Extracted from Pike v7.3 release 18 at 2002-03-27.
pike.roxen.com
[Top]
GL

Method GL.glNormal()


Method glNormal

void GL.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 GL.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 GL.glNormal need not have unit length. If normalization is enabled, then normals specified with GL.glNormal are normalized after transformation. To enable and disable normalization, call GL.glEnable and GL.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.