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

NAME

6       glPolygonMode - select a polygon rasterization mode
7

C SPECIFICATION

9       void glPolygonMode(GLenum face, GLenum mode);
10

PARAMETERS

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

DESCRIPTION

22       glPolygonMode controls the interpretation of polygons for
23       rasterization.  face describes which polygons mode applies to: both
24       front and back-facing polygons (GL_FRONT_AND_BACK). The polygon mode
25       affects only the final rasterization of polygons. In particular, a
26       polygon's vertices are lit and the polygon is clipped and possibly
27       culled before these modes are applied.
28
29       Three modes are defined and can be specified in mode:
30
31       GL_POINT
32           Polygon vertices that are marked as the start of a boundary edge
33           are drawn as points. Point attributes such as GL_POINT_SIZE and
34           GL_POINT_SMOOTH control the rasterization of the points. Polygon
35           rasterization attributes other than GL_POLYGON_MODE have no effect.
36
37       GL_LINE
38           Boundary edges of the polygon are drawn as line segments. Line
39           attributes such as GL_LINE_WIDTH and GL_LINE_SMOOTH control the
40           rasterization of the lines. Polygon rasterization attributes other
41           than GL_POLYGON_MODE have no effect.
42
43       GL_FILL
44           The interior of the polygon is filled. Polygon attributes such as
45           GL_POLYGON_SMOOTH control the rasterization of the polygon.
46

EXAMPLES

48       To draw a surface with outlined polygons, call
49
50           glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
51
52
53

NOTES

55       Vertices are marked as boundary or nonboundary with an edge flag. Edge
56       flags are generated internally by the GL when it decomposes triangle
57       stips and fans.
58

ERRORS

60       GL_INVALID_ENUM is generated if either face or mode is not an accepted
61       value.
62

ASSOCIATED GETS

64       glGet() with argument GL_POLYGON_MODE
65

SEE ALSO

67       glLineWidth(), glPointSize()
68
70       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
71       under the SGI Free Software B License. For details, see
72       http://oss.sgi.com/projects/FreeB/.
73

AUTHORS

75       opengl.org
76
77
78
79opengl.org                        06/10/2014                 GLPOLYGONMODE(3G)
Impressum