dynamic 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
timmoe

dynamic textures

Post by timmoe »

hi everybody,

i´m making a game with irrlicht, but can´t find any tutorials about dynamic textures. can anybody tell me how to create or use dynamic(or "animated") textures... i.g wich format do they have to be...
Yellow
Posts: 9
Joined: Sun Jan 29, 2006 11:53 am

Post by Yellow »

I used an animated texture on my water, might be what you're looking for:

Code: Select all

// load the texture movie
core::array<video::ITexture*> watermovie;
for (int i = 0; i < 45; i++)
{
	char tmp[64];
	if(i < 10)
		sprintf(tmp, "textures/water/water0%d.tga", i);
	else
		sprintf(tmp, "textures/water/water%d.tga", i);

	video::ITexture* t = pDriver->getTexture(tmp);
	watermovie.push_back(t);
}

anim = pSceneMgr->createTextureAnimator(watermovie, 40);
someNode->addAnimator(anim);
timmoe

Post by timmoe »

thanks a lot for your reply, yellow. i also found something in the forum about the magic2d libary... with this libary it should be possible to load .avi as texture... seems to be a nice possibility
Post Reply