Doing Lighting




        glShadeModel(GL_SMOOTH);
        glEnable(GL_LIGHTING);
        glEnable(GL_LIGHT0);
        glBegin(GL_TRIANGLES);
        glNormal3f(nx[0], ny[0], nz[0]);
        glVertex3f(vx[0], vy[0], vz[0]);
        glNormal3f(nx[1], ny[1], nz[1]);
        glVertex3f(vx[1], vy[1], vz[1]);
        glNormal3f(nx[2], ny[2], nz[2]);
        glVertex3f(vx[2], vy[2], vz[2]);
	glEnd();