I'd like for each of my strokes to never show overlapping alpha with itself, thus avoid the artifacts visible in this image:

What I'd like to achieve instead, is having each stroke to overlap only with subsequent or previous strokes, based on Z depth, because it's a 3d paint app.
Also, in this app there's no shading or lights, all flat. Not sure if it helps solving the issue or not.
I've read it might be necessary to use the stencil buffer, but to be honest I'm no openGL expert, I can pretty much work my way around a GLSL shader but I can't write one of my own, especially with advanced techniques, so I'm hoping someone will be able to help here!
Thanks!
Andre