1GLNORMAL(3G) GLNORMAL(3G)
2
3
4
6 glNormal3b, glNormal3d, glNormal3f, glNormal3i, glNormal3s, glNor‐
7 mal3bv, glNormal3dv, glNormal3fv, glNormal3iv, glNormal3sv - set the
8 current normal vector
9
10
12 void glNormal3b( GLbyte nx,
13 GLbyte ny,
14 GLbyte nz )
15 void glNormal3d( GLdouble nx,
16 GLdouble ny,
17 GLdouble nz )
18 void glNormal3f( GLfloat nx,
19 GLfloat ny,
20 GLfloat nz )
21 void glNormal3i( GLint nx,
22 GLint ny,
23 GLint nz )
24 void glNormal3s( GLshort nx,
25 GLshort ny,
26 GLshort nz )
27
28
30 nx, ny, nz
31 Specify the x, y, and z coordinates of the new current nor‐
32 mal. The initial value of the current normal is the unit
33 vector, (0, 0, 1).
34
36 void glNormal3bv( const GLbyte *v )
37 void glNormal3dv( const GLdouble *v )
38 void glNormal3fv( const GLfloat *v )
39 void glNormal3iv( const GLint *v )
40 void glNormal3sv( const GLshort *v )
41
42
44 v Specifies a pointer to an array of three elements: the x, y, and
45 z coordinates of the new current normal.
46
48 The current normal is set to the given coordinates whenever glNormal is
49 issued. Byte, short, or integer arguments are converted to floating-
50 point
51 with a linear mapping that maps the most positive representable inte‐
52 ger value to 1.0, and the most negative representable integer value to
53 -1.0.
54
55 Normals specified with glNormal need not have unit length. If
56 GL_NORMALIZE is enabled, then normals of any length specified with
57 glNormal are normalized after transformation. If GL_RESCALE_NORMAL is
58 enabled, normals are scaled by a scaling factor derived from the mod‐
59 elview matrix. GL_RESCALE_NORMAL requires that the originally speci‐
60 fied normals were of unit length, and that the modelview matrix contain
61 only uniform scales for proper results. To enable and disable normal‐
62 ization, call glEnable and glDisable with either GL_NORMALIZE or
63 GL_RESCALE_NORMAL. Normalization is initially disabled.
64
66 The current normal can be updated at any time. In particular, glNormal
67 can be called between a call to glBegin and the corresponding call to
68 glEnd.
69
71 glGet with argument GL_CURRENT_NORMAL
72 glIsEnabled with argument GL_NORMALIZE
73 glIsEnabled with argument GL_RESCALE_NORMAL
74
76 glBegin(3G), glColor(3G), glIndex(3G), glNormalPointer(3G),
77 glTexCoord(3G), glVertex(3G)
78
79
80
81 GLNORMAL(3G)