WebGLRenderingContext.frontFace()

frontFace指定多边形通过设置一个绕方向是前置还是后置。

语法

void gl.frontFace(mode);

参数

mode

设置绕方向。默认值是gl.CCW。可能的值有:

  • gl.CW:顺时针

  • gl.CCW:逆时针

返回值

例子

gl.frontFace(gl.CW);

规范

WebGL 1.0

OpenGL ES 2.0

浏览器兼容

Desktop:Chrome 9、 Firefox 4.0 、 Internet Explorer 11 、Opera 12、Safari 5.1;

Mobile: Android ?、 Chrome for Android 25、 Firefox Mobile (Yes)、 IE Mobile ?、 Opera Mobile 12、 Safari Mobile 8.1

results matching ""

    No results matching ""