My problem is very simple.
I have a scene composed by multiple textured GL_QUADS and I want to equally blend them. (as doing Enblend for example Enblend/Enfuse )
glBlendEquation(GL_FUNC_ADD) glBlendFunc(GL_ONE,GL_ZERO); draw(obj_A); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glColor3f( *, *, *, 0.5f); draw(obj_B)
doesn’t work because the part of obj_B outside obj_A is blended with the background.
glBlendColor(0.0,0.0,0.0,0.5); glBlendEquationSeparate(GL_FUNC_ADD,GL_MAX); glBlendFuncSeparate(GL_ONE_MINUS_DST_ALPHA,GL_DST_ALPHA,GL_CONSTANT_ALPHA,GL_DST_ALPHA); draw(obj_A); draw(obj_B);
may work but is not implemented on my graphic card (need 2.0).
Is there exist a simple way to achieve this?