I would use a static instancing system. By static I mean to collect the content of a certain area (grid) into a single mesh(maybe 2 or more for large content), including standard cubes and custom meshes for your halfcubes, putting them into a clean trianglestrip (use texture atlas, texture array to handle texture switches).
To avoid memory fragmentation on the GPU I would use some kind of paging, reserving certain memory blocks (i.e. 5000 tris max for each page). This should be kept in a cache (LRU). To avoid frequent updates of this static meshes I would use a second, dynamic approach (= your current?) to span the time until the static mesh has been created and uploaded. Further on create the static meshes in a second thread and only if it has not been modified in the last X seconds.
Show differencesHistory of post edits
#1Ashaman73
Posted 31 July 2012 - 05:56 AM
I would use a static instancing system. By static I mean to collect the content of a certain cube (grid) into a single mesh(maybe 2 or more for large content), including standard cubes and custom meshes for your halfcubes, putting them into a clean trianglestrip (use texture atlas, texture array to handle texture switches).
To avoid memory fragmentation on the GPU I would use some kind of paging, reserving certain memory blocks (i.e. 5000 tris max for each page). This should be kept in a cache (LRU). To avoid frequent updates of this static meshes I would use a second, dynamic approach (= your current?) to span the time until the static mesh has been created and uploaded. Further on create the static meshes in a second thread and only if it has not been modified in the last X seconds.
To avoid memory fragmentation on the GPU I would use some kind of paging, reserving certain memory blocks (i.e. 5000 tris max for each page). This should be kept in a cache (LRU). To avoid frequent updates of this static meshes I would use a second, dynamic approach (= your current?) to span the time until the static mesh has been created and uploaded. Further on create the static meshes in a second thread and only if it has not been modified in the last X seconds.