Results 1 to 7 of 7

Thread: Lights

  1. #1
    Guest

    Lights

    Hi.

    I have trouble: I can't enable more than one light source. If I use glEnable with GL_LIGHT1-GL_LIGHT7 it doesn't work!

    Please, help...

    P.S. Forgive me mine English, pls

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

    Re: Lights

    GL_LIGHT1 and up is black by default, make sure you set their light parameters properly before using them.

  3. #3
    Guest

    Re: Lights

    Yes, I sure that I set light parameters...

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: Lights

    How'd you set the light paramaters? What exactly do you mean by them not working? At the minimum you'll have to set the diffuse and/or the ambient color properties for those lights. You'll probably need to set the positional/directional properties as well.
    Deiussum
    Software Engineer and OpenGL enthusiast

  5. #5
    Guest

    Re: Lights

    I set for the GL_LIGHT1 default parameters:

    GL_DIFFUSE (1.0, 1.0, 1.0, 1.0)
    GL_SPECULAR (1.0, 1.0, 1.0, 1.0)

    ...but it doesn't take effect.

    Or I must set something else?

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

    Re: Lights

    Try remove (comment out that is) all code for all light but GL_LIGHT0. Then rename ALL GL_LIGHT0 to GL_LIGHT1, it that gives you the same result, you are obviously missing something important with the other lights in the old version.

    Can be a driver issue aswell. Try updare your display drivers.

  7. #7
    Guest

    Re: Lights

    Yes, I miss some important light parameters.

    Thanks for help!

Similar Threads

  1. Speed of built in lights v.s. custom lights
    By STTrife in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 01-23-2013, 05:11 PM
  2. Can I use more than 8 lights?
    By AlexanderSK in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-29-2003, 03:02 AM
  3. lights and 3D
    By lara in forum OpenGL: Basic Coding
    Replies: 11
    Last Post: 11-11-2002, 07:11 AM
  4. Lights
    By PhireBat in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-07-2001, 06:13 PM
  5. Replies: 13
    Last Post: 11-29-2000, 02:19 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