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

NAME

6       glDrawArrays - render primitives from array data
7

C SPECIFICATION

9       void glDrawArrays(GLenum mode, GLint first, GLsizei count);
10

PARAMETERS

12       mode
13           Specifies what kind of primitives to render. Symbolic constants
14           GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
15           GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP,
16           GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY,
17           GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted.
18
19       first
20           Specifies the starting index in the enabled arrays.
21
22       count
23           Specifies the number of indices to be rendered.
24

DESCRIPTION

26       glDrawArrays specifies multiple geometric primitives with very few
27       subroutine calls. Instead of calling a GL procedure to pass each
28       individual vertex, normal, texture coordinate, edge flag, or color, you
29       can prespecify separate arrays of vertices, normals, and colors and use
30       them to construct a sequence of primitives with a single call to
31       glDrawArrays.
32
33       When glDrawArrays is called, it uses count sequential elements from
34       each enabled array to construct a sequence of geometric primitives,
35       beginning with element first.  mode specifies what kind of primitives
36       are constructed and how the array elements construct those primitives.
37
38       Vertex attributes that are modified by glDrawArrays have an unspecified
39       value after glDrawArrays returns. Attributes that aren't modified
40       remain well defined.
41

NOTES

43       GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY,
44       GL_TRIANGLE_STRIP_ADJACENCY and GL_TRIANGLES_ADJACENCY are available
45       only if the GL version is 3.2 or greater.
46

ERRORS

48       GL_INVALID_ENUM is generated if mode is not an accepted value.
49
50       GL_INVALID_VALUE is generated if count is negative.
51
52       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
53       bound to an enabled array and the buffer object's data store is
54       currently mapped.
55
56       GL_INVALID_OPERATION is generated if a geometry shader is active and
57       mode is incompatible with the input primitive type of the geometry
58       shader in the currently installed program object.
59

SEE ALSO

61       glDrawArraysInstanced(), glDrawElements(), glDrawRangeElements(),
62
64       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
65       under the SGI Free Software B License. For details, see
66       http://oss.sgi.com/projects/FreeB/.
67

AUTHORS

69       opengl.org
70
71
72
73opengl.org                        06/10/2014                  GLDRAWARRAYS(3G)
Impressum