Managing Multiple Vertex Buffers

Hello,

I am wondering how you guys manage your vertex buffers. Currently, I have an “Entity” class where every instance of the class holds its own vertex buffer. I am concerned that this may not be the most efficient way as it creates a VkBuffer each time an instance of the “Entity” class is created. Some entities will likely have the same vertex data (for example, they use the same 3D model or primitive shape). I am thinking of creating a “VulkanVertexBufferManager” class which holds a list of all vertex buffers. I could then give an entity an ID to bind to the correct vertex buffer.

Any ideas?

Thank you

This is not really a vvulkan Issue but an application design. You already got one solution. You can indeed create a vertex buffer for a model and your Entity class will just have a reference to that buffer.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.