Created attachment 456 [details]
Original PNG. Contains transparent background. Created in Adobe Photoshop.
Loading the texture via following command doesn't work properly:
TextureIO.newTexture(getClass().getClassLoader().getResource("original.png"), false, "png");
Result can be seen here: http://forum.jogamp.org/file/n4029016/bar-left-rendered.png (don't mind the blue line and rotation, it's from another png).
It turns out yellow instead of gray.
If I use the following command it works fine:
BufferedImage img = ImageIO.read(getClass().getClassLoader().getResource("original.png"));
TextureIO.newTexture(AWTTextureIO.newTextureData(GLProfile.getDefault(), img, false));
The problem is I can't use AWTTextureIO on Android, which is one of our target platforms.
The original image is in attachment. It's a default png image created in Adobe Photoshop - with transparent background and no alpha channel - used for web and Jogl1 with no problems.
1 Add manual unit test, incr. PNGImage verbosity.
2 PNGJ: Bump to git sha1 a0b1101ba2d37de39428ed55c8189502e24a3125
3 Testing PNG Transparency / Fixing GLSL Shader of test case:
Mix texture alpha properly (pre-multiply), due to lack of ALPHA_BLENDING.
'Works for me' .. i.e. w/ fixed GLSL shader respecting texture alpha,
the GL readBuffer produced the right data.
I don't think  has anything todo w/ it - but I don't like to test again.
Thank you for the test case (image), it is incl. in our unit tests now [1 and 3].
You might want to tune your shader code, or enable ALPHA blending ?!