texture_set_blending(blend);
Argument | Description |
---|---|
blend | Turn blending on (true) or off (false) |
Returns: N/A
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.
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.