void init_ground()
{
GLfloat amb_and_diffuse[]= {0.1, 0.7, 0.1, 1.0};
GLfloat emission[]= {0.0, 0.2, 0.0, 1.0};
ground = glGenLists(1);
if (ground!=0)
{
glNewList(ground, GL_COMPILE);
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, amb_and_diffuse);
glMaterialfv(GL_FRONT, GL_EMISSION, emission);
glBegin(GL_QUADS);
glNormal3f(0.0, 1.0, 0.0);
glVertex3f(-100.0, 0.0, -100.0);
glVertex3f(100.0, 0.0,-100.0);
glVertex3f(100.0, 0.0, 100.0);
glVertex3f(-100.0, 0.0, 100.0);
glEnd();
glEndList();
}
else
fprintf(stderr, "Error: OpenGL could not obtain a list for the ground\n");
return;
}