From d55f1061a64f92d702a7f218d2f866fa4d5fa9dc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 29 Jul 2014 22:55:56 +0200 Subject: Bug 1038 - Allow skipping detection of certain GLProfiles: Skip native core profiles via property 'jogl.disable.openglcore' Also moved all GL profile properties to GLProfile class and made them public for better documentation. --- .../javax/media/opengl/GLDrawableFactory.java | 19 +---------------- src/jogl/classes/javax/media/opengl/GLProfile.java | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 18 deletions(-) (limited to 'src/jogl/classes/javax/media') diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index c11195c58..71568ee76 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -98,23 +98,6 @@ public abstract class GLDrawableFactory { protected static final boolean DEBUG = Debug.debug("GLDrawable"); - /** - * We have to disable support for ANGLE, the D3D ES2 emulation on Windows provided w/ Firefox and Chrome. - * When run in the mentioned browsers, the eglInitialize(..) implementation crashes. - *

- * This can be overridden by explicitly enabling ANGLE on Windows by setting the property - * jogl.enable.ANGLE. - *

- */ - protected 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. - */ - protected static final boolean disableOpenGLES = Debug.isPropertyDefined("jogl.disable.opengles", true); - private static volatile boolean isInit = false; private static GLDrawableFactory eglFactory; private static GLDrawableFactory nativeOSFactory; @@ -179,7 +162,7 @@ public abstract class GLDrawableFactory { } tmp = null; - if(!disableOpenGLES) { + if(!GLProfile.disableOpenGLES) { try { tmp = (GLDrawableFactory) ReflectionUtil.createInstance("jogamp.opengl.egl.EGLDrawableFactory", cl); } catch (final Exception jre) { diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index 5c70ec675..dec5bc821 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -77,6 +77,30 @@ public class GLProfile { public static final boolean DEBUG = Debug.debug("GLProfile"); + /** + * In case no OpenGL ES profiles are required + * and if the running platform may have a buggy implementation, + * setting the property jogl.disable.opengles disables querying possible existing OpenGL ES profiles. + */ + public static final boolean disableOpenGLES = Debug.isPropertyDefined("jogl.disable.opengles", true); + + /** + * In case no native OpenGL core profiles are required + * and if the running platform may have a buggy implementation, + * setting the property jogl.disable.openglcore disables querying possible existing native OpenGL core profiles. + */ + public static final boolean disableOpenGLCore = Debug.isPropertyDefined("jogl.disable.openglcore", true); + + /** + * We have to disable support for ANGLE, the D3D ES2 emulation on Windows provided w/ Firefox and Chrome. + * When run in the mentioned browsers, the eglInitialize(..) implementation crashes. + *

+ * This can be overridden by explicitly enabling ANGLE on Windows by setting the property + * jogl.enable.ANGLE. + *

+ */ + public static final boolean enableANGLE = Debug.isPropertyDefined("jogl.enable.ANGLE", true); + static { // Also initializes TempJarCache if shall be used. Platform.initSingleton(); -- cgit v1.2.3