From 9f3bf8307320cf80f67e0af707614f0304507731 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 18 Jul 2005 21:28:48 +0000 Subject: 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 --- src/demos/proceduralTexturePhysics/Water.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/demos/proceduralTexturePhysics/Water.java') 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()); } -- cgit v1.2.3