Currently RenderableId and ModelId directly map to indices in their respective containers within the engine.
On one hand, this is extremely useful for quick and easy lookups in buffers, both on CPU and GPU. On the other hand, it makes it impossible to simply remove a renderable or model, since the index will then no longer be correct.
Investigate using a simple allocator that uses a virtual index instead. This needs to still work with the GPU buffers and everywhere else where the Id is used as an index.
Currently RenderableId and ModelId directly map to indices in their respective containers within the engine.
On one hand, this is extremely useful for quick and easy lookups in buffers, both on CPU and GPU. On the other hand, it makes it impossible to simply remove a renderable or model, since the index will then no longer be correct.
Investigate using a simple allocator that uses a virtual index instead. This needs to still work with the GPU buffers and everywhere else where the Id is used as an index.