Ramesh
12-19-2000, 06:17 AM
Hi
I have drawn a cylinder which axis is along the z axis. I have lighting problem when I increase the length of cylinder. When it is small, top and inside surfaces are bright. When I increase the length of cylinder it is getting darker. What could be the problem. How can I avoid this?
Any ideas?
I used following lighting propertices
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_position[] = { 1.0, 1.0, 1.0, 1.0 };
glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
Thanks
[This message has been edited by Ramesh (edited 12-19-2000).]
I have drawn a cylinder which axis is along the z axis. I have lighting problem when I increase the length of cylinder. When it is small, top and inside surfaces are bright. When I increase the length of cylinder it is getting darker. What could be the problem. How can I avoid this?
Any ideas?
I used following lighting propertices
GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat light_position[] = { 1.0, 1.0, 1.0, 1.0 };
glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
Thanks
[This message has been edited by Ramesh (edited 12-19-2000).]