I've got a problem with my terrain engine (using DirectX).
I'm using a vector to hold the vertices of a detail block. When the block increases in detail, so the vector does.
BUT, when the block decreases its detail, the vector doesn't shrink in size.
So, my question: is there a way to shrink the size of a vector? I did try this:
vertexvector.reserve(16);
See Question&Answers more detail:os