Hi Samurai-X,
sure, rendering to a texture will most likely work but I would expect this to be more complex than using simple depth-buffering!
A bit of explanation:
If you turn on depth buffering, pixels will only be painted when they have a z-value that is less than what's already in the depth-buffer. So, when you paint your primitives in such a way that polygons closest to the camera are rendered first, the pixels behind will simply not be rendered, no blending occurs - and you get the desired effect!
You can achieve this easily if you give each polygon just a slightly different z-Value or a polygon offset (https://www.opengl.org/archives/resources/faq/technical/polygonoffset.htm)
Since you're in 2D this should not pose any problems.
Hope, that helps!