这是什么意思:

GLuint bindingPoint = 1, buffer, blockIndex;


我在一个我需要的教程中找到了它,而我之前从未见过这样的变量初始化。

这行的意思是

GLuint bindingPoint = 1;
GLuint bindingPoint = buffer;
GLuint bindingPoint = blockIndex;


最佳答案

GLuint bindingPoint = 1, buffer, blockIndex;行等效于以下三个行:

GLuint bindingPoint = 1;
GLuint buffer;
GLuint blockIndex;


两种版本均定义变量bindingPoint, buffer, blockIndex。用bindingPoint初始化为1

09-18 20:45