summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-10-03 20:21:23 +0200
committerSven Gothel <[email protected]>2013-10-03 20:21:23 +0200
commitcdf38b01fc4b632554c6400239ca5cdca1fe13d9 (patch)
tree91d04cc61e67c465b641b0f0074fed9ee2090fc8
parentb05ccd62d28bcdc320fd35094f2d278b16743eab (diff)
Bug 818: Enable new quirk GLSLNonCompliant on OSX < 10.7 w/ NV GPU; GLJPanel: Don't use GLSL flip if quirk GLSLNonCompliant is present.
-rw-r--r--make/scripts/tests.sh4
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java13
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java11
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java22
4 files changed, 38 insertions, 12 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index d4e367759..f49ae4a42 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -296,7 +296,7 @@ function testawtswt() {
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestOlympicES1NEWT $*
#testnoawt com.jogamp.opengl.test.junit.jogl.demos.es1.newt.TestRedSquareES1NEWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT $*
-#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $*
+testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelsAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NewtCanvasAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestLandscapeES2NewtCanvasAWT $*
@@ -454,7 +454,7 @@ function testawtswt() {
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestPBufferDeadlockAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.TestShutdownCompleteAWT $*
#testawt com.jogamp.opengl.test.junit.jogl.acore.x11.TestGLXCallsOnAWT $*
-testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos01AWT $*
+#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos01AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos02AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug816OSXCALayerPos03AWT $*
#testawt com.jogamp.opengl.test.junit.jogl.awt.TestBug675BeansInDesignTimeAWT $*
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index 023a8a1aa..6ef1e0805 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -181,15 +181,22 @@ public class GLRendererQuirks {
*/
public static final int NoFullFBOSupport = 11;
-
+ /**
+ * GLSL is not compliant or even not stable (crash)
+ * <ul>
+ * <li>OSX < 10.7.0 (?) - NVidia Driver. Bug 818 @ https://jogamp.org/bugzilla/.</li>
+ * </ul>
+ */
+ public static final int GLSLNonCompliant = 12;
+
/** Number of quirks known. */
- public static final int COUNT = 12;
+ public static final int COUNT = 13;
private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval",
"NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard",
"GLNonCompliant", "GLFlushBeforeRelease", "DontCloseX11Display",
"NeedCurrCtx4ARBPixFmtQueries", "NeedCurrCtx4ARBCreateContext",
- "NoFullFBOSupport"
+ "NoFullFBOSupport", "GLSLNonCompliant"
};
private final int _bitmask;
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index dae631f2a..fb39143b4 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -93,6 +93,7 @@ import com.jogamp.common.util.awt.AWTEDTExecutor;
import com.jogamp.nativewindow.awt.AWTPrintLifecycle;
import com.jogamp.nativewindow.awt.AWTWindowClosingProtocol;
import com.jogamp.opengl.FBObject;
+import com.jogamp.opengl.GLRendererQuirks;
import com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes;
import com.jogamp.opengl.util.GLPixelBuffer.SingletonGLPixelBufferProvider;
import com.jogamp.opengl.util.GLDrawableUtil;
@@ -1296,7 +1297,15 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
flipVertical = offscreenDrawable.isGLOriented();
final GLCapabilitiesImmutable chosenCaps = offscreenDrawable.getChosenGLCapabilities();
offscreenIsFBO = chosenCaps.isFBO();
- if( USE_GLSL_TEXTURE_RASTERIZER && offscreenIsFBO && flipVertical && gl.isGL2ES2() ) {
+ final boolean glslCompliant = !offscreenContext.hasRendererQuirk(GLRendererQuirks.GLSLNonCompliant);
+ final boolean useGLSLFlip = flipVertical && offscreenIsFBO && gl.isGL2ES2() && USE_GLSL_TEXTURE_RASTERIZER && glslCompliant;
+ if( DEBUG ) {
+ System.err.println(getThreadName()+": OffscreenBackend.initialize: useGLSLFlip "+useGLSLFlip+
+ " [flip "+flipVertical+", isFBO "+offscreenIsFBO+", isGL2ES2 "+gl.isGL2ES2()+
+ ", noglsl "+!USE_GLSL_TEXTURE_RASTERIZER+", glslNonCompliant "+!glslCompliant+
+ ", isGL2ES2 " + gl.isGL2ES2()+"]");
+ }
+ if( useGLSLFlip ) {
final boolean _autoSwapBufferMode = helper.getAutoSwapBufferMode();
helper.setAutoSwapBufferMode(false);
final GLFBODrawable fboDrawable = (GLFBODrawable) offscreenDrawable;
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 ) {
//