Animated Textures

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
genesys
Posts: 75
Joined: Tue Nov 02, 2004 6:49 pm
Contact:

Animated Textures

Post by genesys »

How can I use sequences of textures as animated textures in Irrlicht?
dhenton9000
Posts: 395
Joined: Fri Apr 08, 2005 8:46 pm

Post by dhenton9000 »

CreateTextureAnimator

Code: Select all


IAnimatedMesh* fMesh = 	m_mgr->getMesh("assets\\fire.obj");
IAnimatedMeshSceneNode* fNode = m_mgr->addAnimatedMeshSceneNode(fMesh);
fNode->setMaterialFlag(video::EMF_LIGHTING, false);
fNode->setMaterialTexture(0, m_driver->getTexture("assets\\b1.bmp"));
core::array<ITexture*> tt(4);
tt.insert(m_driver->getTexture("assets\\b1.bmp"));
tt.insert(m_driver->getTexture("assets\\b2.bmp"));
tt.insert(m_driver->getTexture("assets\\b3.bmp"));
tt.insert(m_driver->getTexture("assets\\b4.bmp"));
ISceneNodeAnimator* sAnim = m_mgr->createTextureAnimator(tt,200,true);
fNode->addAnimator(sAnim);
sAnim->drop(
Post Reply