PDA

View Full Version : text positioning in Opengl



BarrelRider
01-24-2002, 06:33 AM
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.

mikael_aronsson
01-25-2002, 01:59 AM
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.

Mikael

BarrelRider
01-25-2002, 02:45 AM
help much appreciated!!

Thanks