diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-09-23 23:26:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-23 23:26:54 +0300 |
commit | 38916ebf367aa400d8151d78204e714d40e8c323 (patch) | |
tree | 2fe671253d83620fba0e0b1c6c488997b558a7ef /indra/newview/llreflectionmap.cpp | |
parent | 4274eb591a1b0806f8c73ca16df65ade60db2200 (diff) | |
parent | 0b7548c6b69f8259aae987c479a85a9d0fd04d89 (diff) |
Merge pull request #2657 from secondlife/marchcat/b-develop
develop → Maint B sync
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r-- | indra/newview/llreflectionmap.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp index 8d164b6883..f77d37f821 100644 --- a/indra/newview/llreflectionmap.cpp +++ b/indra/newview/llreflectionmap.cpp @@ -253,23 +253,22 @@ bool LLReflectionMap::getBox(LLMatrix4& box) LLVolume* volume = mViewerObject->getVolume(); if (volume && mViewerObject->getReflectionProbeIsBox()) { - glh::matrix4f mv(gGLModelView); - glh::matrix4f scale; + glm::mat4 mv(get_current_modelview()); LLVector3 s = mViewerObject->getScale().scaledVec(LLVector3(0.5f, 0.5f, 0.5f)); mRadius = s.magVec(); - scale.set_scale(glh::vec3f(s.mV)); + glm::mat4 scale = glm::scale(glm::make_vec3(s.mV)); if (mViewerObject->mDrawable != nullptr) { // object to agent space (no scale) - glh::matrix4f rm((F32*)mViewerObject->mDrawable->getWorldMatrix().mMatrix); + glm::mat4 rm(glm::make_mat4((F32*)mViewerObject->mDrawable->getWorldMatrix().mMatrix)); // construct object to camera space (with scale) mv = mv * rm * scale; // inverse is camera space to object unit cube - mv = mv.inverse(); + mv = glm::inverse(mv); - box = LLMatrix4(mv.m); + box = LLMatrix4(glm::value_ptr(mv)); return true; } |