Particles Engine and Slow FPS

Started by
41 comments, last by Medo Mex 11 years, 2 months ago

That’s super. Now show me where you delete the emitter buffers.

You called “EMITTER *emitter = new EMITTER(d3ddev);”, now show the corresponding call to “delete”.

You have probably solved this problem, but based on what you know about new and delete I don’t think this battle is over.

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Advertisement

In EMITTER destructor:


EMITTER::~EMITTER()
{
    for (int i = 0; i < maxVBuffer; i++)
    {
         // Release vertex buffer
         vbuffer[i]->Release(); // or delete v_buffer[i]
    }
}
I iterating through the emitters and check who is not alive anymore and then I remove it using:

EMITTER *emitter = *iter;
emitterList.erase(iter);
delete emitter;

But I think this has nothing to do with flashing smoke environment, I mean the flashing happened when I switched from (draw per particle) to (draw per emitter) and it only happen with the smoke environment particles, other types of particles works well.

Some smoke particles are still flashing, any idea how to fix this? Anyone encouraged this problem before?

This topic is closed to new replies.

Advertisement