diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java index 84bd705db..babea4240 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java @@ -36,40 +36,20 @@ package jogamp.opengl.egl; import javax.media.opengl.*; + import jogamp.opengl.*; + import javax.media.nativewindow.*; public class EGLExternalContext extends EGLContext { - private GLContext lastContext; - public EGLExternalContext(AbstractGraphicsScreen screen) { + public EGLExternalContext(final AbstractGraphicsScreen screen) { super(null, null); GLContextShareSet.contextCreated(this); - setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_ES); - getGLStateTracker().setEnabled(false); // external context usage can't track state in Java - } - - @Override - public int makeCurrent() throws GLException { - // Save last context if necessary to allow external GLContexts to - // talk to other GLContexts created by this library - GLContext cur = getCurrent(); - if (cur != null && cur != this) { - lastContext = cur; - setCurrent(null); + if( !setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_ES, false /* strictMatch */, false /* withinGLVersionsMapping */) ) { // use GL_VERSION + throw new InternalError("setGLFunctionAvailability !strictMatch failed"); } - return super.makeCurrent(); - } - - @Override - public void release() throws GLException { - super.release(); - setCurrent(lastContext); - lastContext = null; - } - - @Override - protected void makeCurrentImpl() throws GLException { + getGLStateTracker().setEnabled(false); // external context usage can't track state in Java } @Override |