开发者

OpenGL Back Face Texture

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 sim开发者_运维技巧ulate 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?


Enable backface culling (glEnable(GL_CULL_FACE)), draw two quads back-to-back each with it's own texture.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜