From 3ac457a3a9074a70bf428bb6a5674b8f70d268b1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 30 Aug 2015 02:30:26 +0200 Subject: Bug 1203: Optimize OpenGL Profile probing/mapping (Skip redundant queries) Via GLDrawableFactory[Impl] the following details are considered while GLContextImpl.mapGLVersions(..): - hasOpenGLDesktopSupport If false, skip OpenGL Desktop queries - hasOpenGLESSupport If false, skip OpenGL ES queries - hasMajorMinorCreateContextARB If false, reduce [maxMajor.maxMinor..minMajor.minMinor] iteration, reducing to [maxMajor..minMajor], usually only one query. --- src/jogl/classes/jogamp/opengl/egl/EGLContext.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java') 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 ) { -- cgit v1.2.3