COpenGL::SetLightState

SetLightStatevoid SetLightState( int LightNumber, BOOL TurnOn );

Parameters

LightNumberSpecifies a zero based index for the light
TurnOn If TRUE then the specified light will be turned on. If FALSE then the specified light will be turned off

Remarks

Use the SetLightState member function to turn the desired light on or off.

The method function is a wrapper around the OpenGL glEnable, glDisable functions.

Note:The SetLightState member function uses the current OpenGL rendering context. Ensure that the current rendering context is what you intend to use. Use wglMakeCurrent or DrawBegin member functions to set the current rendering context.

See Also

SetLightingMode, GetLightingMode, GetNumberOfLights, GetLightState, SetLightModelLocalViewer, GetLightModelLocalViewer