diff options
author | Sven Gothel <[email protected]> | 2012-07-05 14:57:18 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-07-05 14:57:18 +0200 |
commit | d5866a5d55f9445c7cedc1df03dc7958d6fd229e (patch) | |
tree | ee3322121592bda1cea2eb0523b8992604263e7d /src/jogl/classes/jogamp/opengl/egl | |
parent | a26d6e9361fb3287cba053aaf1a6318c853da95a (diff) |
GLContext adds FBO availability to profile mapping; Fix GL[Auto]Drawable/GLContext re-association (switch) incl. unit test.
- GLContext adds FBO availability to profile mapping
- GLContext added 'GLDrawable setGLDrawable(GLDrawable readWrite, boolean setWriteOnly)'
allowing to set the write GLDrawable. This method enables switching context/drawable.
Fix GL[Auto]Drawable/GLContext re-association (switch) incl. unit test
Commit eed8508ae1132e5f45f788e9cb3f3d5a1050ac70 impl. of GLAutoDrawable's setContext(..)
enabled proper setting of the GLAutoDrawable context incl. updating the context's drawables.
Test covers:
- remove/set (GLContext, GLEventListener) of GL[Auto]Drawable
- switch (GLContext, GLEventListener) of 2 GLAutoDrawables
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLContext.java | 10 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java | 2 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index 06cd550b4..65a4c3ece 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -224,15 +224,7 @@ public abstract class EGLContext extends GLContextImpl { throw new GLException("Error making context 0x" + Long.toHexString(contextHandle) + " current: error code " + EGL.eglGetError()); } - int ctp = CTX_PROFILE_ES; - int major; - if(glProfile.usesNativeGLES2()) { - ctp |= CTX_IMPL_ES2_COMPAT; - major = 2; - } else { - major = 1; - } - setGLFunctionAvailability(true, major, 0, ctp); + setGLFunctionAvailability(true, glProfile.usesNativeGLES2() ? 2 : 1, 0, CTX_PROFILE_ES); return true; } diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java index 0a451e5eb..585638d21 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLExternalContext.java @@ -45,7 +45,7 @@ public class EGLExternalContext extends EGLContext { public EGLExternalContext(AbstractGraphicsScreen screen) { super(null, null); GLContextShareSet.contextCreated(this); - setGLFunctionAvailability(false, 0, 0, CTX_IS_ARB_CREATED|CTX_PROFILE_ES); + setGLFunctionAvailability(false, 0, 0, CTX_PROFILE_ES); getGLStateTracker().setEnabled(false); // external context usage can't track state in Java } |