summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorNyx Linden <nyx@lindenlab.com>2013-03-12 22:34:15 +0000
committerNyx Linden <nyx@lindenlab.com>2013-03-12 22:34:15 +0000
commit1586107e87f20da7a3eb8b14beffaed03ffc5db5 (patch)
tree60dd6cafc09babbf44efd91d5587405af199d0b6 /indra/newview/llviewerwindow.cpp
parent45838b8b07a61af9b85ab9bc3013f1ac867e70d8 (diff)
SH-3944 WIP CHUI merge fixing
re-introduced don's refactor of low-level openGL calls pulling out of llui and putting them into llrender. Took the new code from their updated versions from the CHUI merge, but put them in a place accessible to appearance utility.
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 383eb3c9e4..db3476850b 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2157,7 +2157,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
calcDisplayScale();
- BOOL display_scale_changed = mDisplayScale != LLUI::sGLScaleFactor;
+ BOOL display_scale_changed = mDisplayScale != LLUI::getScaleFactor();
LLUI::setScaleFactor(mDisplayScale);
// update our window rectangle
@@ -2363,7 +2363,7 @@ void LLViewerWindow::draw()
// scale view by UI global scale factor and aspect ratio correction factor
gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
- LLVector2 old_scale_factor = LLUI::sGLScaleFactor;
+ LLVector2 old_scale_factor = LLUI::getScaleFactor();
// apply camera zoom transform (for high res screenshots)
F32 zoom_factor = LLViewerCamera::getInstance()->getZoomFactor();
S16 sub_region = LLViewerCamera::getInstance()->getZoomSubRegion();
@@ -2377,7 +2377,7 @@ void LLViewerWindow::draw()
(F32)getWindowHeightScaled() * -(F32)pos_y,
0.f);
gGL.scalef(zoom_factor, zoom_factor, 1.f);
- LLUI::sGLScaleFactor *= zoom_factor;
+ LLUI::getScaleFactor() *= zoom_factor;
}
// Draw tool specific overlay on world
@@ -2425,7 +2425,7 @@ void LLViewerWindow::draw()
LLFontGL::HCENTER, LLFontGL::TOP);
}
- LLUI::sGLScaleFactor = old_scale_factor;
+ LLUI::setScaleFactor(old_scale_factor);
}
LLUI::popMatrix();
gGL.popMatrix();
@@ -3230,8 +3230,8 @@ void LLViewerWindow::updateLayout()
void LLViewerWindow::updateMouseDelta()
{
- S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::sGLScaleFactor.mV[VX]);
- S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::sGLScaleFactor.mV[VY]);
+ S32 dx = lltrunc((F32) (mCurrentMousePoint.mX - mLastMousePoint.mX) * LLUI::getScaleFactor().mV[VX]);
+ S32 dy = lltrunc((F32) (mCurrentMousePoint.mY - mLastMousePoint.mY) * LLUI::getScaleFactor().mV[VY]);
//RN: fix for asynchronous notification of mouse leaving window not working
LLCoordWindow mouse_pos;