diff options
author | Sven Gothel <[email protected]> | 2013-11-02 16:26:02 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-11-02 16:26:02 +0100 |
commit | 7433e513c1f109f75aa34c224b1f5f14b612cba8 (patch) | |
tree | 550cb4580a25698a66de55e9cafe4a28f896d5e0 /src/jogl/classes/jogamp/opengl/egl/EGLContext.java | |
parent | 3ed74abaddb90cb537897b9928e923be50f7f99f (diff) |
GLContextImpl: Move sharedContextHandle check to makeCurrentWithinLock(..) and let it fail there instead of within impl. class, only pass the handle - simplifies and removes redundancy.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLContext.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index 2eb277f3f..903a4c461 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -155,12 +155,12 @@ public class EGLContext extends GLContextImpl { } @Override - protected boolean createImpl(GLContextImpl shareWith) throws GLException { + protected boolean createImpl(final long shareWithHandle) throws GLException { final EGLGraphicsConfiguration config = (EGLGraphicsConfiguration) drawable.getNativeSurface().getGraphicsConfiguration(); final long eglDisplay = config.getScreen().getDevice().getHandle(); final GLProfile glProfile = drawable.getGLProfile(); final long eglConfig = config.getNativeConfig(); - long shareWithHandle = EGL.EGL_NO_CONTEXT; + // 0 == EGL.EGL_NO_CONTEXT; if ( 0 == eglDisplay ) { throw new GLException("Error: attempted to create an OpenGL context without a display connection"); @@ -180,13 +180,6 @@ public class EGLContext extends GLContextImpl { } } - if (shareWith != null) { - shareWithHandle = shareWith.getHandle(); - if (shareWithHandle == 0) { - throw new GLException("GLContextShareSet returned an invalid OpenGL context"); - } - } - final IntBuffer contextAttrsNIO; final int contextVersionReq, contextVersionAttr; { |