glFustrum
Anyone know how to use glFustrum as opposed to having to use gluPerspective. Thanks.
glFrustum(GLdouble left,GLdouble right,GLdouble bottom,GLdouble top,GLdouble near, GLdouble far)
gluPerspective(GLdouble fov, GLdouble aspect, GLdouble near, GLdouble far)
the difference is that with glPerspective you are defining the angle in Y that is visible, aspect is the width/height.glFrustum lets you specify asymetrical frustum(not good). I would not use frustum.
gluPerspective(GLdouble fov, GLdouble aspect, GLdouble near, GLdouble far)
the difference is that with glPerspective you are defining the angle in Y that is visible, aspect is the width/height.glFrustum lets you specify asymetrical frustum(not good). I would not use frustum.
Well I just want to achieve the same result as gluPerspective without having to use GLU.... (just GL), and i''ve been playing with glFustrum, but doesnt seem to be working how I want it :/ Any other ways?
void my_gluPerspective(double FOV, double Aspect, double Near, double Far) { double YMax = Near * tan(FOV * 0.5 * 0.01745329251994329); double YMin = -YMax; double XMin = YMin * Aspect; double XMax = YMax * Aspect; glFrustum(XMin,XMax,YMin,YMax,Near,Far);}

Thanks very much! That''s working wonderfully
I''m just wondering how you came up with that code

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement