Jump to content
  • Advertisement

Archived

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

dynamicman

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

This topic is 6027 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!