Results 1 to 6 of 6

Thread: point light problems

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    7

    point light problems

    I am trying to make a scene where I have a point light that is from the camera. This works fine, but I want to add another light elsewhere in the scene. But when I try to position the second light, it also moves along with the camera so I have both lights at the same place. Does anyone have an idea about how I could get the other light positioned in a different place than the viewpoint?

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    601

    Re: point light problems

    The FAQ tells you what you need to know. Read through the whole thing while you're at it, it's good stuff.

  3. #3
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    7

    Re: point light problems

    I have looked at the FAQ and I have the red book. Ive tried placing the light before I do my drawing and everything and Ive tried putting it after but I still get the same effect. Ive even tried constantly moving it around using an idlefunc but it stays in the same place.

  4. #4
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    Re: point light problems

    set the light's position after you make your matrix transformations

  5. #5
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    7

    Re: point light problems

    I have tried doing that, I think, but it still doesnt work. I have tried putting glLightfv(GL_..., GL_POSITION, pos) as the very last thing in my display function but it still doesnt correct the problem. Am I putting it in the wrong place?

  6. #6
    Junior Member Newbie
    Join Date
    Apr 2002
    Posts
    7

    Re: point light problems

    Input FINALLY helped. I finally fixed it. Thanks!

Similar Threads

  1. Point Light Shadows
    By devmane144 in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 04-29-2016, 01:02 PM
  2. GLSL Point light shader
    By Joel Graff in forum OpenGL: GLSL
    Replies: 5
    Last Post: 10-04-2011, 01:24 PM
  3. max range of point light
    By remdul in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-05-2007, 04:42 PM
  4. Point light VP -> Spot light VP: ?
    By Freelancer in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-27-2004, 11:43 AM
  5. point light source
    By Capt. Jean-Luc Pikachu in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-05-2002, 09:22 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