PDA

View Full Version : Breaking Rendering Chunks into Objects



camoguard
02-06-2007, 09:47 AM
Thanks for reading this. I have a scene with two boxes and a camera. They are all of a standard type of object which contains its own world offset and rotation. It mostly even works. In a scene with one box and the camera everything acts appropriate. But in a scene with two boxes, one box will scoot behind the other box no matter where you move the camera to. I have DEPTH_TEST enabled and I let it default (which I read makes it a less-than test).

So here's my question, I feel like the depth test is supposed to sensibly put one object in front of the other and I think that is failing. What do I have to do to get the closer object to appear in front of another object? Is there more than enabling depth testing? Are there certain initialization parameters that are incompatible?


I'm sure someone else has run into this problem before.
Any help is greatly appreciated.

Thanks,
Cam

camoguard
02-06-2007, 10:03 AM
Posting the problem lead to the solution directly. I didn't glEnable( DEPTH_TEST ) every time I rendered.