gpu_get_cullmode

此函数可用于检索背面消隐模式。返回的值将是以下常量之一(默认值为cull_noculling):

消隐模式常量
常量描述
cull_nocullingNo culling will be done
cull_clockwiseAll clockwise triangles will be culled
cull_counterclockwiseAll counter-clockwise triangles will be culled

 

语法:

gpu_get_cullmode();

 

返回:

消隐模式常量 (see above for constants)

 

例子:

if (gpu_get_cullmode() != cull_clockwise)
{
    gpu_set_cullmode(cull_clockwise);
}

以上代码获取当前剔除模式,如果不是cull_clockwise,则将其设置为该常量。