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) {
GLBATCH(glUniformMatrix4fv)(skinLocations->clusterMatrices, state.clusterMatrices.size(), false,
(const float*)state.clusterMatrices.constData());
gpu::TransformPointer modelTransform(new gpu::Transform());
batch.setModelTransform(modelTransform);
batch.setModelTransform(gpu::TransformPointer());
} else {
gpu::TransformPointer modelTransform(new gpu::Transform(state.clusterMatrices[0]));
batch.setModelTransform(modelTransform);
}