Skip to content Skip to sidebar Skip to footer

Image Displayed With Black Background OPENGL ES Android

Hi I am playing around with OPENGL Es on ANdroid and I am trying to display an image on my app. When I display the image ( image specs is 64x64 pixels ) I get a black background on

Solution 1:

You need to use blending. Something like this should work:

gl.glEnable(gl.GL_BLEND);
gl.glBlendFunc(gl.GL_SRC_ALPHA,gl.GL_ONE_MINE_SRC_ALPHA);

The fact that you can use glAlphaFunc and get close to your result suggests that the image itself is okay at least.


Post a Comment for "Image Displayed With Black Background OPENGL ES Android"