Hello!
I'm currently learning how the depth testing works in OpenGL from these tutorials and the tutorial says that
By default the depth function GL_LESS is used that discards all the fragments that have a depth value higher than or equal to the current depth buffer's value.
If i guess that the depth value it the z coordinate that I pass through the vertex data, then the above statement should not be true. Fragments with small Z values should be discarded because the depth is towards the -Z axis not fragments with higher z value. Does the depth values are created somehow else by using the z coordinate of the fragment? So the depth value is a number from 0...N so lets say a fragment has a depth value of 5 and the one that is behind it has 10, the 5 will pass the test?