I’ve just been trying to get some transparency to work with pngs as textures but when the pngs have transparency they look…odd. Attached is the png image and a screenie of ingame.
blend code:
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
texture loading:
gl.glBindTexture(GL.GL_TEXTURE_2D, textures[textureIndex]);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
gl.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, texturesT[textureIndex].getWidth(), texturesT[textureIndex].getHeight(), 0, GL.GL_RGB, GL.GL_UNSIGNED_BYTE, texturesD[textureIndex].getBuffer());
It’s probably just some stupid little mistake… but I can’t seem to find it.