aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java2
-rw-r--r--src/jogl/classes/jogamp/opengl/GLDrawableImpl.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java31
3 files changed, 24 insertions, 13 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
index 9aa6ce3cc..2bb22f7b0 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableFactoryImpl.java
@@ -74,7 +74,7 @@ import com.jogamp.opengl.GLRendererQuirks;
they may be instantiated by the GLJPanel implementation. */
@SuppressWarnings("deprecation")
public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
- protected static final boolean DEBUG = GLDrawableImpl.DEBUG;
+ protected static final boolean DEBUG = GLDrawableFactory.DEBUG; // allow package access
protected GLDrawableFactoryImpl() {
super();
diff --git a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
index 13960ecdd..df7f742aa 100644
--- a/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLDrawableImpl.java
@@ -52,8 +52,8 @@ import javax.media.opengl.GLException;
import javax.media.opengl.GLProfile;
public abstract class GLDrawableImpl implements GLDrawable {
- protected static final boolean DEBUG = Debug.debug("GLDrawable");
-
+ protected static final boolean DEBUG = GLDrawableFactoryImpl.DEBUG;
+
protected GLDrawableImpl(GLDrawableFactory factory, NativeSurface comp, boolean realized) {
this(factory, comp, (GLCapabilitiesImmutable) comp.getGraphicsConfiguration().getRequestedCapabilities(), realized);
}
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
index da3907193..e985e63b2 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java
@@ -81,13 +81,12 @@ import com.jogamp.nativewindow.egl.EGLGraphicsDevice;
import com.jogamp.opengl.GLRendererQuirks;
public class EGLDrawableFactory extends GLDrawableFactoryImpl {
- protected static final boolean DEBUG = GLDrawableFactoryImpl.DEBUG;
+ protected static final boolean DEBUG = GLDrawableFactoryImpl.DEBUG; // allow package access
/* package */ static final boolean QUERY_EGL_ES_NATIVE_TK = Debug.isPropertyDefined("jogl.debug.EGLDrawableFactory.QueryNativeTK", true);
private static GLDynamicLookupHelper eglES1DynamicLookupHelper = null;
private static GLDynamicLookupHelper eglES2DynamicLookupHelper = null;
- private static boolean isANGLE = false;
private static final boolean isANGLE(GLDynamicLookupHelper dl) {
if(Platform.OSType.WINDOWS == Platform.OS_TYPE) {
@@ -135,10 +134,10 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
EGL.resetProcAddressTable(eglES1DynamicLookupHelper);
final boolean isANGLEES1 = isANGLE(eglES1DynamicLookupHelper);
isANGLE |= isANGLEES1;
- if (GLProfile.DEBUG) {
+ if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: EGLDrawableFactory: EGL ES1 - OK, isANGLE: "+isANGLEES1);
}
- } else if (GLProfile.DEBUG) {
+ } else if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: EGLDrawableFactory: EGL ES1 - NOPE");
}
}
@@ -156,17 +155,28 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
EGL.resetProcAddressTable(eglES2DynamicLookupHelper);
final boolean isANGLEES2 = isANGLE(eglES2DynamicLookupHelper);
isANGLE |= isANGLEES2;
- if (GLProfile.DEBUG) {
+ if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: EGLDrawableFactory: EGL ES2 - OK, isANGLE: "+isANGLEES2);
}
- } else if (GLProfile.DEBUG) {
+ } else if (DEBUG || GLProfile.DEBUG) {
System.err.println("Info: EGLDrawableFactory: EGL ES2 - NOPE");
}
}
- if(null != eglES2DynamicLookupHelper || null != eglES1DynamicLookupHelper) {
- sharedMap = new HashMap<String /*uniqueKey*/, SharedResource>();
- sharedMapCreateAttempt = new HashSet<String>();
- defaultDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
+ if( null != eglES2DynamicLookupHelper || null != eglES1DynamicLookupHelper ) {
+ if(isANGLE && !enableANGLE) {
+ if(DEBUG || GLProfile.DEBUG) {
+ System.err.println("Info: EGLDrawableFactory.init - EGL/ES2 ANGLE disabled");
+ }
+ } else {
+ if( isANGLE && ( DEBUG || GLProfile.DEBUG ) ) {
+ System.err.println("Info: EGLDrawableFactory.init - EGL/ES2 ANGLE enabled");
+ }
+ sharedMap = new HashMap<String /*uniqueKey*/, SharedResource>();
+ sharedMapCreateAttempt = new HashSet<String>();
+
+ // FIXME: Following triggers eglInitialize(..) which crashed on Windows w/ Chrome/Angle, FF/Angle!
+ defaultDevice = EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGL.EGL_DEFAULT_DISPLAY, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT);
+ }
}
}
}
@@ -239,6 +249,7 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl {
private HashSet<String> sharedMapCreateAttempt = null;
private EGLGraphicsDevice defaultDevice = null;
private SharedResource defaultSharedResource = null;
+ private boolean isANGLE = false;
static class SharedResource {
private final EGLGraphicsDevice device;