Sign in to follow this  

draw ui

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

This topic is 3724 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this