glNormal

set the current normal vector

Signature

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

Parameters

VariablesDescription
nx, ny, nz
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).
v
Specifies a pointer to an array of three elements: the x , y , and 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

See Also

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 OpenGLContext/scenegraph/text/toolsfont.py Lines: 159, 162
OpenGLContext tests/glu_tess.py Lines: 59
OpenGLContext tests/glu_tess2.py Lines: 58
glNormal3dv
OpenGLContext OpenGLContext/scenegraph/indexedfaceset.py Lines: 588, 622
glNormal3f
OpenGLContext OpenGLContext/scenegraph/gear.py Lines: 88, 111, 145, 148, 153, 156, 169
OpenGLContext tests/nehe8.py Lines: 186, 192, 198, 204, 210, 216
OpenGLContext tests/multitexture_1.py Lines: 63
OpenGLContext tests/nehe7.py Lines: 180, 186, 192, 198, 204, 210
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson23.py Lines: 97, 104, 111, 118, 125, 132, 187
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 120
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson48/Lesson48.py Lines: 119, 122
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 26, 49, 83, 86, 91, 94, 107
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/logo.py Lines: 13
OpenGL-Demo PyOpenGL-Demo/tom/logo.py Lines: 11
{Artistic License} PymmLib pymmlib/applications/glutviewer.py Lines: 83
{Artistic License} PymmLib pymmlib/mmLib/OpenGLDriver.py Lines: 332, 337
{LGPL} Pyggel pyggel/misc.py Lines: 311
{LGPL} Pyggel pyggel/geometry.py Lines: 125, 208, 268, 434, 560, 633
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 105
{GPL3} OpenGL-Programmable 01-direct.py Lines: 94
glNormal3fv
OpenGLContext tests/redbook_surface_cb.py Lines: 152
OpenGL-Demo PyOpenGL-Demo/dek/OglSurface/triangle.py Lines: 64, 69, 74
{LGPL} Pyggel pyggel/mesh.py Lines: 149

MathML Rendering

Powered by MathJax