PDA

View Full Version : Setting up view in Ortho Mode - window vs pixels.



cutting_crew
08-07-2008, 12:38 PM
hi all i would like to create my window, lets just say 1280x1024 but i would like my screen coordinates to go from something like -89.6 to -89.4 on the x-plane and 30.7 to 30.4 on the y-plane. this is because i would like to draw some polygons in 2D mode based on points coming from a file that lists from lat,lon coordinates. how would i set this up using glOrtho2D? or do i use glOrtho?

thanks all for your help in advance.

ZbuffeR
08-07-2008, 07:00 PM
glOrtho(-89.6,-89.4,30.7, 30.4, nearVal, farVal);

As explained here :
http://www.opengl.org/sdk/docs/man/xhtml/glOrtho.xml