setGLProgramState should not modify state block

This commit is contained in:
yangxiao 2015-10-29 14:22:13 +08:00
parent 16d9cf1af9
commit 11f5e6cf96
1 changed files with 2 additions and 0 deletions

View File

@ -404,6 +404,8 @@ void Mesh::setGLProgramState(GLProgramState* glProgramState)
{
// XXX create dummy texture
auto material = Material::createWithGLStateProgram(glProgramState);
if (_material)
material->setStateBlock(_material->getStateBlock());
setMaterial(material);
}