Well actually you're right that cross-posting is not a good idea...
But I'm working on Direct3D with DelphiX for over 2 years, and I could not make lights work!!!! I was desperate....
Until today!
Actually,
DXDraw.D3DDevice7.SetRenderState(D3DRENDERSTATE_DI FFUSEMATERIALSOURCE, 1);
didn't make a difference, but motivated by your answer I did a little debugging to the return value of DXDraw.D3DDevice7.SetLight(0, light);
And it was <> D3D_OK, it was DDERR_INVALIDPARAMS!!!
What was wrong? Well, the wrong thing was:
light.dvRange := D3DLIGHT_RANGE_MAX;
I change this to
light.dvRange := 100.0 and i work perfectly at last!
Anyway, thanks for motivating me to solve my problem!!!
Thanks!!!!!
Bookmarks