From cdf38b01fc4b632554c6400239ca5cdca1fe13d9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 3 Oct 2013 20:21:23 +0200 Subject: Bug 818: Enable new quirk GLSLNonCompliant on OSX < 10.7 w/ NV GPU; GLJPanel: Don't use GLSL flip if quirk GLSLNonCompliant is present. --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 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 deb80fe7e..7f9f20a21 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1604,13 +1604,23 @@ public abstract class GLContextImpl extends GLContext { quirks[i++] = quirk; } - final VersionNumber osxVersionNVFlushClean = new VersionNumber(10,7,3); // < OSX 10.7.3 w/ NV needs glFlush - if( Platform.getOSVersionNumber().compareTo(osxVersionNVFlushClean) < 0 && isDriverNVIDIAGeForce ) { - final int quirk = GLRendererQuirks.GLFlushBeforeRelease; - if(DEBUG) { - System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", OS Version "+Platform.getOSVersionNumber()+", Renderer "+glRenderer); + if( isDriverNVIDIAGeForce ) { + final VersionNumber osxVersionNVFlushClean = new VersionNumber(10,7,3); // < OSX 10.7.3 w/ NV needs glFlush + if( Platform.getOSVersionNumber().compareTo(osxVersionNVFlushClean) < 0 ) { + final int quirk = GLRendererQuirks.GLFlushBeforeRelease; + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", OS Version "+Platform.getOSVersionNumber()+", Renderer "+glRenderer); + } + quirks[i++] = quirk; + } + final VersionNumber osxVersionNVGLSLGood = new VersionNumber(10,7,0); // < OSX 10.7.0 w/ NV has instable GLSL + if( Platform.getOSVersionNumber().compareTo(osxVersionNVGLSLGood) < 0 ) { + final int quirk = GLRendererQuirks.GLSLNonCompliant; + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", OS Version "+Platform.getOSVersionNumber()+", Renderer "+glRenderer); + } + quirks[i++] = quirk; } - quirks[i++] = quirk; } } else if( Platform.getOSType() == Platform.OSType.WINDOWS ) { // -- cgit v1.2.3