PDA

View Full Version : Handling light position and color



ant08103
05-02-2013, 02:13 AM
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

ant08103
05-02-2013, 02:19 AM
GLfloat light0_position[]={20., 0., 0., .0};
GLfloat light1_position[]={0., 20., -50., .0};
GLfloat light_position[] = {0.0, -20., 10., 0.}; //(light direction)