Results 1 to 2 of 2

Thread: light position

  1. #1
    Senior Member Regular Contributor
    Join Date
    Feb 2001
    Posts
    108

    light position

    ive got a question about light source positioning.

    basically, i just draw a few objects and translate / rotate them.
    ive also got a light source located in the scene. when i roatete the object im viewing, the shading doesnt look quite right, its as if the light source always stays at the same distance and orientation with my object.

    any ideas?

  2. #2
    Senior Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Italy
    Posts
    124

    Re: light position

    If you specify the position of the light after the transformations, you move the light with your objects.
    If you want the objects to move and the light not, you must draw it before or after resetting the matrix to identity.
    tFz

Similar Threads

  1. Light position
    By Lee_Jennifer_82 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-10-2015, 12:34 AM
  2. Light position
    By MaHoHo in forum OpenGL ES
    Replies: 0
    Last Post: 10-21-2004, 11:32 PM
  3. Light position
    By FenKz in forum OpenGL: GLSL
    Replies: 11
    Last Post: 09-05-2004, 06:48 PM
  4. light position, need help
    By qiz in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 03-13-2002, 07:20 AM
  5. no position light
    By tbjerman in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 01-03-2002, 02:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean