Cullface
The CullFace function specifies whether front- or back-facing facets can be culled.
CullFace( mode );
Arguments mode
Specifies whether front- or back-facing facets are candidates for culling. Symbolic constants GL_FRONT and GL_BACK are accepted. The default value is GL_BACK.
For example, the call:
gldraw {
enable(GL_CULL_FACE);
cullface(GL_BACK);
}
causes the back faces not to be rendered, perhaps speeding up drawing.
The call:
gldraw {
disable(GL_CULL_FACE);
}
returns to the default rendering mode, where faces are not culled.
Remarks
The CullFace 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 Enable and Disable with the argument GL_CULL_FACE. Facets include triangles, quadrilaterals, polygons, and rectangles.
Note: Do not call CullFace between a call to Begin and the corresponding call to End.
See Also