As the OpenGL spec states all transformations are ignored by design, but is there an easy way to draw a texture as glDrawTex does, but transforming the pixels with a matrix before?
As the OpenGL spec states all transformations are ignored by design, but is there
Share
Cann’t you simply modify x/y/z arguments for glDrawTex function to transform your texture in position you want?
But if you want to rotate texture, then simply draw textured quad using two triangles. It’s very simple. Assuming you have OpenGL ES version 1.1:
(I’m assuming you are drawing using orthographic projection, and 128 is size of texture)
This way texture position can be modified using modelview matrix. Also texure matrix can be used to modify how texture is applied to triangles.