PDA

View Full Version : (real) viewing



ramym
01-03-2002, 11:20 AM
I use gluLookAt to change the view-point. I
"look" at a cube, and I would like to "go"
to the side of the cube that has light on it,
but the effect I get is IDENTICAL to rotating the cube, meaning - when I rotate
the view-point and get to a (previously) dark
face, the face becomes lit.
I guess it's because the modelview-matrix
transforms the light also. Is it so ??
If yes - can I prevent it ??
Is there other way (besides manually change
light-position) to get the desired effect ??

Tks in advance,

Rami

Korval
01-03-2002, 11:25 AM
Set the lighting after you call gluLookAt, not before.

ramym
01-03-2002, 12:34 PM
Originally posted by Korval:
Set the lighting after you call gluLookAt, not before.

Thanks. It works.

Rami