Thread: OpenGL lighting question...

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

    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,071
    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, 03:24 PM
  2. OpenGL Camera Question
    By Astra in forum Game Programming
    Replies: 2
    Last Post: 03-25-2007, 01: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