1GLDRAWELEMENTS(3G)              [FIXME: manual]             GLDRAWELEMENTS(3G)
2
3
4

NAME

6       glDrawElements - render primitives from array data
7

C SPECIFICATION

9       void glDrawElements(GLenum mode, GLsizei count, GLenum type,
10                           const GLvoid * indices);
11

PARAMETERS

13       mode
14           Specifies what kind of primitives to render. Symbolic constants
15           GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
16           GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP,
17           GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY,
18           GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted.
19
20       count
21           Specifies the number of elements to be rendered.
22
23       type
24           Specifies the type of the values in indices. Must be one of
25           GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
26
27       indices
28           Specifies a pointer to the location where the indices are stored.
29

DESCRIPTION

31       glDrawElements specifies multiple geometric primitives with very few
32       subroutine calls. Instead of calling a GL function to pass each
33       individual vertex, normal, texture coordinate, edge flag, or color, you
34       can prespecify separate arrays of vertices, normals, and so on, and use
35       them to construct a sequence of primitives with a single call to
36       glDrawElements.
37
38       When glDrawElements is called, it uses count sequential elements from
39       an enabled array, starting at indices to construct a sequence of
40       geometric primitives.  mode specifies what kind of primitives are
41       constructed and how the array elements construct these primitives. If
42       more than one array is enabled, each is used.
43
44       Vertex attributes that are modified by glDrawElements have an
45       unspecified value after glDrawElements returns. Attributes that aren't
46       modified maintain their previous values.
47

NOTES

49       GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY,
50       GL_TRIANGLE_STRIP_ADJACENCY and GL_TRIANGLES_ADJACENCY are available
51       only if the GL version is 3.2 or greater.
52

ERRORS

54       GL_INVALID_ENUM is generated if mode is not an accepted value.
55
56       GL_INVALID_VALUE is generated if count is negative.
57
58       GL_INVALID_OPERATION is generated if a geometry shader is active and
59       mode is incompatible with the input primitive type of the geometry
60       shader in the currently installed program object.
61
62       GL_INVALID_OPERATION is generated if a non-zero buffer object name is
63       bound to an enabled array or the element array and the buffer object's
64       data store is currently mapped.
65

VERSION SUPPORT

67       ┌───────────────┬───────────────────────────────────────────────────────────────────────┐
68       │               │                OpenGL Version                                         
69       ├───────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
70Function       2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
71/              │     │     │     │     │     │     │     │     │     │     │     │     │
72Feature        │     │     │     │     │     │     │     │     │     │     │     │     │
73Name           │     │     │     │     │     │     │     │     │     │     │     │     │
74       ├───────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
75glDrawElements │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
76       └───────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
77

SEE ALSO

79       glDrawArrays(), glDrawElementsInstanced(), glDrawElementsBaseVertex(),
80       glDrawRangeElements()
81
83       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
84       Khronos Group. This document is licensed under the SGI Free Software B
85       License. For details, see http://oss.sgi.com/projects/FreeB/.
86
88       Copyright © 1991-2006 Silicon Graphics, Inc.
89       Copyright © 2010-2014 Khronos Group
90
91
92
93[FIXME: source]                   03/06/2019                GLDRAWELEMENTS(3G)
Impressum