View Full Version : glFrustum / gluPerspective

Allan Walton
06-17-2002, 02:34 AM
Hi there.

I've read a few books on the two functions above and am wondering if theres any significant difference between the two?

i know that on gluPerspective you have to have a symetrical viewing volume along the h and w components and it's more intuitive than glFrustum but is there anything else?

Which one would people recommend and why?



06-17-2002, 02:50 AM
glFrusmtum vs gluPerspective is a matter of taste. Use what you feel is more intinuitive and works best with your code.

The only real different is the way you setup the view volume. With glFrustum you set the coordinates of the view volume explicitly, and with gluPerspective you specify FOV. Other than that, they are more or less identical. glFrustum is a little more flexible.

06-17-2002, 04:50 AM
glFrustum can support asymmetric frusta, where the angle to the left is greater than the angle to the right for example.

06-17-2002, 07:13 PM
gluPerspective is basically easier to use than glFrustum - glFrustum is actually called from inside gluPerspective.

If you don't like the glu library, (I don't), then you can find source code in the OpenGL FAQ somewhere which shows how to implement what would be achieved in a gluPerspective call but instead with a glFrustum call.

Allan Walton
06-17-2002, 11:17 PM
Cheers Everyone