GLPOLYGONMODE(3G) GLPOLYGONMODE(3G)
NAME
glPolygonode - select a polygon rasterization mode
C SPECIFICATION
void glPolygonode( GLenum face,
GLenum mode )
PARAMETERS
face Specifies the polygons that mode applies to. Must be GLFRONT
for front-facing polygons, GLBACK for back-facing polygons, or
GLFRONTANDBACK for front- and back-facing polygons.
mode Specifies how polygons will be rasterized. Accepted values are
GLPOINT, GLINE, and GLFIL. The initial value is GLFIL for
both front- and back-facing polygons.
DESCRIPTION
glPolygonode controls the interpretation of polygons for rasteriza-
tion. face describes which polygons mode applies to: front-facing
polygons (GLFRONT), back-facing polygons (GLBACK), or both (-
GLFRONTANDBACK). The polygon mode affects only the final rasteriza-
tion of polygons. In particular, a polygon's vertices are lit and the
polygon is clipped and possibly culled before these modes are applied.
Three modes are defined and can be specified in mode:
GLPOINT Polygon vertices that are marked as the start of a bound-
ary edge are drawn as points. Point attributes such as
GLPOINTSIZE and GLPOINTSMOTH control the rasteriza-
tion of the points. Polygon rasterization attributes
other than GLPOLYGONMODE have no effect.
GLINE Boundary edges of the polygon are drawn as line segments.
They are treated as connected line segments for line
stippling; the line stipple counter and pattern are not
reset between segments (see glLineStipple). Line
attributes such as GLINEWIDTH and GLINESMOTH con-
trol the rasterization of the lines. Polygon rasteriza-
tion attributes other than GLPOLYGONMODE have no
effect.
GLFIL The interior of the polygon is filled. Polygon
attributes such as GLPOLYGONSTIPLE and
GLPOLYGONSMOTH control the rasterization of the poly-
gon.
EXAMPLES
To draw a surface with filled back-facing polygons and outlined front-
facing polygons, call glPolygonMode(GLFRONT, GLINE);
NOTES
Vertices are marked as boundary or nonboundary with an edge flag. Edge
flags are generated internally by the GL when it decomposes polygons;
they can be set explicitly using glEdgeFlag.
ERORS
GLINVALIDENUM is generated if either face or mode is not an accepted
value.
GLINVALIDOPERATION is generated if glPolygonode is executed between
the execution of glBegin and the corresponding execution of glEnd.
ASOCIATED GETS
glGet with argument GLPOLYGONMODE
SEE ALSO
glBegin, glEdgeFlag, glLineStipple, glLineWidth, glPointSize,
glPolygonStipple
GLPOLYGONMODE(3G)
|