Problem with frustum culling

Hello all. I am new here. I am currently working on frustum culling some 3ds objects. I am having a strange problem with it right now. My codes for generating a proper bounding box seems to work for objects that are near. But if i move the objects very far away( > 1000 ) the bounding box codes seem to fail. Any idea why?

Hi !

Not sure what your problem is here, if you are just calculating bounding boxes on geometry, then it would be your own code, that has nothing to do with OpenGL. But what does come to mind is that if you are using gluProject/gluUnproject for something you do, that might be the problem, say that you have set the depth range to 0.5 to 1000 then these functions will fail when you ge beyond 1000 (that is 1000 away from the “camera”).

That’s the only thing I can think of at the moment, if you could post the piece of code that does not work it would be easier to help.

Mikael

Thanks for your help. But I found the problem already. I constructed the bounding box wrongly. Forgot to calculate the rotation. Thanks anyway.