I've been using glDisable(GL_DEPTH_TEST)
to disable depth testing, thinking that it only disables depth "testing". The reason I've been confused I guess is because I've created two functions, one to disable the depth "test", and another to disable depth "writes" with glDepthMask(GL_FALSE);
If disabling GL_DEPTH_TEST
disables both "testing" and "writing" then would it be the equivalent of doing:
glDepthFunc(GL_ALWAYS); // DISABLE TESTS (OR ACTUALLY ALWAYS LET THE TEST SUCCEED)
glDepthMask(GL_FALSE); // DISABLE WRITES
I'm thinking that there's little use for disabling GL_DEPTH_TEST
unless I want to disable both tests and writes, and I'm wondering which one is better. The wording seems confusing, but maybe it's just me. I suppose doing disabling depth tests with glDepthFun(GL_ALWAYS)
will still do a comparison, I suppose there's no way to disable the depth test entirely while still allowing writes?