Original Post
what is the difference?
i tried both, not at the same time, and opengl appears to work.
is glFrustum basically a more advanced viewing system over glPerspective?
quote:
Original post by Nemesis2k2
I''d be very surprised if gluPerspective calls glFrustrum. That would create unnessicary overhead.
quote:
Original post by Nemesis2k2
I'd be very surprised if gluPerspective calls glFrustrum.
void gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble near, GLdouble far )The only "unnecessary" overhead is the glFrustum call overhead and two negate operations. Who cares??? It is better than unnecessary duplication of code.
{
GLdouble half_height = near * tan( fovy * 0.5 * TWOPI_OVER_360 );
GLdouble half_width = half_height * aspect;
glFrustum( -half_width, half_width, -half_height, half_height, near, far );
}
yFac = tanf(FOV * 3.14f/360);
xFac = yFac*Aspect;
glMatrixMode(GL_PROJECTION);
float PMtr[16]={1/xFac, 0, 0, 0,
0, 1/yFac, 0, 0,
0, 0, -(far+near)/(far-near), -1,
0, 0, -(2*far*near)/(far-near), 0};
glLoadMatrixf(PMtr);
glMatrixMode(GL_MODELVIEW);
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more