draw_get_alpha_test

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

Syntax:

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:

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).


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