OpenGL lighting question...

This is a discussion on OpenGL lighting question... within the Game Programming forums, part of the General Programming Boards category; how would i make a light in openGL that emits in all directions but only reaches so far...basicly a light ...

  1. #1
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070

    OpenGL lighting question...

    how would i make a light in openGL that emits in all directions but only reaches so far...basicly a light with a radius?

    any help will be much appreciated

    -psychopath

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Look up the ways of setting Attenuation in OpenGL.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Registered User linuxdude's Avatar
    Join Date
    Mar 2003
    Location
    Louisiana
    Posts
    926
    well you have to atenuate the light and I think you also want a spotlight. With linear attenuation and spotlight. look at the glLightfv with GL_SPOT_CUTOFF, GL_SPOT_DIRECTION and GL_SPOT_EXPONENT, also GL_LINEAR_ATTENUATION

  4. #4
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,070
    hmmm.....nothing seems to be giving the desired effect......?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. OpenGL lighting
    By Zishaan in forum Game Programming
    Replies: 6
    Last Post: 04-21-2007, 04:24 PM
  2. OpenGL Camera Question
    By Astra in forum Game Programming
    Replies: 2
    Last Post: 03-25-2007, 02:53 PM
  3. opengl: maintaining colour when using lighting
    By gazsux in forum Game Programming
    Replies: 2
    Last Post: 03-07-2003, 10:12 AM
  4. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21