File: drawrangeelements.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 (132 lines) | stat: -rw-r--r-- 4,688 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
'\" te
'\"! tbl|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 drawrange
.ds Xs 22158 7 drawrangeelements.gl
.TH GLDRAWRANGEELEMENTS 3G
.SH NAME
.B "glDrawRangeElements
\- render primitives from array data

.SH C SPECIFICATION
void \f3glDrawRangeElements\fP(
GLenum \fImode\fP,
.nf
.ta \w'\f3void \fPglDrawRangeElements( 'u
	GLuint \fIstart\fP,
	GLuint \fIend\fP,
	GLsizei \fIcount\fP,
	GLenum \fItype\fP,
	const GLvoid \fI*indices\fP )
.fi

.EQ
delim $$
.EN
.SH PARAMETERS
.TP \w'\fIindices\fP\ \ 'u 
\f2mode\fP
Specifies what kind of primitives to render.
Symbolic constants
\%\f3GL_POINTS\fP,
\%\f3GL_LINE_STRIP\fP,
\%\f3GL_LINE_LOOP\fP,
\%\f3GL_LINES\fP,
\%\f3GL_TRIANGLE_STRIP\fP,
\%\f3GL_TRIANGLE_FAN\fP,
\%\f3GL_TRIANGLES\fP,
\%\f3GL_QUAD_STRIP\fP,
\%\f3GL_QUADS\fP,
and \%\f3GL_POLYGON\fP are accepted. 
.TP
\f2start\fP
Specifies the minimum array index contained in \f2indices\fP.
.TP
\f2end\fP
Specifies the maximum array index contained in \f2indices\fP.
.TP
\f2count\fP
Specifies the number of elements to be rendered.
.TP
\f2type\fP
Specifies the type of the values in \f2count\fP. Must be one of
\%\f3GL_UNSIGNED_BYTE\fP, \%\f3GL_UNSIGNED_SHORT\fP, or
\%\f3GL_UNSIGNED_INT\fP. 
.TP
\f2indices\fP
Specifies a pointer to the location where the indices are stored. 
.SH DESCRIPTION
\%\f3glDrawRangeElements\fP is a restricted form of \%\f3glDrawElements\fP. \f2mode\fP, \f2start\fP, \f2end\fP,
and \f2count\fP match the corresponding arguments to \%\f3glDrawElements\fP, with
the additional constraint that all values in the arrays \f2count\fP must lie
between \f2start\fP and \f2end\fP, inclusive.
.P
Implementations denote recommended maximum amounts of vertex and
.br
index data,
which may be queried by calling \%\f3glGet\fP with argument 
\%\f3GL_MAX_ELEMENTS_VERTICES\fP and \%\f3GL_MAX_ELEMENTS_INDICES\fP.
If $"end" ~-~ "start" ~+~ 1$ is greater than the value of
\%\f3GL_MAX_ELEMENTS_VERTICES\fP, or if \f2count\fP is greater than the value of
\%\f3GL_MAX_ELEMENTS_INDICES\fP, then the call may operate at reduced
performance.  There is no requirement that all vertices in the range
[\f2start\fP,\ \f2end\fP] be referenced.  However, the implementation may
partially process unused vertices, reducing performance from what could 
be achieved with an optimal index set.
.P
When \%\f3glDrawRangeElements\fP is called, it uses \f2start\fP sequential elements from an
enabled array, starting at \f2count\fP to construct a sequence of
geometric primitives. \f2mode\fP specifies what kind of primitives are
constructed, and how the array elements construct these primitives. If
more than one array is enabled, each is used. If
\%\f3GL_VERTEX_ARRAY\fP is not enabled, no geometric primitives are
constructed.
.P
Vertex attributes that are modified by \%\f3glDrawRangeElements\fP have an
unspecified value after \%\f3glDrawRangeElements\fP returns. For example, if
\%\f3GL_COLOR_ARRAY\fP is enabled, the value of the current color is
undefined after \%\f3glDrawRangeElements\fP executes. Attributes that aren't
modified maintain their previous values.
.SH NOTES
\%\f3glDrawRangeElements\fP is available only if the GL version is 1.2 or greater.
.P
\%\f3glDrawRangeElements\fP is included in display lists. If \%\f3glDrawRangeElements\fP is entered into a
display list, 
the necessary array data (determined by the array pointers and
enables) is also 
entered into the display list. Because the array pointers and
enables are client-side state, their values affect display lists
when the lists are created, not when the lists are executed.
.SH ERRORS
It is an error for indices to lie outside the range [\f2start\fP,\ \f2end\fP],
but implementations may not check for this situation. Such indices
cause implementation-dependent behavior.
.P
\%\f3GL_INVALID_ENUM\fP is generated if \f2mode\fP is not an accepted value.
.P
\%\f3GL_INVALID_VALUE\fP is generated if \f2count\fP is negative.
.P
\%\f3GL_INVALID_VALUE\fP is generated if \f2end\fP $<$ \f2start\fP.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glDrawRangeElements\fP is executed between
the execution of \%\f3glBegin\fP and the corresponding \%\f3glEnd\fP.
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_MAX_ELEMENTS_VERTICES\fP
.P
\%\f3glGet\fP with argument \%\f3GL_MAX_ELEMENTS_INDICES\fP
.SH SEE ALSO 
\%\f3glArrayElement(3G)\fP,
\%\f3glColorPointer(3G)\fP,
\%\f3glDrawArrays(3G)\fP,
\%\f3glDrawElements(3G)\fP,
\%\f3glEdgeFlagPointer(3G)\fP,
\%\f3glGetPointerv(3G)\fP,
\%\f3glIndexPointer(3G)\fP,
\%\f3glInterleavedArrays(3G)\fP,
\%\f3glNormalPointer(3G)\fP,
\%\f3glTexCoordPointer(3G)\fP,
\%\f3glVertexPointer(3G)\fP