How can I make the texture of a shape transparent? (E.g. cube or cylinder).
I'm trying now:
glEnable(GL_BLEND);
glEnable(GL_ALPHA_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glAlphaFunc(GL_GREATER, 1f);
glColor4f(0.5f, 0.5f, 0.5f, 0.2f);
//Cube code
This doesn’t work quite right, the textures are getting lighter, but I don’t see the objects behind them.
How can I make transparency, which will show what is behind the object?