SVG opengl implementation - strokes overlap on transparency I am trying to implement svg rendering by opengl using meshes. 
In paths with opacity less than 1, the color of overlapping strokes add up. 



But it should be like this



the opengl calls are:

    glDepthMask(false);
    glEnable(GL20.GL_BLEND);
    glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
    ....
    glDrawArrays(....);
    ....
    glDepthMask(true);


is there any opengl calls, shader or other method to have same transparent value around the whole stroke without modifying the geometry of the shape?
You can use the depth buffer to ensure that the second time you get on a point the pixels aren't written. 

You start with the maximum depth value and each new path (that you want to add to the existing drawn image) you decrement the depth.