title: How can I draw custom colors in Cocos2d-x draw function?
body: <p>I am using Cocos 2.2.6 (the latest 2.x release shown on their site). (I have to use 2.x for business purposes)</p>
  
  <p>I know how to draw shapes in opengl and how to color them, but unfortunately what I am trying to do is not working exactly.</p>
  
  <p>I am trying to give color to vertices with glColor3f and glColor4f but they just show up as monochrome. I tried to enable disable material, lighting etc.. nothing worked.. Is there a filter or something? If so how can I disable it so I can use my own colors in a glPush/glPop block. If not, what should I do?</p>
  
  <p>Thanks!</p>
  
  <p><strong><em>Update 1:</em></strong></p>
  
  <pre><code>void Hey::draw()
  {
      glBegin(GL_LINES);
      glColor4f(0, 1, 0,1);
      glVertex2f( a.x, a.y );
      glColor4f(0, 1, 0,1);
      glVertex2f( b.x, b.y );
      glEnd();
  }
  </code></pre>