diff options
Diffstat (limited to 'indra/newview/llpanelprimmediacontrols.cpp')
-rw-r--r-- | indra/newview/llpanelprimmediacontrols.cpp | 17 |
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) |