Fixed-Positioned Text (based on Tutorial 13)
i´m trying to use tutorial 13 to output some text in my game. the player can zoom in and out during the game, but the text should remain at the bottom of the screen. however, it always goes to the middle of the screen when i zoom out, and out of the screen when i zoom in...
is there a way to change that?
even if he uses ortho mode it''ll still scale..
you need to do this:
// do your scaling, then
glPushmatrix();
glLoadIdentity();
// draw your text
glPopMatrix();
you need to do this:
// do your scaling, then
glPushmatrix();
glLoadIdentity();
// draw your text
glPopMatrix();
-eldee;another space monkey;[ Forced Evolution Studios ]
quote:
Original post by eldee
even if he uses ortho mode it''ll still scale..
it won''t if you always specify the same sizes for the ortho matrix.
quote:
Original post by eldee
even if he uses ortho mode it''ll still scale..
you need to do this:
// do your scaling, then
glPushmatrix();
glLoadIdentity();
// draw your text
glPopMatrix();
that doesnt work... first it didnt compile because that function is called glPushMatrix, but even after i renamed it it didn´t draw any text on the screen.
and i didn´t get that with ortho-mode, i´m rather an opengl-beginner.
quote:
Original post by MarvinTheRobot
that doesnt work... first it didnt compile because that function is called glPushMatrix, but even after i renamed it it didn´t draw any text on the screen.
and i didn´t get that with ortho-mode, i´m rather an opengl-beginner.
well i dunno what to tell you... i''m using it right now

-eldee
;another space monkey;
[ Forced Evolution Studios ]
Do NOT let Dr. Mario touch your genitals. He is not a real doctor!
-eldee;another space monkey;[ Forced Evolution Studios ]
maybe it´s because i´m not using matrices in the rest of the program... should i create a matrix before using pushMatrix and popMatrix? and if yes, how can i do that? (i´m not into matrices with opengl yet)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement