summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:05:09 -0800
committerPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:05:09 -0800
commit660c3b182c12ce0842334127782abc7c3cfba860 (patch)
tree4c81eec10c77b407ccbdba6d1887d2c471325097 /indra/newview
parent6499aee37ca89ba5d35c6f30d0dc7c8c9c72865d (diff)
parent651b14fcae01b089522f3672bbf35bfbe7268aac (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llhudrender.cpp12
-rw-r--r--indra/newview/llhudtext.cpp2
-rw-r--r--indra/newview/llmediactrl.cpp8
-rw-r--r--indra/newview/llnetmap.cpp15
-rw-r--r--indra/newview/llviewerwindow.cpp14
5 files changed, 13 insertions, 38 deletions
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 325c9c260c..a02dc3355b 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -121,24 +121,24 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glMatrixMode(GL_MODELVIEW);
- gGL.pushMatrix();
+
LLUI::pushMatrix();
gl_state_for_2d(world_view_rect.getWidth(), world_view_rect.getHeight());
gViewerWindow->setup3DViewport();
-
+ //gViewerWindow->setup2DRender();
+
winX -= world_view_rect.mLeft;
winY -= world_view_rect.mBottom;
LLUI::loadIdentity();
- glLoadIdentity();
LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f));
+ //glRotatef(angle * RAD_TO_DEG, axis.mV[VX], axis.mV[VY], axis.mV[VZ]);
+ //glScalef(right_scale, up_scale, 1.f);
F32 right_x;
font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x);
-
LLUI::popMatrix();
- gGL.popMatrix();
-
+
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 8d1d27444b..8ad94b957d 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -555,7 +555,7 @@ void LLHUDText::renderText(BOOL for_select)
}
}
/// Reset the default color to white. The renderer expects this to be the default.
- gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f);
+ glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
if (for_select)
{
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index bf33d8527e..501a137b42 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -724,14 +724,14 @@ void LLMediaCtrl::draw()
LLGLSUIDefault gls_ui;
LLGLDisable gls_alphaTest( GL_ALPHA_TEST );
- gGL.pushUIMatrix();
+ gGL.pushMatrix();
{
if (mIgnoreUIScale)
{
- gGL.loadUIIdentity();
+ glLoadIdentity();
// font system stores true screen origin, need to scale this by UI scale factor
// to get render origin for this view (with unit scale)
- gGL.translateUI(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
+ gGL.translatef(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]),
floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]),
LLFontGL::sCurOrigin.mZ);
}
@@ -825,7 +825,7 @@ void LLMediaCtrl::draw()
gGL.end();
gGL.setSceneBlendType(LLRender::BT_ALPHA);
}
- gGL.popUIMatrix();
+ gGL.popMatrix();
}
else
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 05623198ab..234fe13217 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -153,18 +153,6 @@ void LLNetMap::draw()
// Prepare a scissor region
F32 rotation = 0;
- gGL.pushMatrix();
- gGL.pushUIMatrix();
-
- LLVector3 offset = gGL.getUITranslation();
- LLVector3 scale = gGL.getUIScale();
-
- glLoadIdentity();
- gGL.loadUIIdentity();
-
- glScalef(scale.mV[0], scale.mV[1], scale.mV[2]);
- gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]);
-
{
LLLocalClipRect clip(getLocalRect());
{
@@ -447,9 +435,6 @@ void LLNetMap::draw()
}
}
- gGL.popMatrix();
- gGL.popUIMatrix();
-
LLUICtrl::draw();
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index cb14505abb..1fd7c1cfb3 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -486,10 +486,6 @@ public:
}
ypos += y_inc;
- addText(xpos, ypos, llformat("UI Verts/Calls: %d/%d", LLRender::sUIVerts, LLRender::sUICalls));
- LLRender::sUICalls = LLRender::sUIVerts = 0;
- ypos += y_inc;
-
addText(xpos,ypos, llformat("%d/%d Nodes visible", gPipeline.mNumVisibleNodes, LLSpatialGroup::sNodeCount));
ypos += y_inc;
@@ -2007,15 +2003,12 @@ void LLViewerWindow::drawDebugText()
{
gGL.color4f(1,1,1,1);
gGL.pushMatrix();
- gGL.pushUIMatrix();
{
// scale view by UI global scale factor and aspect ratio correction factor
- gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
+ glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
mDebugText->draw();
}
- gGL.popUIMatrix();
gGL.popMatrix();
-
gGL.flush();
}
@@ -2063,11 +2056,9 @@ void LLViewerWindow::draw()
// No translation needed, this view is glued to 0,0
gGL.pushMatrix();
- LLUI::pushMatrix();
{
-
// scale view by UI global scale factor and aspect ratio correction factor
- gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
+ glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f);
LLVector2 old_scale_factor = LLUI::sGLScaleFactor;
// apply camera zoom transform (for high res screenshots)
@@ -2133,7 +2124,6 @@ void LLViewerWindow::draw()
LLUI::sGLScaleFactor = old_scale_factor;
}
- LLUI::popMatrix();
gGL.popMatrix();
#if LL_DEBUG