Jump to content
  • Advertisement
Sign in to follow this  
nippysaurus

draw ui

This topic is 3969 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

I have a simple scene displaying some 3D scenes, but I would like to draw a user interface. Is there an easy way to draw directly to the screen. Or should I just draw it 0 units along the z axis? That should be at the screen shouldnt it?

Share this post


Link to post
Share on other sites
Advertisement
Look into orthographic projection, what you want is something like this:

glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, Width, 0, Height, -1, 1);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();



This sets up the viewport to specified width and height. Hope it helps

[Edited by - O-san on October 3, 2007 5:16:08 AM]

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.

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!