glDrawTexiOES and transparency
I am seeing a strange problem in my Android application, illustrated by this screen shot:
(开发者_如何学运维source: lavadip.com)The labels are being drawn using GL11Ext.glDrawTexiOES
. They have a transparent background, and the transparency works fine over the OpenGL surface.
But between the labels themselves, the transparency doesn't work. If you see closely, the "Alnilam" label is blocking the "Mintaka" and "Alnitak" labels.
But the ORION label is not blocking out the underlying lines.
Is this a common problem with a known solution?
Which order are they drawn in ? at what depth ?
What you're seeing is likely that Alnilam is drawn first and closer, and then Mintaka is drawn, but parts of it are rejected because they are considered behind Alnilam.
Drawing translucent objects typically require that you sort their drawing order from back to front.
An alternative is that you disable Z-write. But be wary that the blending will potentially happen in the wrong order, generating results that might look a bit odd.
精彩评论