FileDocCategorySizeDatePackage
GLDebugHelper.javaAPI DocAndroid 1.5 API3743Wed May 06 22:42:00 BST 2009android.opengl

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.

Fields Summary
public static final int
CONFIG_CHECK_GL_ERROR
Check glError() after every call.
public static final int
CONFIG_CHECK_THREAD
Check if all calls are on the same thread.
public static final int
CONFIG_LOG_ARGUMENT_NAMES
Print argument names when logging GL Calls.
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.
Constructors Summary
Methods Summary
public static javax.microedition.khronos.opengles.GLwrap(javax.microedition.khronos.opengles.GL gl, int configFlags, java.io.Writer log)


             
        if ( configFlags != 0 ) {
            gl = new GLErrorWrapper(gl, configFlags);
        }
        if ( log != null ) {
            boolean logArgumentNames =
                (CONFIG_LOG_ARGUMENT_NAMES & configFlags) != 0;
            gl = new GLLogWrapper(gl, log, logArgumentNames);
        }
        return gl;
    
public static javax.microedition.khronos.egl.EGLwrap(javax.microedition.khronos.egl.EGL egl, int configFlags, java.io.Writer log)
Wrap an existing EGL interface in a new EGL interface that adds support for error checking and/or logging.

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

        if (log != null) {
            egl = new EGLLogWrapper(egl, configFlags, log);
        }
        return egl;