summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprimmediacontrols.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-09-28 18:01:02 +0800
committerErik Kundiman <erik@megapahit.org>2024-10-18 18:38:25 +0800
commitad3cbb9f75c4ea7f0473225afc034c403b54fc82 (patch)
tree4e4239e97a405d2820e26a4f2215ad8ccb88af7e /indra/newview/llpanelprimmediacontrols.cpp
parent7fdb350e487acc35b26de6e243ff27f94185d3a5 (diff)
parent64c055f9be03861661f8c211ae36ba0db489b12d (diff)
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/newview/llpanelprimmediacontrols.cpp')
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 4e905ae0fd..4db0a5b59d 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -63,11 +63,10 @@
#include "llfloatertools.h" // to enable hide if build tools are up
#include "llvector4a.h"
-// Functions pulled from pipeline.cpp
-glh::matrix4f get_current_modelview();
-glh::matrix4f get_current_projection();
+#include <glm/gtx/transform2.hpp>
+
// Functions pulled from llviewerdisplay.cpp
-bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model);
+bool get_hud_matrices(glm::mat4 &proj, glm::mat4 &model);
// Warning: make sure these two match!
const LLPanelPrimMediaControls::EZoomLevel LLPanelPrimMediaControls::kZoomLevels[] = { ZOOM_NONE, ZOOM_MEDIUM };
@@ -646,13 +645,13 @@ void LLPanelPrimMediaControls::updateShape()
vert_it = vect_face.begin();
vert_end = vect_face.end();
- glh::matrix4f mat;
+ glm::mat4 mat;
if (!is_hud)
{
mat = get_current_projection() * get_current_modelview();
}
else {
- glh::matrix4f proj, modelview;
+ glm::mat4 proj, modelview;
if (get_hud_matrices(proj, modelview))
mat = proj * modelview;
}
@@ -661,11 +660,11 @@ void LLPanelPrimMediaControls::updateShape()
for(; vert_it != vert_end; ++vert_it)
{
// project silhouette vertices into screen space
- glh::vec3f screen_vert = glh::vec3f(vert_it->mV);
- mat.mult_matrix_vec(screen_vert);
+ glm::vec3 screen_vert(glm::make_vec3(vert_it->mV));
+ screen_vert = mul_mat4_vec3(mat, screen_vert);
// add to screenspace bounding box
- update_min_max(min, max, LLVector3(screen_vert.v));
+ update_min_max(min, max, LLVector3(glm::value_ptr(screen_vert)));
}
// convert screenspace bbox to pixels (in screen coords)