Reload image

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Reload image

Post by LunaRebirth »

Is there any way to reload an image, if say I use...

Code: Select all

b->setImage(Game::driver->getTexture((char*)img.c_str()));
and then I open paint.net, change the image, and then have the new (changed) image display instead of the old one?



For clarification, I'm making update files. If the player loads an image, then the server recognized the player's image is out of date and sends the new image,
Once the image is done downloading, I'd like to use the finished version rather than the old one, with the same file name
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Reload image

Post by CuteAlien »

I've not tested it now, but try to remove the texture from the cache (IVideoDriver::removeTexture). After that you should be able to load it again.
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
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Reload image

Post by Mel »

Also, keep in mind that the pointers would change, so you'd have to update those aswell
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Reload image

Post by LunaRebirth »

Thanks bros :)
Post Reply