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: Setup a light

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Årsunda,gästrikland,Sweden
    Posts
    146

    Setup a light

    I have tried to set up a light, the light is there but it is rotating with the cube ! why ? I want it to be still

  2. #2
    Junior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Austin, TX, USA
    Posts
    150

    Re: Setup a light

    Make sure you are declaring the light's position (GL_POSITION) outside of the matrix manipulations which rotate the cube. Additionally, make sure you are using a value to incrementally change the rotation of the cube (encapsulating within a Push and Pop) and not stacking the rotate calls every frame.

    My 2 cents...

    Glossifah

Posting Permissions

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