title: Drawing with transparency in opengl es 2
body: <p>I'm working on a simple drawing application. My line is constructed using polygons and things look good so far. I would like to add a transparency feature and I used <code>glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);</code> for that reason. However, because my polys sometimes overlap, I get the ugly result shown in the picture (multiple layers of transparency).  What I would like to get is the figure in the left(no overlapping because there is no transparency), with an overall transparency. </p>
  
  <p>I guess I could do this by keeping the polys from overlaping, but that would be a overkill for this task I think. There should be a way to control them at drawing time, but being a beginner with OpenGL doesn't help.</p>
  
  <p><img src="https://i.stack.imgur.com/NeHMt.png" alt="enter image description here"></p>