Does anyone know how to make blend more than 2 textures? It seems that OpenGL only is blending the top and bottom image with. I’m currently using:
glShadeModel(GL_SMOOTH);
glEnable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
And it looks good as long as I have just one sprite against the back ground, but if two overlap one is not fully drawn or gets overwritten in an ugly way, making a square whole where the top model is:
I’ve seen games based on LibGDX that seemed to have fixed this somehow, and have an idea how it could be done in Java2D, but don’t want to re-write my rendering if I don’t have to. Solutions I find by Google are not only fairly complex but assume a 3D scene and all the texture being on the same model, so not really aplicable. I had wondered if there was a way to render to the buffer without a full Display.update() call so they might be blended with existing graphics, but don’t see any way of doing that?
Any suggestions?