The D3DLIGHTSTATETYPE enumerated type defines the light state for the IDirect3DDevice3::SetLightState method. This enumerated type is part of the D3DSTATE structure.
typedef enum _D3DLIGHTSTATETYPE {
D3DLIGHTSTATE_MATERIAL = 1,
D3DLIGHTSTATE_AMBIENT = 2,
D3DLIGHTSTATE_COLORMODEL = 3,
D3DLIGHTSTATE_FOGMODE = 4,
D3DLIGHTSTATE_FOGSTART = 5,
D3DLIGHTSTATE_FOGEND = 6,
D3DLIGHTSTATE_FOGDENSITY = 7,
D3DLIGHTSTATE_COLORVERTEX = 8,
D3DLIGHTSTATE_FORCE_DWORD = 0x7fffffff,
} D3DLIGHTSTATETYPE;
When programming for execute buffers, this enumerated type is used with the D3DOP_STATELIGHT opcode.
Setting D3DLIGHTSTATE_COLORVERTEX to FALSE instructs the geometry pipeline to ignore part of each vertex (the vertex color). The only reason to use this light state is to change the appearance of the geometry without respecifying it in a different vertex format.
If D3DLIGHTSTATE_COLORVERTEX is set to TRUE and a diffuse vertex color is present, the output alpha is equal to the diffuse alpha for the vertex. Otherwise, output alpha is equal to the alpha component of diffuse material, clamped to the range [0, 255].
You can disable or enable lighting by including or omitting the D3DDP_DONOTLIGHT flag when calling a standard IDirect3DDevice3 rendering method, such as IDirect3DDevice3::DrawPrimitive. If you are using vertex buffers, disable or enable lighting by ommiting or including the D3DVOP_LIGHT flag when you call the IDirect3DVertexBuffer::ProcessVertices method.
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in d3dtypes.h.