title: materials lose colour when enabling light in OpenGL ES
body: <p>The moment I enable light, I lose colour. I am using the same code as on OpenGL which is working nicely but I get to use glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); just before glEnable(GL_COLOR_MATERIAL);</p>
  
  <p>Articles I've read mention that you don't need to use that call on OpenGLES, is there some sequence of calls that I am missing?</p>
  
  <p>I should also add I'm using a 3ds file for the model which is working fine until i try and add light.</p>
  
  <pre><code>//draw function
  //ofSetSmoothLighting()
     glShadeModel(GL_SMOOTH)
  
  //ofEnableDepthTest();
  glEnable(GL_DEPTH_TEST);
  
  //ofEnableLighting();
      glEnable(GL_LIGHTING);
      glEnable(GL_COLOR_MATERIAL);
      glEnable(GL_NORMALIZE);
  
  //pointLight.enable();
      //setup
          glLightfv(GL_LIGHT0 + /*my index*/, GL_AMBIENT, &amp;/*first member of my aray*/);
          glLightfv(GL_LIGHT0 + /*my index*/, GL_DIFFUSE, &amp;/*first member of my aray*/);
          glLightfv(GL_LIGHT0 + /*my index*/, GL_SPECULAR, &amp;/*first member of my aray*/);
  
      //on position change
          glLightfv(GL_LIGHT0 + /*my index*/, GL_POSITION, cc);
  
      //on orientation
          glLightfv(GL_LIGHT0 + /*my index*/, GL_SPOT_DIRECTION, spot_direction);
  
      //setAttenuation(1.f,0.f,0.f);
          glLightf(GL_LIGHT0 + /*my index*/, GL_CONSTANT_ATTENUATION, attenuation_constant);
          glLightf(GL_LIGHT0 + /*my index*/, GL_LINEAR_ATTENUATION, attenuation_linear);
         glLightf(GL_LIGHT0 + /*my index*/, GL_QUADRATIC_ATTENUATION, attenuation_quadratic);
  
      //ofEnablelighting 
          glEnable(GL_LIGHTING);
          glEnable(GL_COLOR_MATERIAL);
          glEnable(GL_NORMALIZE);
  
      glEnable(GL_LIGHT0 + /*my index*/);
  
  //modelDraw()
  
  //for each mesh 
      glShadeModel(GL_SMOOTH);
      glBindTexture(GL_TEXTURE_2D, 0);
  
      glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, currentMaterial.getDiffuseColor());
      glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, currentMaterial.getAmbientColor());
      glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, adjustedSpecular);
      glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 128.f * currentMaterial.getSpecularExponent());
  
      glEnableClientState( GL_VERTEX_ARRAY );
      glEnableClientState( GL_NORMAL_ARRAY );
      glVertexPointer( 3, GL_FLOAT, 0, &amp;m_vertices[0] );
      glNormalPointer(GL_FLOAT, 0, &amp;m_normals[0] );
      glDrawElements(GL_TRIANGLES, numFaces, GL_UNSIGNED_SHORT, &amp;(materialsIter-&gt;second[0]));
  
      glDisableClientState( GL_VERTEX_ARRAY );
      glDisableClientState( GL_NORMAL_ARRAY );
  
  //point light disable
      glDisable(GL_LIGHT0 + /*my index*/);
  
  //ofDisableLighting()
      glDisable(GL_LIGHTING);
      glDisable(GL_NORMALIZE);
  </code></pre>