Name
gl.Normal -- set the current normal vector
Synopsis
gl.Normal(nx, ny, nz)
Function
The current normal is set to the given floating-point coordinates whenever gl.Normal() is issued. The initial value of the current normal is the unit vector, (0, 0, 1). Alternatively, gl.Normal() can also be called with a single table element containing the x, y, z normal coordinates.

Normals specified with gl.Normal() need not have unit length. If #GL_NORMALIZE is enabled, then normals of any length specified with gl.Normal() are normalized after transformation. If #GL_RESCALE_NORMAL is enabled, normals are scaled by a scaling factor derived from the modelview matrix. #GL_RESCALE_NORMAL requires that the originally specified normals were of unit length, and that the modelview matrix contain only uniform scales for proper results. To enable and disable normalization, call gl.Enable() and gl.Disable() with either #GL_NORMALIZE or #GL_RESCALE_NORMAL. Normalization is initially disabled.

The current normal can be updated at any time. In particular, gl.Normal() can be called between a call to gl.Begin() and the corresponding call to gl.End().

Please consult an OpenGL reference manual for more information.

Inputs
nx
specify the x coordinate of the new current normal
ny
specify the y coordinate of the new current normal
nz
specify the z coordinate of the new current normal
Associated gets
gl.Get() with argument #GL_CURRENT_NORMAL

gl.IsEnabled() with argument #GL_NORMALIZE

gl.IsEnabled() with argument #GL_RESCALE_NORMAL


Show TOC