It's part of Dgame and it's the shape draw method. The method collects the vertices and give them to the vertex buffer. I will try it with my current way: static stack buffer with a size of 1024 and otherwise I will temporary allocate memory. But how much shapes grow larger than 1024 vertices ;).