From 654615cdb56fc28b8f215cbc248479b58025e579 Mon Sep 17 00:00:00 2001 From: Kenneth Russel <kbrussel@alum.mit.edu> Date: Sun, 25 Sep 2005 23:36:12 +0000 Subject: Changed GLDrawableFactory.canCreateGLPbuffer(GLCapabilities, int, int) to take no arguments because in general it is not possible to answer that question without actually attempting to create the pbuffer. Instead this method is now a simple capability check of whether the current graphics card supports pbuffers. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/branches/JSR-231@136 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/hdr/HDR.java | 4 ++-- src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java | 2 +- src/demos/proceduralTexturePhysics/Water.java | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/demos/hdr/HDR.java b/src/demos/hdr/HDR.java index ea2cfc5..5cdf56b 100755 --- a/src/demos/hdr/HDR.java +++ b/src/demos/hdr/HDR.java @@ -281,8 +281,8 @@ public class HDR extends Demo { caps.setAlphaBits(floatAlphaBits); caps.setDepthBits(floatDepthBits); int[] tmp = new int[1]; - if (!GLDrawableFactory.getFactory().canCreateGLPbuffer(caps, pbuffer_w, pbuffer_h)) { - unavailableExtension("Can not create pbuffer of size (" + pbuffer_w + ", " + pbuffer_h + ")"); + if (!GLDrawableFactory.getFactory().canCreateGLPbuffer()) { + unavailableExtension("Can not create pbuffer"); } if (pbuffer != null) { pbuffer.destroy(); diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java index a1d6721..69dd3db 100644 --- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java +++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java @@ -248,7 +248,7 @@ public class HWShadowmapsSimple extends Demo { GLCapabilities caps = new GLCapabilities(); caps.setDoubleBuffered(false); - if (!GLDrawableFactory.getFactory().canCreateGLPbuffer(caps, TEX_SIZE, TEX_SIZE)) { + if (!GLDrawableFactory.getFactory().canCreateGLPbuffer()) { unavailableExtension("Can not create pbuffer"); } if (pbuffer != null) { diff --git a/src/demos/proceduralTexturePhysics/Water.java b/src/demos/proceduralTexturePhysics/Water.java index 404d012..701a10f 100644 --- a/src/demos/proceduralTexturePhysics/Water.java +++ b/src/demos/proceduralTexturePhysics/Water.java @@ -201,9 +201,7 @@ public class Water { // it allows rendering a texture larger than our window. GLCapabilities caps = new GLCapabilities(); caps.setDoubleBuffered(false); - if (!GLDrawableFactory.getFactory().canCreateGLPbuffer(caps, - initialMapDimensions[0], - initialMapDimensions[1])) { + if (!GLDrawableFactory.getFactory().canCreateGLPbuffer()) { throw new GLException("Pbuffers not supported with this graphics card"); } pbuffer = GLDrawableFactory.getFactory().createGLPbuffer(caps, -- cgit v1.2.3