# glNormal

set the current normal vector

## Signature

glNormal( )->
glNormal( nx , ny , )
glNormal3b( GLbyte ( nx ) , GLbyte ( ny ) , GLbyte ( nz ) )-> void
glNormal3b( nx , ny , )
glNormal3bv( const GLbyte * ( v ) )-> void
glNormal3bv( )
glNormal3d( GLdouble ( nx ) , GLdouble ( ny ) , GLdouble ( nz ) )-> void
glNormal3d( nx , ny , )
glNormal3dv( const GLdouble * ( v ) )-> void
glNormal3dv( )
glNormal3f( GLfloat ( nx ) , GLfloat ( ny ) , GLfloat ( nz ) )-> void
glNormal3f( nx , ny , )
glNormal3fv( const GLfloat * ( v ) )-> void
glNormal3fv( )
glNormal3i( GLint ( nx ) , GLint ( ny ) , GLint ( nz ) )-> void
glNormal3i( nx , ny , )
glNormal3iv( const GLint * ( v ) )-> void
glNormal3iv( )
glNormal3s( GLshort ( nx ) , GLshort ( ny ) , GLshort ( nz ) )-> void
glNormal3s( nx , ny , )
glNormal3sv( const GLshort * ( v ) )-> void
glNormal3sv( )

## Parameters

VariablesDescription
nx, ny, nz
Specify the $\mathit{x}$ , $\mathit{y}$ , and $\mathit{z}$ coordinates of the new current normal. The initial value of the current normal is the unit vector, (0, 0, 1).

## Parameters

v
Specifies a pointer to an array of three elements: the $\mathit{x}$ , $\mathit{y}$ , and $\mathit{z}$ coordinates of the new current normal.

## 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 GL_NORMALIZE is enabled, then normals of any length specified with glNormal 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 glEnable and glDisable with either GL_NORMALIZE or GL_RESCALE_NORMAL . Normalization is initially disabled.

## Notes

The current normal can be updated at any time. In particular, glNormal can be called between a call to glBegin and the corresponding call to glEnd .

## Associated Gets

glGet with argument GL_CURRENT_NORMAL
glIsEnabled with argument GL_NORMALIZE
glIsEnabled with argument GL_RESCALE_NORMAL

## Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glNormal
OpenGLContext tests/glu_tess2.py Lines: 57
OpenGLContext tests/glu_tess.py Lines: 59
OpenGLContext OpenGLContext/scenegraph/text/toolsfont.py Lines: 155, 158
Glinter Widget.py Lines: 849
glNormal3dv
OpenGLContext OpenGLContext/scenegraph/indexedfaceset.py Lines: 581, 615
glNormal3f
OpenGLContext tests/nehe8.py Lines: 186, 192, 198, 204, 210, 216
OpenGLContext tests/multitexture_1.py Lines: 62
OpenGLContext tests/nehe7.py Lines: 179, 185, 191, 197, 203, 209
OpenGLContext OpenGLContext/scenegraph/gear.py Lines: 88, 111, 145, 148, 153, 156, 169
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 23, 46, 80, 83, 88, 91, 104
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/logo.py Lines: 13
OpenGL-Demo PyOpenGL-Demo/tom/logo.py Lines: 15
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 118
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 95, 102, 109, 116, 123, 130, 185
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson48/Lesson48.py Lines: 119, 122
{Artistic License} PymmLib applications/glutviewer.py Lines: 83
{Artistic License} PymmLib mmLib/OpenGLDriver.py Lines: 325, 330
{GPL} GLChess src/lib/scene/opengl/opengl.py Lines: 716, 846
{LGPL} Pyggel pyggel/geometry.py Lines: 125, 208, 268, 434, 560, 633
{LGPL} Pyggel pyggel/misc.py Lines: 311
{GPL3} OpenGL-Programmable 01-direct.py Lines: 95
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 106
glNormal3fv
OpenGLContext tests/redbook_surface_cb.py Lines: 154
OpenGL-Demo PyOpenGL-Demo/dek/OglSurface/triangle.py Lines: 64, 69, 74
{GPL} GLChess src/lib/scene/opengl/opengl.py Lines: 809
{GPL} GLChess src/lib/scene/opengl/builtin_models.py Lines: 237, 241, 254, 258, 272, 276, 280, 284, 325, 337
{LGPL} Pyggel pyggel/mesh.py Lines: 149