I think it's:
if (particles.size () * 6 * 3 > vertices_cache.size ())
Not:
if (particles.size () > vertices_cache.size ())
vertices_cache needs space for 6 vertices, 3 for each triangle(2 triangles per particle), each vertex is stored as 3 GLfloats.
It could be inverted like that(and similarly for the rest caches):
if (vertices_cache.size () < particles.size () * 6 * 3)
it makes reading it a bit clearer.
Line 83 in showmouse.cpp:
I think it's:
if (particles.size () * 6 * 3 > vertices_cache.size ())
Not:
if (particles.size () > vertices_cache.size ())
vertices_cache needs space for 6 vertices, 3 for each triangle(2 triangles per particle), each vertex is stored as 3 GLfloats.
It could be inverted like that(and similarly for the rest caches): cache.size () < particles.size () * 6 * 3)
if (vertices_
it makes reading it a bit clearer.