The glCullFace function specifies whether front- or back-facing facets can be culled.
void glCullFace(
GLenum mode
);
The glCullFace function specifies whether front- or back-facing facets are culled (as specified by mode) when facet culling is enabled. You enable and disable facet culling using glEnable and glDisable with the argument GL_CULL_FACE. Facets include triangles, quadrilaterals, polygons, and rectangles.
The glFrontFace function specifies which of the clockwise and counterclockwise facets are front-facing and back-facing.
The following functions retrieve information related to glCullFace:
glGet with argument GL_CULL_FACE_MODE
glIsEnabled with argument GL_CULL_FACE
The following are the error codes generated and their conditions.
Error Code | Condition |
---|---|
GL_INVALID_ENUM | mode was not an accepted value. |
GL_INVALID_OPERATION | glCullFace was called between a call to glBegin and the corresponding call to glEnd. |
Windows NT: Use version 3.5 and later.
Windows: Use Windows 95 and later.
Windows CE: Unsupported.
Header: Declared in gl.h.
Import Library: Link with opengl32.lib.
glBegin, glDisable, glEnable, glEnd, glFrontFace, glGet, glIsEnabled