aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-25 03:35:24 +0200
committerSven Gothel <[email protected]>2013-10-25 03:35:24 +0200
commited47ed58374fe57e2d1db9b2d0af6e29595016dd (patch)
tree5a3d32a9c89cc407685c9523566c5d2e9b76c7f2
parent472dae2dd6bafcd1d867b090369c359417db0d8d (diff)
Fix regression of commit 34b35c5a0a379a6b4c0b23b9d347a0b1338f0239 - GLContextImpl.createContextARBVersions(..) erroneous upper bounds check.
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 8542a799a..dff55488d 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1048,10 +1048,13 @@ public abstract class GLContextImpl extends GLContext {
major[0]=majorMax;
minor[0]=minorMax;
long _context=0;
+ int i=0;
do {
if (DEBUG) {
- System.err.println(getThreadName() + ": createContextARBVersions: share "+share+", direct "+direct+", version "+major[0]+"."+minor[0]);
+ i++;
+ System.err.println(getThreadName() + ": createContextARBVersions."+i+": share "+share+", direct "+direct+
+ ", version "+major[0]+"."+minor[0]+", major["+majorMin+".."+majorMax+"], minor["+minorMin+".."+minorMax+"]");
}
_context = createContextARBImpl(share, direct, ctxOptionFlags, major[0], minor[0]);
@@ -1064,8 +1067,13 @@ public abstract class GLContextImpl extends GLContext {
}
}
- } while ( ( major[0]>majorMin || major[0]==majorMin && minor[0] >=minorMin ) &&
- GLContext.decrementGLVersion(ctxOptionFlags, major, minor) );
+ } while ( ( major[0]>majorMin || major[0]==majorMin && minor[0] >minorMin ) && // #1 check whether version is above lower limit
+ GLContext.decrementGLVersion(ctxOptionFlags, major, minor) // #2 decrement version
+ );
+ if (DEBUG) {
+ System.err.println(getThreadName() + ": createContextARBVersions.X: ctx "+toHexString(_context)+", share "+share+", direct "+direct+
+ ", version "+major[0]+"."+minor[0]+", major["+majorMin+".."+majorMax+"], minor["+minorMin+".."+minorMax+"]");
+ }
return _context;
}