Extracted from Pike v7.8 release 866 at 2016-11-06.
pike.ida.liu.se
[Top]
GL

Method GL.glNormal()


Method glNormal

void glNormal(float|int|array(float|int) nx, float|int|void ny, float|int|void nz)

Description

The current normal is set to the given coordinates whenever glNormal is issued. Byte, short, or integer arguments are converted to floating-point format with a linear mapping that maps the most positive representable integer value to 1.0, and the most negative representable integer value to -1.0.

Normals specified with glNormal need not have unit length. If normalization is enabled, then normals specified with glNormal are normalized after transformation. To enable and disable normalization, call glEnable and glDisable with the argument GL_NORMALIZE . Normalization is initially disabled.

Parameter nx

Specify the x, y, and z coordinates of the new current normal. The initial value of the current normal is the unit vector, (0, 0, 1).

Parameter v

Specifies a pointer to an array of three elements: the x, y, and z coordinates of the new current normal.