Enabling and Disabling the Lighting Engine

Direct3D normally performs lighting calculations on any vertices that contain a vertex normal. However, you can disable lighting for vertices that include normals by using the D3DDP_DONOTLIGHT flag when you call DrawPrimitive-based rendering methods.

If your application uses vertex buffers, include or omit the D3DVOP_LIGHT flag when calling the IDirect3DVertexBuffer::ProcessVertices method to enable or disable lighting for that vertex buffer.

If the rendering device does not have a material assigned to it, the Direct3D lighting engine is disabled.