d3dLight.Type = D3DLIGHT_DIRECTIONAL;
d3dLight.Diffuse.r = 1.0f;
d3dLight.Diffuse.g = 1.0f;
d3dLight.Diffuse.b = 1.0f;
d3dLight.Ambient.r = 1.0f;
d3dLight.Ambient.g = 1.0f;
d3dLight.Ambient.b = 1.0f;
d3dLight.Specular.r = 0.0f;
d3dLight.Specular.g = 0.0f;
d3dLight.Specular.b = 0.0f;
d3dLight.Position = D3DXVECTOR3(0.0f, 0.0f, 0.0f);
d3dLight.Direction = D3DXVECTOR3( 0.0f, 0.0f, 1.0f);
d3dLight.Attenuation0 = 0.0f;
d3dLight.Attenuation1 = 0.0f;
d3dLight.Attenuation2 = 0.0f;
d3dLight.Range = ((float)sqrt(FLT_MAX));
// Set the property information for the first light.
hr = d3dDevice->SetLight(0, &d3dLight);
if (FAILED(hr))
THROW_ERROR_AND_EXIT("d3dDevice->SetLight");
hr = d3dDevice->LightEnable(0, TRUE);
if (FAILED(hr))
THROW_ERROR_AND_EXIT("hr = d3dDevice->LightEnable");