1GLPOLYGONMODE(3G)                                            GLPOLYGONMODE(3G)
2
3
4

NAME

6       glPolygonMode - select a polygon rasterization mode
7
8

C SPECIFICATION

10       void glPolygonMode( GLenum face,
11                           GLenum mode )
12
13

PARAMETERS

15       face  Specifies  the  polygons  that mode applies to.  Must be GL_FRONT
16             for front-facing polygons, GL_BACK for back-facing  polygons,  or
17             GL_FRONT_AND_BACK for front- and back-facing polygons.
18
19       mode  Specifies  how  polygons will be rasterized.  Accepted values are
20             GL_POINT, GL_LINE, and GL_FILL.  The initial value is GL_FILL for
21             both front- and back-facing polygons.
22

DESCRIPTION

24       glPolygonMode  controls  the  interpretation of polygons for rasteriza‐
25       tion.  face describes which  polygons  mode  applies  to:  front-facing
26       polygons   (GL_FRONT),  back-facing  polygons  (GL_BACK),  or  both  (‐
27       GL_FRONT_AND_BACK).  The polygon mode affects only the final rasteriza‐
28       tion  of polygons.  In particular, a polygon's vertices are lit and the
29       polygon is clipped and possibly culled before these modes are applied.
30
31       Three modes are defined and can be specified in mode:
32
33       GL_POINT      Polygon vertices that are marked as the start of a bound‐
34                     ary  edge  are drawn as points.  Point attributes such as
35                     GL_POINT_SIZE and GL_POINT_SMOOTH control the  rasteriza‐
36                     tion  of  the  points.   Polygon rasterization attributes
37                     other than GL_POLYGON_MODE have no effect.
38
39       GL_LINE       Boundary edges of the polygon are drawn as line segments.
40                     They  are  treated  as  connected  line segments for line
41                     stippling; the line stipple counter and pattern  are  not
42                     reset   between   segments   (see  glLineStipple).   Line
43                     attributes such as GL_LINE_WIDTH and GL_LINE_SMOOTH  con‐
44                     trol  the rasterization of the lines.  Polygon rasteriza‐
45                     tion  attributes  other  than  GL_POLYGON_MODE  have   no
46                     effect.
47
48       GL_FILL       The   interior   of   the  polygon  is  filled.   Polygon
49                     attributes     such     as     GL_POLYGON_STIPPLE     and
50                     GL_POLYGON_SMOOTH  control the rasterization of the poly‐
51                     gon.
52

EXAMPLES

54       To draw a surface with filled back-facing polygons and outlined  front-
55       facing polygons, call glPolygonMode(GL_FRONT, GL_LINE);
56

NOTES

58       Vertices are marked as boundary or nonboundary with an edge flag.  Edge
59       flags are generated internally by the GL when it  decomposes  polygons;
60       they can be set explicitly using glEdgeFlag.
61

ERRORS

63       GL_INVALID_ENUM  is generated if either face or mode is not an accepted
64       value.
65
66       GL_INVALID_OPERATION is generated if glPolygonMode is executed  between
67       the execution of glBegin and the corresponding execution of glEnd.
68

ASSOCIATED GETS

70       glGet with argument GL_POLYGON_MODE
71

SEE ALSO

73       glBegin(3G),    glEdgeFlag(3G),   glLineStipple(3G),   glLineWidth(3G),
74       glPointSize(3G), glPolygonStipple(3G)
75
76
77
78                                                             GLPOLYGONMODE(3G)
Impressum