gpu_set_zfunc


描述

This function can be used to set the z-buffer testing comparison mode (see gpu_set_ztestenable for more information). The values available for use are any of the following constants (the default value is cmpfunc_lessequal):


语法:

gpu_set_zfunc(cmp_func);


参数:

参数 描述
cmp_func The comparison mode to use (see list above)


返回:

N/A(无返回值)


例如:

gpu_set_ztestenable(true);
gpu_set_zfunc(cmpfunc_always);
draw_sprite(spr_Background, 0, 0, 0);
gpu_set_ztestenable(false);

The above code switches on z-buffer testing and sets its comparison mode before drawing a background sprite and then switches it back off again to continue drawing.


上一页: GPU Functions
下一页: gpu_set_zwriteenable
© Copyright YoYo Games Ltd. 2018 All Rights Reserved