• Advertisement
Sign in to follow this  

openGL, fustrum and perspective

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

i am a bit confused about the difference between glFustrum and gluPerspective. why do you use glFustrum to set up perspective, doesnt gluPerspective do basically the same thing but in a simpler way?

Share this post


Link to post
Share on other sites
Advertisement
Very brief answer: glFrustum() allows you to set up an arbitrary, off-axis frustum. gluPerspective() basically wraps glFrustum(), allowing you to create a symmetrical frustum with somewhat more intuitive arguments.

Share this post


Link to post
Share on other sites
gluPerspective is a specialized function for creating a symetric view volume based on a view angle, and ultimately calls glFrustum. glFrustum is a more generic function which gives you more control of the shape of the view volume.

In some cases, glFrustum is the simplest of the two; it's a matter of what information and requirements you have when you specify the view volume. If you have a view angle and want a symmetric view volume, then gluPerspective is obviously a better choise, as that's the kind of parameters it takes and the kind of shape it generates. If you need to control how coordinates are mapped from eye space to window space, then glFrustum is a better choise, as that's the kind of parameters it takes.

Share this post


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

  • Advertisement