diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/egl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLContext.java | 5 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java | 38 |
2 files changed, 30 insertions, 13 deletions
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index f0040f989..1910fbe72 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -168,7 +168,7 @@ public class EGLContext extends GLContextImpl { final long eglConfig = config.getNativeConfig(); final EGLDrawableFactory factory = (EGLDrawableFactory) drawable.getFactoryImpl(); - final boolean hasFullOpenGLAPISupport = factory.hasFullOpenGLAPISupport(); + final boolean hasFullOpenGLAPISupport = factory.hasOpenGLDesktopSupport(); final boolean useKHRCreateContext = factory.hasDefaultDeviceKHRCreateContext(); final boolean ctDesktopGL = 0 == ( GLContext.CTX_PROFILE_ES & ctp ); final boolean ctBwdCompat = 0 != ( CTX_PROFILE_COMPAT & ctp ) ; @@ -177,9 +177,8 @@ public class EGLContext extends GLContextImpl { if(DEBUG) { System.err.println(getThreadName() + ": EGLContext.createContextARBImpl: Start "+getGLVersion(reqMajor, reqMinor, ctp, "@creation") - + ", OpenGL API Support "+factory.hasOpenGLAPISupport() + ", useKHRCreateContext "+useKHRCreateContext - + ", Full OpenGL API Support "+hasFullOpenGLAPISupport + + ", OpenGL API Support "+hasFullOpenGLAPISupport + ", device "+device); } if ( 0 == eglDisplay ) { diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java index dc7b35bf2..2e5ee0854 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLDrawableFactory.java @@ -899,17 +899,14 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { return defaultDeviceEGLFeatures.hasKHRCreateContext; } /** - * Method returns {@code true} if {@code EGL_OpenGL_API} is supported, - * otherwise method returns {@code false}. + * {@inheritDoc} + * <p> + * This factory may support native desktop OpenGL if {@link EGL#EGL_CLIENT_APIS} contains {@code OpenGL} + * <i>and</i> if {@code EGL_KHR_create_context} extension is supported. + * </p> */ - public final boolean hasOpenGLAPISupport() { - return defaultDeviceEGLFeatures.hasGLAPI; - } - /** - * Method returns {@code true} if {@code EGL_OpenGL_API} and {@code EGL_KHR_create_context} is supported, - * otherwise method returns {@code false}. - */ - public final boolean hasFullOpenGLAPISupport() { + @Override + public final boolean hasOpenGLDesktopSupport() { /** * It has been experienced w/ Mesa 10.3.2 (EGL 1.4/Gallium) * that even though initial OpenGL context can be created w/o 'EGL_KHR_create_context', @@ -920,6 +917,27 @@ public class EGLDrawableFactory extends GLDrawableFactoryImpl { defaultDeviceEGLFeatures.hasGLAPI && defaultDeviceEGLFeatures.hasKHRCreateContext; } + /** + * {@inheritDoc} + * <p> + * This factory always supports native GLES profiles. + * </p> + */ + @Override + public final boolean hasOpenGLESSupport() { return true; } + + /** + * {@inheritDoc} + * <p> + * Return true if {@code EGL_KHR_create_context} extension is supported, + * see {@link #hasDefaultDeviceKHRCreateContext()}. + * </p> + */ + @Override + public final boolean hasMajorMinorCreateContextARB() { + return hasDefaultDeviceKHRCreateContext(); + } + @Override public final AbstractGraphicsDevice getDefaultDevice() { return defaultDevice; |