Stay organized with collections
Save and categorize content based on your preferences.
GLDebugHelper
open class 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 methods |
open static EGL! |
Wrap an existing EGL interface in a new EGL interface that adds support for error checking and/or logging.
|
open static GL! |
|
Constants
CONFIG_CHECK_GL_ERROR
static val CONFIG_CHECK_GL_ERROR: Int
Check glError() after every call.
Value: 1
CONFIG_CHECK_THREAD
static val CONFIG_CHECK_THREAD: Int
Check if all calls are on the same thread.
Value: 2
CONFIG_LOG_ARGUMENT_NAMES
static val CONFIG_LOG_ARGUMENT_NAMES: Int
Print argument names when logging GL Calls.
Value: 4
ERROR_WRONG_THREAD
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
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. |
wrap
open static fun wrap(
gl: GL!,
configFlags: Int,
log: Writer!
): GL!
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# GLDebugHelper\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nGLDebugHelper\n=============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/opengl/GLDebugHelper \"View this page in Java\") \n\n```\nopen class GLDebugHelper\n```\n\n|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.opengl.GLDebugHelper](#) |\n\nA 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.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONFIG_CHECK_GL_ERROR](#CONFIG_CHECK_GL_ERROR:kotlin.Int) Check glError() after every call. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONFIG_CHECK_THREAD](#CONFIG_CHECK_THREAD:kotlin.Int) Check if all calls are on the same thread. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [CONFIG_LOG_ARGUMENT_NAMES](#CONFIG_LOG_ARGUMENT_NAMES:kotlin.Int) Print argument names when logging GL Calls. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [ERROR_WRONG_THREAD](#ERROR_WRONG_THREAD:kotlin.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. |\n\n| Public constructors ||\n|----------------------------------------------|---|\n| [GLDebugHelper](#GLDebugHelper())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open static [EGL](../../javax/microedition/khronos/egl/EGL.html#)! | [wrap](#wrap(javax.microedition.khronos.egl.EGL,%20kotlin.Int,%20java.io.Writer))`(`egl:` `[EGL](../../javax/microedition/khronos/egl/EGL.html#)!`, `configFlags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `log:` `[Writer](../../java/io/Writer.html#)!`)` Wrap an existing EGL interface in a new EGL interface that adds support for error checking and/or logging. |\n| open static [GL](../../javax/microedition/khronos/opengles/GL.html#)! | [wrap](#wrap(javax.microedition.khronos.opengles.GL,%20kotlin.Int,%20java.io.Writer))`(`gl:` `[GL](../../javax/microedition/khronos/opengles/GL.html#)!`, `configFlags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `log:` `[Writer](../../java/io/Writer.html#)!`)` \u003cbr /\u003e |\n\nConstants\n---------\n\n### CONFIG_CHECK_GL_ERROR\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CONFIG_CHECK_GL_ERROR: Int\n```\n\nCheck glError() after every call. \n\n Value: 1\n\n### CONFIG_CHECK_THREAD\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CONFIG_CHECK_THREAD: Int\n```\n\nCheck if all calls are on the same thread. \n\n Value: 2\n\n### CONFIG_LOG_ARGUMENT_NAMES\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val CONFIG_LOG_ARGUMENT_NAMES: Int\n```\n\nPrint argument names when logging GL Calls. \n\n Value: 4\n\n### ERROR_WRONG_THREAD\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val ERROR_WRONG_THREAD: Int\n```\n\nThe 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. \n\n Value: 28672\n\nPublic constructors\n-------------------\n\n### GLDebugHelper\n\n```\nGLDebugHelper()\n```\n\nPublic methods\n--------------\n\n### wrap\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen static fun wrap(\n egl: EGL!, \n configFlags: Int, \n log: Writer!\n): EGL!\n```\n\nWrap an existing EGL interface in a new EGL interface that adds support for error checking and/or logging.\n\n| Parameters ||\n|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `egl` | [EGL](../../javax/microedition/khronos/egl/EGL.html#)!: the existing GL interface. Must implement EGL and EGL10. May optionally implement EGL11 as well. |\n| `configFlags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): A bitmask of error checking flags. |\n| `log` | [Writer](../../java/io/Writer.html#)!: - null to disable logging, non-null to enable logging. |\n\n| Return ||\n|--------------------------------------------------------|----------------------------|\n| [EGL](../../javax/microedition/khronos/egl/EGL.html#)! | the wrapped EGL interface. |\n\n### wrap\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen static fun wrap(\n gl: GL!, \n configFlags: Int, \n log: Writer!\n): GL!\n```"]]