Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink
Accepted Solution

Image drawing on OpeGL surface

[ Edited ]

In my application I draw a image on top of OpenGL surface by following this. My image is as follow-

MySpeechBubble.png

After drawing it my output at device is as follow-

MyDeviceOutput.png

 

As you can see my output image is not relevant with my given image, there are some extra image view beside speech bubble. Can someone tell me what I did wrong here and how can I solve this issue? I just want to see speech bubble on my device without extra image view.

 

Thanks in advance.

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Image drawing on OpeGL surface

Are you sure respective areas of your bubble are transparent?

Contributor
Posts: 13
Registered: ‎06-17-2013
My Device: Z10, STL100-2
My Carrier: Telenor

Re: Image drawing on OpeGL surface

Have you enabled transparency (blending or alpha testing)? 

I come from a regular OpenGL world and this might not be needed with ES, but I'm not sure. Smiley Happy 

Developer
Posts: 49
Registered: ‎03-27-2013
My Device: z10
My Carrier: Banglalink

Re: Image drawing on OpeGL surface

thanks.

Yes, you are right. It's an transparency issue.

Contributor
Posts: 13
Registered: ‎06-17-2013
My Device: Z10, STL100-2
My Carrier: Telenor

Re: Image drawing on OpeGL surface

Also -

When using blending it's important to draw things back-to-front, otherwise the transparency will not be correct. 

Alpha testing allows for order independent drawing but does only allow fully opaque or fully transparent - nothing in between.