View Full Version : Texturing overlay

03-23-2006, 10:31 AM
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

03-23-2006, 10:38 AM
What about using polygon offset for reducing depth fighting and correct painting order? What impossible is in your task?

03-23-2006, 06:32 PM

//render first rectangle

glBlendFunc(???, ???);

//render second rectangle using EXACTLY the same vertex coordinates

glBlendFunc(???, ???);

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