From 8cb3edf91fd5d03e9da03ba5f92334fd5db5e57c Mon Sep 17 00:00:00 2001 From: yangxiao Date: Wed, 27 Aug 2014 14:53:39 +0800 Subject: [PATCH] merge cocos light work --- cocos/3d/CCSprite3D.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cocos/3d/CCSprite3D.cpp b/cocos/3d/CCSprite3D.cpp index f5bfa07225..815945757d 100644 --- a/cocos/3d/CCSprite3D.cpp +++ b/cocos/3d/CCSprite3D.cpp @@ -310,12 +310,13 @@ void Sprite3D::genGLProgramState() { if (hasNormal) shader = GLProgram::SHADER_3D_POSITION_NORMAL_TEXTURE; - glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION_TEXTURE); + else + shader = GLProgram::SHADER_3D_POSITION_TEXTURE; } } else { - glProgram = GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_3D_POSITION); + shader = GLProgram::SHADER_3D_POSITION; } if (shader) glProgram = GLProgramCache::getInstance()->getGLProgram(shader);