diff options
author | Sven Gothel <[email protected]> | 2011-02-05 02:39:25 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-02-05 02:39:25 +0100 |
commit | 5d18d6b57f7d9d92a9f568e20beb64a6d44de25a (patch) | |
tree | d157eda355bdf27784efd52ac90a2a4c90640e4c /src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java | |
parent | 6dd574f75e0b27de31136c05cc0ed18f075f004f (diff) |
Fix bug #461 on NV/Win (caps selection)
Allows TestBug461OffscreenSupersamplingSwingAWT to pass on NV/Win7.
Root cause was using the requested unfixed caps (onscreen, !pbuffer)
instead of the fixed ones.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java index 53d42259a..529b32f2c 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java @@ -113,6 +113,7 @@ public class GLGraphicsConfigurationUtil { } return capsRequested; } + public static GLCapabilitiesImmutable fixOffScreenGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean pbufferAvailable) { if( capsRequested.getDoubleBuffered() || @@ -130,4 +131,17 @@ public class GLGraphicsConfigurationUtil { } return capsRequested; } + + public static GLCapabilitiesImmutable fixGLPBufferGLCapabilities(GLCapabilitiesImmutable capsRequested) + { + if( capsRequested.getDoubleBuffered() || capsRequested.isOnscreen() || !capsRequested.isPBuffer()) { + // fix caps .. + GLCapabilities caps2 = (GLCapabilities) capsRequested.cloneMutable(); + caps2.setDoubleBuffered(false); // FIXME DBLBUFOFFSCRN + caps2.setPBuffer(true); + return caps2; + } + return capsRequested; + } + } |