From 93ab5e38ed59d6df101886ac8a2207955b0cea7f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 25 Jul 2012 04:25:32 +0200 Subject: Add property: 'jogl.disable.opengles' to disable querying and using OpenGL ES This might be required by a few older buggy ES implementations. Also assists to discable ANGLE is not properly detected (?) on Windows 32bit - the latter causes SEGV within FF and Chrome. TODO: Fix ANGLE detection and usage within broser NOTE: ANGLE works fine standalone .. --- src/jogl/classes/javax/media/opengl/GLProfile.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index 73d13a387..1e10dc9a6 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -86,7 +86,14 @@ public class GLProfile { *

*/ private static final boolean enableANGLE = Debug.isPropertyDefined("jogl.enable.ANGLE", true); - + + /** + * In case no OpenGL ES implementation is required + * and if the running platform may have a buggy implementation, + * setting the property jogl.disable.opengles disables querying a possible existing OpenGL ES implementation. + */ + private static final boolean disableOpenGLES = Debug.isPropertyDefined("jogl.disable.opengles", true); + static { // Also initializes TempJarCache if shall be used. Platform.initSingleton(); @@ -1475,7 +1482,7 @@ public class GLProfile { } } - if ( ReflectionUtil.isClassAvailable("jogamp.opengl.egl.EGLDrawableFactory", classloader) ) { + if ( !disableOpenGLES && ReflectionUtil.isClassAvailable("jogamp.opengl.egl.EGLDrawableFactory", classloader) ) { t=null; try { eglFactory = (GLDrawableFactoryImpl) GLDrawableFactory.getFactoryImpl(GLES2); -- cgit v1.2.3