Page 1 of 1

TexGen

Posted: Mon Aug 23, 2010 12:16 pm
by Kjell
:?:

Does anyone know how to for instance map world-space ( X+Y ) coordinates to texture coordinates using the Texture Matrix?* I've tried glTexGen & manipulating the Texture Matrix manually, but no cigar so far.

*Within the current ZGE limitation of course, so no matrix pointers :(

Thanks ~
K

Posted: Mon Aug 23, 2010 2:16 pm
by VilleK
So you've already tried glMatrixMode(GL_TEXTURE) and then glLoadIdentity(), glTranslatef, glScalef etc? It should work (although it is not obvious to me what values to use as parameters in the transformations). Note that you need to do this after UseMaterial on your texture otherwise UseMaterial will override your texture matrix.

I like your new avatar :)

Posted: Mon Aug 23, 2010 3:28 pm
by Kjell
Hej Ville,

Yea I tried that, and that works .. but rotating the Texture Matrix in 3D isn't all that straight-forward ( ends up stretching & skewing all over the place ).

& Tempo deserves more lovin' 8)

K