Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBUniformBufferObject

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Native bindings to the ARB_uniform_buffer_object extension.

This extension introduces the concept of a group of GLSL uniforms known as a "uniform block", and the API mechanisms to store "uniform blocks" in GL buffer objects.

The extension also defines both a standard cross-platform layout in memory for uniform block data, as well as mechanisms to allow the GL to optimize the data layout in an implementation-defined manner.

Prior to this extension, the existing interface for modification of uniform values allowed modification of large numbers of values using glUniform* calls, but only for a single uniform name (or a uniform array) at a time. However, updating uniforms in this manner may not map well to heterogenous uniform data structures defined for a GL application and in these cases, the application is forced to either:

  1. restructure their uniform data definitions into arrays or
  2. make an excessive number of calls through the GL interface to one of the Uniform* variants.

These solutions have their disadvantages. Solution A imposes considerable development overhead on the application developer. Solution B may impose considerable run-time overhead on the application if the number of uniforms modified in a given frame of rendering is sufficiently large.

This extension provides a better alternative to either (A) or (B) by allowing buffer object backing for the storage associated with all uniforms of a given GLSL program.

Storing uniform blocks in buffer objects enables several key use cases:

The data storage for a uniform block can be declared to use one of three layouts in memory: packed, shared, or std140.

Any uniforms not declared in a named uniform block are said to be part of the "default uniform block".

While uniforms in the default uniform block are updated with glUniform* entry points and can have static initializers, uniforms in named uniform blocks are not. Instead, uniform block data is updated using the routines that update buffer objects and can not use static initializers.

Rules and Concepts Guiding this Specification:

For reference, a uniform has a "uniform index" (subsequently referred to as "u_index) and also a "uniform location" to efficiently identify it in the uniform data store of the implementation. We subsequently refer to this uniform data store of the implementation as the "uniform database".

A "uniform block" only has a "uniform block index" used for queries and connecting the "uniform block" to a buffer object. A "uniform block" has no "location" because "uniform blocks" are not updated directly. The buffer object APIs are used instead.

Properties of Uniforms and uniform blocks:

  1. A uniform is "active" if it exists in the database and has a valid u_index.
  2. A "uniform block" is "active" if it exists in the database and has a valid ub_index.
  3. Uniforms and "uniform blocks" can be inactive because they don't exist in the source, or because they have been removed by dead code elimination.
  4. An inactive uniform has u_index == INVALID_INDEX.
  5. An inactive uniform block has ub_index == INVALID_INDEX.
  6. A u_index or ub_index of INVALID_INDEX generates the INVALID_VALUE error if given as a function argument.
  7. The default uniform block, which is not assigned any ub_index, uses a private, internal data storage, and does not have any buffer object associated with it.
  8. An active uniform that is a member of the default uniform block has location ≥ 0 and it has offset == stride == -1.
  9. An active uniform that is a member of a named uniform block has location == -1.
  10. A uniform location of -1 is silently ignored if given as a function argument.
  11. Uniform block declarations may not be nested

Requires OpenGL 2.0 or ARB_shader_objects and OpenGL 1.5 or ARB_vertex_buffer_object. Promoted to core in OpenGL 3.1.

Field Summary

Modifier and TypeField and Description
public static final int
GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH

Accepted by the pname parameter of GetProgramiv.

public static final int
GL_ACTIVE_UNIFORM_BLOCKS

Accepted by the pname parameter of GetProgramiv.

public static final int
GL_INVALID_INDEX

Returned by GetActiveUniformsiv and GetUniformBlockIndex.

public static final int
GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_COMBINED_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_FRAGMENT_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_GEOMETRY_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_UNIFORM_BLOCK_SIZE

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_UNIFORM_BUFFER_BINDINGS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_MAX_VERTEX_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_UNIFORM_ARRAY_STRIDE

Accepted by the pname parameter of GetActiveUniformsiv.

public static final int
GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BLOCK_BINDING

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BLOCK_DATA_SIZE

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BLOCK_INDEX

Accepted by the pname parameter of GetActiveUniformsiv.

public static final int
GL_UNIFORM_BLOCK_NAME_LENGTH

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER

Accepted by the pname parameter of GetActiveUniformBlockiv.

public static final int
GL_UNIFORM_BUFFER

Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv.

public static final int
GL_UNIFORM_BUFFER_BINDING

Accepted by the pname parameter of GetIntegeri_v, GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

public static final int
GL_UNIFORM_BUFFER_SIZE

Accepted by the pname parameter of GetIntegeri_v.

public static final int
GL_UNIFORM_BUFFER_START

Accepted by the pname parameter of GetIntegeri_v.

public static final int
GL_UNIFORM_IS_ROW_MAJOR

Accepted by the pname parameter of GetActiveUniformsiv.

public static final int
GL_UNIFORM_MATRIX_STRIDE

Accepted by the pname parameter of GetActiveUniformsiv.

public static final int
GL_UNIFORM_NAME_LENGTH

Accepted by the pname parameter of GetActiveUniformsiv.

public static final int
GL_UNIFORM_OFFSET

Accepted by the pname parameter of GetActiveUniformsiv.

public static final int
GL_UNIFORM_SIZE

Accepted by the pname parameter of GetActiveUniformsiv.

public static final int
GL_UNIFORM_TYPE

Accepted by the pname parameter of GetActiveUniformsiv.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glBindBufferBase(int target, int
the index of the binding point within the array specified by target
index
,
int
a buffer object to bind to the specified binding point
buffer
)

Binds a buffer object to an indexed buffer target.

public static void
glBindBufferRange(int target, int
the index of the binding point within the array specified by target
index
,
int
a buffer object to bind to the specified binding point
buffer
,
long
the starting offset in basic machine units into the buffer object buffer
offset
,
long
the amount of data in machine units that can be read from the buffer object while used as an indexed target
size
)

Binds a range within a buffer object to an indexed buffer target.

public static int
glGetActiveUniformBlocki(int
the name of a program containing the uniform block
program
,
int
the index of the uniform block within program
uniformBlockIndex
,
int pname)

Queries information about an active uniform block.

public static void
glGetActiveUniformBlockiv(int
the name of a program containing the uniform block
program
,
int
the index of the uniform block within program
uniformBlockIndex
,
int pname, IntBuffer
the address of a variable to receive the result of the query
params
)

Queries information about an active uniform block.

public static void
glGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, int[] params)

Array version of: GetActiveUniformBlockiv

public static void
glGetActiveUniformBlockName(int
the name of a program containing the uniform block
program
,
int
the index of the uniform block within program
uniformBlockIndex
,
IntBuffer
the address of a variable to receive the number of characters that were written to uniformBlockName
length
,
ByteBuffer
an array of characters to receive the name of the uniform block at uniformBlockIndex
uniformBlockName
)

Retrieves the name of an active uniform block.

public static String
glGetActiveUniformBlockName(int
the name of a program containing the uniform block
program
,
int
the index of the uniform block within program
uniformBlockIndex
,
int
the size of the buffer addressed by uniformBlockName
bufSize
)

Retrieves the name of an active uniform block.

public static String
glGetActiveUniformBlockName(int
the name of a program containing the uniform block
program
,
int
the index of the uniform block within program
uniformBlockIndex
)

Retrieves the name of an active uniform block.

public static void
glGetActiveUniformBlockName(int program, int uniformBlockIndex, int[] length, ByteBuffer uniformBlockName)

Array version of: GetActiveUniformBlockName

public static void
glGetActiveUniformName(int
the program containing the active uniform index uniformIndex
program
,
int
the index of the active uniform whose name to query
uniformIndex
,
IntBuffer
the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by uniformName
length
,
ByteBuffer
the address of a buffer into which the GL will place the name of the active uniform at uniformIndex within program
uniformName
)

Queries the name of an active uniform.

public static String
glGetActiveUniformName(int
the program containing the active uniform index uniformIndex
program
,
int
the index of the active uniform whose name to query
uniformIndex
,
int
the size of the buffer, in units of GLchar, of the buffer whose address is specified in uniformName
bufSize
)

Queries the name of an active uniform.

public static String
glGetActiveUniformName(int
the program containing the active uniform index uniformIndex
program
,
int
the index of the active uniform whose name to query
uniformIndex
)

Queries the name of an active uniform.

public static void
glGetActiveUniformName(int program, int uniformIndex, int[] length, ByteBuffer uniformName)

Array version of: GetActiveUniformName

public static int
glGetActiveUniformsi(int
the program object to be queried
program
,
int uniformIndex, int
the property of the each uniform in uniformIndices that should be written into the corresponding element of params
pname
)

Returns information about several active uniform variables for the specified program object.

public static void
glGetActiveUniformsiv(int
the program object to be queried
program
,
IntBuffer
an array of uniformCount integers containing the indices of uniforms within program
uniformIndices
,
int
the property of the each uniform in uniformIndices that should be written into the corresponding element of params
pname
,
IntBuffer
an array of uniformCount integers which are to receive the value of pname for each uniform in uniformIndices
params
)

Returns information about several active uniform variables for the specified program object.

public static void
glGetActiveUniformsiv(int program, int[] uniformIndices, int pname, int[] params)

Array version of: GetActiveUniformsiv

public static int
glGetIntegeri(int
the indexed state to query
target
,
int
the index of the element being queried
index
)

Queries the integer value of an indexed state variable.

public static void
glGetIntegeri_v(int
the indexed state to query
target
,
int
the index of the element being queried
index
,
IntBuffer
a scalar or buffer in which to place the returned data
data
)

Queries the integer value of an indexed state variable.

public static void
glGetIntegeri_v(int target, int index, int[] data)

Array version of: GetIntegeri_v

public static int
glGetUniformBlockIndex(int
the name of a program containing the uniform block
program
,
ByteBuffer
an array of characters to containing the name of the uniform block whose index to retrieve
uniformBlockName
)

Retrieves the index of a named uniform block.

public static int
glGetUniformBlockIndex(int
the name of a program containing the uniform block
program
,
CharSequence
an array of characters to containing the name of the uniform block whose index to retrieve
uniformBlockName
)

Retrieves the index of a named uniform block.

public static void
glGetUniformIndices(int
the name of a program containing uniforms whose indices to query
program
,
PointerBuffer
an array of pointers to buffers containing the names of the queried uniforms
uniformNames
,
IntBuffer
an array that will receive the indices of the uniforms
uniformIndices
)

Retrieves the indices of a number of uniforms within a program object

public static void
glGetUniformIndices(int
the name of a program containing uniforms whose indices to query
program
,
CharSequence[]
an array of pointers to buffers containing the names of the queried uniforms
uniformNames
,
IntBuffer
an array that will receive the indices of the uniforms
uniformIndices
)

Retrieves the indices of a number of uniforms within a program object

public static int
glGetUniformIndices(int
the name of a program containing uniforms whose indices to query
program
,
CharSequence uniformName)

Retrieves the indices of a number of uniforms within a program object

public static void
glGetUniformIndices(int program, PointerBuffer uniformNames, int[] uniformIndices)

Array version of: GetUniformIndices

public static void
glUniformBlockBinding(int
the name of a program object containing the active uniform block whose binding to assign
program
,
int
the index of the active uniform block within program whose binding to assign
uniformBlockIndex
,
int
the binding point to which to bind the uniform block with index uniformBlockIndex within program
uniformBlockBinding
)

Assigns a binding point to an active uniform block.

public static void
nglGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, long params)

Unsafe version of: GetActiveUniformBlockiv

public static void
nglGetActiveUniformBlockName(int program, int uniformBlockIndex, int
the size of the buffer addressed by uniformBlockName
bufSize
,
long length, long uniformBlockName)

Unsafe version of: GetActiveUniformBlockName

public static void
nglGetActiveUniformName(int program, int uniformIndex, int
the size of the buffer, in units of GLchar, of the buffer whose address is specified in uniformName
bufSize
,
long length, long uniformName)

Unsafe version of: GetActiveUniformName

public static void
nglGetActiveUniformsiv(int program, int
the number of elements in the array of indices uniformIndices and the number of parameters written to params upon successful return
uniformCount
,
long uniformIndices, int pname, long params)

Unsafe version of: GetActiveUniformsiv

public static void
nglGetIntegeri_v(int target, int index, long data)

Unsafe version of: GetIntegeri_v

public static int
nglGetUniformBlockIndex(int program, long uniformBlockName)

Unsafe version of: GetUniformBlockIndex

public static void
nglGetUniformIndices(int program, int
the number of uniforms whose indices to query
uniformCount
,
long uniformNames, long uniformIndices)

Unsafe version of: GetUniformIndices

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTHback to summary
public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH

Accepted by the pname parameter of GetProgramiv.

GL_ACTIVE_UNIFORM_BLOCKSback to summary
public static final int GL_ACTIVE_UNIFORM_BLOCKS

Accepted by the pname parameter of GetProgramiv.

GL_INVALID_INDEXback to summary
public static final int GL_INVALID_INDEX

Returned by GetActiveUniformsiv and GetUniformBlockIndex.

GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTSback to summary
public static final int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTSback to summary
public static final int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_COMBINED_UNIFORM_BLOCKSback to summary
public static final int GL_MAX_COMBINED_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTSback to summary
public static final int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_FRAGMENT_UNIFORM_BLOCKSback to summary
public static final int GL_MAX_FRAGMENT_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_GEOMETRY_UNIFORM_BLOCKSback to summary
public static final int GL_MAX_GEOMETRY_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_UNIFORM_BLOCK_SIZEback to summary
public static final int GL_MAX_UNIFORM_BLOCK_SIZE

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_UNIFORM_BUFFER_BINDINGSback to summary
public static final int GL_MAX_UNIFORM_BUFFER_BINDINGS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_MAX_VERTEX_UNIFORM_BLOCKSback to summary
public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_UNIFORM_ARRAY_STRIDEback to summary
public static final int GL_UNIFORM_ARRAY_STRIDE

Accepted by the pname parameter of GetActiveUniformsiv.

GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICESback to summary
public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BLOCK_ACTIVE_UNIFORMSback to summary
public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BLOCK_BINDINGback to summary
public static final int GL_UNIFORM_BLOCK_BINDING

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BLOCK_DATA_SIZEback to summary
public static final int GL_UNIFORM_BLOCK_DATA_SIZE

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BLOCK_INDEXback to summary
public static final int GL_UNIFORM_BLOCK_INDEX

Accepted by the pname parameter of GetActiveUniformsiv.

GL_UNIFORM_BLOCK_NAME_LENGTHback to summary
public static final int GL_UNIFORM_BLOCK_NAME_LENGTH

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADERback to summary
public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADERback to summary
public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADERback to summary
public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER

Accepted by the pname parameter of GetActiveUniformBlockiv.

GL_UNIFORM_BUFFERback to summary
public static final int GL_UNIFORM_BUFFER

Accepted by the target parameters of BindBuffer, BufferData, BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and GetBufferPointerv.

GL_UNIFORM_BUFFER_BINDINGback to summary
public static final int GL_UNIFORM_BUFFER_BINDING

Accepted by the pname parameter of GetIntegeri_v, GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_UNIFORM_BUFFER_OFFSET_ALIGNMENTback to summary
public static final int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT

Accepted by the pname parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev.

GL_UNIFORM_BUFFER_SIZEback to summary
public static final int GL_UNIFORM_BUFFER_SIZE

Accepted by the pname parameter of GetIntegeri_v.

GL_UNIFORM_BUFFER_STARTback to summary
public static final int GL_UNIFORM_BUFFER_START

Accepted by the pname parameter of GetIntegeri_v.

GL_UNIFORM_IS_ROW_MAJORback to summary
public static final int GL_UNIFORM_IS_ROW_MAJOR

Accepted by the pname parameter of GetActiveUniformsiv.

GL_UNIFORM_MATRIX_STRIDEback to summary
public static final int GL_UNIFORM_MATRIX_STRIDE

Accepted by the pname parameter of GetActiveUniformsiv.

GL_UNIFORM_NAME_LENGTHback to summary
public static final int GL_UNIFORM_NAME_LENGTH

Accepted by the pname parameter of GetActiveUniformsiv.

GL_UNIFORM_OFFSETback to summary
public static final int GL_UNIFORM_OFFSET

Accepted by the pname parameter of GetActiveUniformsiv.

GL_UNIFORM_SIZEback to summary
public static final int GL_UNIFORM_SIZE

Accepted by the pname parameter of GetActiveUniformsiv.

GL_UNIFORM_TYPEback to summary
public static final int GL_UNIFORM_TYPE

Accepted by the pname parameter of GetActiveUniformsiv.

Constructor Detail

ARBUniformBufferObjectback to summary
protected ARBUniformBufferObject()

Method Detail

glBindBufferBaseback to summary
public static void glBindBufferBase(int target, int index, int buffer)

Binds a buffer object to an indexed buffer target.

Parameters
target:int

the target of the bind operation. One of:

TRANSFORM_FEEDBACK_BUFFERUNIFORM_BUFFERATOMIC_COUNTER_BUFFERSHADER_STORAGE_BUFFER
index:int

the index of the binding point within the array specified by target

buffer:int

a buffer object to bind to the specified binding point

glBindBufferRangeback to summary
public static void glBindBufferRange(int target, int index, int buffer, long offset, long size)

Binds a range within a buffer object to an indexed buffer target.

Parameters
target:int

the target of the bind operation. One of:

TRANSFORM_FEEDBACK_BUFFERUNIFORM_BUFFERATOMIC_COUNTER_BUFFERSHADER_STORAGE_BUFFER
index:int

the index of the binding point within the array specified by target

buffer:int

a buffer object to bind to the specified binding point

offset:long

the starting offset in basic machine units into the buffer object buffer

size:long

the amount of data in machine units that can be read from the buffer object while used as an indexed target

glGetActiveUniformBlockiback to summary
public static int glGetActiveUniformBlocki(int program, int uniformBlockIndex, int pname)

Queries information about an active uniform block.

Parameters
program:int

the name of a program containing the uniform block

uniformBlockIndex:int

the index of the uniform block within program

pname:int

the name of the parameter to query. One of:

UNIFORM_BLOCK_BINDINGUNIFORM_BLOCK_DATA_SIZE
UNIFORM_BLOCK_NAME_LENGTHUNIFORM_BLOCK_ACTIVE_UNIFORMS
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICESUNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADERUNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
Annotations
@NativeType:void
glGetActiveUniformBlockivback to summary
public static void glGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, IntBuffer params)

Queries information about an active uniform block.

Parameters
program:int

the name of a program containing the uniform block

uniformBlockIndex:int

the index of the uniform block within program

pname:int

the name of the parameter to query. One of:

UNIFORM_BLOCK_BINDINGUNIFORM_BLOCK_DATA_SIZE
UNIFORM_BLOCK_NAME_LENGTHUNIFORM_BLOCK_ACTIVE_UNIFORMS
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICESUNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADERUNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
params:IntBuffer

the address of a variable to receive the result of the query

glGetActiveUniformBlockivback to summary
public static void glGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, int[] params)

Array version of: GetActiveUniformBlockiv

glGetActiveUniformBlockNameback to summary
public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, IntBuffer length, ByteBuffer uniformBlockName)

Retrieves the name of an active uniform block.

Parameters
program:int

the name of a program containing the uniform block

uniformBlockIndex:int

the index of the uniform block within program

length:IntBuffer

the address of a variable to receive the number of characters that were written to uniformBlockName

uniformBlockName:ByteBuffer

an array of characters to receive the name of the uniform block at uniformBlockIndex

glGetActiveUniformBlockNameback to summary
public static String glGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize)

Retrieves the name of an active uniform block.

Parameters
program:int

the name of a program containing the uniform block

uniformBlockIndex:int

the index of the uniform block within program

bufSize:int

the size of the buffer addressed by uniformBlockName

Annotations
@NativeType:void
glGetActiveUniformBlockNameback to summary
public static String glGetActiveUniformBlockName(int program, int uniformBlockIndex)

Retrieves the name of an active uniform block.

Parameters
program:int

the name of a program containing the uniform block

uniformBlockIndex:int

the index of the uniform block within program

Annotations
@NativeType:void
glGetActiveUniformBlockNameback to summary
public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, int[] length, ByteBuffer uniformBlockName)

Array version of: GetActiveUniformBlockName

glGetActiveUniformNameback to summary
public static void glGetActiveUniformName(int program, int uniformIndex, IntBuffer length, ByteBuffer uniformName)

Queries the name of an active uniform.

Parameters
program:int

the program containing the active uniform index uniformIndex

uniformIndex:int

the index of the active uniform whose name to query

length:IntBuffer

the address of a variable that will receive the number of characters that were or would have been written to the buffer addressed by uniformName

uniformName:ByteBuffer

the address of a buffer into which the GL will place the name of the active uniform at uniformIndex within program

glGetActiveUniformNameback to summary
public static String glGetActiveUniformName(int program, int uniformIndex, int bufSize)

Queries the name of an active uniform.

Parameters
program:int

the program containing the active uniform index uniformIndex

uniformIndex:int

the index of the active uniform whose name to query

bufSize:int

the size of the buffer, in units of GLchar, of the buffer whose address is specified in uniformName

Annotations
@NativeType:void
glGetActiveUniformNameback to summary
public static String glGetActiveUniformName(int program, int uniformIndex)

Queries the name of an active uniform.

Parameters
program:int

the program containing the active uniform index uniformIndex

uniformIndex:int

the index of the active uniform whose name to query

Annotations
@NativeType:void
glGetActiveUniformNameback to summary
public static void glGetActiveUniformName(int program, int uniformIndex, int[] length, ByteBuffer uniformName)

Array version of: GetActiveUniformName

glGetActiveUniformsiback to summary
public static int glGetActiveUniformsi(int program, int uniformIndex, int pname)

Returns information about several active uniform variables for the specified program object.

Parameters
program:int

the program object to be queried

pname:int

the property of the each uniform in uniformIndices that should be written into the corresponding element of params

Annotations
@NativeType:void
glGetActiveUniformsivback to summary
public static void glGetActiveUniformsiv(int program, IntBuffer uniformIndices, int pname, IntBuffer params)

Returns information about several active uniform variables for the specified program object.

Parameters
program:int

the program object to be queried

uniformIndices:IntBuffer

an array of uniformCount integers containing the indices of uniforms within program

pname:int

the property of the each uniform in uniformIndices that should be written into the corresponding element of params

params:IntBuffer

an array of uniformCount integers which are to receive the value of pname for each uniform in uniformIndices

glGetActiveUniformsivback to summary
public static void glGetActiveUniformsiv(int program, int[] uniformIndices, int pname, int[] params)

Array version of: GetActiveUniformsiv

glGetIntegeriback to summary
public static int glGetIntegeri(int target, int index)

Queries the integer value of an indexed state variable.

Parameters
target:int

the indexed state to query

index:int

the index of the element being queried

Annotations
@NativeType:void
glGetIntegeri_vback to summary
public static void glGetIntegeri_v(int target, int index, IntBuffer data)

Queries the integer value of an indexed state variable.

Parameters
target:int

the indexed state to query

index:int

the index of the element being queried

data:IntBuffer

a scalar or buffer in which to place the returned data

glGetIntegeri_vback to summary
public static void glGetIntegeri_v(int target, int index, int[] data)

Array version of: GetIntegeri_v

glGetUniformBlockIndexback to summary
public static int glGetUniformBlockIndex(int program, ByteBuffer uniformBlockName)

Retrieves the index of a named uniform block.

Parameters
program:int

the name of a program containing the uniform block

uniformBlockName:ByteBuffer

an array of characters to containing the name of the uniform block whose index to retrieve

Annotations
@NativeType:GLuint
glGetUniformBlockIndexback to summary
public static int glGetUniformBlockIndex(int program, CharSequence uniformBlockName)

Retrieves the index of a named uniform block.

Parameters
program:int

the name of a program containing the uniform block

uniformBlockName:CharSequence

an array of characters to containing the name of the uniform block whose index to retrieve

Annotations
@NativeType:GLuint
glGetUniformIndicesback to summary
public static void glGetUniformIndices(int program, PointerBuffer uniformNames, IntBuffer uniformIndices)

Retrieves the indices of a number of uniforms within a program object

Parameters
program:int

the name of a program containing uniforms whose indices to query

uniformNames:PointerBuffer

an array of pointers to buffers containing the names of the queried uniforms

uniformIndices:IntBuffer

an array that will receive the indices of the uniforms

glGetUniformIndicesback to summary
public static void glGetUniformIndices(int program, CharSequence[] uniformNames, IntBuffer uniformIndices)

Retrieves the indices of a number of uniforms within a program object

Parameters
program:int

the name of a program containing uniforms whose indices to query

uniformNames:CharSequence[]

an array of pointers to buffers containing the names of the queried uniforms

uniformIndices:IntBuffer

an array that will receive the indices of the uniforms

glGetUniformIndicesback to summary
public static int glGetUniformIndices(int program, CharSequence uniformName)

Retrieves the indices of a number of uniforms within a program object

Parameters
program:int

the name of a program containing uniforms whose indices to query

Annotations
@NativeType:void
glGetUniformIndicesback to summary
public static void glGetUniformIndices(int program, PointerBuffer uniformNames, int[] uniformIndices)

Array version of: GetUniformIndices

glUniformBlockBindingback to summary
public static void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding)

Assigns a binding point to an active uniform block.

Parameters
program:int

the name of a program object containing the active uniform block whose binding to assign

uniformBlockIndex:int

the index of the active uniform block within program whose binding to assign

uniformBlockBinding:int

the binding point to which to bind the uniform block with index uniformBlockIndex within program

nglGetActiveUniformBlockivback to summary
public static void nglGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, long params)

Unsafe version of: GetActiveUniformBlockiv

nglGetActiveUniformBlockNameback to summary
public static void nglGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize, long length, long uniformBlockName)

Unsafe version of: GetActiveUniformBlockName

Parameters
bufSize:int

the size of the buffer addressed by uniformBlockName

nglGetActiveUniformNameback to summary
public static void nglGetActiveUniformName(int program, int uniformIndex, int bufSize, long length, long uniformName)

Unsafe version of: GetActiveUniformName

Parameters
bufSize:int

the size of the buffer, in units of GLchar, of the buffer whose address is specified in uniformName

nglGetActiveUniformsivback to summary
public static void nglGetActiveUniformsiv(int program, int uniformCount, long uniformIndices, int pname, long params)

Unsafe version of: GetActiveUniformsiv

Parameters
uniformCount:int

the number of elements in the array of indices uniformIndices and the number of parameters written to params upon successful return

nglGetIntegeri_vback to summary
public static void nglGetIntegeri_v(int target, int index, long data)

Unsafe version of: GetIntegeri_v

nglGetUniformBlockIndexback to summary
public static int nglGetUniformBlockIndex(int program, long uniformBlockName)

Unsafe version of: GetUniformBlockIndex

nglGetUniformIndicesback to summary
public static void nglGetUniformIndices(int program, int uniformCount, long uniformNames, long uniformIndices)

Unsafe version of: GetUniformIndices

Parameters
uniformCount:int

the number of uniforms whose indices to query