Texturing overlay

Hello all.

I’ve three rectangles. All of them are parallel between them. The first and the second one are normally textured. The third one uses backface culling, so it has one texture in one face and a different texture in the other face.

What I want is one they’re both in the same plan (all overlayed) the textures showing have some kind of overlaying order. Like the first one is in the bottom, the second one is in the middle (so it overlays the bottom texture) and the top one is over all of them (both textures).

How can I do this? any ideas?

Thank you

What about using polygon offset for reducing depth fighting and correct painting order? What impossible is in your task?


//render first rectangle

glBlendFunc(???, ???);

//render second rectangle using EXACTLY the same vertex coordinates

glBlendFunc(???, ???);

//render third rectangle, again using EXACTLY the same coordinates