Microsoft DirectX 8.1 (Visual Basic) |
To use lighting in Microsoft® Direct3D®, you must create one or more lights. To determine which color a geometric object reflects, a material is created that is used to render geometric objects. Before rendering the scene, the Lights sample project calls an application-defined function named SetupLights to set up one material and one directional light. This function takes the following steps to create a material and a light.