ARB vbo - Many small buffers or a few large ones?

Hello,

I’ve got a question for everybody who’s been using the GL_ARB_vertex_buffer_object extension:

Is glBindBufferARB an expensive operation?
Should I use one or a few big buffers (as in the GL_NV_vertex_array_range extension) or can I put every mesh in its own (small)vbo?


Thanx
Pedro

Hi Pedro,

The short answers are 1) no, and 2) reasonably small is fine.

It will take some time with implementation tuning and such to see what the recommendation is at the end of the day, but the goal will be that you can get good performance keeping each array (or set of interleaved arrays) in its own buffer object.

If all your arrays contain 10 vertices, then the buffer management overhead could become a problem, but if your arrays generally contain hundreds of vertices, you’ll probably be fine.

Here’s one of the issues quoted directly from the spec:

How is this extension different from NV_vertex_array_range?

    The following summarizes the major differences.
    - Applications are no longer responsible for memory management
      and synchronization.
    - Applications may still access high-performance memory, but
      this is optional, and such access is more restricted.
    [b]- Buffer changes (glBindBufferARB) are generally expected to
      be very lightweight, rather than extremely heavyweight
      (glVertexArrayRangeNV).[/b]
    - A platform-specific allocator such as wgl/glXAllocateMemoryNV
      is no longer required.

Thanks -
Cass