- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
494 B
494 B
OpenGLShader::GetUniformLocation
int GetUniformLocation(const char* name) const;
获取 Uniform 变量的位置索引。
参数:
name- Uniform 变量名称
返回: Uniform 位置索引,失败返回 -1
线程安全: ❌
示例:
int loc = shader->GetUniformLocation("modelMatrix");
if (loc != -1) {
glUniformMatrix4fv(loc, 1, GL_FALSE, &modelMatrix[0][0]);
}
相关文档
- OpenGLShader 总览 - 返回类总览