diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java | 11 |
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; + } } |