draw_get_alpha_test

Returns the current state of alpha testing (enabled or not).

Syntax:

GML Code Example

draw_get_alpha_test();


Returns: Boolean


Description

With this function you can check to see whether alpha testing is enabled (returns true) or not (returns false). For more information on alpha testing, see the function draw_set_alpha_test.


Example:

GML Code Example

if !draw_get_alpha_test()
    {
    draw_set_alpha_test(true);
    draw_set_alpha_test_ref_value(128);
    }
 

The above code will check to see if alpha testing is enabled and if not it will switch on alpha testing and set the test threshold to 128 (only pixels with an alpha over 0.5 will be drawn).





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