Original Post
Hi,
What i would like to have is a light in space wich can move.
The problem in my code is that it does not accept my variable floats and does not use them at all.
With my floats the screen turns dark-grey.
I have created the following source:
D3DLIGHT8 d3dLight; //Initialize the light structure. ZeroMemory(&d3dLight, sizeof(D3DLIGHT8)); d3dLight.Type = D3DLIGHT_POINT; d3dLight.Diffuse.r = 1.0f; d3dLight.Diffuse.g = 1.0f; d3dLight.Diffuse.b = 1.0f; d3dLight.Ambient.r = 0.0f; d3dLight.Ambient.g = 0.0f; d3dLight.Ambient.b = 0.0f; d3dLight.Specular.r = 0.0f; d3dLight.Specular.g = 0.0f; d3dLight.Specular.b = 0.0f; d3dLight.Position.x = Light_X; // -100.0f; d3dLight.Position.y = Light_Y; //100.0f; d3dLight.Position.z = Light_Z; // -100.0f; d3dLight.Attenuation0 = 1.0f; d3dLight.Attenuation1 = 0.0f; d3dLight.Attenuation2 = 0.0f; d3dLight.Range = 1000.0f;Thank you. Those who find beautifull meanings in beautiful things are the cultivated.For these there is hope. They are the elect to whom beautiful things mean only beauty. -- Unknown --