DJTN
2009-06-12 20:27:01 UTC
I have a light set up as a Point Light and I can change the color to basic
colors only (i.e red, black, white, blue) but when I try to change the
deffuse color to like orange or a custom color it reverts to white or some
weird color thats not even close. If I switch the light type to a spot light
or directional type I can change it to what ever color I want. My code is
pretty basic:
//begin code
ColorDialog cd = new ColorDialog();
cd.AllowFullOpen = true;
cd.FullOpen = true;
cd.ShowHelp = false;
cd.ShowDialog();
device.Lights[0].Diffuse = cd.Color;
device.Lights[0].Update();
cd.Dispose();
//end code
For example, if I select the top left color (salmonish color) in the color
picker dialog, the light reverts back to white. But if I open it again and
choose red or blue or green or black, it changes it to the selected color.
Is this how the point light functions or am I implementing the light
incorrectly?
Todd
colors only (i.e red, black, white, blue) but when I try to change the
deffuse color to like orange or a custom color it reverts to white or some
weird color thats not even close. If I switch the light type to a spot light
or directional type I can change it to what ever color I want. My code is
pretty basic:
//begin code
ColorDialog cd = new ColorDialog();
cd.AllowFullOpen = true;
cd.FullOpen = true;
cd.ShowHelp = false;
cd.ShowDialog();
device.Lights[0].Diffuse = cd.Color;
device.Lights[0].Update();
cd.Dispose();
//end code
For example, if I select the top left color (salmonish color) in the color
picker dialog, the light reverts back to white. But if I open it again and
choose red or blue or green or black, it changes it to the selected color.
Is this how the point light functions or am I implementing the light
incorrectly?
Todd