【发布时间】:2022-01-04 22:33:34
【问题描述】:
glVertexAttribFormat 中的attribindex 是否与我的 GLSL 顶点着色器中的布局位置相对应?
即如果我写
glVertexAttribFormat(0, 3, GL_FLOAT, GL_FALSE, offsetof(Vertex, position));
0 会与我的着色器中的这一行相对应吗?
layout (location = 0) in vec3 inPos;
【问题讨论】: