summaryrefslogtreecommitdiff
path: root/common/texfont.cpp
diff options
context:
space:
mode:
authorleo2005-06-25 07:36:18 +0000
committerleo2005-06-25 07:36:18 +0000
commit7c16eadee05cfe3115ac0a69a822c66f1b3e292f (patch)
tree523b1c925f83b078a0cbfe1a38c211353ad40eb7 /common/texfont.cpp
parent511456b0716460eace01efe5861bf7381bd5612f (diff)
Rewrote the axis icon rendering.
git-svn-id: http://svn.leocad.org/trunk@413 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/texfont.cpp')
-rw-r--r--common/texfont.cpp30
1 files changed, 15 insertions, 15 deletions
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