Would like to understand this about GL_LIGHT
This is a discussion on Would like to understand this about GL_LIGHT within the Game Programming forums, part of the General Programming Boards category; Code:
// GL lights initialization:
glLightfv(GL_LIGHT2, GL_AMBIENT, LightAmbient);
glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse);
glLightfv(GL_LIGHT1, GL_POSITION,LightPosition);
glLightf(GL_LIGHT1, GL_SPOT_CUTOFF,90.0f);
glLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, LightSpotDirection);
glLightf(GL_LIGHT1,GL_SPOT_EXPONENT,0.4f);
glEnable(GL_LIGHT1);
...