I am researching about "batching" objects for one big VBO and reduce draw call.
These are what I am doing now:
Create interleaved VBO based on texture or render state (like Blending)
- So, for example, there will be two separate VBO and draw call if I want only some object has blending
For more batching, add unused vertex data.
- eg) Object "A" doesn't need to have color data, but I added white empty color, so can be batched in interleaved array
For hiding object, set vertex positions to 0.0. So, stay on the array, but cannot see.
- eg) if it is quad, set to [0.0, 0.0, 0.0, 0.0]
These are my questions:
Should I create one Giant VBO, and use draw call based on offset??
- If I do that, then is there any limitation on glbufferData?? (or performance drop, if too much data in)
- Is there any method that vbo can contain different types of interleaved vertex?
- Is multiple "offset" draw call not affect performance unlike single draw call?
Should I bind multiple texture atlas to each unit, and use uniform?
- Currently, I am only binding one texture per draw.
Is there correct way for above #3 method?? (Feels like not correct)
I am updating "All" vertices every frame, even though some object doesn't need to be updated. (glBufferData) Should I do multiple update call??
Sorry for my wording, but please point me anything that I am doing something wrong.