diff options
author | Sven Gothel <[email protected]> | 2011-07-31 19:25:13 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-07-31 19:25:13 +0200 |
commit | c1c8dcbb0d51e4e2a902db129e5a6991d84c5fc9 (patch) | |
tree | fe6e090ba13d84b276b4141d8d75965d06af26e4 /src/jogl/classes/jogamp | |
parent | a7bd295f0fd5740833a0c2fb55c474d995f65819 (diff) |
JOGL: Add GLBase::isGLES2Compatible()
Indicates whether this GL object is compatible with OpenGL ES2,
i.e. has the extension <code>GL_ARB_ES2_compatibility</code>
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 1d5c6911b..aef90dbe6 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -646,6 +646,9 @@ public abstract class GLContextImpl extends GLContext { } if(0!=_context) { AbstractGraphicsDevice device = drawable.getNativeSurface().getGraphicsConfiguration().getNativeGraphicsConfiguration().getScreen().getDevice(); + if( isExtensionAvailable("GL_ARB_ES2_compatibility") ) { + ctp |= CTX_PROFILE_ES2_COMPAT; + } GLContext.mapAvailableGLVersion(device, reqMajor, reqProfile, major[0], minor[0], ctp); setGLFunctionAvailability(true, major[0], minor[0], ctp); destroyContextARBImpl(_context); @@ -931,8 +934,6 @@ public abstract class GLContextImpl extends GLContext { } } } - - hasNativeES2Methods = isGLES2() || isExtensionAvailable("GL_ARB_ES2_compatibility") ; } /** @@ -940,10 +941,6 @@ public abstract class GLContextImpl extends GLContext { */ protected abstract void updateGLXProcAddressTable(); - protected boolean hasNativeES2Methods = false; - - public final boolean hasNativeES2Methods() { return hasNativeES2Methods; } - /** * Returns true if the specified OpenGL core- or extension-function can be * successfully called using this GL context given the current host (OpenGL |