开发者

glDrawTexiOES and transparency

I am seeing a strange problem in my Android application, illustrated by this screen shot:

glDrawTexiOES and transparency

(开发者_如何学运维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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜