I’m still designing my new engine and the question that bugs me is vertex attribute storage.
Since the engine will be based on GL32 FW_COMPAT, I have to store all data in buffer objects. But since I haven’t tried to do serious rendering for some time I don’t know what are the pitfalls of these objects.
From http://developer.amd.com/media/gpu_assets/PerformanceTuning.pdf presentation I understand that big BO are bad, but small BO are also bad, unfortunately I can’t find any research on optimal sizing.
Since you have worked with BO more then I, can you tell me what modularity I should try to achieve?
So far I understand I should go for indexed buffers, preferably with drawrangeelements. But optimal vertex count and state change costs are still quite fuzzy for me.
Do you pack all objects in one big buffer at level load and then draw them via drawrangeelements or is it smarter to create a buffer for each object and then rebind the buffers?
What about objects that have variable vertex attribute count, some have color information, some don’t? Should I create two interleaved buffers or pad the missing vertex attributes?