diff options
author | James Cook <james@lindenlab.com> | 2009-11-30 14:41:52 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-11-30 14:41:52 -0800 |
commit | 7d3b3cc474822db144b623980d08b7addc2f77ff (patch) | |
tree | 7d972191820ff94840a6f48d7f30b17fb6f3316a /indra/newview/llhudrender.cpp | |
parent | 447d1c6498870e82834c3b404fa507aee331f45b (diff) |
Linker optimization - use "extern template" for commonly regenerated templates
Also replaced many duplicate calls to LLViewerCamera::getInstance() with local pointer.
Reviewed with Ambroff
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 { |