text positioning in Opengl

Hi all,

Can somebody please tell me how to position 3d text at exact screen coordinates. I need to display labels around the outside of my lanscape and the labels need to rotate with the lanscape. I have managed to get the 3D text to rotate with the scene, but the size and heights of the landscape changes, so I need the position of the text to change too. I have seaqched everywhere, and I have not found anybody who can do this. I would really appreciate help from anybody. Would you also let me know if I didn’t have to use 3D text (ie. if I can rotate 2D text or something like that).

Thanks for any help.

Hi !

Get the 3D coordinate, you can then convert to/from screen coordinates with gluProject/gluUnproject.

Thw problem there is that if the text is 3D you need to scale it depending on the distance (z value), switching to orthographic mode when you render the text might help.

I think it would be better to use 2D text, I think it look’s better, but that depends a bit on your application of course.


help much appreciated!!