diff options
author | James Cook <james@lindenlab.com> | 2009-11-30 14:42:34 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-11-30 14:42:34 -0800 |
commit | d83f934ec87e594b7e88267bdd1be938a73f090d (patch) | |
tree | 2fc1bc60f960e3139f3da799b7d93c9a08f8e7c6 /indra/newview/llhudrender.cpp | |
parent | 1ec8ca378814b7f493f5f6e55fb505b5c884a995 (diff) | |
parent | 7d3b3cc474822db144b623980d08b7addc2f77ff (diff) |
merge
Diffstat (limited to 'indra/newview/llhudrender.cpp')
-rw-r--r-- | indra/newview/llhudrender.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index ab0be90def..a02dc3355b 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -64,11 +64,12 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, const LLColor4& color, const BOOL orthographic) { + LLViewerCamera* camera = LLViewerCamera::getInstance(); // Do cheap plane culling - LLVector3 dir_vec = pos_agent - LLViewerCamera::getInstance()->getOrigin(); + LLVector3 dir_vec = pos_agent - camera->getOrigin(); dir_vec /= dir_vec.magVec(); - if (wstr.empty() || (!orthographic && dir_vec * LLViewerCamera::getInstance()->getAtAxis() <= 0.f)) + if (wstr.empty() || (!orthographic && dir_vec * camera->getAtAxis() <= 0.f)) { return; } @@ -82,15 +83,15 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, } else { - LLViewerCamera::getInstance()->getPixelVectors(pos_agent, up_axis, right_axis); + camera->getPixelVectors(pos_agent, up_axis, right_axis); } - LLCoordFrame render_frame = *LLViewerCamera::getInstance(); + LLCoordFrame render_frame = *camera; LLQuaternion rot; if (!orthographic) { rot = render_frame.getQuaternion(); - rot = rot * LLQuaternion(-F_PI_BY_TWO, LLViewerCamera::getInstance()->getYAxis()); - rot = rot * LLQuaternion(F_PI_BY_TWO, LLViewerCamera::getInstance()->getXAxis()); + rot = rot * LLQuaternion(-F_PI_BY_TWO, camera->getYAxis()); + rot = rot * LLQuaternion(F_PI_BY_TWO, camera->getXAxis()); } else { |