Sign in to follow this  
derek_of_bodom@hotmail.com

Set up the projection for 2D drawing?

Recommended Posts

I'm trying to figure out how to set up the projection for 2D drawing. I know to use glOrtho, but I'm wondering how I can set up the projection so that (-100.0,-100.0) is the top-left corner of the screen, and (100.0,100.0) is the bottom-right corner of the screen. Can anyone point me in the right direction?

Share this post


Link to post
Share on other sites
karwosts    840
Did you look at the [url="http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml"]documentation [/url]for glOrtho? Should be pretty self explanatory.

glOrtho(-100, 100, 100, -100, near, far) should be what you want.

Share this post


Link to post
Share on other sites

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