Archived

This topic is now archived and is closed to further replies.

iwaskia

depth-buffer value

Recommended Posts

i know the value is in the range of 0.0 to 1.0, what is the distance from to viewpoint of the depth-buffer value = 1.0 ? [edited by - iwaskia on April 29, 2002 5:17:06 PM]

Share this post


Link to post
Share on other sites
Please clarify your question, maybe with a code snippet that you are confused on.

As for z-buffering, if you enable it in opengl, you can test for the depth of your drawn objects. This is useful say when you draw 2 objects (say in orthoganal projection where the z values are zeroed out by the multiplication), one closer to the viewer , then draw the second object behind the first. With z-buffering off (with depth testing off) the second object you drew would appear to show up in front of the first object (or inside). With z-buffering on, the calculations of the z values are saved so when the objects are drawn, it can determine which objects should appear to the viewer, which in this example the first one would appear when it is rendered because the second one would have a z value further back then the first object.

Share this post


Link to post
Share on other sites