PDA

View Full Version : One big vertex buffer or many small?



nullable
10-01-2014, 01:55 PM
Hello,

Lets say I have 5 entities (objects) with method Render(). Every entity needs to set own vertices to buffer for rendering.
Is it better to use big pre-allocated buffer using glGenBuffer and every entity will use this buffer (id of buffer passed as argument) using glBufferSubData, or every entity will need to create own buffer?

If big buffer is better, how can I render all vertices in buffer (from all entities) properly, with proper shaders and etc?

Thank you.