avoid for a new Transform for identity gpu::Batch::setTransformModel when rendering model part which are blend shapes

This commit is contained in:
Sam Gateau 2014-11-12 00:52:40 -08:00
parent 5f0fdeccb2
commit 6096a61ecc

View file

@ -1866,11 +1866,8 @@ int Model::renderMeshes(gpu::Batch& batch, RenderMode mode, bool translucent, fl
if (state.clusterMatrices.size() > 1) { if (state.clusterMatrices.size() > 1) {
GLBATCH(glUniformMatrix4fv)(skinLocations->clusterMatrices, state.clusterMatrices.size(), false, GLBATCH(glUniformMatrix4fv)(skinLocations->clusterMatrices, state.clusterMatrices.size(), false,
(const float*)state.clusterMatrices.constData()); (const float*)state.clusterMatrices.constData());
batch.setModelTransform(gpu::TransformPointer());
gpu::TransformPointer modelTransform(new gpu::Transform());
batch.setModelTransform(modelTransform);
} else { } else {
gpu::TransformPointer modelTransform(new gpu::Transform(state.clusterMatrices[0])); gpu::TransformPointer modelTransform(new gpu::Transform(state.clusterMatrices[0]));
batch.setModelTransform(modelTransform); batch.setModelTransform(modelTransform);
} }