summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmap.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@lindenlab.com>2024-09-12 09:22:10 -0700
committerGitHub <noreply@github.com>2024-09-12 11:22:10 -0500
commitb713f56d07cffb21cad5928bf30d6d4b6dc79de9 (patch)
tree9c64cef93e350c153c8ab590141650f21b99ed66 /indra/newview/llreflectionmap.cpp
parent264c57831bc6ca9be1c465c10a2558c3d28b936e (diff)
Replace glh_linear usage with GLM (#2554)
Diffstat (limited to 'indra/newview/llreflectionmap.cpp')
-rw-r--r--indra/newview/llreflectionmap.cpp11
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;
}