Skip to main content
gamedev.net
🔒 Locked

Question about perspective

Started by UponTheEnd Dec 30, 2002 at 5:20 PM 1 replies 200+ views
Original Post
UponTheEnd
UponTheEnd
What are the advantages of gluPerspective() and the 3d function like glOrtho() (Forgot the name sorry) what are the advantages and disadvantages? with gluPerspective() do you have unlimted space and with the other you have a set space. thanks alot
"What we do in life, echos in eternity" -- Gladiator
snisarenko
snisarenko
glOrtho() is 2D drawing mode. All coordinates are pixel based.

Its good for drawing a crosshair and HUD in a game or 3D Engine.

[edited by - snisarenko on December 30, 2002 6:47:42 PM]
ga
ga
with glOrtho() you get orthogonal projection, e.g. the x, y and z coordinates are independently scaled/biased, only x and y coordinates are used to compute screen x/y coordinates - use it if you want to do some 2D stuff.
with glFrustum() you get perspective projection similar to the real-world to eye or real-world to film projection in a camera.

gluPerspective is just a glu routine to make life easier - instead of specifying right, left, top, bottom of the screen on the near plane you can specify the aspect ratio and the field-of-view angle; you don''t need gluPerspective, you can do the same things with glFrustum (actually glFrustum can set up projections which can''t be set up with gluPerspective, but I think you won''t need them).

GA
Visit our homepage: www.rarebyte.de.stGA

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.