glOrtho

Dear everyone.
As you know, opengl has a glOrtho function.
Even if I try to know this function
exactly, I am still confuing now.

What the heck glOrtho function?
When should I use this function?

Please explain me as specifically as possible.

Thanx.

Ortho is a projection mode that dosent deal with depth into the screen, an object could be at -2, or -200, and it will be the same size useing ortho.

Ortho is commonly used to display an overlay which is where you will do your on screen text and HUD info.

To use it, just swap to the projection matrix, call glLoadIdentity() then glOrtho(), go back to the modelview matrix, draw the overlay stuff, swap to the Projection matrix, call glPopMatrix(), go back to modelview, and continue drawing.

[This message has been edited by Eber Kain (edited 06-29-2001).]

[b]Ortho is a projection mode that dosent deal with depth into the screen, an object could be at -2, or -200, and it will be the same size useing ortho.

Ortho is commonly used to display an overlay which is where you will do your on screen text and HUD info.

To use it, just swap to the projection matrix, call glLoadIdentity() then glOrtho(), go back to the modelview matrix, draw the overlay stuff, swap to the Projection matrix, call glPopMatrix(), go back to modelview, and continue drawing.

[This message has been edited by Eber Kain (edited 06-29-2001).][/b][/QUOTE]

First of all, Thank you for your responding.
Actually, I am not accustomed to terms.
I am a beginner.

  1. What is projection mode?
  2. What is stand for HUD?
  3. What is HUD?
  4. What does mean that “an object could be at -2, or -200”?
  5. What is modelview?

Coiuld you narrow down a little bit more about glOrthro function?

Thank you very much for your help.

Originally posted by snowboy:

  1. What is projection mode?
  2. What is stand for HUD?
  3. What is HUD?
  4. What does mean that “an object could be at -2, or -200”?
  5. What is modelview?
  1. The projection matrix is where you set up your viewing volume. For example if you are standing in a field you can see in front of you for some distance and you can see to the left and right for some angle but you can’t see behind you or above you. This is your “viewing volume” similar to what you set up with the projection matrix in OpenGL.

  2. HUD = Head Up Display.

  3. HUD is like the information displayed across the bottom of your screen when you play a game. Even when the 3D objects move in the screen in front of you, the HUD stays across the bottom of your screen. You commonly set up a HUD using glOrtho.

  4. The object could be at -2 or -200 on the z-axis i.e any distance into the screen.

  5. The modelview matrix is the matrix that you use for all your modelling code.

These are all basic terms. If you don’t understand them, you need to buy a copy of the red book or look for an older version online. Red book = OpenGL Programming Guide.

The redbook can be found in the large .pdf download at nehe.gamedev.net, its the best thing your could download next to a compiler.

Thank you for your big helping.
I really appreciate you.

Thank you for your big helping.
I really appreciate you.