View Full Version : point light problems
04-25-2002, 06:52 PM
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?
04-26-2002, 12:53 AM
The FAQ (http://www.opengl.org/developers/faqs/technical/lights.htm#ligh0050) tells you what you need to know. Read through the whole thing while you're at it, it's good stuff.
04-26-2002, 07:40 AM
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.
04-26-2002, 08:28 AM
set the light's position after you make your matrix transformations
04-26-2002, 09:32 AM
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?
04-26-2002, 11:51 AM
Input FINALLY helped. I finally fixed it. Thanks!
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.