From 7f0781f6e893374df50f817dba097bccdd5af405 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Thu, 7 Jan 2016 11:49:02 -0800 Subject: [PATCH] Move model update next to bindTransform --- libraries/render-utils/src/MeshPartPayload.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libraries/render-utils/src/MeshPartPayload.cpp b/libraries/render-utils/src/MeshPartPayload.cpp index 7b1f6887f1..fd2a025d1d 100644 --- a/libraries/render-utils/src/MeshPartPayload.cpp +++ b/libraries/render-utils/src/MeshPartPayload.cpp @@ -221,7 +221,6 @@ void MeshPartPayload::render(RenderArgs* args) const { PerformanceTimer perfTimer("MeshPartPayload::render"); gpu::Batch& batch = *(args->_batch); - auto mode = args->_renderMode; ShapeKey key = getShapeKey(); @@ -359,9 +358,6 @@ ShapeKey ModelMeshPartPayload::getShapeKey() const { return ShapeKey::Builder::invalid(); } - // Back to model to update the cluster matrices right now - _model->updateClusterMatrices(_transform.getTranslation(), _transform.getRotation()); - const FBXMesh& mesh = geometry.meshes.at(_meshIndex); // if our index is ever out of range for either meshes or networkMeshes, then skip it, and set our _meshGroupsKnown @@ -463,7 +459,6 @@ void ModelMeshPartPayload::render(RenderArgs* args) const { } gpu::Batch& batch = *(args->_batch); - auto mode = args->_renderMode; ShapeKey key = getShapeKey(); if (!key.isValid()) { @@ -497,6 +492,7 @@ void ModelMeshPartPayload::render(RenderArgs* args) const { assert(locations); // Bind the model transform and the skinCLusterMatrices if needed + _model->updateClusterMatrices(_transform.getTranslation(), _transform.getRotation()); bindTransform(batch, locations); //Bind the index buffer and vertex buffer and Blend shapes if needed