Shader Program Fatal Error

I didn’t know that was needed. How is it done?

This:


glEnable(GL_BLEND);

(above needs ordered rendering (back to front, back drawn first))
or, when you only want to have the functionality to simply discard transparent pixels and have to semi-transparency (no need for ordered rendering):


glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.1f);

hope this helps :slight_smile:

Also needed:

glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

I added both of those methods to my initialisation and the texture is still rendered with a white background.

You should read this http://www.arcsynthesis.org/gltut/
Understanding how stuff work make doing it lot easier.

I understand how they work, I just can’t find out where this bug is coming from.

https://github.com/Harris6310/Dragonshire/blob/master/src/dragonshire/graphics/Texture.java#L58 ?

Your texture doesn’t appear to have an alpha channel - shouldn’t that be GL_RGBA?