Results 1 to 3 of 3

Thread: Light not working

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2006
    Posts
    4

    Light not working

    Hi. I am new to OGL and started developing my engine(aiming for n64 level graphics) a few days ago. It is known as dirt and being developed by team dirt. Now, I am working on implementing some basic lighting. The problem is, whether lighting is enabled or not, placed next to it or far away, etc, etc, etc, the geometry looks the exact same as with no lighting code. I am basically asking what are some things I should check for in my code that could be causing the light to not change anything. I am using GLUT too, but that shouldn't affect my lighting code.

    Thanks for your help,
    dirt

  2. #2
    Senior Member Frequent Contributor
    Join Date
    May 2005
    Location
    Prague, Czech Republic
    Posts
    913

    Re: Light not working

    What texture environment mode (GL_MODULATE, GL_REPLACE, ..) do you use? If you use setup that ignores contribution of vertex color, the lighting will be not visible.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2006
    Posts
    4

    Re: Light not working

    I had been using GL_REPLACE, but when I changed it to GL_MODULATE, everything worked fine. Thanks for your help Komat, I don't think I would have found that on my own.

Similar Threads

  1. Directional Light is not working.
    By sharath in forum OpenGL: GLSL
    Replies: 3
    Last Post: 08-31-2018, 08:00 PM
  2. Light behind image plane not working?
    By JayRay in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-08-2010, 06:36 AM
  3. Only one light working
    By jaymystro in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 01-15-2006, 03:44 PM
  4. Light working correctly with negative normals why ??
    By AceEmbler in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 06-23-2005, 08:04 AM
  5. Second light source not working
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-01-2004, 08:54 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