Set up the projection for 2D drawing?
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?
Did you look at the documentation for glOrtho? Should be pretty self explanatory.
glOrtho(-100, 100, 100, -100, near, far) should be what you want.
glOrtho(-100, 100, 100, -100, near, far) should be what you want.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement