help me!
//Camera code and scene codeglPushMatrix(); //Save current matrix (with camera transformations)glLoadIdentity(); //Reset to the identity matrixglTranslate(0.0,0.0,-5.0); //Move back out from screenDrawText("something"); //Your text function hereglPopMatrix(); //Load camera transformed matrix//back to normal code using the camera again.
this should keep text infront of the camera all the time if thats what you asked. I translated out of the screen to show the text, just play around with the z param to get it right. Push and Pop matrix save the matrix wit the applied camera transformations and rotations. Load identiy clears the matrix back to normal so the camera wont effect the drawing commands in between push/pop matrix commands.
I hope that made some kind of sence, if not, i''ll try and make it clearer.
-J
or... go to ortho mode and do the drawing - you''ll only need to translate to correct screen coordinates
Crispy
Crispy
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
glortho mode will probably cuase a bit of a slowdown if your calling it every frame, then reseting back to projection.
My Homepage
Freeservers.com sucks. Angelfire.lycos.com is cool.
My Homepage
Freeservers.com sucks. Angelfire.lycos.com is cool.
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement