gpu_set_blendenable


Description

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.


Syntax:

gpu_set_blendenable(enable);


Arguments:

Argument Description
enable Enable or disable alpha blending value (true or false).


Returns:

N/A


Example:

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.


Back: GPU Functions
Next: gpu_set_ztestenable
© Copyright YoYo Games Ltd. 2018 All Rights Reserved