StaticImage problem

chevin

16-06-2011 03:49:46

hi all
first apology for my pool engilsh.

I update MyGUI to v3.2 and found a problem with using StaticImage.
I create two StaticImage objects and then update them in ogre's function frameRenderingQueued to show different image, like below code

bool OgreSys::frameRenderingQueued( const Ogre::FrameEvent& evt )
{
mStaticImage1->setImageTexture(imageName1); // change the image according to my program logic
mStaticImage2->setImageTexture(imageName2);
return true;
}

and then the memory increase very fast and the application crashed in a while.

Is there a wrong way to use it?

environment : win7+vs2008

Altren

16-06-2011 11:09:22

May be you loading too many images or something like that. StaticImage doesn't allocate additional memory when you load same image again.
Also it looks like a bad idea to call setImageTexture at every frame, you only need to call this when your imageName actually changed.

chevin

17-06-2011 03:37:51

Thanks for your reply.

I change back to v3.0, it work fine.
But, what happen in v3.2?

Thank you.