Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Dynamic Lightning

  1. #11
    Senior Member de_jean_7777's Avatar
    Join Date
    Nov 2006
    Location
    Bosnia and Herzegovina (Herzegovina)
    Posts
    171
    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
    In defeat we learn.

  2. #12
    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 only thing you can learn from Dreamweaver is how not to build a website, and the only thing you can learn from jquery is how not to learn Javascript."
    -- Dan Schulz to me via PM August 2008 - To blazes with resting in peace my friend, you give 'em hell.

  3. #13
    Junior Member
    Join Date
    Apr 2012
    Location
    Düsseldorf im Rheinland
    Posts
    28
    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!

  4. #14
    I ended up finishing my display list rewrite of glKernedFont using this as the test platform. I've got it wrapped in my handler unit for SDL/OpenGL, and tested that it compiles and runs in both windows and linux.

    http://www.deathshadow.com/downloads/lightingDemo.rar

    source code is naturally in /sources

    in /binaries are pre-built versions for win32 and for 32 bit Ubuntu in their own little archives.

    The linux binary may work in other distro's, might not. You really want to see it in linux download FPC, make sure the dev files SDL and SDL_image are installed, and build it yerself... and we wonder why not a lot of commercial developers make normal linux software (and why the real Linux success -- Android -- gets rid of most all the *nixisms)

    Should build clean in either FPC 2.4 or 2.6, uses SDL to set up video modes and handle input, and SDL_image which lets us use PNG files.

    Again, uses my glKernedFont library so we can see the FPS in realtime. Ah, the 'joys' of running multiple projections at the same time

    I played with some of the values to make the 'bugs' fly around a larger area, changed it to use my FPS object to throttle the animations, and of course it uses display lists.

    Full screen only, I'm still playing with it but using SDL it should start up the same resolution as your desktop. Honestly I wonder why the **** most commercial games can't even manage that...
    "The only thing you can learn from Dreamweaver is how not to build a website, and the only thing you can learn from jquery is how not to learn Javascript."
    -- Dan Schulz to me via PM August 2008 - To blazes with resting in peace my friend, you give 'em hell.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
http://flippulseimages.com/Food/oakley-mag-four.html