summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:04:51 -0800
committerPalmer Truelson <palmer@lindenlab.com>2010-02-12 21:04:51 -0800
commit651b14fcae01b089522f3672bbf35bfbe7268aac (patch)
treef63793ae6b972f6205b07769dd7abc9c91690d71 /indra/newview
parent979ddb2ec952f836f7cde7cbc85559b8e9582416 (diff)
Backed out davep's UI optimization. changeset 3134cb7bb181
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 6fd6958d2e..d464862eed 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 f6227c2dd6..de4317b2de 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -476,10 +476,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;
@@ -1847,15 +1843,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();
}
@@ -1903,11 +1896,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)
@@ -1973,7 +1964,6 @@ void LLViewerWindow::draw()
LLUI::sGLScaleFactor = old_scale_factor;
}
- LLUI::popMatrix();
gGL.popMatrix();
#if LL_DEBUG