aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-30 02:37:47 +0200
committerSven Gothel <[email protected]>2014-07-30 02:37:47 +0200
commitc8b99d197769eaec53c2def562c0ef3fc0e6a9d2 (patch)
treefed2c6e9c85ef313bbfa02db54e57d56298f0733 /src
parentd55f1061a64f92d702a7f218d2f866fa4d5fa9dc (diff)
GLContext: Don't map compatibility profiles to core profile if the latter are not available (restrict profile aliasing) ; GLProfile does this - Simplification.
GLContext shall not map compatibility profiles to core profile if the latter is are not available (restrict profile aliasing). If a user requests a straight GL3 core profile, don't answer with a compatibility profile, e.g. GL4bc. Hence this patch exposes the true GL profile situation more honestly the the user! User can already query profile mappings via GLProfile, i.e. - GL2GL3, - GL4ES3, or via - getMaximum - getMaxFixedFunc - getMaxProgrammable - getMaxProgrammableCore This also fixes an issue when a user requests 'getMaxProgrammableCore' but would receive a GL4bc profile.
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index ac9e1e53c..34e247cdd 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -925,14 +925,6 @@ public abstract class GLContextImpl extends GLContext {
hasGL4bc = createContextARBMapVersionsAvailable(4, CTX_PROFILE_COMPAT); // GL4bc
success |= hasGL4bc;
if( hasGL4bc ) {
- if( !hasGL4 ) { // last chance .. ignore hw-accel
- GLContext.mapAvailableGLVersion(device, 4, CTX_PROFILE_CORE, ctxVersion.getMajor(), ctxVersion.getMinor(), ctxOptions);
- hasGL4 = true;
- }
- if( !hasGL3 ) { // last chance .. ignore hw-accel
- GLContext.mapAvailableGLVersion(device, 3, CTX_PROFILE_CORE, ctxVersion.getMajor(), ctxVersion.getMinor(), ctxOptions);
- hasGL3 = true;
- }
if( 0 == ( CTX_IMPL_ACCEL_SOFT & ctxOptions ) ) {
// Map hw-accel GL4bc to all lower compatible profiles: GL3bc, GL2
GLContext.mapAvailableGLVersion(device, 3, CTX_PROFILE_COMPAT, ctxVersion.getMajor(), ctxVersion.getMinor(), ctxOptions);
@@ -949,10 +941,6 @@ public abstract class GLContextImpl extends GLContext {
hasGL3bc = createContextARBMapVersionsAvailable(3, CTX_PROFILE_COMPAT); // GL3bc
success |= hasGL3bc;
if( hasGL3bc ) {
- if(!hasGL3) { // last chance .. ignore hw-accel
- GLContext.mapAvailableGLVersion(device, 3, CTX_PROFILE_CORE, ctxVersion.getMajor(), ctxVersion.getMinor(), ctxOptions);
- hasGL3 = true;
- }
if( 0 == ( CTX_IMPL_ACCEL_SOFT & ctxOptions ) ) {
// Map hw-accel GL3bc to all lower compatible profiles: GL2
GLContext.mapAvailableGLVersion(device, 2, CTX_PROFILE_COMPAT, ctxVersion.getMajor(), ctxVersion.getMinor(), ctxOptions);