开发者

Drawing bitmaps with empty areas

开发者 https://www.devze.com 2023-03-03 10:10 出处:网络
I need to draw a bitmap on top of a completely rendered GLSurfaceView.By completely rendered I mean that the entire thing is filled with colorized triangles.Obviously the bitmap will hide the triangle

I need to draw a bitmap on top of a completely rendered GLSurfaceView. By completely rendered I mean that the entire thing is filled with colorized triangles. Obviously the bitmap will hide the triangles underneath it, but I would like to minimize how much is hidden.

Drawing bitmaps with empty areas

The bitmap is 64x64 pixels and has many empty areas that are translucent in the PNG file. When I draw the bitmap by making a square with two triangles, the translucent areas become black (the green areas in the picture above), perhaps because the app background is black. Is there an easy way to get the translucent areas to not affect the ima开发者_Python百科ge (the second image above)? Do I need to create a complex set of triangles that exactly outlines the non-translucent parts when I render the bitmap?

I am developing on a Motorola Xoom, Android 3.0. Thanks for your time.


Use the alpha test.

0

精彩评论

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