#179 Wrong defaults for diffuse and specular color of lights

open-fixed
nobody
None
5
2011-05-27
2011-05-26
Ulrich Simon
No

In the constructor of TGLStateCache in the file GLState.pas, FLightSpecular and FLightDiffuse are set to black for all lights. According to documentation of OpenGL, the default is white for the first light and black for all others. So the code should look like

if I = 0 then
begin
FLightSpecular[I] := clrWhite; // default is white for the first light
FLightDiffuse[I] := clrWhite
end
else
begin
FLightSpecular[I] := clrBlack;
FLightDiffuse[I] := clrBlack
end;

Without the change the color is white even if you set the diffuse and specular colors to black. Please can you check this?

Thanks a lot!
Ulrich

Discussion

  • YarUnderoaker
    YarUnderoaker
    2011-05-27

    Yes, you right. This was fixed in current revision of trunk.

     
  • YarUnderoaker
    YarUnderoaker
    2011-05-27

    • status: open --> open-fixed
     
  • Good web site . Many thanks for posting . Really good internet site, appreciate your time and effort written the blogposts
    <a href="http://www.plinky.com/people/soap1shorts" title="can a wedding dress be taken out">can a wedding dress be taken out</a>