This function can be used to retrieve the z comparison mode. The value returned will be one of the following constants (the default value is cmpfunc_lessequal):
- cmpfunc_never
- cmpfunc_less
- cmpfunc_equal
- cmpfunc_lessequal
- cmpfunc_greater
- cmpfunc_notequal
- cmpfunc_greaterequal
- cmpfunc_always
gpu_get_zfunc();
Constant (see table above)
if gpu_get_zfunc() != cmpfunc_greater
{
gpu_set_zfunc(cmpfunc_greater);
}
The above code checks to see if the z-testing method is set to cmpfunc_greater and if not then it is set to that constant.