View Full Version : Problem with text
04-24-2001, 12:59 AM
Hi, I try to use Nehe's code (lesson 13 of his tut.). But the text follow my object when he move. Here is my code:
Where does the probleme come from ??
I've try to use glPushMatrix and glPopMatrix without succes but I still don't understand what they exactly did.
Thanks for your answers...
04-24-2001, 01:46 AM
glRasterPos is transformed like a standard vertex. You must set a different transformation than the object's one before the glRasterPos call to keep its position static.
04-24-2001, 10:16 AM
Here is a quick fix:
glLoadIdentity(); // added this
This is a quick fix and you are right, you should look into pushing and poping as these will achieve a similar effect and will come in useful later. Imagine a pile of trays in a cabinet or what ever, each tray stores all information about rotations and movement etc., when you load an identity matrix you add to the top of this pile a blank tray, when you push the matrix you push the matrix that is on top you push the top tray down one level in the cabinet and make a blank new identity on top which you might further rotate or whatever, to get back to the origional state you pop the top tray off the top of the pile this leaves the tray that was below with the origional rotations and movement on top. Get it, this sounds like a good topic for me to make a tutorial on for my website. Tell me if this doesn't make any sense or my code doesn't work.
04-24-2001, 11:04 PM
it doesn't seem to work !
Where is your web site, cause I look for each useful tut. ?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.