moving light?????
I am having a problem with a program that involves simple spheres on the screen. when i move in on them the light moves with me. How can i correct this?
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
First draw your light and then do any matrix tranformation (or fiddle around with pushing or popping the matrix).
so it would be:
make a light
move stuff (with a matrix transform)
draw stuff
or:
move stuff (with a matrix transform)
pushmatrix
load identity
make a light
popmatrix
draw stuff
Second one being more complex, but might be nesecesary because of your program structure.
so it would be:
make a light
move stuff (with a matrix transform)
draw stuff
or:
move stuff (with a matrix transform)
pushmatrix
load identity
make a light
popmatrix
draw stuff
Second one being more complex, but might be nesecesary because of your program structure.
Shabaz
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement