From 0da7005c329f4484ccba95a5fde48d4312392bc3 Mon Sep 17 00:00:00 2001 From: Muhammad Al-Syrwan Date: Thu, 17 May 2012 02:00:57 +0300 Subject: [PATCH] fixed scaling bug for multi-mesh models --- .../SimpleTexturedOpenGL/src/model_loading.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp index 66e44250c..01d51aea7 100644 --- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp @@ -409,8 +409,9 @@ void recursive_render (const struct aiScene *sc, const struct aiNode* nd, float unsigned int i; unsigned int n=0, t; aiMatrix4x4 m = nd->mTransformation; - - m.Scaling(aiVector3D(scale, scale, scale), m); + aiMatrix4x4 m2; + aiMatrix4x4::Scaling(aiVector3D(scale, scale, scale), m2); + m = m * m2; // update transform m.Transpose();