This extension allows OpenGL applications to access texture objects in shaders without first binding each texture to one of a limited number of texture
image units. Using this extension, an application can query a 64-bit unsigned integer texture handle for each texture that it wants to access and then
use that handle directly in GLSL or assembly-based shaders. The ability to access textures without having to bind and/or re-bind them is similar to the
capability provided by the NV_shader_buffer_load extension that allows shaders to access buffer objects without binding them. In both cases,
these extensions significantly reduce the amount of API and internal GL driver overhead needed to manage resource bindings.
This extension also provides similar capability for the image load, store, and atomic functionality provided by OpenGL 4.2 and the
ARB_shader_image_load_store and EXT_shader_image_load_store extensions, where a texture can be accessed without first binding it to an
image unit. An image handle can be extracted from a texture object using an API with a set of parameters similar to those for
BindImageTextureEXT.
This extension adds no new data types to GLSL. Instead, it uses existing sampler and image data types and allows them to be populated with texture and image handles. This extension does permit sampler and image data types to be used in more contexts than in unextended GLSL 4.00. In particular, sampler and image types may be used as shader inputs/outputs, temporary variables, and uniform block members, and may be assigned to by shader code. Constructors are provided to convert unsigned integer values to and from sampler and image data types. Additionally, new APIs are provided to load values for sampler and image uniforms with 64-bit handle inputs. The use of existing integer-based Uniform* APIs is still permitted, in which case the integer specified will identify a texture image or image unit. For samplers and images with values specified as texture image or image units, the GL implemenation will translate the unit number to an internal handle as required.
To access texture or image resources using handles, the handles must first be made resident. Accessing a texture or image by handle without first making it resident can result in undefined results, including program termination. Since the amount of texture memory required by an application may exceed the amount of memory available to the system, this extension provides API calls allowing applications to manage overall texture memory consumption by making a texture resident and non-resident as required.
Requires OpenGL 4..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_UNSIGNED_INT64_ARB
Accepted by the |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | |||
|---|---|---|---|---|
| public static native long | glGetImageHandleARB(int
the texture object texture, int the texture level level, boolean the layered flag layered, int the texture layer layer, int the texture format format)Creates and returns an image handle for level | |||
| public static native long | glGetTextureHandleARB(int
the texture object texture)Creates a texture handle using the current state of the texture named | |||
| public static native long | glGetTextureSamplerHandleARB(int
the texture object texture, int the sampler object sampler)Creates a texture handle using the current non-sampler state from the texture named | |||
| public static long | glGetVertexAttribLui64ARB(int
the generic vertex attribute index index, int the parameter to query pname)Returns the 64-bit unsigned integer handle value of a generic vertex attribute parameter. | |||
| public static void | glGetVertexAttribLui64vARB(int
the generic vertex attribute index index, int the parameter to query pname, LongBuffer a buffer in which to place the returned data params)Returns the 64-bit unsigned integer handle value of a generic vertex attribute parameter. | |||
| public static void | glGetVertexAttribLui64vARB(int index, int pname, long[] params)
Array version of: | |||
| public static native boolean | glIsImageHandleResidentARB(long
the image handle handle)Returns | |||
| public static native boolean | glIsTextureHandleResidentARB(long
the texture handle handle)Returns | |||
| public static native void | glMakeImageHandleNonResidentARB(long
the image handle handle)Makes an image handle inaccessible to shaders. | |||
| public static native void | glMakeImageHandleResidentARB(long
the image handle handle, int the access type. One of: access)
Makes an image handle resident, so that it is accessible to shaders for image loads, stores, and atomic operations. | |||
| public static native void | glMakeTextureHandleNonResidentARB(long
the texture handle handle)Makes a texture handle inaccessible to shaders. | |||
| public static native void | glMakeTextureHandleResidentARB(long
the texture handle handle)Make a texture handle resident, so that it is accessible to shaders for texture mapping operations. | |||
| public static native void | glProgramUniformHandleui64ARB(int
the program object program, int the uniform location location, long the handle value value)DSA version of | |||
| public static void | glProgramUniformHandleui64vARB(int
the program object program, int the uniform location location, LongBuffer a buffer from which to load the handles values)DSA version of | |||
| public static void | glProgramUniformHandleui64vARB(int program, int location, long[] values)
Array version of: | |||
| public static native void | glUniformHandleui64ARB(int
the uniform location location, long the handle value value)Loads a 64-bit unsigned integer handle into a uniform location corresponding to sampler or image variable types. | |||
| public static void | glUniformHandleui64vARB(int
the uniform location location, LongBuffer a buffer from which to load the handles values)Loads | |||
| public static void | ||||
| public static native void | glVertexAttribL1ui64ARB(int
the index of the generic vertex attribute to be modified index, long the handle value x)Specifies the 64-bit unsigned integer handle value of a generic vertex attribute. | |||
| public static void | glVertexAttribL1ui64vARB(int
the index of the generic vertex attribute to be modified index, LongBuffer the vertex attribute buffer v)Pointer version of | |||
| public static void | ||||
| public static native void | nglGetVertexAttribLui64vARB(int index, int pname, long params)
Unsafe version of: | |||
| public static native void | nglProgramUniformHandleui64vARB(int program, int location, int
the number of handles to load count, long values)Unsafe version of: | |||
| public static native void | nglUniformHandleui64vARB(int location, int
the number of handles to load count, long values)Unsafe version of: | |||
| public static native void |
| GL_UNSIGNED_INT64_ARB | back to summary |
|---|---|
| public static final int GL_UNSIGNED_INT64_ARB Accepted by the | |
| ARBBindlessTexture | back to summary |
|---|---|
| protected ARBBindlessTexture() | |
| glGetImageHandleARB | back to summary |
|---|---|
| public static native long glGetImageHandleARB(int texture, int level, boolean layered, int layer, int format) Creates and returns an image handle for level The error
The error
When a texture object is referenced by one or more image handles, the texture parameters of the object may not be changed, and the size and format of
the images in the texture object may not be re-specified. The error The error The handle returned for each combination of
| |
| glGetTextureHandleARB | back to summary |
|---|---|
| public static native long glGetTextureHandleARB(int texture) Creates a texture handle using the current state of the texture named
| |
| glGetTextureSamplerHandleARB | back to summary |
|---|---|
| public static native long glGetTextureSamplerHandleARB(int texture, int sampler) Creates a texture handle using the current non-sampler state from the texture named The error The handle for each texture or texture/sampler pair is unique; the same handle will be returned if GetTextureHandleARB is called multiple times for the same texture or if GetTextureSamplerHandleARB is called multiple times for the same texture/sampler pair. When a texture object is referenced by one or more texture handles, the texture parameters of the object may not be changed, and the size and format of
the images in the texture object may not be re-specified. The error The error When a sampler object is referenced by one or more texture handles, the sampler parameters of the object may not be changed. The error
| |
| glGetVertexAttribLui64ARB | back to summary |
|---|---|
| public static long glGetVertexAttribLui64ARB(int index, int pname) Returns the 64-bit unsigned integer handle value of a generic vertex attribute parameter.
| |
| glGetVertexAttribLui64vARB | back to summary |
|---|---|
| public static void glGetVertexAttribLui64vARB(int index, int pname, LongBuffer params) Returns the 64-bit unsigned integer handle value of a generic vertex attribute parameter.
| |
| glGetVertexAttribLui64vARB | back to summary |
|---|---|
| public static void glGetVertexAttribLui64vARB(int index, int pname, long[] params) Array version of: | |
| glIsImageHandleResidentARB | back to summary |
|---|---|
| public static native boolean glIsImageHandleResidentARB(long handle) Returns
| |
| glIsTextureHandleResidentARB | back to summary |
|---|---|
| public static native boolean glIsTextureHandleResidentARB(long handle) Returns
| |
| glMakeImageHandleNonResidentARB | back to summary |
|---|---|
| public static native void glMakeImageHandleNonResidentARB(long handle) Makes an image handle inaccessible to shaders.
| |
| glMakeImageHandleResidentARB | back to summary | |||
|---|---|---|---|---|
| public static native void glMakeImageHandleResidentARB(long handle, int access) Makes an image handle resident, so that it is accessible to shaders for image loads, stores, and atomic operations.
While the image handle is resident, it may be used in image load, store, and atomic operations. If a shader attempts to perform an image operation using
a handle that is not resident, the results of that operation are undefined and may lead to application termination. When an image handle is resident,
the texture it references is not necessarily considered resident for the purposes of the
| ||||
| glMakeTextureHandleNonResidentARB | back to summary |
|---|---|
| public static native void glMakeTextureHandleNonResidentARB(long handle) Makes a texture handle inaccessible to shaders. The error
| |
| glMakeTextureHandleResidentARB | back to summary |
|---|---|
| public static native void glMakeTextureHandleResidentARB(long handle) Make a texture handle resident, so that it is accessible to shaders for texture mapping operations. While the texture handle is resident, it may be used in texture mapping operations. If a shader attempts to perform a texture mapping operation using a
handle that is not resident, the results of that operation are undefined and may lead to application termination. When a texture handle is resident, the
texture it references is also considered resident for the purposes of the
| |
| glProgramUniformHandleui64ARB | back to summary |
|---|---|
| public static native void glProgramUniformHandleui64ARB(int program, int location, long value) DSA version of
| |
| glProgramUniformHandleui64vARB | back to summary |
|---|---|
| public static void glProgramUniformHandleui64vARB(int program, int location, LongBuffer values) DSA version of
| |
| glProgramUniformHandleui64vARB | back to summary |
|---|---|
| public static void glProgramUniformHandleui64vARB(int program, int location, long[] values) Array version of: | |
| glUniformHandleui64ARB | back to summary |
|---|---|
| public static native void glUniformHandleui64ARB(int location, long value) Loads a 64-bit unsigned integer handle into a uniform location corresponding to sampler or image variable types.
| |
| glUniformHandleui64vARB | back to summary |
|---|---|
| public static void glUniformHandleui64vARB(int location, LongBuffer values) Loads
| |
| glUniformHandleui64vARB | back to summary |
|---|---|
| public static void glUniformHandleui64vARB(int location, long[] values) Array version of: | |
| glVertexAttribL1ui64ARB | back to summary |
|---|---|
| public static native void glVertexAttribL1ui64ARB(int index, long x) Specifies the 64-bit unsigned integer handle value of a generic vertex attribute.
| |
| glVertexAttribL1ui64vARB | back to summary |
|---|---|
| public static void glVertexAttribL1ui64vARB(int index, LongBuffer v) Pointer version of
| |
| glVertexAttribL1ui64vARB | back to summary |
|---|---|
| public static void glVertexAttribL1ui64vARB(int index, long[] v) Array version of: | |
| nglGetVertexAttribLui64vARB | back to summary |
|---|---|
| public static native void nglGetVertexAttribLui64vARB(int index, int pname, long params) Unsafe version of: | |
| nglProgramUniformHandleui64vARB | back to summary |
|---|---|
| public static native void nglProgramUniformHandleui64vARB(int program, int location, int count, long values) Unsafe version of:
| |
| nglUniformHandleui64vARB | back to summary |
|---|---|
| public static native void nglUniformHandleui64vARB(int location, int count, long values) Unsafe version of:
| |
| nglVertexAttribL1ui64vARB | back to summary |
|---|---|
| public static native void nglVertexAttribL1ui64vARB(int index, long v) Unsafe version of: | |