I'm drawing some "2D" pictures. Let's say, pic A in the background draw first, pic B in foreground draw later than A. and there are some transparent area in B. So when i enable GL_DEPTH_TEST, B should cover A but those transparent area.
the actual result i got here is strange, the B did cover A, but the transparent area show the very background instead of A which it should be.
i use glFrustum as GL_PROJECTION, glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), glDepthFunc(GL_LEQUAL) is there some settings i missing or what?