diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-06-06 23:21:07 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-06-06 23:21:07 -0400 |
| commit | 89ea7ccfc7fd4c33eab4ad9123141fa40231a00d (patch) | |
| tree | af2083dc9563abc8fa7a97100fc7766044d406e8 /indra/newview/llhudrender.cpp | |
| parent | 3d1cb7ef111cbd5724262077702e0dc2a3d6998d (diff) | |
| parent | a519e34f02b4b2663fe082ba9ad12f1b423669cb (diff) | |
Automated merge with file:///Users/nat/linden/viewer-maint-1144
Diffstat (limited to 'indra/newview/llhudrender.cpp')
| -rw-r--r-- | indra/newview/llhudrender.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 1156e764a1..dff310ecf9 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,16 +134,16 @@ 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; - font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x); + font.render(wstr, 0, 0, 1, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x); LLUI::popMatrix(); gGL.popMatrix(); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); + gGL.matrixMode(LLRender::MM_PROJECTION); + gGL.popMatrix(); + gGL.matrixMode(LLRender::MM_MODELVIEW); } |
