我从 opengl 的着色器中获得了两个变量。我做这样的事情。
vLoc = glGetAttribLocation(progId,"vPosition");
nLoc = glGetAttribLocation(progId,"vNormal");
matViewLoc = glGetUniformLocation(progId,"matView");
matProjLoc = glGetUniformLocation(progId,"matProj");
matTranslateLoc = glGetUniformLocation(progId,"matTranslate");
vLoc 和 projLoc 返回相同的位置。有人会知道为什么吗?谢谢!