The following steps are required, in order, to create and prepare a light for use in a scene. Note that these steps assume that you have already initialized the Direct3D sub-system and created a viewport.
To prepare a light for use in a scene
Creating a light causes Direct3D to allocate internal data structures that will contain information about the light. For more information, see Creating a Light.
By setting the light properties, you are choosing the type of light you will use, and how Direct3D will calculate lighting effects generated by that object. For more information, see Setting Light Properties.
The final step in preparing a light is to add it to the light list for a rendering viewport. For more information, see Adding a Light to a Viewport.