glLight

set light source parameters

Signature

glLight( )->
glLight( light , pname , params )
glLightf( GLenum ( light ) , GLenum ( pname ) , GLfloat ( param ) )-> void
glLightf( light , pname , param )
glLightfv( GLenum ( light ) , GLenum ( pname ) , const GLfloat * ( params ) )-> void
glLightfv( light , pname , params )
glLighti( GLenum ( light ) , GLenum ( pname ) , GLint ( param ) )-> void
glLighti( light , pname , param )
glLightiv( GLenum ( light ) , GLenum ( pname ) , const GLint * ( params ) )-> void
glLightiv( light , pname , params )

Parameters

VariablesDescription
light
Specifies a light. The number of lights depends on the implementation, but at least eight lights are supported. They are identified by symbolic names of the form GL_LIGHT i , where i ranges from 0 to the value of GL_MAX_LIGHTS - 1.
pname
Specifies a single-valued light source parameter for light . GL_SPOT_EXPONENT , GL_SPOT_CUTOFF , GL_CONSTANT_ATTENUATION , GL_LINEAR_ATTENUATION , and GL_QUADRATIC_ATTENUATION are accepted.
param
Specifies the value that parameter pname of light source light will be set to.

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.

glLight
OpenGLContext OpenGLContext/passes/rendervisitor.py Lines: 188, 189
{GPL3} OpenGL-Programmable 01-direct.py Lines: 239
{GPL3} OpenGL-Programmable 06-perpixel.py Lines: 336
{GPL3} OpenGL-Programmable 03-array.py Lines: 250
{GPL3} OpenGL-Programmable 08-pbo.py Lines: 369
{GPL3} OpenGL-Programmable 02-displaylist.py Lines: 248
{GPL3} OpenGL-Programmable 05-shader.py Lines: 328
{GPL3} OpenGL-Programmable 07-attrib.py Lines: 347
{GPL3} OpenGL-Programmable 04-vbo.py Lines: 269
glLightf
OpenGLContext OpenGLContext/scenegraph/light.py Lines: 123, 124, 125, 160, 162
glLightfv
OpenGLContext tests/nehe7.py Lines: 76, 77, 78
OpenGLContext tests/nehe8.py Lines: 67, 68, 69
OpenGLContext tests/redbook_alpha3D.py Lines: 119
OpenGLContext OpenGLContext/scenegraph/light.py Lines: 54, 60, 69, 159
OpenGL-Demo PyOpenGL-Demo/GLUT/gears.py Lines: 228
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/checker.py Lines: 78, 79
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/text.py Lines: 34, 35, 36, 37
OpenGL-Demo PyOpenGL-Demo/GLUT/tom/cone.py Lines: 39, 40, 41, 42
OpenGL-Demo PyOpenGL-Demo/GLE/maintest.py Lines: 57, 58, 60, 61
OpenGL-Demo PyOpenGL-Demo/tom/conechecker.py Lines: 38, 39, 40, 41
OpenGL-Demo PyOpenGL-Demo/tom/conesave.py Lines: 21, 22, 23, 24
OpenGL-Demo PyOpenGL-Demo/tom/fog.py Lines: 44
OpenGL-Demo PyOpenGL-Demo/tom/cone.py Lines: 17, 18, 19, 20
OpenGL-Demo PyOpenGL-Demo/proesch/nurbs/nurbs.py Lines: 172, 173, 174, 175
OpenGL-Demo PyOpenGL-Demo/proesch/bezier/bezier.py Lines: 121, 122, 123, 124
OpenGL-Demo PyOpenGL-Demo/proesch/stereo/stereoDemo.py Lines: 48, 49, 50, 110, 112, 114, 116
OpenGL-Demo PyOpenGL-Demo/redbook/teapots.py Lines: 74, 75, 76
OpenGL-Demo PyOpenGL-Demo/redbook/scene.py Lines: 72, 73, 74, 75
OpenGL-Demo PyOpenGL-Demo/redbook/fog.py Lines: 74
OpenGL-Demo PyOpenGL-Demo/redbook/movelight.py Lines: 98
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson18.py Lines: 121, 122, 123
OpenGL-Demo PyOpenGL-Demo/NeHe/lesson26.py Lines: 63, 64, 65, 166, 177
Glinter Core.py Lines: 211, 213, 215, 217
{Artistic License} PymmLib applications/glutviewer.py Lines: 196, 197, 198, 200
{Artistic License} PymmLib mmLib/OpenGLDriver.py Lines: 171, 172, 173, 174
{LGPL} PyMT pymt/obj.py Lines: 22, 277, 278
{LGPL} Pyggel pyggel/light.py Lines: 39, 40, 41, 42, 43
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Spheres.py Lines: 52, 53, 54, 55
{LGPL or GPL or MPL} Kamaelia Sketches/CL/Topology3D/Experiments/Cubes.py Lines: 71, 72, 73
Visvis core/light.py Lines: 265, 268, 269, 270, 273

MathML Rendering

Powered by MathJax