summaryrefslogtreecommitdiff
path: root/indra/newview/llhudrender.cpp
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-12-05 09:36:41 -0800
committerLeslie Linden <leslie@lindenlab.com>2011-12-05 09:36:41 -0800
commit837e4e5165cc3e6595577e90bae240e676be8ffe (patch)
tree85c8e8a8cb6adf8abc87fe3a70d4513a1ab625e5 /indra/newview/llhudrender.cpp
parent570d02dc7e41c3e08477e7f759d632db78690eb4 (diff)
parent71974461114d81f818f69a4344ce4071c20f331f (diff)
Merge with viewer-experience
Diffstat (limited to 'indra/newview/llhudrender.cpp')
-rw-r--r--indra/newview/llhudrender.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp
index 1156e764a1..122711a86d 100644
--- a/indra/newview/llhudrender.cpp
+++ b/indra/newview/llhudrender.cpp
@@ -107,14 +107,24 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
viewport[1] = world_view_rect.mBottom;
viewport[2] = world_view_rect.getWidth();
viewport[3] = world_view_rect.getHeight();
+
+ F64 mdlv[16];
+ F64 proj[16];
+
+ for (U32 i = 0; i < 16; i++)
+ {
+ mdlv[i] = (F64) gGLModelView[i];
+ proj[i] = (F64) gGLProjection[i];
+ }
+
gluProject(render_pos.mV[0], render_pos.mV[1], render_pos.mV[2],
- gGLModelView, gGLProjection, (GLint*) viewport,
+ mdlv, proj, (GLint*) viewport,
&winX, &winY, &winZ);
//fonts all render orthographically, set up projection``
- glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.pushMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
LLUI::pushMatrix();
@@ -124,7 +134,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
winX -= world_view_rect.mLeft;
winY -= world_view_rect.mBottom;
LLUI::loadIdentity();
- glLoadIdentity();
+ gGL.loadIdentity();
LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f));
F32 right_x;
@@ -133,7 +143,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent,
LLUI::popMatrix();
gGL.popMatrix();
- glMatrixMode(GL_PROJECTION);
- glPopMatrix();
- glMatrixMode(GL_MODELVIEW);
+ gGL.matrixMode(LLRender::MM_PROJECTION);
+ gGL.popMatrix();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
}