Several recent trends in how OpenGL ES integrates into modern computer systems have created new requirements for robustness and security for GL rendering contexts.
Additionally GPU architectures now support hardware fault detection; for example, video memory supporting ECC (error correcting codes) and error detection. GL contexts should be capable of recovering from hardware faults such as uncorrectable memory errors. Along with recovery from such hardware faults, the recovery mechanism can also allow recovery from video memory access exceptions and system software failures. System software failures can be due to device changes or driver failures.
GL queries that return (write) some number of bytes to a buffer indicated by a pointer parameter introduce risk of buffer overflows that might be exploitable by malware. To address this, queries with return value sizes that are not expressed directly by the parameters to the query itself are given additional API functions with an additional parameter that specifies the number of bytes in the buffer and never writing bytes beyond that limit. This is particularly useful for multi-threaded usage of GL contexts in a "share group" where one context can change objects in ways that can cause buffer overflows for another context's GL queries.
The original ARB_vertex_buffer_object extension includes an issue that explicitly states program termination is allowed when out-of-bounds vertex buffer object fetches occur. Modern graphics hardware is capable of well-defined behavior in the case of out-of- bounds vertex buffer object fetches. Older hardware may require extra checks to enforce well-defined (and termination free) behavior, but this expense is warranted when processing potentially untrusted content.
The intent of this extension is to address some specific robustness goals:
Requires GLES 2..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_CONTEXT_LOST_KHR
Returned by |
| public static final int | GL_CONTEXT_ROBUST_ACCESS_KHR
Accepted by the |
| public static final int | GL_GUILTY_CONTEXT_RESET_KHR
Returned by |
| public static final int | |
| public static final int | GL_LOSE_CONTEXT_ON_RESET_KHR
Returned by GetIntegerv and related simple queries when |
| public static final int | GL_NO_RESET_NOTIFICATION_KHR
Returned by GetIntegerv and related simple queries when |
| public static final int | GL_RESET_NOTIFICATION_STRATEGY_KHR
Accepted by the |
| public static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static native int | glGetGraphicsResetStatusKHR()
Indicates if the GL context has been in a reset state at any point since the last call to GetGraphicsResetStatus:
|
| public static float | glGetnUniformfKHR(int
the program object program, int the uniform location location)Returns the value or values of a uniform of the default uniform block. |
| public static void | glGetnUniformfvKHR(int
the program object program, int the uniform location location, FloatBuffer the buffer in which to place the returned data params)Returns the value or values of a uniform of the default uniform block. |
| public static void | |
| public static float | glGetnUniformiKHR(int
the program object program, int the uniform location location)Integer version of |
| public static void | glGetnUniformivKHR(int
the program object program, int the uniform location location, FloatBuffer the buffer in which to place the returned data params)Integer version of |
| public static void | |
| public static float | glGetnUniformuiKHR(int
the program object program, int the uniform location location)Unsigned version of |
| public static void | glGetnUniformuivKHR(int
the program object program, int the uniform location location, FloatBuffer the buffer in which to place the returned data params)Unsigned version of |
| public static void | |
| public static void | glReadnPixelsKHR(int
the left pixel coordinate x, int the lower pixel coordinate y, int the number of pixels to read in the x-dimension width, int the number of pixels to read in the y-dimension height, int the pixel format format, int the pixel type type, int the maximum number of bytes to write into bufSize, long dataa buffer in which to place the returned pixel data pixels)Behaves identically to |
| public static void | glReadnPixelsKHR(int
the left pixel coordinate x, int the lower pixel coordinate y, int the number of pixels to read in the x-dimension width, int the number of pixels to read in the y-dimension height, int the pixel format format, int the pixel type type, ByteBuffer a buffer in which to place the returned pixel data pixels)Behaves identically to |
| public static void | glReadnPixelsKHR(int
the left pixel coordinate x, int the lower pixel coordinate y, int the number of pixels to read in the x-dimension width, int the number of pixels to read in the y-dimension height, int the pixel format format, int the pixel type type, ShortBuffer a buffer in which to place the returned pixel data pixels)Behaves identically to |
| public static void | glReadnPixelsKHR(int
the left pixel coordinate x, int the lower pixel coordinate y, int the number of pixels to read in the x-dimension width, int the number of pixels to read in the y-dimension height, int the pixel format format, int the pixel type type, IntBuffer a buffer in which to place the returned pixel data pixels)Behaves identically to |
| public static void | glReadnPixelsKHR(int
the left pixel coordinate x, int the lower pixel coordinate y, int the number of pixels to read in the x-dimension width, int the number of pixels to read in the y-dimension height, int the pixel format format, int the pixel type type, FloatBuffer a buffer in which to place the returned pixel data pixels)Behaves identically to |
| public static void | glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, short[] pixels)
Array version of: |
| public static void | glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, int[] pixels)
Array version of: |
| public static void | glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, float[] pixels)
Array version of: |
| public static native void | nglGetnUniformfvKHR(int program, int location, int
the maximum number of bytes to write to bufSize, long params)paramsUnsafe version of: |
| public static native void | nglGetnUniformivKHR(int program, int location, int
the maximum number of bytes to write to bufSize, long params)paramsUnsafe version of: |
| public static native void | nglGetnUniformuivKHR(int program, int location, int
the maximum number of bytes to write to bufSize, long params)paramsUnsafe version of: |
| public static native void | nglReadnPixelsKHR(int x, int y, int width, int height, int format, int type, int
the maximum number of bytes to write into bufSize, long pixels)dataUnsafe version of: |
| GL_CONTEXT_LOST_KHR | back to summary |
|---|---|
| public static final int GL_CONTEXT_LOST_KHR Returned by | |
| GL_CONTEXT_ROBUST_ACCESS_KHR | back to summary |
|---|---|
| public static final int GL_CONTEXT_ROBUST_ACCESS_KHR Accepted by the | |
| GL_GUILTY_CONTEXT_RESET_KHR | back to summary |
|---|---|
| public static final int GL_GUILTY_CONTEXT_RESET_KHR Returned by | |
| GL_INNOCENT_CONTEXT_RESET_KHR | back to summary |
|---|---|
| public static final int GL_INNOCENT_CONTEXT_RESET_KHR Returned by | |
| GL_LOSE_CONTEXT_ON_RESET_KHR | back to summary |
|---|---|
| public static final int GL_LOSE_CONTEXT_ON_RESET_KHR Returned by GetIntegerv and related simple queries when | |
| GL_NO_RESET_NOTIFICATION_KHR | back to summary |
|---|---|
| public static final int GL_NO_RESET_NOTIFICATION_KHR Returned by GetIntegerv and related simple queries when | |
| GL_RESET_NOTIFICATION_STRATEGY_KHR | back to summary |
|---|---|
| public static final int GL_RESET_NOTIFICATION_STRATEGY_KHR Accepted by the | |
| GL_UNKNOWN_CONTEXT_RESET_KHR | back to summary |
|---|---|
| public static final int GL_UNKNOWN_CONTEXT_RESET_KHR Returned by | |
| KHRRobustness | back to summary |
|---|---|
| protected KHRRobustness() | |
| glGetGraphicsResetStatusKHR | back to summary |
|---|---|
| public static native int glGetGraphicsResetStatusKHR() Indicates if the GL context has been in a reset state at any point since the last call to GetGraphicsResetStatus:
If a reset status other than NO_ERROR is returned and subsequent calls return NO_ERROR, the context reset was encountered and completed. If a reset status is repeatedly returned, the context may be in the process of resetting. Reset notification behavior is determined at context creation time, and may be queried by calling GetIntegerv with the symbolic constant
If the reset notification behavior is If the behavior is If a graphics reset notification occurs in a context, a notification must also occur in all other contexts which share objects with that context. After a graphics reset has occurred on a context, subsequent GL commands on that context (or any context which shares with that context) will generate a
| |
| glGetnUniformfKHR | back to summary |
|---|---|
| public static float glGetnUniformfKHR(int program, int location) Returns the value or values of a uniform of the default uniform block.
| |
| glGetnUniformfvKHR | back to summary |
|---|---|
| public static void glGetnUniformfvKHR(int program, int location, FloatBuffer params) Returns the value or values of a uniform of the default uniform block.
| |
| glGetnUniformfvKHR | back to summary |
|---|---|
| public static void glGetnUniformfvKHR(int program, int location, float[] params) Array version of: | |
| glGetnUniformiKHR | back to summary |
|---|---|
| public static float glGetnUniformiKHR(int program, int location) Integer version of
| |
| glGetnUniformivKHR | back to summary |
|---|---|
| public static void glGetnUniformivKHR(int program, int location, FloatBuffer params) Integer version of
| |
| glGetnUniformivKHR | back to summary |
|---|---|
| public static void glGetnUniformivKHR(int program, int location, float[] params) Array version of: | |
| glGetnUniformuiKHR | back to summary |
|---|---|
| public static float glGetnUniformuiKHR(int program, int location) Unsigned version of
| |
| glGetnUniformuivKHR | back to summary |
|---|---|
| public static void glGetnUniformuivKHR(int program, int location, FloatBuffer params) Unsigned version of
| |
| glGetnUniformuivKHR | back to summary |
|---|---|
| public static void glGetnUniformuivKHR(int program, int location, float[] params) Array version of: | |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, int bufSize, long pixels) Behaves identically to
| |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) Behaves identically to
| |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, ShortBuffer pixels) Behaves identically to
| |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, IntBuffer pixels) Behaves identically to
| |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, FloatBuffer pixels) Behaves identically to
| |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, short[] pixels) Array version of: | |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, int[] pixels) Array version of: | |
| glReadnPixelsKHR | back to summary |
|---|---|
| public static void glReadnPixelsKHR(int x, int y, int width, int height, int format, int type, float[] pixels) Array version of: | |
| nglGetnUniformfvKHR | back to summary |
|---|---|
| public static native void nglGetnUniformfvKHR(int program, int location, int bufSize, long params) Unsafe version of:
| |
| nglGetnUniformivKHR | back to summary |
|---|---|
| public static native void nglGetnUniformivKHR(int program, int location, int bufSize, long params) Unsafe version of:
| |
| nglGetnUniformuivKHR | back to summary |
|---|---|
| public static native void nglGetnUniformuivKHR(int program, int location, int bufSize, long params) Unsafe version of:
| |
| nglReadnPixelsKHR | back to summary |
|---|---|
| public static native void nglReadnPixelsKHR(int x, int y, int width, int height, int format, int type, int bufSize, long pixels) Unsafe version of:
| |