Reputation: 1183
I got a game tile on witch I want to simulate a flip animation.
So I'm using glRotatef(angle, 0, 1, 0) on my Tile to simulate a flip animation starting from 180 deg angle, in this way my tile start backflipped and show me the backface. Everything is fine but the problem is that when my tile start backflipped i don't want to see the flipped texture.
The result I would like to see is a black color (provided by vertex color) or a different texture for the back Face and the game texture for the front Face. More simply i would like to build a sort of Game Card.
Anyone can suggest me a way to solve my problem?
Upvotes: 1
Views: 1736
Reputation: 162164
Enable backface culling (glEnable(GL_CULL_FACE)
), draw two quads back-to-back each with it's own texture.
Upvotes: 5