Camera and Frustrum Culling
How does the use of a camera affect frustrum culling?
eg i use the rotatef and translate method to move my cammera...
glRotatef(camera.yaw, 1, 0, 0);
glRotatef(camera.pitch, 0, 1, 0);
glRotatef(camera.roll, 0, 0, 1);
glTranslatef(-x, -y, -z);
and my frustrum culling does not seem to work if i move my camera to far from 0,0,0 , almost seems as if this code dosnt modify the frustrum? someone help, this is way ablove my head.
btw the frustrum culling i use is described at..
http://www.markmorley.com/opengl/frustumculling.html
Thanks
I just had a quick look over the article, but it actually works by extracting the frustum limiting planes from the modelview/projection matrices.
With your glRotate and glTranslate you modify the modelview matrix, so you have to update the clip planes by calling ExtractFrustum() each frame (after you updated your camera)
With your glRotate and glTranslate you modify the modelview matrix, so you have to update the clip planes by calling ExtractFrustum() each frame (after you updated your camera)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement