Archived

This topic is now archived and is closed to further replies.

Newbie: NeHe Tutorial 13 (System Fonts)

This topic is 5674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i use the code of nehe''s tutorial for my systemfont text output. Now i want to change the glPrint("", ...) funtion to include the coordinates. glPrint(x,y,"",...); i copied the code from NeHe''s Texture font and replaced the glCallList. It compiles fine. but displays the text always in the bottom left corner. extract from my glPrint function glDisable(GL_DEPTH_TEST); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); glOrtho(0,640,0,480,-1,1); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glTranslated(x,y,0); glPushAttrib(GL_LIST_BIT); glListBase(m_base - 32); glCallLists(strlen(text), GL_UNSIGNED_BYTE, text); glPopAttrib(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glEnable(GL_DEPTH_TEST);

Share this post


Link to post
Share on other sites
well you should REALLY learn to read more descent


// Position The Text On The Screen
glRasterPos2f(-0.45f+0.05f*float(cos(cnt1)), 0.35f*float(sin(cnt2)));


then you will maybe find this somewhere in the source

mfg Phreak
--
"Input... need input!" - Johnny Five, Short Circuit.

Share this post


Link to post
Share on other sites