104 lines
3.1 KiB
Plaintext
104 lines
3.1 KiB
Plaintext
'\" e
|
|
'\"! eqn | mmdoc
|
|
'\"macro stdmacro
|
|
.ds Vn Version 1.2
|
|
.ds Dt 24 September 1999
|
|
.ds Re Release 1.2.1
|
|
.ds Dp Jan 14 18:30
|
|
.ds Dm 01 polygonmo
|
|
.ds Xs 24991 5 polygonmode.gl
|
|
.TH GLPOLYGONMODE 3G
|
|
.SH NAME
|
|
.B "glPolygonMode
|
|
\- select a polygon rasterization mode
|
|
|
|
.SH C SPECIFICATION
|
|
void \f3glPolygonMode\fP(
|
|
GLenum \fIface\fP,
|
|
.nf
|
|
.ta \w'\f3void \fPglPolygonMode( 'u
|
|
GLenum \fImode\fP )
|
|
.fi
|
|
|
|
.SH PARAMETERS
|
|
.TP \w'\f2face\fP\ \ 'u
|
|
\f2face\fP
|
|
Specifies the polygons that \f2mode\fP applies to.
|
|
Must be
|
|
\%\f3GL_FRONT\fP for front-facing polygons,
|
|
\%\f3GL_BACK\fP for back-facing polygons,
|
|
or \%\f3GL_FRONT_AND_BACK\fP for front- and back-facing polygons.
|
|
.TP
|
|
\f2mode\fP
|
|
Specifies how polygons will be rasterized.
|
|
Accepted values are
|
|
\%\f3GL_POINT\fP,
|
|
\%\f3GL_LINE\fP, and
|
|
\%\f3GL_FILL\fP.
|
|
The initial value is \%\f3GL_FILL\fP for both front- and back-facing polygons.
|
|
.SH DESCRIPTION
|
|
\%\f3glPolygonMode\fP controls the interpretation of polygons for rasterization.
|
|
\f2face\fP describes which polygons \f2mode\fP applies to:
|
|
front-facing polygons (\%\f3GL_FRONT\fP),
|
|
back-facing polygons (\%\f3GL_BACK\fP),
|
|
or both (\%\f3GL_FRONT_AND_BACK\fP).
|
|
The polygon mode affects only the final rasterization of polygons.
|
|
In particular,
|
|
a polygon's vertices are lit and
|
|
the polygon is clipped and possibly culled before these modes are applied.
|
|
.P
|
|
Three modes are defined and can be specified in \f2mode\fP:
|
|
.TP 14
|
|
\%\f3GL_POINT\fP
|
|
Polygon vertices that are marked as the start of a boundary edge
|
|
are drawn as points.
|
|
Point attributes such as
|
|
\%\f3GL_POINT_SIZE\fP and
|
|
\%\f3GL_POINT_SMOOTH\fP control
|
|
the rasterization of the points.
|
|
Polygon rasterization attributes other than \%\f3GL_POLYGON_MODE\fP have no effect.
|
|
.TP
|
|
\%\f3GL_LINE\fP
|
|
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 \%\f3glLineStipple\fP).
|
|
Line attributes such as
|
|
\%\f3GL_LINE_WIDTH\fP and
|
|
\%\f3GL_LINE_SMOOTH\fP control
|
|
the rasterization of the lines.
|
|
Polygon rasterization attributes other than \%\f3GL_POLYGON_MODE\fP have no effect.
|
|
.TP
|
|
\%\f3GL_FILL\fP
|
|
The interior of the polygon is filled.
|
|
Polygon attributes such as
|
|
\%\f3GL_POLYGON_STIPPLE\fP and
|
|
\%\f3GL_POLYGON_SMOOTH\fP control the rasterization of the polygon.
|
|
.SH EXAMPLES
|
|
To draw a surface with filled back-facing polygons
|
|
and outlined front-facing polygons,
|
|
call
|
|
.Ex 1
|
|
glPolygonMode(\%\f3GL_FRONT\fP, \%\f3GL_LINE\fP);
|
|
.Ee
|
|
.SH 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 \%\f3glEdgeFlag\fP.
|
|
.SH ERRORS
|
|
\%\f3GL_INVALID_ENUM\fP is generated if either \f2face\fP or \f2mode\fP is not
|
|
an accepted value.
|
|
.P
|
|
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPolygonMode\fP
|
|
is executed between the execution of \%\f3glBegin\fP
|
|
and the corresponding execution of \%\f3glEnd\fP.
|
|
.SH ASSOCIATED GETS
|
|
\%\f3glGet\fP with argument \%\f3GL_POLYGON_MODE\fP
|
|
.SH SEE ALSO
|
|
\%\f3glBegin(3G)\fP,
|
|
\%\f3glEdgeFlag(3G)\fP,
|
|
\%\f3glLineStipple(3G)\fP,
|
|
\%\f3glLineWidth(3G)\fP,
|
|
\%\f3glPointSize(3G)\fP,
|
|
\%\f3glPolygonStipple(3G)\fP
|