Enable or disable separate channels for drawing.


GML Code Example

draw_set_colour_write_enable(red, green, blue, alpha);

Argument Description
red The colour to set for drawing.
green The colour to set for drawing.
blue The colour to set for drawing.
alpha The colour to set for drawing.

Returns: N/A


With this function you can switch on or off the colour channels and the alpha channel for all further drawing. You can use this function to create alpha-channel only surfaces (switch off the RGB writing before using the surface), or to create special effects while drawing to the screen. The default value for each of the components is true.


GML Code Example

draw_set_colour_write_enable(false, false, true, true);
 draw_set_colour_write_enable(true, true, true, true);

The above code will draw only the blue and alpha channel of the current sprite for the instance.

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