Hi, for those who remember, I AM working on that engine i was talking about, and I'm having some trouble in the LIGHT class. I have directional lights working fine and dandy, but spotlights and point lights won't work. By changing the line:
to either
or
it won't light the scene (i get pitch black). It would make more sense for the spotlight simply because it is directionally based and the rotation of a directional light could give differing results for a spotlight. But point lights are independent of rotation, so I'm stumped. Also, how do I change light properties in runtime after it has been registerred and activated using:
If it helps, I found that when creating a series of lights, if either a spotlight or point light is included as a light, i get no lighting, which inclines me to believe that the light initialization is failing, so some DirectX function is returning false without me realizing.
Any help is appreciated!!
g_light.Type = D3DLIGHT_DIRECTIONAL;
to either
g_light.Type = D3DLIGHT_POINT;
or
g_light.Type = D3DLIGHT_SPOT;
it won't light the scene (i get pitch black). It would make more sense for the spotlight simply because it is directionally based and the rotation of a directional light could give differing results for a spotlight. But point lights are independent of rotation, so I'm stumped. Also, how do I change light properties in runtime after it has been registerred and activated using:
g_D3DDevice->SetLight(0, &g_light); g_D3DDevice->LightEnable(0, TRUE);
If it helps, I found that when creating a series of lights, if either a spotlight or point light is included as a light, i get no lighting, which inclines me to believe that the light initialization is failing, so some DirectX function is returning false without me realizing.
Any help is appreciated!!