I’ve been playing around with VBOs a lot today (mostly because a game I’m working on necessitates it), and while I have a basic idea of how glBufferSubData() and glMapBuffer() work, I’m not quite sure of how to implement them. My game is essentially a Terraria clone, and the primary VBO contains data about the blocks in the world. The world is divided into “chunks” which are 16x128 blocks large. When the player modifies a block in a chunk, that chunk is updated. Up until now, I’ve been doing this by storing each chunk’s vertex data to its own array in a HashMap and updating each array as needed. This also means I have to splice them together into a single array, which causes a minor lag spike. But, I digress. I’d be set to go with the two aforementioned methods, except that some blocks are sometimes null. When a player places a block in a chunk, its number of vertices increases. Therefore, it wouldn’t suffice to simply replace the existing data for the chunk in the VBO, as it would cause the game to crash due to a lack of allocated memory for the vertices. My first thought as to preventing this would be to allocate enough memory for 16 times 128 times four vertices (the number of vertices which would exist in a chunk if every block were filled in). But, I’m not entirely sure as to how to accomplish this. Would anyone mind pointing me in the right direction?