I've enabled DepthTesting in my project and it seems to be working fine when i put some cube's  (partly) behind each other but when the Distance between the two cube's fornt surfaces gets <5.0f depth testing doesnt really work anymore (ill upload a picture later on)

Anyone encountered the same problem or knows how to fix this?

Posted on 2005-03-15 15:20:36 by Scorpie
What are you filling the Z-buffer with at the start of each Frame? ;)


Posted on 2005-03-15 20:53:08 by Homer
i fill it up with 1.0f
Posted on 2005-03-16 08:21:10 by Scorpie
Better post some code.
I'm interested in how the cubes are constructed etc.
Disable alpha blending, and/or disable backface culling - I bet your triangles are being created backwards and that you're really seeing the "inside" faces on the far sides of the cubes... heh.
Posted on 2005-03-16 21:16:15 by Homer
hehe saved my day :P my triangles are suposed to be CCW instead of CW (making a single colored cube can mislead ya bigtime)
thanks :)

ill post some code soon when i included animations also

Posted on 2005-03-17 11:17:38 by Scorpie
One colour, multicoloured, textured with a single texture, it would have been hard to spot (or realize) what was wrong regardless of the surfaces - light and shadow is our main visual depth cue, and without these, you may as well have been looking through an exceptionally clean glass cabinet.
I'm glad to hear the problem was resolved.
Posted on 2005-03-17 16:07:26 by Homer
Ligth and shadows, yet another nut that needs cracking hehe  :P
animations have to wait since milkshape format itself only supports one animation, gona transform the file format a bit i think and make someone make me a model app or something.
After light and shadows: map/world and after that collision i gues.

So much time, so much more to do, Scorpie
Posted on 2005-03-17 16:26:07 by Scorpie
Adding one light is easy.
Once you have done it, you can add up to eight lights.
After you've done that, you can implement as many lights as you like, as long as you only apply the closest eight or less lights to any given surface you are rendering.
Note that you can use eight lights at once, render something, then change the lights, and render something else.
Posted on 2005-03-17 17:59:07 by Homer