English | Site Directory

Android - An Open Handset Alliance Project

android.opengl
public class

android.opengl.GLDebugHelper

java.lang.Object
android.opengl.GLDebugHelper

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.

Summary

Public Constructors

          GLDebugHelper()

Public Methods

      static  GL  wrap(GL gl, boolean enableErrorChecking, Writer log)
Wrap an existing GL interface in a new GL interface that adds support for error checking and/or logging.
Methods inherited from class java.lang.Object

Details

Public Constructors

public GLDebugHelper()

Public Methods

public static GL wrap(GL gl, boolean enableErrorChecking, Writer log)

Wrap an existing GL interface in a new GL interface that adds support for error checking and/or logging.

Wrapping means that the GL instance that is passed in to this method is wrapped inside a new GL instance that optionally performs additional operations before and after calling the wrapped GL instance.

Error checking means that the wrapper will automatically call glError after each GL operation, and throw a GLException if an error occurs. (By design, calling glError itself will not cause an exception to be thrown.) Enabling error checking is an alternative to manually calling glError after every GL operation.

Logging means writing a text representation of each GL method call to a log.

Parameters

gl the existing GL interface. Must implement GL and GL10. May optionally implement GL11 as well.
enableErrorChecking true to enable error checking.
log - null to disable logging, non-null to enable logging.

Returns

  • the wrapped GL instance.
Build m5-rc15i - 10 Jun 2008 13:54