#include <cl.h>
Data Fields | |
GLenum | id |
CLcolour | ambient |
CLcolour | diffuse |
CLcolour | specular |
GLfloat | position [4] |
CLnormal | spot_direction |
GLfloat | spot_exponent |
GLfloat | spot_cutoff |
GLfloat | constant_attenuation |
GLfloat | linear_attenuation |
GLfloat | quadratic_attenuation |
GLuint | display_list |
glLight()
.
CLlight light;
clDefaultLight(&light);
glLightfv(light.id, GL_AMBIENT, (GLfloat*)&light.ambient); glLightfv(light.id, GL_DIFFUSE, (GLfloat*)&light.diffuse); glLightfv(light.id, GL_SPECULAR, (GLfloat*)&light.specular); glLightfv(light.id, GL_POSITION, (GLfloat*)&light.position); glLightfv(light.id, GL_SPOT_DIRECTION, (GLfloat*)&light.spot_direction); glLightfv(light.id, GL_SPOT_EXPONENT, &light.spot_exponent); glLightfv(light.id, GL_SPOT_CUTOFF, &light.spot_cutoff); glLightfv(light.id, GL_CONSTANT_ATTENUATION, &light.constant_attenuation); glLightfv(light.id, GL_LINEAR_ATTENUATION, &light.linear_attenuation); glLightfv(light.id, GL_QUADRATIC_ATTENUATION, &light.quadratic_attenuation);
The display_list
member is an OpenGL display list ID. It is set by the clUpdateLight()
function and called by the clLoadLight()
function. However, it may also be set and called by the user.
For more information on CLlight
members consult the OpenGL documentation for glLight()
, glGenLists()
, glNewList()
, glEndList()
, glCallList()
, and glDeleteLists()
.
Definition at line 422 of file cl.h.