OpenGl Units?

Fillbert
Unregistered
 
Post: #1
In openGL when I draw somting to the screen how do I know what the distance of one openGl unit is compared to a pixal or onscreen coor. Thanks...
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #2
if you are in 3D then a unit is varible pixel size... the closer you are to a unit the bigger it is... now you can make the view the exact same size as your window and stick it in orthographic view and you will have 1 unit = 1 pixel at any depth
Quote this message in a reply
Jeff Binder
Unregistered
 
Post: #3
If you're drawing 2D, gluOrtho2D() lets you set this yourself. For example, in 1024x768 resolution,

gluOrtho2D(0, 1024, 0, 768);

sets OpenGL's units to pixels.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  normal maps, DUDV maps, GLSL & too few texture units TomorrowPlusX 32 13,497 Jun 21, 2006 10:31 PM
Last Post: akb825