texture_set_blending

Indicates whether to use blending with colours and alpha values.

Syntax:

GML Code Example

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:

GML Code 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.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here