From ed47ed58374fe57e2d1db9b2d0af6e29595016dd Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 25 Oct 2013 03:35:24 +0200 Subject: Fix regression of commit 34b35c5a0a379a6b4c0b23b9d347a0b1338f0239 - GLContextImpl.createContextARBVersions(..) erroneous upper bounds check. --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java') 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; } -- cgit v1.2.3