Simplify chunk rendering backends
jellysquid3 opened this issue ยท 1 comments
Right now our chunk rendering backends handle allocating and uploading chunk meshes individually (as the oneshot renderer uses one buffer per chunk layer, and multidraw uses a large arena buffer). Neither backend needs to care about where a chunk's mesh is stored, as they just need the buffer ID and the range of vertex data to render.
Untying this would allow oneshot rendering to use buffer regions, speeding up draw performance significantly on OpenGL 3.2+ capable hardware. However, this would also require that the oneshot rendering sort chunks for rendering based on the region they're contained in to minimize buffer switches. This essentially means that both the oneshot and multidraw backends would be identical to one another aside from how they build command buffers.
This was completed with 93a8660.