Page 1 of 1

texture rotation matrix

Posted: Sun Sep 17, 2006 6:51 am
by Cezaro
HELLO

Hybrid wrote:

" I've just release a patch (http://parsys.informatik.uni-oldenburg. ... trix.patch also added to SVN) which enables a very simple and efficient way to manipulate texture coords. Both OpenGL and DirectX allow to use texture matrices which are applied to texture coords before these are finally used. This is now usable in Irrlicht.
So by manipulating the texture matrix one can easily rotate the textures across an arbitrarily deformed mesh with lots of vertices in just one step. Also texture animation is easily possible, e.g. by using a translation matrix. Pulsating effects can be made y scaling the coords. "


please write how to use this feature in simple code

best regards
thanks

Posted: Sun Sep 17, 2006 9:06 am
by hybrid
I use this code to let the texture of the cube in tutorial 4 move across the mesh while the mesh itself rotates around the sphere.

Code: Select all

wall->getTransformation().setTranslation(core::vector3df(i*0.0001f,i*0.0002f, 0.0f));
++i;