Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

AndreTheGiant

glOrtho() vs gluOrtho2D() ?

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

Whats the difference between a call to glOrtho( l, r, b, t, n, f); and gluOrtho2D(l, r, b, t); ? When Should I use one instead of the other? Why does the second one (but not the first one) require this code first: glMatrixMode(GL_PROJECTION); glLoadIdentity(); Thanks ----- It''''s not my fault I''''m the biggest and the strongest; I don''''t even exercise!

Share this post


Link to post
Share on other sites
Advertisement
The only difference between the two calls, is that gluOrtho2D will use -1 for n, and 1 for f implicity.

glMatrixMode/glLoadIdentity reset the projection matrix, because glOrtho multiples by it insted of just setting it outright.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!