Hardware mapping hint buffers remove problem

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
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Hardware mapping hint buffers remove problem

Post by Harch »

Found a strange thing. Buffer with Hardware mapping hint is not deleted when you delete the buffer itself. I am developing a voxel game. I added all Chunk Hardware mapping hint, but when you update the chunk (removal of node, creating a new mesh) memory is not freed. Without the inclusion of Haredwar mapping hint everything is fine.

What is the problem?

Thx!
CuteAlien
Admin
Posts: 9929
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Hardware mapping hint buffers remove problem

Post by CuteAlien »

Not quite my area, but I remember there had been some timers involved in some buffer operations. So could be deleting is just delayed for this case (I don't remember the reasons, thought I'm pretty sure there had been some thread about that stuff a few years ago ...).
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
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: Hardware mapping hint buffers remove problem

Post by Harch »

How to configure the timer? Prompt please?
CuteAlien
Admin
Posts: 9929
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Hardware mapping hint buffers remove problem

Post by CuteAlien »

As far as I can see it's a hardcoded value in CNullDriver::updateAllHardwareBuffers. But I'm a little guessing here as well - this stuff is not my code. Not even sure if it's the effect you are seeing.
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
Harch
Posts: 75
Joined: Wed Oct 08, 2014 9:01 pm

Re: Hardware mapping hint buffers remove problem

Post by Harch »

And why not remove them immediately after removal of meshbuffer?
CuteAlien
Admin
Posts: 9929
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Hardware mapping hint buffers remove problem

Post by CuteAlien »

I don't know the reason - I think there was a thread about that once somewhere ... that's pretty much all I know.
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
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Hardware mapping hint buffers remove problem

Post by Nadro »

This problem is finally solved in shader-pipeline branch, where user handle buffers manually, but in current stable and upcoming release buffers are handle by IVideoDriver and like a CuteAlien said delete is delayed.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Post Reply