I’m writing a game engine and I’d like to load all static map objects geometry into a single VBO/IBO pair and then use instancing. The problem is that the geometry data is distributed among separate files (models). I’m trying to figure out an optimal way of uploading the stuff without wasting memory, both system RAM and VRAM.
The model format is human-readable (a derivative of Doom 3’s MD5), so predicting the size of the complete buffer is a bit difficult. I was thinking of first assembling all the geometry in a huge client memory buffer and then feeding it to glBufferData, but that doesn’t sound like a good option either.
What do you suggest?