1GLNORMALPOINTER(3G) OpenGL Manual GLNORMALPOINTER(3G)
2
3
4
6 glNormalPointer - define an array of normals
7
9 void glNormalPointer(GLenum type, GLsizei stride,
10 const GLvoid * pointer);
11
13 type
14 Specifies the data type of each coordinate in the array. Symbolic
15 constants GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, and GL_DOUBLE are
16 accepted. The initial value is GL_FLOAT.
17
18 stride
19 Specifies the byte offset between consecutive normals. If stride is
20 0, the normals are understood to be tightly packed in the array.
21 The initial value is 0.
22
23 pointer
24 Specifies a pointer to the first coordinate of the first normal in
25 the array. The initial value is 0.
26
28 glNormalPointer specifies the location and data format of an array of
29 normals to use when rendering. type specifies the data type of each
30 normal coordinate, and stride specifies the byte stride from one normal
31 to the next, allowing vertices and attributes to be packed into a
32 single array or stored in separate arrays. (Single-array storage may be
33 more efficient on some implementations; see glInterleavedArrays().)
34
35 If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
36 target (see glBindBuffer()) while a normal array is specified, pointer
37 is treated as a byte offset into the buffer object's data store. Also,
38 the buffer object binding (GL_ARRAY_BUFFER_BINDING) is saved as normal
39 vertex array client-side state (GL_NORMAL_ARRAY_BUFFER_BINDING).
40
41 When a normal array is specified, type, stride, and pointer are saved
42 as client-side state, in addition to the current vertex array buffer
43 object binding.
44
45 To enable and disable the normal array, call glEnableClientState() and
46 glDisableClientState() with the argument GL_NORMAL_ARRAY. If enabled,
47 the normal array is used when glDrawArrays(), glMultiDrawArrays(),
48 glDrawElements(), glMultiDrawElements(), glDrawRangeElements(), or
49 glArrayElement() is called.
50
52 glNormalPointer is available only if the GL version is 1.1 or greater.
53
54 The normal array is initially disabled and isn't accessed when
55 glArrayElement(), glDrawElements(), glDrawRangeElements(),
56 glDrawArrays(), glMultiDrawArrays(), or glMultiDrawElements() is
57 called.
58
59 Execution of glNormalPointer is not allowed between glBegin() and the
60 corresponding glEnd(), but an error may or may not be generated. If an
61 error is not generated, the operation is undefined.
62
63 glNormalPointer is typically implemented on the client side.
64
65 Normal array parameters are client-side state and are therefore not
66 saved or restored by glPushAttrib() and glPopAttrib(). Use
67 glPushClientAttrib() and glPopClientAttrib() instead.
68
70 GL_INVALID_ENUM is generated if type is not an accepted value.
71
72 GL_INVALID_VALUE is generated if stride is negative.
73
75 glIsEnabled() with argument GL_NORMAL_ARRAY
76
77 glGet() with argument GL_NORMAL_ARRAY_TYPE
78
79 glGet() with argument GL_NORMAL_ARRAY_STRIDE
80
81 glGet() with argument GL_NORMAL_ARRAY_BUFFER_BINDING
82
83 glGet() with argument GL_ARRAY_BUFFER_BINDING
84
85 glGetPointerv() with argument GL_NORMAL_ARRAY_POINTER
86
88 glArrayElement(), glBindBuffer(), glColorPointer(),
89 glDisableClientState(), glDrawArrays(), glDrawElements(),
90 glDrawRangeElements(), glEdgeFlagPointer(), glEnableClientState(),
91 glFogCoordPointer(), glIndexPointer(), glInterleavedArrays(),
92 glMultiDrawArrays(), glMultiDrawElements(), glNormal(),
93 glPopClientAttrib(), glPushClientAttrib(), glSecondaryColorPointer(),
94 glTexCoordPointer(), glVertexAttribPointer(), glVertexPointer()
95
97 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
98 under the SGI Free Software B License. For details, see
99 http://oss.sgi.com/projects/FreeB/.
100
102 opengl.org
103
104
105
106opengl.org 07/13/2018 GLNORMALPOINTER(3G)