closed #2410: Fixing a bug that loading a wrong texture in ShaderCache::loadDefaultShaders. This could fix DrawNode displays nothing when resume.

This commit is contained in:
James Chen 2013-07-17 12:55:27 +08:00
parent 56419b9e90
commit 7b51599cbd
1 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ void ShaderCache::reloadDefaultShaders()
//
p = programForKey(kShader_PositionLengthTexureColor);
p->reset();
loadDefaultShader(p, kShaderType_Position_uColor);
loadDefaultShader(p, kShaderType_PositionLengthTexureColor);
}
void ShaderCache::loadDefaultShader(GLProgram *p, int type)
@ -297,7 +297,7 @@ void ShaderCache::loadDefaultShader(GLProgram *p, int type)
GLProgram* ShaderCache::programForKey(const char* key)
{
return (GLProgram*)_programs->objectForKey(key);
return static_cast<GLProgram*>(_programs->objectForKey(key));
}
void ShaderCache::addProgram(GLProgram* program, const char* key)