File: polygonmode.3gl

package info (click to toggle)
vnc4 4.1.1%2BX4.3.0-37
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 171,636 kB
  • ctags: 288,245
  • sloc: ansic: 2,205,268; cpp: 56,345; sh: 38,092; pascal: 13,773; asm: 12,656; tcl: 9,182; lisp: 7,831; perl: 3,364; makefile: 2,957; yacc: 2,902; objc: 2,698; xml: 2,614; python: 2,383; lex: 1,477; awk: 901; csh: 58; sed: 50
file content (103 lines) | stat: -rw-r--r-- 3,216 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
'\" 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