开发者

Opengl ES sliding texture animation

开发者 https://www.devze.com 2023-02-11 06:53 出处:网络
I开发者_StackOverflow d like to animate a texture on a vertex from left to right. How can i do this?

I开发者_StackOverflow d like to animate a texture on a vertex from left to right. How can i do this?

my old code is:

        float texCoords[] = { 
            iTextcoord, 0.0f, 
            iTextcoord, 1.0f, 
            iTextcoord+1.0f, 0.0f, 
            iTextcoord+1.0f, 1.0f, 
        };
        this.setTextureCoords(texCoords);

but its isnt the best:(


You can use glMatrixMode(GL_TEXTURE_MATRIX) and glTranslatef().

0

精彩评论

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