标签:io ar sp for on bs cti ad ef
GLint maxUniformLen;glGetActiveUniform(this->_program, index, maxUniformLen, &length, &size, &type, uniformName);
location = glGetUniformLocation(this->_program, uniformName);
switch(type)
{
case GL_FLOAT:
//
break;
case GL_FLOAT_VEC2:
//
break;
case GL_FLOAT_VEC3:
//
break;
case GL_FLOAT_VEC4:
//
break;
case GL_INT:
//
break;
//.....all type
default:
//
break;
}
OpenGLShader 编程系列 - 查询shader中的Uniforms
标签:io ar sp for on bs cti ad ef
原文地址:http://blog.csdn.net/zangle260/article/details/41800899