1GLNORMALPOINTER(3G) GLNORMALPOINTER(3G)
2
3
4
6 glNormalPointer - define an array of normals
7
8
10 void glNormalPointer( GLenum type,
11 GLsizei stride,
12 const GLvoid *ptr )
13
14
16 type Specifies the data type of each coordinate in the array. Sym‐
17 bolic constants GL_BYTE, GL_SHORT, GL_INT, GL_FLOAT, and
18 GL_DOUBLE are accepted. The initial value is GL_FLOAT.
19
20 stride Specifies the byte offset between consecutive normals. If
21 stride is 0- the initial value-the normals are understood to be
22 tightly packed in the array. The initial value is 0.
23
24 ptr Specifies a pointer to the first coordinate of the first normal
25 in the array. The initial value is 0.
26
28 glNormalPointer specifies the location and data of an array of normals
29 to use when rendering. type specifies the data type of the normal
30 coordinates and stride gives the byte stride from one normal to the
31 next, allowing vertices and attributes to be packed into a single array
32 or stored in separate arrays. (Single-array storage may be more effi‐
33 cient on some implementations; see glInterleavedArrays.) When a normal
34 array is specified, type, stride, and ptr are saved as client-side
35 state.
36
37 To enable and disable the normal array, call glEnableClientState and
38 glDisableClientState with the argument GL_NORMAL_ARRAY. If enabled, the
39 normal array is used when glDrawArrays, glDrawElements, or
40 glArrayElement is called.
41
42 Use glDrawArrays to construct a sequence of primitives (all of the same
43 type) from prespecified vertex and vertex attribute arrays. Use
44 glArrayElement to specify primitives by indexing vertices and vertex
45 attributes and glDrawElements to construct a sequence of primitives by
46 indexing vertices and vertex attributes.
47
49 glNormalPointer is available only if the GL version is 1.1 or greater.
50
51 The normal array is initially disabled and isn't accessed when
52 glArrayElement, glDrawElements, or glDrawArrays is called.
53
54 Execution of glNormalPointer is not allowed between glBegin and the
55 corresponding glEnd, but an error may or may not be generated. If an
56 error is not generated, the operation is undefined.
57
58 glNormalPointer is typically implemented on the client side.
59
60 Since the normal array parameters are client-side state, they are not
61 saved or restored by glPushAttrib and glPopAttrib. Use
62 glPushClientAttrib and glPopClientAttrib instead.
63
65 GL_INVALID_ENUM is generated if type is not an accepted value.
66
67 GL_INVALID_VALUE is generated if stride is negative.
68
70 glIsEnabled with argument GL_NORMAL_ARRAY
71 glGet with argument GL_NORMAL_ARRAY_TYPE
72 glGet with argument GL_NORMAL_ARRAY_STRIDE
73 glGetPointerv with argument GL_NORMAL_ARRAY_POINTER
74
76 glArrayElement(3G), glColorPointer(3G), glDrawArrays(3G),
77 glDrawElements(3G), glEdgeFlagPointer(3G), glEnable(3G),
78 glGetPointerv(3G), glIndexPointer(3G), glInterleavedArrays(3G),
79 glPopClientAttrib(3G), glPushClientAttrib(3G), glTexCoordPointer(3G),
80 glVertexPointer(3G)
81
82
83
84 GLNORMALPOINTER(3G)