Change to gstate.getDepthTestFunction()