From 6c0ad949be979d5fed95a1166d59100f7bf5580f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 24 Apr 2011 12:21:36 +0200 Subject: Add unified support for GL_ARB_debug_output and GL_AMD_debug_output. If GL_ARB_debug_output is not available, but GL_AMD_debug_output exist, fallback to the latter, offering generic aliased methods translating the delta (AMD category <-> ARB source/type). Generic aliased methods reside in GLContext* Enable/Disable via GLContext and GLAutoDrawable. To enable the GLDebugOutput feature GLContext.enableGLDebugMessage(true) or GLContext.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG) shall be called _before_ context creation via GLContext.makeCurrent()! In case GLAutoDrawable is being used, GLAutoDrawable.setContextCreationFlags(GLContext.CTX_OPTION_DEBUG) shall be issued before context creation via GLContext.makeCurrent()!. After context creation, the GLDebugOutput feature may be enabled or disabled at any time using this method. Verify both unit tests for usability. --- .../classes/javax/media/opengl/GLAutoDrawable.java | 23 +++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl/GLAutoDrawable.java') diff --git a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java index cf24d1028..90290d882 100644 --- a/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java +++ b/src/jogl/classes/javax/media/opengl/GLAutoDrawable.java @@ -185,14 +185,14 @@ public interface GLAutoDrawable extends GLDrawable { * Enqueues a one-shot {@link javax.media.opengl.GLRunnable}, * which will be executed with the next {@link #display()} call.

*

- * If a {@link javax.media.opengl.GLAnimatorControl} is registered, or if it's not animating, the default situation,
+ * If no {@link javax.media.opengl.GLAnimatorControl} is registered, or if it is not animating, the default situation,
* or if the current thread is the animator thread,
- * a {@link #display()} call has to be issued after enqueue the GLRunnable.
- * No extra synchronization must be performed in case wait is true, since it is executed in the current thread.

+ * a {@link #display()} call is issued after enqueue the GLRunnable.
+ * No extra synchronization is performed in case wait is true, since it is executed in the current thread.

*

* If {@link javax.media.opengl.GLAnimatorControl} is registered and is animating,
- * no call of {@link #display()} must be issued, since the animator thread will performs it.
- * If wait is true, the implementation must wait until the GLRunnable is executed.
+ * no {@link #display()} call is issued, since the animator thread performs it.
+ * If wait is true, the implementation waits until the GLRunnable is executed.
*


* * @see #setAnimator(javax.media.opengl.GLAnimatorControl) @@ -255,6 +255,19 @@ public interface GLAutoDrawable extends GLDrawable { drawable. See {@link #setAutoSwapBufferMode}. */ public boolean getAutoSwapBufferMode(); + /** + * @param flags Additional context creation flags. + * + * @see GLContext#setContextCreationFlags(int) + * @see GLContext#enableGLDebugMessage(boolean) + */ + public void setContextCreationFlags(int flags); + + /** + * @return Additional context creation flags + */ + public int getContextCreationFlags(); + /** Returns the {@link GL} pipeline object this GLAutoDrawable uses. If this method is called outside of the {@link GLEventListener}'s callback methods (init, display, etc.) it may -- cgit v1.2.3