什么意思:
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
。
关于c++ - "weird"变量初始化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41272035/