From 39a8ca392d7302831f5689979c4ce89145b732af Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 28 Apr 2011 22:09:31 +0200 Subject: GLContext GLDebugMessages: Add synchronous status/dumpStack; Remove length in aliased glDebugMessageInsert. - GLDebugMessages add synchronous status - defaults to true - GLContext/GLDebugMessages add dumpStack() if jogl.debug.DebugGL is set - Remove param length in aliased glDebugMessageInsert. --- src/jogl/classes/javax/media/opengl/GLContext.java | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLContext.java') diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 08bbcbb96..30cc9c2ea 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -538,6 +538,21 @@ public abstract class GLContext { */ public abstract String getGLDebugMessageExtension(); + /** + * @return the current synchronous debug behavior via + * @see #setSynchronous(boolean) + */ + public abstract boolean isGLDebugSynchronous(); + + /** + * Enables or disables the synchronous debug behavior via + * {@link GL2GL3#GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB glEnable/glDisable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB)}, + * if extension is {@link #GL_ARB_debug_output}. + * There is no equivalent for {@link #GL_AMD_debug_output}. + *

The default is true, ie {@link GL2GL3#GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB}.

+ */ + public abstract void setGLDebugSynchronous(boolean synchronous); + /** * @return true if the GLDebugOutput feature is enabled or not. */ @@ -585,12 +600,6 @@ public abstract class GLContext { */ public abstract void removeGLDebugListener(GLDebugListener listener); - /** - * @return number of added {@link GLDebugListener}. If > 0, the GLDebugFeature is turned on, otherwise off. - * @see #enableGLDebugMessage(boolean) - */ - public abstract int getGLDebugListenerSize(); - /** * Generic entry for {@link GL2GL3#glDebugMessageControlARB(int, int, int, int, IntBuffer, boolean)} * and {@link GL2GL3#glDebugMessageEnableAMD(int, int, int, IntBuffer, boolean)} of the GLDebugOutput feature. @@ -610,7 +619,7 @@ public abstract class GLContext { * and {@link GL2GL3#glDebugMessageInsertAMD(int, int, int, int, String)} of the GLDebugOutput feature. * @see #enableGLDebugMessage(boolean) */ - public abstract void glDebugMessageInsert(int source, int type, int id, int severity, int length, String buf); + public abstract void glDebugMessageInsert(int source, int type, int id, int severity, String buf); public static final int GL_VERSIONS[][] = { /* 0.*/ { -1 }, -- cgit v1.2.3