For the texture, I am using PNG file. One advantage of PNG file is it can make transparent background.
I know that unlike GIF, PNG can make pixel translucent. (On other words, alpha level of pixel can be various in PNG)
Here is my problem.
The background (totally transparent section) can be transparent but I cannot make a pixel transluent with alpha level.

Captured from image editor
See the pixel in the red rectangular. It is translucent.

Captured from emulator (on the sky color background)
See that translucent pixels become black color pixel.
I was digging this problem for few days and found below source comment
"//It seems like alpha is currently broken in Android..."
orignal source (converting ARGB to RGBA)
http://www.pragmaticprogrammer.com/titles/eband
Using java Syntax Highlighting
- protected static ByteBuffer makeByteBuffer(Bitmap bmp) {
- ByteBuffer bb = ByteBuffer.allocateDirect(bmp.getHeight()*bmp.getWidth()*4);
- bb.order(ByteOrder.BIG_ENDIAN);
- IntBuffer ib = bb.asIntBuffer();
- for (int y = 0; y < bmp.getHeight(); y++)
- for (int x=0;x<bmp.getWidth();x++) {
- int pix = bmp.getPixel(x, bmp.getHeight()-y-1);
- // Convert ARGB -> RGBA
- byte alpha = (byte)((pix >> 24)&0xFF);
- byte red = (byte)((pix >> 16)&0xFF);
- byte green = (byte)((pix >> <img src="http://www.anddev.org/images/smilies/cool.png" alt="8)" title="Cool" />&0xFF);
- byte blue = (byte)((pix)&0xFF);
- // It seems like alpha is currently broken in Android...
- ib.put(((red&0xFF) << 24) |
- ((green&0xFF) << 16) |
- ((blue&0xFF) << <img src="http://www.anddev.org/images/smilies/cool.png" alt="8)" title="Cool" /> |
- ((alpha&0xFF))); //255-alpha);
- }
- ib.position(0);
- bb.position(0);
- return bb;
- }
Parsed in 0.035 seconds, using GeSHi 1.0.8.4
According to hise comment, I guess alpha channel does not work......
I need to use translucent effect for smooth image layer effect
IS it true that android openGL does not support alpha level? Is it problem of android or opengl?
Is there any way to go around this problem?
If you have any idea, please share some idea




