dave_1234
02-17-2005, 07:57 AM
I need to be able to redefine glFrustum as i move the camera around
my world to maintain the distance between the camera and the VRP.
I have set glFrustum to
glFrustum(-81.5, 81.5, -55.0, 55.0, frontPlaneDistance, backPlaneDistance);
in the init and resize functions.
I have set my lookAt function to
gluLookAt (-4.0, 0, -viewPlaneDistance, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
The set up is that frontplane and backplane are set that they are constant
distances from viewplane.
But when I try to run this i get a blank screen, but when i replace these
variables with actual values the scene renders correctly.
So what am I doing wrong?
Thanks
my world to maintain the distance between the camera and the VRP.
I have set glFrustum to
glFrustum(-81.5, 81.5, -55.0, 55.0, frontPlaneDistance, backPlaneDistance);
in the init and resize functions.
I have set my lookAt function to
gluLookAt (-4.0, 0, -viewPlaneDistance, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
The set up is that frontplane and backplane are set that they are constant
distances from viewplane.
But when I try to run this i get a blank screen, but when i replace these
variables with actual values the scene renders correctly.
So what am I doing wrong?
Thanks