开发者

OpenGL Back Face Texture

开发者 https://www.devze.com 2023-03-02 04:16 出处:网络
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

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

精彩评论

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