If one wishes to render normally, where the closest object to the camera is rendered, you set the OpenGL flags as follows:
glDepthFunc(GL_LESS);
glEnable(GL_DEPTH_TEST);
So i would assume that doing:
glDepthFunc(GL_GREATER);
glEnable(GL_DEPTH_TEST);
Would also allow me to render the fragments furthest away from the camera instead. However I see no output when setting the flags like this. (no other modification has been done to my application)
How can you render the fragments furthest away from the camera?
The depth range is from 0 to 1.
When you clear the depth, the whole array is filled with 1's by default.
You can change that with glClearDepth(0)
And you can change the range with glDepthRange(near, far)
GL_LESS
(default) states this:
"Passes if the incoming depth value is less than the stored depth value."
GL_GREATER
states:
"Passes if the incoming depth value is greater than the stored depth value."
So you need some cleared depth (0's) for greater depth to pile on. (to see furthest fragments only)