gpu_set_colorwriteenable


描述

With this function you can switch on or off the colour channels and the alpha channel for all further drawing. For example, 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, and can be supplied as either four unique arguments or as a 4 element 1D array with the following elements in it which will be either true (enabled) or false (disabled):


语法:

gpu_set_colorwriteenable(red, green, blue, alpha);


参数:

参数 描述
red Enable/disable the red channel
green Enable/disable the green channel
blue Enable/disable the blue channel
alpha Enable/disable the alpha channel


返回:

N/A(无返回值)


例如:

var cw = gpu_get_colorwriteenable();
cw[3] = false;
gpu_set_colorwriteenable(cw);

The above code gets the current colour write values and then sets the alpha component to false.


上一页: GPU Functions
下一页: gpu_set_alphatestenable
© Copyright YoYo Games Ltd. 2018 All Rights Reserved