EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.

frontFace method

Sets whether or not polygons are considered front-facing based on their winding direction.

IE11

Syntax

WebGLRenderingContext.frontFace(mode);

Parameters

mode [in]

Type: Number

Sets orientation of front-facing polygons.

ValueMeaning
gl.CCW

Initial value. Counterclockwise winding.

gl.CW

Clockwise winding.

 

Return value

This method does not return a value.

Remarks

WebGL errorDescription
gl.INVALID_ENUMMode is not CW or CCW.

 

A polygon has a clockwise winding if an imaginary object following a path moves in a clockwise direction from the first vertex, second vertex, and so forth, to the last vertex, and then back to the first vertex. It's counterclockwise winding if it moves in the opposite direction.

To turn rendering of back-facing polygons on or off, call enable or disable using CULL_FACE as the argument.

See also

WebGLRenderingContext

 

 

표시:
© 2014 Microsoft. All rights reserved.