texture_set_blending

Indicates whether to use blending with colours and alpha values.

Syntax:

texture_set_blending(blend);


Argument Description
blend Turn blending on (true) or off (false)


Returns: N/A


Description

This function can be used to turn off all alpha and colour blending in GameMaker: Studio. This will over-ride all other functions and means that all image assets (sprites and backgrounds) with an image alpha or image blend other than 1 and c_white, will be drawn with an alpha of 1 and blended with the default white colour. Switching this off can give a minor performance boost, but the default value is true.


Example:

if global.Blend
   {
   texture_set_blending(true);
   }
else
   {
   texture_set_blending(false);
   }

The above code will turn interpolation on or off depending on the value of a global variable.


Back: Drawing
Next: texture_set_repeat
© Copyright YoYo Games Ltd. 2018 All Rights Reserved