diff options
author | Sven Gothel <[email protected]> | 2011-04-25 10:20:41 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-04-25 10:20:41 +0200 |
commit | 83f79535ff424cc31411c156ec4706ddd5bf0dd2 (patch) | |
tree | 4e71412c90ec9f51a471cf46d9817658554017cb /src | |
parent | 6cc35a9171db43f6c7551cc1c89202c08c88eae9 (diff) |
GLContextImpl.createContextARB(..): Use impl. GLProfile to determine requested context
.. this fixes the bug where [GL2ES2/GL4bc] didn't fetch GL4bc, but a GL2 old context.
Diffstat (limited to 'src')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index ee2686fd4..6128b30b4 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -542,6 +542,7 @@ public abstract class GLContextImpl extends GLContext { AbstractGraphicsDevice device = config.getScreen().getDevice(); GLCapabilitiesImmutable glCaps = (GLCapabilitiesImmutable) config.getChosenCapabilities(); GLProfile glp = glCaps.getGLProfile(); + GLProfile glpImpl = GLProfile.get(glp.getImplName()); if (DEBUG) { System.err.println(getThreadName() + ": !!! createContextARB: mappedVersionsAvailableSet("+device.getConnection()+"): "+ @@ -553,15 +554,15 @@ public abstract class GLContextImpl extends GLContext { } int reqMajor; - if(glp.isGL4()) { + if(glpImpl.isGL4()) { reqMajor=4; - } else if (glp.isGL3()) { + } else if (glpImpl.isGL3()) { reqMajor=3; - } else /* if (glp.isGL2()) */ { + } else /* if (glpImpl.isGL2()) */ { reqMajor=2; } - boolean compat = glp.isGL2(); // incl GL3bc and GL4bc + boolean compat = glpImpl.isGL2(); // incl GL3bc and GL4bc int _major[] = { 0 }; int _minor[] = { 0 }; int _ctp[] = { 0 }; @@ -580,10 +581,10 @@ public abstract class GLContextImpl extends GLContext { private final void mapGLVersions(AbstractGraphicsDevice device) { synchronized (GLContext.deviceVersionAvailable) { - createContextARBMapVersionsAvailable(4, false /* core */); // GL4 createContextARBMapVersionsAvailable(4, true /* compat */); // GL4bc - createContextARBMapVersionsAvailable(3, false /* core */); // GL3 + createContextARBMapVersionsAvailable(4, false /* core */); // GL4 createContextARBMapVersionsAvailable(3, true /* compat */); // GL3bc + createContextARBMapVersionsAvailable(3, false /* core */); // GL3 createContextARBMapVersionsAvailable(2, true /* compat */); // GL2 GLContext.setAvailableGLVersionsSet(device); } |