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

NAME

6       glVertexPointer - define an array of vertex data
7

C SPECIFICATION

9       void glVertexPointer(GLint size, GLenum type, GLsizei stride,
10                            const GLvoid * pointer);
11

PARAMETERS

13       size
14           Specifies the number of coordinates per vertex. Must be 2, 3, or 4.
15           The initial value is 4.
16
17       type
18           Specifies the data type of each coordinate in the array. Symbolic
19           constants GL_SHORT, GL_INT, GL_FLOAT, or GL_DOUBLE are accepted.
20           The initial value is GL_FLOAT.
21
22       stride
23           Specifies the byte offset between consecutive vertices. If stride
24           is 0, the vertices are understood to be tightly packed in the
25           array. The initial value is 0.
26
27       pointer
28           Specifies a pointer to the first coordinate of the first vertex in
29           the array. The initial value is 0.
30

DESCRIPTION

32       glVertexPointer specifies the location and data format of an array of
33       vertex coordinates to use when rendering.  size specifies the number of
34       coordinates per vertex, and must be 2, 3, or 4.  type specifies the
35       data type of each coordinate, and stride specifies the byte stride from
36       one vertex to the next, allowing vertices and attributes to be packed
37       into a single array or stored in separate arrays. (Single-array storage
38       may be more efficient on some implementations; see
39       glInterleavedArrays().)
40
41       If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
42       target (see glBindBuffer()) while a vertex array is specified, pointer
43       is treated as a byte offset into the buffer object's data store. Also,
44       the buffer object binding (GL_ARRAY_BUFFER_BINDING) is saved as vertex
45       array client-side state (GL_VERTEX_ARRAY_BUFFER_BINDING).
46
47       When a vertex array is specified, size, type, stride, and pointer are
48       saved as client-side state, in addition to the current vertex array
49       buffer object binding.
50
51       To enable and disable the vertex array, call glEnableClientState() and
52       glDisableClientState() with the argument GL_VERTEX_ARRAY. If enabled,
53       the vertex array is used when glArrayElement(), glDrawArrays(),
54       glMultiDrawArrays(), glDrawElements(), glMultiDrawElements(), or
55       glDrawRangeElements() is called.
56

NOTES

58       glVertexPointer is available only if the GL version is 1.1 or greater.
59
60       The vertex array is initially disabled and isn't accessed when
61       glArrayElement(), glDrawElements(), glDrawRangeElements(),
62       glDrawArrays(), glMultiDrawArrays(), or glMultiDrawElements() is
63       called.
64
65       Execution of glVertexPointer is not allowed between the execution of
66       glBegin() and the corresponding execution of glEnd(), but an error may
67       or may not be generated. If no error is generated, the operation is
68       undefined.
69
70       glVertexPointer is typically implemented on the client side.
71
72       Vertex array parameters are client-side state and are therefore not
73       saved or restored by glPushAttrib() and glPopAttrib(). Use
74       glPushClientAttrib() and glPopClientAttrib() instead.
75

ERRORS

77       GL_INVALID_VALUE is generated if size is not 2, 3, or 4.
78
79       GL_INVALID_ENUM is generated if type is not an accepted value.
80
81       GL_INVALID_VALUE is generated if stride is negative.
82

ASSOCIATED GETS

84       glIsEnabled() with argument GL_VERTEX_ARRAY
85
86       glGet() with argument GL_VERTEX_ARRAY_SIZE
87
88       glGet() with argument GL_VERTEX_ARRAY_TYPE
89
90       glGet() with argument GL_VERTEX_ARRAY_STRIDE
91
92       glGet() with argument GL_VERTEX_ARRAY_BUFFER_BINDING
93
94       glGet() with argument GL_ARRAY_BUFFER_BINDING
95
96       glGetPointerv() with argument GL_VERTEX_ARRAY_POINTER
97

SEE ALSO

99       glArrayElement(), glBindBuffer(), glColorPointer(),
100       glDisableClientState(), glDrawArrays(), glDrawElements(),
101       glDrawRangeElements(), glEdgeFlagPointer(), glEnableClientState(),
102       glFogCoordPointer(), glIndexPointer(), glInterleavedArrays(),
103       glMultiDrawArrays(), glMultiDrawElements(), glNormalPointer(),
104       glPopClientAttrib(), glPushClientAttrib(), glSecondaryColorPointer(),
105       glTexCoordPointer(), glVertex(), glVertexAttribPointer()
106
108       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
109       under the SGI Free Software B License. For details, see
110       http://oss.sgi.com/projects/FreeB/.
111

AUTHORS

113       opengl.org
114
115
116
117opengl.org                        07/13/2018               GLVERTEXPOINTER(3G)
Impressum