TexGen

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
Kjell
Posts: 1935
Joined: Sat Feb 23, 2008 11:15 pm

TexGen

Post 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
User avatar
VilleK
Site Admin
Posts: 2383
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post 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 :)
User avatar
Kjell
Posts: 1935
Joined: Sat Feb 23, 2008 11:15 pm

Post 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
Post Reply