This is how I turn on ortho projection after drawing 3D objects:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0,Screen_Width,Screen_Height,0,0,1);
And this is how I turn on blending and draw textures in ortho after drawing 3D objects:
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(1,1,1,1);
glBindTexture(GL_TEXTURE_2D,Texture1);
glBegin(GL_QUADS);
//draw 1st quad
glEnd();
glBindTexture(GL_TEXTURE_2D,Texture2);
glBegin(GL_QUADS);
//draw 2nd quad
glEnd();
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
Quad1 is a bit larger than Quad2 and covers some parts of Quad2. Both textures have alpha channel as RGBA.
The problem is, Quad1 & Quad2 overlay the 3D objects with alpha correctly, but the alpha of Quad1 doesn't work when being on top of Quad2. It draws on top of Quad2 like RGB only.
How could I solve this problem?