Strange memory leaking while rendering nodes manually

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
JunkerKun
Posts: 97
Joined: Mon Jan 28, 2013 12:52 am

Strange memory leaking while rendering nodes manually

Post by JunkerKun »

When I render nodes like this:

Code: Select all

 
for (u32 i=0; i<nodes.size(); i++) {
nodes[i]->OnAnimate(coreManager->GetDevice()->getTimer()->getTime());
nodes[i]->OnRegisterSceneNode();
if (nodes[i]->isVisible()) nodes[i]->render();
};
 
memory usage rapidly increases. When I use drawAll(), however, it doesn't. Uhm. Why? This is the strangiest problem I've had yet.
It seems that it happens only when I use shaders...
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Strange memory leaking while rendering nodes manually

Post by CuteAlien »

Does not really make sense. If you are on Linux you can use valgrind with massif (http://valgrind.org/docs/manual/ms-manual.html) to find out where the allocations do happen.
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
JunkerKun
Posts: 97
Joined: Mon Jan 28, 2013 12:52 am

Re: Strange memory leaking while rendering nodes manually

Post by JunkerKun »

CuteAlien wrote:Does not really make sense. If you are on Linux you can use valgrind with massif (http://valgrind.org/docs/manual/ms-manual.html) to find out where the allocations do happen.
I'm on Windows 8.1 with Irrlicht 1.8.1
After some investigation it seems that OnRegisterSceneNode() is what causes it. Also, it happens when I render every node, bones included. But I'm not sure that's the problem here.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Strange memory leaking while rendering nodes manually

Post by CuteAlien »

Me neither as OnRegisterSceneNode is usually always called. But can't help without a test-case to reproduce it.
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
JunkerKun
Posts: 97
Joined: Mon Jan 28, 2013 12:52 am

Re: Strange memory leaking while rendering nodes manually

Post by JunkerKun »

I'll try to make it for you when I'll have time. Don't have any right now =__=
Post Reply