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. --- .../macosx/cgl/MacOSXCGLDrawableFactory.java | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/jogl/classes/jogamp/opengl/macosx') diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java index 120de4a13..871067f4c 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLDrawableFactory.java @@ -335,6 +335,33 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl { return null; } + /** + * {@inheritDoc} + *

+ * This factory always supports native desktop OpenGL profiles. + *

+ */ + @Override + public final boolean hasOpenGLDesktopSupport() { return true; } + + /** + * {@inheritDoc} + *

+ * This factory never supports native GLES profiles. + *

+ */ + @Override + public final boolean hasOpenGLESSupport() { return false; } + + /** + * {@inheritDoc} + *

+ * Always returns true. + *

+ */ + @Override + public final boolean hasMajorMinorCreateContextARB() { return true; } + @Override protected List getAvailableCapabilitiesImpl(final AbstractGraphicsDevice device) { return MacOSXCGLGraphicsConfiguration.getAvailableCapabilities(this, device); -- cgit v1.2.3