Fixed particle generation terrible performances

Former-commit-id: 484ab2a95a2848aecef0089dea458791c2b86735
This commit is contained in:
Lynix 2015-01-20 00:12:50 +01:00
parent 7cf561f05e
commit c9d636c929
1 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ void* NzParticleSystem::GenerateParticles(unsigned int count)
NzParticleMapper mapper(ptr, m_declaration);
for (NzParticleGenerator* generator : m_generators)
generator->Generate(*this, mapper, 0, m_particleCount-1);
generator->Generate(*this, mapper, 0, count-1);
return ptr;
}
@ -279,7 +279,7 @@ void NzParticleSystem::ResizeBuffer()
// Histoire de décrire un peu mieux l'erreur en cas d'échec
try
{
m_buffer.resize(m_maxParticleCount*m_particleSize*2);
m_buffer.resize(m_maxParticleCount*m_particleSize);
}
catch (const std::exception& e)
{