Is is just me, or does setting the ambient light do NOTHING!
I am using a single directional light, and it works fine, then I call this every frame:
lpD3DDevice->SetRenderState( D3DRENDERSTATE_AMBIENT, RANDOM_COLOR);
This should at least change how the image looks considering I am pseudo-randomly changing the ambient color, but it doesn''t change a thing.
Is there something I have to do to enable ambient lights?
Most people recommend that you do the lighting yourself, using D3DLVERTEX. Typically, your own lighting model is faster, since d3d takes many things into account that you wouldn''t typically bother with.
If you do it this way, it''s as easy as setting up an ambient light variable and keeping it.
I had your problem too, but I switched to my own lighting model-- not because of it, but because when I compared the speeds of the two, my own model was faster.
D3DLVERTEX doesn''t contain normal data so how do you use it to do your own lighting model? Don''t you still use vertex normals to shade? I hope you don''t fill the D3DLVERTEX structure after the calculations, because this would mean you have to duplicate every vertex. Please inlighten me.