com.badlogic.gdx.backends.android.surfaceview
Class GLDebugHelper

java.lang.Object
  extended by com.badlogic.gdx.backends.android.surfaceview.GLDebugHelper

public class GLDebugHelper
extends Object

A helper class for debugging OpenGL ES applications. Wraps the supplied GL interface with a new GL interface that adds support for error checking and logging.


Field Summary
static int CONFIG_CHECK_GL_ERROR
          Check glError() after every call.
static int CONFIG_CHECK_THREAD
          Check if all calls are on the same thread.
static int CONFIG_LOG_ARGUMENT_NAMES
          Print argument names when logging GL Calls.
static int ERROR_WRONG_THREAD
          The Error number used in the GLException that is thrown if CONFIG_CHECK_THREAD is enabled and you call OpenGL ES on the a different thread.
 
Constructor Summary
GLDebugHelper()
           
 
Method Summary
static javax.microedition.khronos.egl.EGL wrap(javax.microedition.khronos.egl.EGL egl, int configFlags, Writer log)
          Wrap an existing EGL interface in a new EGL interface that adds support for error checking and/or logging.
static javax.microedition.khronos.opengles.GL wrap(javax.microedition.khronos.opengles.GL gl, int configFlags, Writer log)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_CHECK_GL_ERROR

public static final int CONFIG_CHECK_GL_ERROR
Check glError() after every call.

See Also:
Constant Field Values

CONFIG_CHECK_THREAD

public static final int CONFIG_CHECK_THREAD
Check if all calls are on the same thread.

See Also:
Constant Field Values

CONFIG_LOG_ARGUMENT_NAMES

public static final int CONFIG_LOG_ARGUMENT_NAMES
Print argument names when logging GL Calls.

See Also:
Constant Field Values

ERROR_WRONG_THREAD

public static final int ERROR_WRONG_THREAD
The Error number used in the GLException that is thrown if CONFIG_CHECK_THREAD is enabled and you call OpenGL ES on the a different thread.

See Also:
Constant Field Values
Constructor Detail

GLDebugHelper

public GLDebugHelper()
Method Detail

wrap

public static javax.microedition.khronos.opengles.GL wrap(javax.microedition.khronos.opengles.GL gl,
                                                          int configFlags,
                                                          Writer log)

wrap

public static javax.microedition.khronos.egl.EGL wrap(javax.microedition.khronos.egl.EGL egl,
                                                      int configFlags,
                                                      Writer log)
Wrap an existing EGL interface in a new EGL interface that adds support for error checking and/or logging.

Parameters:
egl - the existing GL interface. Must implement EGL and EGL10. May optionally implement EGL11 as well.
configFlags - A bitmask of error checking flags.
log - - null to disable logging, non-null to enable logging.
Returns:
the wrapped EGL interface.


Copyright © 2013. All Rights Reserved.