1) Are you using D3DVERTEX vertices? Lighting doesn't affect D3DLVERTEX structures (I think)
2) Are you setting the vertex normals?
--TheGoop
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
1) Are you using D3DVERTEX vertices? Lighting doesn't affect D3DLVERTEX structures (I think)
2) Are you setting the vertex normals?
--TheGoop
could it be the material?
Josh
LONG fTimeKey = timeGetTime();
FLOAT x = sinf( fTimeKey*2.000f );
FLOAT y = sinf( fTimeKey*2.246f );
FLOAT z = sinf( fTimeKey*2.640f );
// Set up the light structure
D3DLIGHT7 light;
ZeroMemory( &light, sizeof(light) );
light.dltType = D3DLIGHT_DIRECTIONAL;
light.dcvDiffuse.r = 0.5f + 0.5f * x;
light.dcvDiffuse.g = 0.5f + 0.5f * y;
light.dcvDiffuse.b = 0.5f + 0.5f * z;
light.dvDirection = D3DVECTOR( x, y, z );
pd3dDevice->SetLight( 0, &light );
pd3dDevice->LightEnable( 0, TRUE );