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/lldynamictexture.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/lldynamictexture.cpp')
-rw-r--r-- | indra/newview/lldynamictexture.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 9bc7221dc8..c7c79401a0 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -141,11 +141,12 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth) gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); } // Set up camera - mCamera.setOrigin(*LLViewerCamera::getInstance()); - mCamera.setAxes(*LLViewerCamera::getInstance()); - mCamera.setAspect(LLViewerCamera::getInstance()->getAspect()); - mCamera.setView(LLViewerCamera::getInstance()->getView()); - mCamera.setNear(LLViewerCamera::getInstance()->getNear()); + LLViewerCamera* camera = LLViewerCamera::getInstance(); + mCamera.setOrigin(*camera); + mCamera.setAxes(*camera); + mCamera.setAspect(camera->getAspect()); + mCamera.setView(camera->getView()); + mCamera.setNear(camera->getNear()); glViewport(mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight); if (clear_depth) @@ -174,11 +175,12 @@ void LLViewerDynamicTexture::postRender(BOOL success) gViewerWindow->setup2DViewport(); // restore camera - LLViewerCamera::getInstance()->setOrigin(mCamera); - LLViewerCamera::getInstance()->setAxes(mCamera); - LLViewerCamera::getInstance()->setAspect(mCamera.getAspect()); - LLViewerCamera::getInstance()->setView(mCamera.getView()); - LLViewerCamera::getInstance()->setNear(mCamera.getNear()); + LLViewerCamera* camera = LLViewerCamera::getInstance(); + camera->setOrigin(mCamera); + camera->setAxes(mCamera); + camera->setAspect(mCamera.getAspect()); + camera->setView(mCamera.getView()); + camera->setNear(mCamera.getNear()); } //----------------------------------------------------------------------------- |