title: glEnable(GL_COLOR_MATERIAL) applying to all drawn objects
body: <p>I'm developing a version of the Frogger game for a University project, and we got to the light and materials part. The problem I have is: when I set the materials for the frog, it applies them to all other objects that are drawn.
  How do I make it so that it only applies to the frog? 
  If I disable GL_COLOR_MATERIAL after the draw or after the material properties have been set, everything becomes red.</p>
  
  <pre><code>void Frog::draw(void)
  {
      Vector3 _pos = Entity::getPosition();
  
      glPushMatrix();
  
      glEnable(GL_COLOR_MATERIAL);
  
      GLfloat greenEmissiveMaterial[] = {1.0, 0.0, 0.0};
      glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
  
      GLfloat mat_ambient[] = {0.7, 0.0, 0.0, 1.0};
      GLfloat mat_diffuse[] = { 0.7, 0.0, 0.0, 1.0 };
      GLfloat mat_specular[] = { 0.0, 0.0, 0.0, 0.0 };
      GLfloat mat_shininess[] = {1.8 };
  
      glColor3f(1.0, 0.0, 0.0);
  
      glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient);
      glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);
      glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
      glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
  
  glDisable(GL_COLOR_MATERIAL);
  
      glScalef(0.1, 0.1, 0.1);
      glTranslatef( _pos.getX()*U , _pos.getY()*U , 1 );
      //CORPO
      glPushMatrix();
      glColor3f(0.0, 1.0, 0.0);
      glutSolidSphere(0.5,50,50);
      glPopMatrix();
  
      glPushMatrix();
      glColor3f(0.0, 1.0, 0.0);
      glTranslatef(0.0, 0.5, 0.0);
      glutSolidSphere(0.3,50,50);
      glPopMatrix();
  
  
      glPopMatrix();
  
  }
  </code></pre>