From 5ebb4c2704711b4387f263484a5b820edffadf0a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 13 Dec 2011 17:53:22 +0100 Subject: GLDebugMessageHandler: Move Windows 32bit exclusion to init() block signaling no extension is available. --- .../jogamp/opengl/GLDebugMessageHandler.java | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java') diff --git a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java index c7b183e1a..b950c2fdf 100644 --- a/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java +++ b/src/jogl/classes/jogamp/opengl/GLDebugMessageHandler.java @@ -123,7 +123,14 @@ public class GLDebugMessageHandler { } return; } - + if(Platform.OS_TYPE == Platform.OSType.WINDOWS && Platform.is32Bit()) { + // Currently buggy, ie. throws an exception after leaving the native callback. + // Probably a 32bit on 64bit JVM / OpenGL-driver issue. + if(DEBUG) { + System.err.println("GLDebugMessageHandler: Windows 32bit currently not supported!"); + } + return; + } if( ctx.isExtensionAvailable(GL_ARB_debug_output) ) { extName = GL_ARB_debug_output; extType = EXT_ARB; @@ -230,18 +237,10 @@ public class GLDebugMessageHandler { final void enableImpl(boolean enable) throws GLException { if(enable) { if(0 == handle) { - if(Platform.OS_TYPE == Platform.OSType.WINDOWS && Platform.is32Bit()) { - // Currently buggy, ie. throws an exception after leaving the native callback. - // Probably a 32bit on 64bit JVM / OpenGL-driver issue. - if(DEBUG) { - System.err.println("GLDebugMessageHandler: Windows 32bit currently not supported!"); - } - } else { - setSynchronousImpl(); - handle = register0(glDebugMessageCallbackProcAddress, extType); - if(0 == handle) { - throw new GLException("Failed to register via \"glDebugMessageCallback*\" using "+extName); - } + setSynchronousImpl(); + handle = register0(glDebugMessageCallbackProcAddress, extType); + if(0 == handle) { + throw new GLException("Failed to register via \"glDebugMessageCallback*\" using "+extName); } } } else { -- cgit v1.2.3