Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Rotation, translation & lights

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000
    Location
    Finland
    Posts
    1

    Rotation, translation & lights

    I have a small program where I can move around with the camera by moving and rotating all the objects in the opposite direction. But it seems that the light source always stays in the same place, so it follows the camera. Since translate and rotate affect objects that are drawn after these actions, how could I get the light source to be positioned with rest of the objects?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: Rotation, translation & lights

    Hello

    Seems like you are setting the lightposition before translation/rotation.

    First you need to translate/rotate camera, then place light, and then render objects.

    Bob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •