From 7c16eadee05cfe3115ac0a69a822c66f1b3e292f Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 25 Jun 2005 07:36:18 +0000 Subject: Rewrote the axis icon rendering. git-svn-id: http://svn.leocad.org/trunk@413 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/texfont.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'common/texfont.cpp') diff --git a/common/texfont.cpp b/common/texfont.cpp index 4e53092..7c61359 100644 --- a/common/texfont.cpp +++ b/common/texfont.cpp @@ -125,22 +125,22 @@ void TexFont::PrintText(float Left, float Top, float ScaleX, float ScaleY, const } // Old function, should probably be removed. -void TexFont::PrintText (float left, float top, const char* text) const +void TexFont::PrintText(float Left, float Top, float Z, const char* text) const { - while (*text != 0) - { - glTexCoord2f (m_Glyphs[*text].left, m_Glyphs[*text].top); - glVertex2f (left, top); - glTexCoord2f (m_Glyphs[*text].left, m_Glyphs[*text].bottom); - glVertex2f (left, top - m_nFontHeight); - glTexCoord2f (m_Glyphs[*text].right, m_Glyphs[*text].bottom); - glVertex2f (left + m_Glyphs[*text].width, top - m_nFontHeight); - glTexCoord2f (m_Glyphs[*text].right, m_Glyphs[*text].top); - glVertex2f (left + m_Glyphs[*text].width, top); - - left += m_Glyphs[*text].width; - text++; - } + while (*text != 0) + { + glTexCoord2f(m_Glyphs[*text].left, m_Glyphs[*text].top); + glVertex3f(Left, Top, Z); + glTexCoord2f(m_Glyphs[*text].left, m_Glyphs[*text].bottom); + glVertex3f(Left, Top - m_nFontHeight, Z); + glTexCoord2f(m_Glyphs[*text].right, m_Glyphs[*text].bottom); + glVertex3f(Left + m_Glyphs[*text].width, Top - m_nFontHeight, Z); + glTexCoord2f(m_Glyphs[*text].right, m_Glyphs[*text].top); + glVertex3f(Left + m_Glyphs[*text].width, Top, Z); + + Left += m_Glyphs[*text].width; + text++; + } } // Temporary function to draw the axis icon text -- cgit v1.2.3