openGL之API学习(一零三)glGetActiveUniform

glGetActiveUniform是OpenGL中用于查询活跃统一变量信息的函数,它能获取变量的索引、大小、类型和名称。此函数在程序执行期间对可以访问的变量进行查询,帮助开发者了解其属性。
摘要由CSDN通过智能技术生成

获取活跃一致变量的信息。变量可以在程序执行期间被访问,则该变量被认为是活动的

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值