From a4c7bf0420e369e71561d2847f2fc444ce5abafa Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 20 Feb 2012 18:03:36 +0100 Subject: API Change [GLProfile/GLContext]: Add notion of hardware acceleration in GLProfile.get() methods. We need to distinguish between software and hardware accelerated OpenGL profiles to allow choosing the proper profiles [default, GL2ES1, GL2ES2, ..] on platforms where both, software and hardware implementations exist (GL, GLES2, ..). Where no preference is being requested, hardware acceleration is favored: GLProfile.getDefault() GLProfile.getGL2ES1() GLProfile.getGL2ES2() Some method signatures needed to change GLProfile: getMaxProgrammable(AbstractGraphicsDevice device) -> getMaxProgrammable(AbstractGraphicsDevice device, boolean favorHardwareRasterizer) GLProfile adds: isHardwareRasterizer() Determination whether a hardware acceleration is being used or not is extended in GLContextImpl by querying the current context's GL_RENDERER string. If the latter contains 'software' (case insensitive) it is not hardware accelerated. At least this works w/ newer Mesa3D impl, where GLX_SLOW_CONFIG is not set! --- .../classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl') diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java index f40a5f0bf..5eafebc11 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java @@ -292,7 +292,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { sharedDevice.lock(); try { AbstractGraphicsScreen absScreen = new DefaultGraphicsScreen(sharedDevice, 0); - GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP); + GLProfile glp = GLProfile.get(sharedDevice, GLProfile.GL_PROFILE_LIST_MIN_DESKTOP, false); if (null == glp) { throw new GLException("Couldn't get default GLProfile for device: "+sharedDevice); } -- cgit v1.2.3