summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-08-29 17:11:11 +0200
committerSven Gothel <[email protected]>2015-08-29 17:11:11 +0200
commitb8ba30a0bc7cbd36abba37d72b45f78eb989e994 (patch)
tree62b617231580b6d3bc81716d3a67cd0d6fef1db5 /src/jogl/classes/jogamp/opengl/egl/EGLContext.java
parent50d4fd0210a417ba0fcbf73a90e50a86ef076cad (diff)
Bug 1203: Cleanup and Prepare for regular EGL Profile probing
- GLContextImpl - add 'MappedGLVersion' type, preserving information from GL profile mapping - add 'MappedGLVersion mapAvailableGLVersion(..)' - add 'setMappedGLVersionListener(final MappedGLVersionListener mvl)', allowing implementations to register successfully mapped profiled. - add 'void remapAvailableGLVersions(final AbstractGraphicsDevice fromDevice, final AbstractGraphicsDevice toDevice)', allowing implementations to fully map one-devices profiles to another one avoiding a redundant profile mapping (probe operation). - 'mapGLVersions(..)' - disable desktop-core profile mapping if GLProfile.disableOpenGLDesktop - disable desktop-desktop profile mapping if GLProfile.disableOpenGLDesktop - EGLDrawableFactory - remove jogl.debug.EGLDrawableFactory.QueryNativeTK, since it shall not be used anymore. - Use 'NativeWindowFactory.getDefaultDisplayConnection(..)' for default EGLGraphicsDevcie - add 'hasFullOpenGLAPISupport()' - Use 'EGLSurface' return type if appropriate.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLContext.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
index 3c1175420..eba8b1df3 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java
@@ -49,6 +49,7 @@ import com.jogamp.opengl.GLProfile;
import jogamp.opengl.GLContextImpl;
import jogamp.opengl.GLDrawableImpl;
+import jogamp.opengl.GLDynamicLookupHelper;
import jogamp.opengl.egl.EGLExtImpl;
import jogamp.opengl.egl.EGLExtProcAddressTable;
@@ -167,9 +168,8 @@ public class EGLContext extends GLContextImpl {
final long eglConfig = config.getNativeConfig();
final EGLDrawableFactory factory = (EGLDrawableFactory) drawable.getFactoryImpl();
- final boolean hasOpenGLAPISupport = factory.hasOpenGLAPISupport();
+ final boolean hasFullOpenGLAPISupport = factory.hasFullOpenGLAPISupport();
final boolean useKHRCreateContext = factory.hasDefaultDeviceKHRCreateContext();
- final boolean allowOpenGLAPI = hasOpenGLAPISupport && useKHRCreateContext;
final boolean ctDesktopGL = 0 == ( GLContext.CTX_PROFILE_ES & ctp );
final boolean ctBwdCompat = 0 != ( CTX_PROFILE_COMPAT & ctp ) ;
final boolean ctFwdCompat = 0 != ( CTX_OPTION_FORWARD & ctp ) ;
@@ -177,9 +177,9 @@ public class EGLContext extends GLContextImpl {
if(DEBUG) {
System.err.println(getThreadName() + ": EGLContext.createContextARBImpl: Start "+getGLVersion(reqMajor, reqMinor, ctp, "@creation")
- + ", hasOpenGLAPISupport "+hasOpenGLAPISupport
+ + ", OpenGL API Support "+factory.hasOpenGLAPISupport()
+ ", useKHRCreateContext "+useKHRCreateContext
- + ", allowOpenGLAPI "+allowOpenGLAPI
+ + ", Full OpenGL API Support "+hasFullOpenGLAPISupport
+ ", device "+device);
}
if ( 0 == eglDisplay ) {
@@ -202,8 +202,7 @@ public class EGLContext extends GLContextImpl {
* hence it must be switched before makeCurrent w/ different APIs, see:
* eglWaitClient();
*/
- if( ctDesktopGL && !allowOpenGLAPI ) {
- // if( ctDesktopGL && !hasOpenGLAPISupport ) {
+ if( ctDesktopGL && !hasFullOpenGLAPISupport ) {
if(DEBUG) {
System.err.println(getThreadName() + ": EGLContext.createContextARBImpl: DesktopGL not avail "+getGLVersion(reqMajor, reqMinor, ctp, "@creation"));
}
@@ -211,7 +210,7 @@ public class EGLContext extends GLContextImpl {
}
try {
- if( allowOpenGLAPI && device.getEGLVersion().compareTo(Version1_2) >= 0 ) {
+ if( hasFullOpenGLAPISupport && device.getEGLVersion().compareTo(Version1_2) >= 0 ) {
EGL.eglWaitClient(); // EGL >= 1.2
}
if( !EGL.eglBindAPI( ctDesktopGL ? EGL.EGL_OPENGL_API : EGL.EGL_OPENGL_ES_API) ) {