Anecoz / AneRend

Prototyping Vulkan engine
16 stars 1 forks source link

Make it possible to remove renderables and models #6

Closed Anecoz closed 1 year ago

Anecoz commented 1 year ago

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.