aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-05 02:39:25 +0100
committerSven Gothel <[email protected]>2011-02-05 02:39:25 +0100
commit5d18d6b57f7d9d92a9f568e20beb64a6d44de25a (patch)
treed157eda355bdf27784efd52ac90a2a4c90640e4c /src/jogl/classes/com/jogamp/opengl/impl/GLGraphicsConfigurationUtil.java
parent6dd574f75e0b27de31136c05cc0ed18f075f004f (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.java14
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;
+ }
+
}