Hi, I'm trying to make animated textures for my strategy game.
E.g if I build a unit, the texture of the building should blink (I need it for more complicated things too so only blink wont be enough).
but as I just read, irrlicht doesn't support .gif textures.
So I'm not sure how to achieve that.
I could make an array or a vector with every single texture and switch between them but it seems not the best way.
How should I do that?
I hope you can help me.
Best regards
Ritti
[SOLVED] animated textures
[SOLVED] animated textures
Last edited by ritti on Thu Jul 26, 2012 6:28 pm, edited 1 time in total.
Re: animated textures
Maybe you can use ISceneManager::createTextureAnimator: http://irrlicht.sourceforge.net/docu/cl ... 735d22d04a
Or if that's not sufficient it might at least give you some ideas how to create an own animator doing what you need.
Or if that's not sufficient it might at least give you some ideas how to create an own animator doing what you need.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: animated textures
Doing a blink by changing textures is expensive. Just use a shader to do the blinking, and keep one constant texture 
Re: animated textures
or use different uv coords with a texture-atlas
Re: animated textures
You could register two textures and just swap between them.
-
zhengxianfu
- Posts: 16
- Joined: Thu Apr 05, 2012 9:33 am
Re: animated textures
createTextureAnimator is very expensive , my Samsung I9100 can not display the example.
At last ,i update the texture by setmeterialtexture,I think that Irrlicht will cache the textures ,so it's very fast.
At last ,i update the texture by setmeterialtexture,I think that Irrlicht will cache the textures ,so it's very fast.
Re: animated textures
Thank you for your replies, I'll play around with the different ways so I'll see whats the best for my needings.
Thx again
Ritti
Thx again
Ritti