Jump to content
  • Advertisement
Sign in to follow this  
Superr

OpenGL Screen Coordinates with OpenGL + SDL

This topic is 3647 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, this is my first post but i have been following this forum and nehe tutorials for a while. I have a project using SDL and OpenGL, and I'm trying to write some messages on the screen. I know I can't use SDL Surface Bliting because I'm using OpenGl. And I tried some suggestions I found over the internet about using textures with the letters, but this only works in world coordinates and not on the screen. I also tried unsing glProject and glUnproject to compute a 2d location, but it didn't worked. Could anyone help me? I can post a zip with the current code if someone wants to take a look at it. Thanks! Merry Christmas

Share this post


Link to post
Share on other sites
Advertisement
I'm assuming you are simply trying to overlay some regular 2D text on the screen - in much the same way as a game with a HUD. If this is the case, one simple way is to create a separate pass. In that pass define a regular 2D orographic view and display the text.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!