Erakis
12-12-2001, 05:04 AM
The problem :
I want to put some text on my scene. If I choose a projection Ortho I can draw text well in my window even if it's resolution are 320x400 or 1024x768. But when I use a perspective projection, the position of the text change cause the perspective change...
I just want to ajust the text coord depend the size of the my windows. Is it possible to get the perspective dimension of my scene, depend the size of my windows, and also compute the righ position to draw the my text message ?
Ex :
_____________________________________________
I must get a proportionnal coord to draw the text at the correct position depend the size of the windows.
...
glTranslatef(-4.5, 3.6, -10.0);
glScalef(0.0015, 0.0015, 0.0015);
glColor4f( 0.0, 0.0, 1.0, 1.0 );
...
glutStrokeCharacter(GLUT_STROKE_ROMAN),
Text );
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
A BIG BIG thanks http://www.opengl.org/discussion_boards/ubb/wink.gif
Martin
I want to put some text on my scene. If I choose a projection Ortho I can draw text well in my window even if it's resolution are 320x400 or 1024x768. But when I use a perspective projection, the position of the text change cause the perspective change...
I just want to ajust the text coord depend the size of the my windows. Is it possible to get the perspective dimension of my scene, depend the size of my windows, and also compute the righ position to draw the my text message ?
Ex :
_____________________________________________
I must get a proportionnal coord to draw the text at the correct position depend the size of the windows.
...
glTranslatef(-4.5, 3.6, -10.0);
glScalef(0.0015, 0.0015, 0.0015);
glColor4f( 0.0, 0.0, 1.0, 1.0 );
...
glutStrokeCharacter(GLUT_STROKE_ROMAN),
Text );
ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
A BIG BIG thanks http://www.opengl.org/discussion_boards/ubb/wink.gif
Martin