Results 1 to 3 of 3

Thread: DelphiX and lights in Immediate mode

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3

    Thanks!!!!

    Well actually you're right that cross-posting is not a good idea...
    But I'm working on Direct3D with DelphiX for over 2 years, and I could not make lights work!!!! I was desperate....
    Until today!

    Actually,
    DXDraw.D3DDevice7.SetRenderState(D3DRENDERSTATE_DI FFUSEMATERIALSOURCE, 1);
    didn't make a difference, but motivated by your answer I did a little debugging to the return value of DXDraw.D3DDevice7.SetLight(0, light);
    And it was <> D3D_OK, it was DDERR_INVALIDPARAMS!!!
    What was wrong? Well, the wrong thing was:
    light.dvRange := D3DLIGHT_RANGE_MAX;
    I change this to
    light.dvRange := 100.0 and i work perfectly at last!

    Anyway, thanks for motivating me to solve my problem!!!
    Thanks!!!!!
    Last edited by Jimmy Valavanis; 30-03-2012 at 03:47 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •