mirror of https://github.com/axmolengine/axmol.git
draw sub mesh bug
This commit is contained in:
parent
b1c9fb99e3
commit
da63032a46
|
@ -313,12 +313,12 @@ void Sprite3D::genGLProgramState()
|
||||||
}
|
}
|
||||||
|
|
||||||
setGLProgramState(programstate);
|
setGLProgramState(programstate);
|
||||||
auto count = mesh->getSubMeshCount();
|
auto count = _subMeshStates.size();
|
||||||
_meshCommands.resize(count);
|
_meshCommands.resize(count);
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
auto tex = _subMeshStates.at(i)->getTexture();
|
auto tex = _subMeshStates.at(i)->getTexture();
|
||||||
GLuint texID = tex ? tex->getName() : 0;
|
GLuint texID = tex ? tex->getName() : 0;
|
||||||
_meshCommands[i].genMaterialID(texID, programstate, mesh->getSubMesh(i)/*_meshes.at(i)*/, _blend);
|
_meshCommands[i].genMaterialID(texID, programstate, _subMeshStates.at(i)->getSubMesh()->getMesh(), _blend);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue