Updating instanced data during runtime

Hey im trying to get my head around instanced drawing and how to structure it in a nice way that would be appropriate for a 2D RTS game.

Is there a common way of implementing the instanced data for these kind of tasks?

And how do you usually update the instanced data during runtime if you don’t know how many objects or where all the objects will be from start?

“Instanced data” lives in buffer objects. So you’re talking about techniques for updating buffer objects. Use those. Pay particular attention to the persistent mapping part.

You pick a number that is bigger than you’ll ever need.

1 Like