aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-04-18 19:14:35 +0200
committerSven Gothel <[email protected]>2013-04-18 19:14:35 +0200
commit0a7cd9c58537d80131dbebf102f1f639ca0eb334 (patch)
treedb9305071c9f9f029d05145e40cef5c7c72eeae2 /src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
parent0a9ecf74540659a3258ea71d3355eeb45697db96 (diff)
Bug 718: WindowsBitmapWGLDrawable: Requires GLProfile.GL2, fix BITMAP GLCaps ASAP at Ctor instead of setRealized(true); WindowsWGLContext: Exclude ARB creation for BITMAP
Unit Test TestGLAutoDrawableFactoryGLnBitmapCapsNEWT added using BITMAP on GLProfile.getDefault() Also: X11GLXContext, WindowsWGLContext: Cleanup formatting in createImpl(..)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
index 654d286d3..48b509263 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
@@ -33,6 +33,7 @@ import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLCapabilitiesImmutable;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLDrawableFactory;
+import javax.media.opengl.GLProfile;
import com.jogamp.opengl.GLRendererQuirks;
@@ -317,4 +318,14 @@ public class GLGraphicsConfigurationUtil {
}
return compOut;
}
+
+ public static GLCapabilitiesImmutable fixGLProfile(GLCapabilitiesImmutable caps, GLProfile glp)
+ {
+ if( caps.getGLProfile() != glp ) {
+ final GLCapabilities caps2 = (GLCapabilities) caps.cloneMutable();
+ caps2.setGLProfile(glp);
+ return caps2;
+ }
+ return caps;
+ }
}