summaryrefslogtreecommitdiffstats
path: root/src/demos/proceduralTexturePhysics/Water.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-07-18 21:28:48 +0000
committerKenneth Russel <[email protected]>2005-07-18 21:28:48 +0000
commit9f3bf8307320cf80f67e0af707614f0304507731 (patch)
tree117f6338d05a00d4fe8687952e53a913bdab2568 /src/demos/proceduralTexturePhysics/Water.java
parent6f2bdbacf131b05937925fbfe32ac0b603ccbcc6 (diff)
Implemented pbuffer instantiation support in GLDrawableFactory rather
than GLCanvas on Windows. Restructured GLJPanel and jogl-demos to use new APIs. Still needs to be ported to other platforms. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@104 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/proceduralTexturePhysics/Water.java')
-rw-r--r--src/demos/proceduralTexturePhysics/Water.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java
index 46d199a..f15fe37 100644
--- a/src/demos/proceduralTexturePhysics/Water.java
+++ b/src/demos/proceduralTexturePhysics/Water.java
@@ -194,14 +194,17 @@ public class Water {
// create the pbuffer. Will use this as an offscreen rendering buffer.
// it allows rendering a texture larger than our window.
- if (!parentWindow.canCreateOffscreenDrawable()) {
- throw new GLException("Parent window doesn't support creation of pbuffers");
- }
GLCapabilities caps = new GLCapabilities();
caps.setDoubleBuffered(false);
- pbuffer = parentWindow.createOffscreenDrawable(caps,
- initialMapDimensions[0],
- initialMapDimensions[1]);
+ if (!GLDrawableFactory.getFactory().canCreateGLPbuffer(caps,
+ initialMapDimensions[0],
+ initialMapDimensions[1])) {
+ throw new GLException("Pbuffers not supported with this graphics card");
+ }
+ pbuffer = GLDrawableFactory.getFactory().createGLPbuffer(caps,
+ initialMapDimensions[0],
+ initialMapDimensions[1],
+ parentWindow.getContext());
pbuffer.addGLEventListener(new Listener());
}