fix normal flag check error

This commit is contained in:
yangxiao 2014-09-26 16:46:15 +08:00
parent fd35d43510
commit c335df1071
1 changed files with 1 additions and 1 deletions

View File

@ -354,7 +354,7 @@ void MeshCommand::setLightUniforms()
int maxPointLight = conf->getMaxSupportPointLightInShader(); int maxPointLight = conf->getMaxSupportPointLightInShader();
int maxSpotLight = conf->getMaxSupportSpotLightInShader(); int maxSpotLight = conf->getMaxSupportSpotLightInShader();
auto &lights = scene->getLights(); auto &lights = scene->getLights();
if (_glProgramState->getVertexAttribsFlags() & GLProgram::VERTEX_ATTRIB_NORMAL) if (_glProgramState->getVertexAttribsFlags() & (1 << GLProgram::VERTEX_ATTRIB_NORMAL))
{ {
GLint enabledDirLightNum = 0; GLint enabledDirLightNum = 0;
GLint enabledPointLightNum = 0; GLint enabledPointLightNum = 0;