Some help is needed. I'm developing drawing application on OpenGL (deployment target 4.0) for iOS (iPad). We have 3 drawing tools: pen, marker (with alfa) and eraser. I apply drawing with textures using blending in orthographic projection. I can't use z-ordering because in this case I have to face a lot of troubles with cutting and erasing. The thing that I need is to make the pen be always on the top. When I first use the marker and then the pen - it's ok. But if I use pen first and marker over the pen - I can't see the pen color under marker. I'd appreciate any help or advice.
closed as not a real question by Byte56, Jonathan Hobbs, michael.bartnett, Josh Petrie, Trevor Powell Oct 17 '12 at 2:28
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.
I suggest you use opengl lines, since all you can draw are lines with a pen and a marker. That should be more efficient than textures and would eliminate the overlaps. Also keep track of the order in which the lines were drawn.
The thing of using opengl blending in this case is that these kind of problems arise a lot, and the only way to solve them is through trial and error. So I suggest you use opengl lines instead of textures with blending.