I was wondering how to make my application interact with a 3D model that has to change a lot. For instance, I would like to be able to freely modify color, texture id, position or even normals from the application itself. I thought re-uploading the model (glBufferData) every time the model changes, or every frame, but that seems to be kind of memory intensive to me.
Also, I'm not quite sure how I'm supposed to let a class access a part of the buffer in the host memory. Example: a class "Shape" that has attributes and can modify them at any time, modifying what the buffer contains. For this, I have no idea where to start. I have to point out that I need to have many more attributes in these classes that can't be sent to the GPU. Any hints / techniques I could look into?
Edit: I found this article on Buffer Object Streaming, and feel pretty confortable about streaming data to the GPU using glBufferData and glBufferSubData. I still have trouble finding a good way to define my objects in the buffer though.
I looked into creating my own class "SubArray" which contains the array in CPU memory, an offset and a length. It has an indexer that validates the indices and throws an exception if not in the correct range, but I don't feel quite comfortable using this method as I can't change the block size of a simple object (add vertices).