Thanks for the answer.
I use this function only in the editor.
As not always you know how many a maximum it is required on this or that effect. I have looked your code and have a little altered function, I am not assured that it correctly, but it works for me. I have added pool.clear (); and program falling have stopped. I use DX9Renderer and consequently it was necessary to make some changes to it.
1) has added DX9DestroyBuffers (group);
void DX9QuadRenderer:: destroyBuffers (const Group AND group)
offsetIndex = 0;
2) has changed in places in render () prepareBuffers () and DX9PrepareBuffers ()
void DX9QuadRenderer:: render (const Group AND group)
HRESULT hr = 0;
int nb_part = group.getNbParticles ();
if (! prepareBuffers (group))
if (! DX9PrepareBuffers (group))
Still I had problems with Model:: getParamValue (), I could not receive last parametre. I have corrected so:
float Model:: getParamValue (ModelParam type, size_t index) const
unsigned int nbValues = getNbValues (type);
if ((nbValues - 1> = index) && (nbValues! = 0))
return params [indices [type] + index];
return DEFAULT_VALUES [type];
Probably it was possible and so to make
if ((nbValues> index) && (nbValues! = 0))