Jump to content
  • Advertisement
Sign in to follow this  
NickyP101

OpenGL OPEN GL Unit Length

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

Advertisement
Absolutely not. OpenGL units are, like any other API, completely arbritary.

They can be anything you want.

In 3d, the appearance is controlled by the view matrix set up with gluPerspective etc.

If you are setting up an orthogonal projection, glOrtho allows you to choose the bottom left and top right coordinates. If these happen to coincide with pixels, then you'll have 1.0 = 1 pixel (Assuming you did a glLoadIdentity on the projection matrix beforehand).

I think the absolutely default (orthogonal) projection matrix makes the screen** go from 0,0 to 1,1 (bottom left / top right). But I'm not sure as I never use it.

Mark

** By "screen" I mean, "the bounds of the visible area of the opengl context" which may or may not mean screen depending on how the context was created (for example, it could be an offscreen context or a context in a window which only covers part of the screen)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!