GLfloat lineLength = 100;
/* Light 0 parameters */
-GLfloat diffuse0[] = {1.0, 1.0, 1.0, 0.5};
-GLfloat ambient0[] = {1.0, 1.0, 1.0, 0.5};
-GLfloat specular0[] = {1.0, 1.0, 1.0, 0.5};
+GLfloat diffuse0[]={1.0, 0.0, 0.0, 1.0};
+GLfloat ambient0[]={1.0, 0.0, 0.0, 1.0};
+GLfloat specular0[]={1.0, 0.0, 0.0, 1.0};
GLfloat emission0[] = {1.0, 1.0, 1.0, 0.5};
GLfloat light0_pos[] ={1.0, 1.0, 0,0, 0.5};
GLfloat glightmodel[] = {0.2,0.2,0.2,1};
\ No newline at end of file
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse0);\r
glLightfv(GL_LIGHT0, GL_SPECULAR, specular0);\r
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, glightmodel);\r
+\r
+GLfloat ambient[] = {0.2, 0.2, 0.2, 1.0};\r
+GLfloat diffuse[] = {1.0, 0.8, 0.0, 1.0};\r
+GLfloat specular[] = {1.0, 1.0, 1.0, 1.0};\r
+GLfloat shine = 100.0;\r
+glMaterialfv(GL_FRONT, GL_AMBIENT, ambient);\r
+glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse);\r
+glMaterialfv(GL_FRONT, GL_SPECULAR, specular);\r
+glMaterialf(GL_FRONT, GL_SHININESS, shine);\r
+\r
+GLfloat emission[] = {0.0, 0.3, 0.3, 1.0};\r
+glMaterialfv(GL_FRONT, GL_EMISSION, emission);\r
+\r
glEnable(GL_LIGHT0);\r
glEnable(GL_LIGHTING);\r
- glEnable(GL_COLOR_MATERIAL);\r
- glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );\r
- glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, specular0);\r
- glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, emission0);\r
+ //glEnable(GL_COLOR_MATERIAL);\r
+ //glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );\r
+ //glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, specular0);\r
+ //glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, emission0);\r
\r
\r
\r