Added in API level 1

GLDebugHelper

open class GLDebugHelper
kotlin.Any
   ↳ 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

Constants
static Int

Check glError() after every call.

static Int

Check if all calls are on the same thread.

static Int

Print argument names when logging GL Calls.

static Int

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.

Public constructors

Public methods
open static GL!
wrap(gl: GL!, configFlags: Int, log: Writer!)

open static EGL!
wrap(egl: EGL!, configFlags: Int, log: Writer!)

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

Constants

CONFIG_CHECK_GL_ERROR

Added in API level 1
static val CONFIG_CHECK_GL_ERROR: Int

Check glError() after every call.

Value: 1

CONFIG_CHECK_THREAD

Added in API level 1
static val CONFIG_CHECK_THREAD: Int

Check if all calls are on the same thread.

Value: 2

CONFIG_LOG_ARGUMENT_NAMES

Added in API level 1
static val CONFIG_LOG_ARGUMENT_NAMES: Int

Print argument names when logging GL Calls.

Value: 4

ERROR_WRONG_THREAD

Added in API level 1
static val ERROR_WRONG_THREAD: Int

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.

Value: 28672

Public constructors

GLDebugHelper

GLDebugHelper()

Public methods

wrap

Added in API level 1
open static fun wrap(
    gl: GL!,
    configFlags: Int,
    log: Writer!
): GL!

wrap

Added in API level 1
open static fun wrap(
    egl: EGL!,
    configFlags: Int,
    log: Writer!
): EGL!

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

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