#196 TGLightSource SpotCutOff not working

closed
nobody
None
5
2012-03-08
2012-02-24
luiwo
No

When LightStyle is selected as IsSpot, TGLightSource.SpotCutOff has not effect.

Tested with last svn revision 5896 and 6014

Discussion

  • luiwo

    luiwo - 2012-02-24

    wanted to say: "Tested with svn revision 5896 and 6014"

     
  • luiwo

    luiwo - 2012-02-24

    I just fixed it myself ... Was simpler than it seemed
    Attached zip with glscene.pas fixed.

     
  • luiwo

    luiwo - 2012-02-24

    Fixed procedure "SetupLights"
    In line 7848: GL.Lightfv(GL_LIGHT0 + FLightID, GL_SPOT_CUTOFF, @FSpotCutOff);

    and added
    P180SpotCutOff: Single;
    ...
    if if LightStyle = lsSpot then
    ...
    else
    begin
    P180SpotCutOff:=180;
    GL.Lightfv(GL_LIGHT0 + FLightID, GL_SPOT_CUTOFF,@P180SpotCutOff );
    end;

     
  • YarUnderoaker

    YarUnderoaker - 2012-03-01

    I fixed bug in GLState.pas instead of your patch. Thanks.

     
  • luiwo

    luiwo - 2012-03-08
    • status: open --> closed
     
  • luiwo

    luiwo - 2012-03-08

    Fixed in rev 6016

     
  • luiwo

    luiwo - 2012-03-08

    This issue has been fixed in the Developers CVS.

    This means it will take a few hours before it is finally
    available on public CVS, and it will possibly take some time
    until it's available on a public (snapshot, alpha, beta or
    stable) release.

     
  • YarUnderoaker

    YarUnderoaker - 2012-03-12

    Actually we use SVN not CVS, change comes almost instantly.
    Repository is common for all. Releases are issued a couple in year.