vdweller
Member
Hello!
The past few days I have been fiddling with using vertex buffers for rendering tilesets. I understand that this is a quite fast method. However, what happens when you have a map where tiles change?
Do I need to re-create the entire vertex buffer in that case? If so, doesn't that defeat the purpose of using vertex buffers for speed?
For example, if you have a 300x300 map with tiles, every time a tile changes you would have to iterate through 90,000 tiles and recreate the vertex buffer data. Have I understood that correctly or is there some trick to update vertex buffer contents without having to go through all available tiles?
The same goes with tile smoothing. Every time a tile changes, the only way to update the "edge vertices" that will fade out to give that nice blend is to recreate the buffer from scratch?
The past few days I have been fiddling with using vertex buffers for rendering tilesets. I understand that this is a quite fast method. However, what happens when you have a map where tiles change?
Do I need to re-create the entire vertex buffer in that case? If so, doesn't that defeat the purpose of using vertex buffers for speed?
For example, if you have a 300x300 map with tiles, every time a tile changes you would have to iterate through 90,000 tiles and recreate the vertex buffer data. Have I understood that correctly or is there some trick to update vertex buffer contents without having to go through all available tiles?
The same goes with tile smoothing. Every time a tile changes, the only way to update the "edge vertices" that will fade out to give that nice blend is to recreate the buffer from scratch?