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: Handling light position and color

  1. #1
    Newbie Newbie
    Join Date
    May 2013
    Posts
    2

    Handling light position and color

    hello thanks in advance for your time
    ok i have a simple town (houses,cars,trees)
    i have the colored with colorf(r,g,b) and i want it to render the color based on light and color
    im having trouble with light position and the simple form or applying the color
    now what i see is the original color and light is off to the left

  2. #2
    Newbie Newbie
    Join Date
    May 2013
    Posts
    2
    GLfloat light0_position[]={20., 0., 0., .0};
    GLfloat light1_position[]={0., 20., -50., .0};
    GLfloat light_position[] = {0.0, -20., 10., 0.}; //(light direction)

Posting Permissions

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