summaryrefslogtreecommitdiff
path: root/indra/llprimitive/lldaeloader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
-rw-r--r--indra/llprimitive/lldaeloader.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 34af3ffece..b634600de0 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -51,7 +51,8 @@
#include "llsdserialize.h"
#include "lljoint.h"
-#include "glh/glh_linear.h"
+#include "glm/mat4x4.hpp"
+#include "glm/gtc/type_ptr.hpp"
#include "llmatrix4a.h"
#include <boost/regex.hpp>
@@ -1072,7 +1073,9 @@ bool LLDAELoader::OpenFile(const std::string& filename)
LLModel* mdl = *i;
if(mdl->getStatus() != LLModel::NO_ERRORS)
{
- setLoadState(ERROR_MODEL + mdl->getStatus()) ;
+ // setLoadState() values >= ERROR_MODEL are reserved to
+ // report errors with the model itself.
+ setLoadState(ERROR_MODEL + eLoadState(mdl->getStatus())) ;
return false; //abort
}
@@ -1216,9 +1219,9 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do
mesh_scale *= normalized_transformation;
normalized_transformation = mesh_scale;
- glh::matrix4f inv_mat((F32*) normalized_transformation.mMatrix);
- inv_mat = inv_mat.inverse();
- LLMatrix4 inverse_normalized_transformation(inv_mat.m);
+ glm::mat4 inv_mat = glm::make_mat4((F32*)normalized_transformation.mMatrix);
+ inv_mat = glm::inverse(inv_mat);
+ LLMatrix4 inverse_normalized_transformation(glm::value_ptr(inv_mat));
domSkin::domBind_shape_matrix* bind_mat = skin->getBind_shape_matrix();