Archived

This topic is now archived and is closed to further replies.

dynamicman

trouble correctly identifying 2d (x,y) coordinates.

Recommended Posts

Hi, I have loaded a font and I would like to display it at (x,y) on the screen efficiently. This is good for displaying FPS and other info. So far, the two ways that I''ve explored are: 1) Change screen to orthogonal projection and use a simple glTranslate(...). Con: Need to change type of projection, might be slow if changing from perspective/orthogonal projections back and forth every frame. 2) Using perspective project, use glRasterPos2i(...). Con: Need to do funny calculations that take into account view angle, width and height. I don''t know how to do this Which is a better way of approaching this problem? Can anybody give me any hints on how THEY did this?

Share this post


Link to post
Share on other sites