Vertex Colors and Lights..
BlitzMax Forums/BlitzMax Programming/Vertex Colors and Lights..
| ||
For some reason I can not get Vertex Colors and lights working together in DirectX, it works fine in OpenGL. If I make a Material then my objects use that material and ignore the vertex colors. If I remove the material the lights don't work. Can this be done in DirectX7? These are the FVF flags I use : D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_DIFFUSE|D3DFVF_TEX1 Should I also be using D3DFVF_SPECULAR ?? |
| ||
No worries worked it out. D3DRENDERSTATE_DIFFUSEMATERIALSOURCE Diffuse color source for lighting calculations. Valid values are members of the D3DMATERIALCOLORSOURCE enumerated type. The default value is D3DMCS_COLOR1. The value for this render state is used only if the D3DRENDERSTATE_COLORVERTEX render state is set to TRUE. D3DRENDERSTATE_SPECULARMATERIALSOURCE Specular color source for lighting calculations. Valid values are members of the D3DMATERIALCOLORSOURCE enumerated type. The default value is D3DMCS_COLOR2. D3DRENDERSTATE_AMBIENTMATERIALSOURCE Ambient color source for lighting calculations. Valid values are members of the D3DMATERIALCOLORSOURCE enumerated type. The default value is D3DMCS_COLOR2. |