Graphics Reference
In-Depth Information
7.
A row-major matrix with C columns and R rows—Stored as an array
of R vectors with C components according to rule 4.
8.
An array of M row-major matrices with C columns and R rows—
Stored as M × R vectors with C components according to rule 4.
9.
A single structure—The offset and size are calculated according to the
preceding rules. The structure's size will be padded to a multiple of
the size of a vec4 .
10.
An array of S structures—The base alignment is calculated according
to the alignment of the element of the array. The element of the
array is calculated according to rule 9.
Similar to how a uniform location value is used to refer to a uniform, a
uniform block index is used to refer to a uniform block. You can retrieve
the uniform block index using glGetUniformBlockIndex .
GLuint glGetUniformBlockIndex (GLuint program ,
const GLchar *blockName )
program handle to the program object
blockName the name of the uniform block for which to get the index
From the uniform block index, you can determine the details of the active
uniform block using glGetActiveUniformBlockName (to get the block
name) and glGetActiveUniformBlockiv (to get many properties of the
uniform block).
void glGetActiveUniformBlockName (GLuint program ,
GLuint index ,
GLsizei bufSize ,
GLsizei * length ,
GLchar * block N ame )
handle to the program object
program
the uniform block index to be queried
index
the number of characters in the name array
bufSize
if not NULL , will be written with the number of characters
written into the name array (less the null terminator)
(continues)
length
 
 
Search WWH ::




Custom Search