使用此函数,您可以检查是否启用Alpha测试(返回true)(返回false)。有关Alpha测试的详细信息,请参阅函数gpu_set_alphatestref()。
gpu_get_alphatestenable();
if (!gpu_get_alphatestenable())
{
gpu_set_alphatestenable(true);
gpu_set_alphatestref(128);
}
上述代码将检查Alpha测试是否已启用,如果未启用,将打开Alpha测试并将测试阈值设置为128(仅绘制Alpha大于0.5的像素)。