Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Particles Engine and Slow FPS


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
42 replies to this topic

#41 L. Spiro   Crossbones+   -  Reputation: 20739

Like
0Likes
Like

Posted 19 January 2013 - 05:30 AM

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



Sponsor:

#42 Medo3337   Members   -  Reputation: 683

Like
0Likes
Like

Posted 19 January 2013 - 09:23 PM

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.

 



#43 Medo3337   Members   -  Reputation: 683

Like
0Likes
Like

Posted 24 January 2013 - 03:04 PM

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






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS