获取活跃一致变量的信息。变量可以在程序执行期间被访问,则该变量被认为是活动的
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.
获取一致变量

glGetActiveUniform是OpenGL中用于查询活跃统一变量信息的函数,它能获取变量的索引、大小、类型和名称。此函数在程序执行期间对可以访问的变量进行查询,帮助开发者了解其属性。
最低0.47元/天 解锁文章
735

被折叠的 条评论
为什么被折叠?



