Talk About Network

Google





Graphics > OpenGL 3D API > Re: Why are lig...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 7 Topic 4759 of 5061
Post > Topic >>

Re: Why are lights moving?

by Sourcerer <enlorkMAKNI@[EMAIL PROTECTED] > May 21, 2008 at 12:00 AM

On Tue, 20 May 2008 14:19:40 -0700 (PDT), fungus wrote:

> On May 20, 9:40 pm, Sourcerer <enlorkMA...@[EMAIL PROTECTED]
> wrote:
>>
>> GLfloat lightSourcePosition[] = {10.0, 10.0, 10.0, 0.0};
>> GLfloat lightSourceDirection[] = {0.0, 0.0, 0.0, 0.0};
>>
>> glLightfv(GL_LIGHT0, GL_POSITION, lightSourcePosition);
>> glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, lightSourceDirection);
>>
> 
> My copy of the manual says: "The position is transformed by the
> modelview matrix when glLight is called"
> 
> Maybe that's the problem.

Well, that doesn't really matter (i.e. I could live with that). What
matters is that the position of the light is transformed every time I
change the modelview matrix -- after the light is already placed in the
scene, by doing glLoadIdentity() and gluLookAt() -- and I don't want that
to happen.

If that can't work, is there another way to change my perspective in the
scene which won't move the light with me?

-- 
"Let's see what's out there. Engage."
Jean Luc Picard, Star Trek: TNG, Encounter at Farpoint
http://pinpoint.wordpress.com/
 




 7 Posts in Topic:
Why are lights moving?
Sourcerer <enlorkMAKNI  2008-05-20 21:40:36 
Re: Why are lights moving?
fungus <openglMYSOCKS@  2008-05-20 14:19:40 
Re: Why are lights moving?
Sourcerer <enlorkMAKNI  2008-05-21 00:00:05 
Re: Why are lights moving?
"jbwest" <jb  2008-05-20 18:56:53 
Re: Why are lights moving?
fungus <openglMYSOCKS@  2008-05-20 16:45:44 
Re: Why are lights moving?
General <mariodantunes  2008-05-21 11:14:13 
Re: Why are lights moving?
Sourcerer <enlorkMAKNI  2008-05-25 22:46:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 14:32:57 PST 2009.