summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLContextImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 6866374bc..84c62b95d 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -2442,10 +2442,13 @@ public abstract class GLContextImpl extends GLContext {
GLRendererQuirks.pushStickyDeviceQuirks(factoryDefaultDevice, quirks);
}
if( isES ) {
- final AbstractGraphicsDevice eglFactoryDefaultDevice = GLDrawableFactory.getEGLFactory().getDefaultDevice();
- if( !GLRendererQuirks.areSameStickyDevice(eglFactoryDefaultDevice, adevice) &&
- !GLRendererQuirks.areSameStickyDevice(eglFactoryDefaultDevice, factoryDefaultDevice) ) {
- GLRendererQuirks.pushStickyDeviceQuirks(eglFactoryDefaultDevice, quirks);
+ final GLDrawableFactory mobileFactory = GLDrawableFactory.getFactory(true);
+ if( null != factory ) {
+ final AbstractGraphicsDevice esFactoryDefaultDevice = mobileFactory.getDefaultDevice();
+ if( !GLRendererQuirks.areSameStickyDevice(esFactoryDefaultDevice, adevice) &&
+ !GLRendererQuirks.areSameStickyDevice(esFactoryDefaultDevice, factoryDefaultDevice) ) {
+ GLRendererQuirks.pushStickyDeviceQuirks(esFactoryDefaultDevice, quirks);
+ }
}
}
}