jjzjj

SkeletonBlock

全部标签

c++ - glGetUniformIndices 没有返回正确的索引

我正在尝试学习如何使用统一缓冲区对象,阅读OpenGLSuperbible5。我的着色器中有一个统一block:layout(std140)uniformSkeletonBlock{vec3position[64];vec4orientation[64];}Skeleton;现在我获取索引的代码是:constGLchar*uniformNames[2]={"SkeletonBlock.position","SkeletonBlock.orientation"};GLuintuniformIndex[2];glGetUniformIndices(shaderProgram,2,unifo