title: Color disappears when light is used in opengl
body: <pre class="lang-cpp prettyprint-override"><code>glLoadIdentity();               
  glTranslatef(0.0f + deltaA - deltaD, 0.0f + deltaQ - deltaE, 0.0f + deltaW - deltaS);
  glRotatef(_rotate_x, 1, 0, 0);
  glRotatef(_rotate_y, 0, 1, 0);
  glColor3f(1.0f, 0.0f, 0.0f);
  glutSolidSphere(20, 15, 15);
  </code></pre>
  <p><a href="https://i.stack.imgur.com/VJadD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VJadD.jpg" alt="enter image description here" /></a></p>
  <p>If I write the code like this, the red color looks good.</p>
  <pre class="lang-cpp prettyprint-override"><code>glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  
  glLoadIdentity();               
  glTranslatef(0.0f + deltaA - deltaD, 0.0f + deltaQ - deltaE, 0.0f + deltaW - deltaS);
  glRotatef(_rotate_x, 1, 0, 0);
  glRotatef(_rotate_y, 0, 1, 0);
  glColor3f(1.0f, 0.0f, 0.0f);
  glutSolidSphere(20, 15, 15);
  
  glDisable(GL_LIGHTING);
  glDisable(GL_LIGHT0);
  </code></pre>
  <p><a href="https://i.stack.imgur.com/aqj4D.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aqj4D.jpg" alt="enter image description here" /></a></p>
  <p>But if I use a light like this, it's white. What's the reason?</p>
  <p>How can I solve this problem?</p>