Take the 2-minute tour ×  The lighting doesn't work, the object
appears with solid color. The color itself changes with the
material or lighting parameters but no shadow or anything just
solid grey.  Here's part of the code:   GLfloat amb[] = {0.6,
0.6, 0.6, 1.0}; GLfloat dif[] = {0.8, 0.8, 0.8, 1.0}; GLfloat
spec[] = {0.5, 0.5, 0.5, 1.0}; GLfloat pos[] = {0.0, 0.0, 30.0};
glLightfv(GL_LIGHT0, GL_AMBIENT, amb); glLightfv(GL_LIGHT0,
GL_DIFFUSE, dif); glLightfv(GL_LIGHT0, GL_SPECULAR, spec);
glLightfv(GL_LIGHT0, GL_POSITION, pos);  GLfloat co[4]={0.5,
0.5, 0.5, 0.5}; GLfloat mat_shininess[] = { 1.0 };
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
for(int i=0; i < numofTr; i++)   glNormal3f(tr[i].v1->n.x,
tr[i].v1->n.y, tr[i].v1->n.z);   glVertex3f(tr[i].v1->x,
tr[i].v1->y, tr[i].v1->z);       glNormal3f(tr[i].v2->n.x,
tr[i].v2->n.y, tr[i].v2->n.z);   glVertex3f(tr[i].v2->x,
tr[i].v2->y, tr[i].v2->z);       glNormal3f(tr[i].v3->n.x,