Hi all,
I have some code that has to be implemented in both DirectX and OpenGL ES 1.0 (meaning no shaders).
What I'm doing is setting the texture matrix. In DirectX via:
gDevice->SetTransform(D3DTS_TEXTURE0,((D3DMATRIX*)theMatrixPtr));
And in OpenGL via:
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glLoadMatrixf((float*)theMatrixPtr);
I'm using this code right now only to TRANSFORM the texture matrix-- basically translating small fractions to make the texture scroll.
In DirectX I found that I have to put the translation numbers in a 3x3 matrix rather than a 4x4 matrix. I.E. the x/y transform coordinates have to go in matrix m20, m21 rather than what I use for all other transforms (m30,m31).
Is this also true in OpenGL? Or will OpenGL accept the texture coordinate transforms in m30,m31?
Thanks!
--John