gpu_set_blendenable


描述

This function can be used to toggle alpha-blending on and off. Basically, if you have this set to false, all images being drawn will be drawn 100% opaque, meaning that any transparent, or semi transparent, areas of a sprite or background will be visible as a solid colour. It is a good idea to have alpha blending off whenever possible (especially when developing for mobile devices) as this greatly increases the draw speed.


语法:

gpu_set_blendenable(enable);


参数:

参数 描述
enable Enable or disable alpha blending value (true or false).


返回:

N/A(无返回值)


例如:

gpu_set_blendenable(false);
draw_sprite(spr_Background, 0, 0, 0);
gpu_set_blendenable(true);

The above code switches off alpha blending to draw a background sprite and then switches it back on again to continue drawing.


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