View Full Version : How dynamic must dynamic data be?

08-08-2009, 10:21 AM
I have an application that displays for lack of a better term, a map using an Orthographic projection.

Though speed is not really required due to the simplicity of the rendering, my plan is to render using VBO's in preparation for the day when immediate mode goes away.

My question is - how dynamic does the data need to be in order to necessitate dynamic arrays? My situation is that 99.5% of the time, the map data will be static. However, occasionally, a user may choose to add or remove elements from the map, which would obviously change the vertex data. By occasionally I mean that in a 4-hour session of using the app, they might do it twice.

My thinking is that that's not really dynamic - so I should probably use static arrays and then just tear them down and rebuild them when the data changes. Obviously that'd be horrible for most applications, but my application is so, well....static, that it seems OK to me.

Any thoughts?

08-08-2009, 03:13 PM
well tearing them down and making new ones isn't that bad with that periodicity, especially if their sizes are wildly different.
But when it comes to dynamic arrays it really doesn't matter as they are all the same, the term dynamic or static are just hints to the memory management.

08-09-2009, 11:05 AM
Yes, you should read the specs because it doesn't make any problem even if you change the data of a static VBO at each and every frame, just it's not performance-wise.
Anyway in this case you should definitely use static VBOs but don't recreate the VBO if change occurs, just do the update and there will be no problem.