From c335df10717e8915107b5ff3bce3d5fa77eecabd Mon Sep 17 00:00:00 2001 From: yangxiao Date: Fri, 26 Sep 2014 16:46:15 +0800 Subject: [PATCH] fix normal flag check error --- cocos/renderer/CCMeshCommand.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/renderer/CCMeshCommand.cpp b/cocos/renderer/CCMeshCommand.cpp index 5f938e448c..73ecfbd659 100644 --- a/cocos/renderer/CCMeshCommand.cpp +++ b/cocos/renderer/CCMeshCommand.cpp @@ -354,7 +354,7 @@ void MeshCommand::setLightUniforms() int maxPointLight = conf->getMaxSupportPointLightInShader(); int maxSpotLight = conf->getMaxSupportSpotLightInShader(); auto &lights = scene->getLights(); - if (_glProgramState->getVertexAttribsFlags() & GLProgram::VERTEX_ATTRIB_NORMAL) + if (_glProgramState->getVertexAttribsFlags() & (1 << GLProgram::VERTEX_ATTRIB_NORMAL)) { GLint enabledDirLightNum = 0; GLint enabledPointLightNum = 0;