Results 1 to 10 of 14

Thread: Dynamic Lightning

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Really nice. Remembers the oldschool Assembly demo parties.
    The source is a good example for using directional lighting.
    Using Freepascal would allow some multiplatformity.

  2. #2
    cool work !
    Current (and lifetime) project: FAR Colony
    https://www.farcolony.com/

  3. #3
    Something's not kosher with how it works here -- after about 3 seconds the cursor appears over the animation as a hourglass, then windows complains about it not responding WHILE it's still running. Taking a guess I'd say the 'while' without a proper wm handler could have something to do with it. GetAsync is cute, it's not a substitute for actually calling windows for input handling.

    since last I checked, that's just a waste of time. Likewise there's no reason to set the clear color or matrix mode on every loop.


    Still VERY cool demo of openGL lighting.

    -- edit -- doh, my bad on the push/popmatrix, removed that part. What I get for posting at 4AM.
    Last edited by deathshadow; 11-06-2012 at 09:22 PM.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  4. #4
    Oh, and lighting is not showing up here on high end cards (like my GTX 560ti) because you declare the glLight settings before you've set up the perspective and viewport properly. Works ok on my GMA 950 netbook, and on my Quadro NVS 320 equipped lappy, but my desktop? No lighting.

    I'm working on porting this to FPC right now -- using my OpenGL kind-of framework.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  5. #5
    PGDCE Developer de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    287
    Yeah, depending on the manufacturer and drivers, setting up lights before projection and/or viewport has no effect. This should be done after the projection has been set up. Learned this the other day after wasting time on some debugging
    Existence is pain

  6. #6
    In my porting it to FPC, I discovered that unless you declare GL_POSITION, GL_AMBIENT, GL_DIFFUSE and GL_SPECULAR every frame, you don't get lights on my GTX 560 TI, GTX 260, or ATI 5770 machines. Intel 950 and Quadro NVS 320m don't seem to give a flying fig.

    I'll probably post up my version later today -- which uses display lists to help speed things up. I'd use VBO's, but for the life of me I can't make heads nor tails of 'em. I also tried to make it into triangle_strip or quad_strip, and for some reason they refuse to render even when fed the same values -- trying to sort that right now.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  7. #7
    Member
    Join Date
    Apr 2012
    Location
    Düsseldorf im Rheinland
    Posts
    38
    Quote Originally Posted by deathshadow View Post
    I'll probably post up my version later today -- which uses display lists to help speed things up. I'd use VBO's, but for the life of me I can't make heads nor tails of 'em. I also tried to make it into triangle_strip or quad_strip, and for some reason they refuse to render even when fed the same values -- trying to sort that right now.
    Nice to read this!

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
  •