merge cocos light work

This commit is contained in:
yangxiao 2014-08-27 14:53:39 +08:00
parent fdc0fad935
commit 8cb3edf91f
1 changed files with 3 additions and 2 deletions

View File

@ -310,12 +310,13 @@ void Sprite3D::genGLProgramState()
{ {
if (hasNormal) if (hasNormal)
shader = GLProgram::SHADER_3D_POSITION_NORMAL_TEXTURE; shader = GLProgram::SHADER_3D_POSITION_NORMAL_TEXTURE;
glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION_TEXTURE); else
shader = GLProgram::SHADER_3D_POSITION_TEXTURE;
} }
} }
else else
{ {
glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION); shader = GLProgram::SHADER_3D_POSITION;
} }
if (shader) if (shader)
glProgram = GLProgramCache::getInstance()->getGLProgram(shader); glProgram = GLProgramCache::getInstance()->getGLProgram(shader);