Results 1 to 4 of 4

Thread: Manipulating light using class

  1. #1
    Guest

    Manipulating light using class

    I`ve created a class that holds all the light parameters neede :
    Position,Direction,Specular color,Diffusion color,its index(used GL_LIGHT1 as the first and a static counter reference for the next).
    The class is suppose to turn on/off (glEnable/Disable..) the light , set new values etc.
    The problem : it is`nt working !!!
    Must I use the usual function inside the render/Callback functions ?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Manipulating light using class

    Erm, not working in what way? Do you get any lighting at all? Or you can't change the values? And are you sure you do glEnable(GL_LIGHTNING) to enable lights at all?

    Bob

  3. #3
    Guest

    Re: Manipulating light using class

    Not working in manner that I can`t make things happen !!!
    I assume the problem is getting The glEnable/glDisable enumrator working .

  4. #4
    Member Contributor
    Join Date
    Feb 2000
    Location
    Italy
    Posts
    77

    Re: Manipulating light using class

    Why are you using GL_LIGHT1 as the first?
    Use GL_LIGHT0.
    Implementations could limit the number of lights, and you are supposed to use the first available set.
    Also, check out specs about default light parameters. LIGHT0 has different defaults from the others.
    --
    Paolo M.

Similar Threads

  1. Manipulating memory buffers.
    By amit aides in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-30-2005, 02:03 PM
  2. Displaying and manipulating -
    By JimmyFo in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 09-28-2004, 06:18 AM
  3. defining and manipulating 4x4 matrices
    By Lanfear in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-06-2004, 06:47 AM
  4. no light with light class
    By SirKnight in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 05-20-2002, 06:15 PM
  5. Manipulating Objects
    By Ken in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-03-2000, 10:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean