获取活跃一致变量的信息。变量可以在程序执行期间被访问,则该变量被认为是活动的
void glGetActiveUniform( GLuint program,
GLuint index,
GLsizei bufSize,
GLsizei *length,
GLint *size,
GLenum *type,
GLchar *name);
program
Specifies the program object to be queried.
指定着色器程序标识符
index
Specifies the index of the uniform variable to be queried.
指定一致变量的索引序号
bufSize
Specifies the maximum number of characters OpenGL is allowed to write in the character buffer indicated by name.
指定一致变量名的最大长度
length
Returns the number of characters actually written by OpenGL in the string indicated by name (excluding the null terminator) if a value other than NULL is passed.
获取一致变量名的实际长度,如果不需要获取长度,设置为NULL或0即可
size
Returns the size of the uniform variable.
获取一致变量的内存长度
type
Returns the data type