diff --git a/cocos/3d/CCMesh.cpp b/cocos/3d/CCMesh.cpp index 5d79a10e97..c6e81189ec 100644 --- a/cocos/3d/CCMesh.cpp +++ b/cocos/3d/CCMesh.cpp @@ -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); }