flingengine / FlingEngine

A Vulkan game engine with a focus on data oriented design
https://fling-engine.site/
MIT License
408 stars 16 forks source link

Reduce the amount of iteration when buliding command buffers #135

Open BenjaFriend opened 4 years ago

BenjaFriend commented 4 years ago

Right now we rebuild the command buffers every frame. This is relatively cheap since we re-use the buffers and makes managing them much simpler.

However, we do have the cost of iterating through all objects every frame then. This doesn't really need to happen, and we should really have a state system that manages if a mesh is dirty/needs to be updated.

At a minimum we need to update the UBO's of dirty entities every frame.