Separate buffers for objects that are instanced and not instanced?

So I have a vertex buffer for a bunch of objects that use the same vertex format (say a vertex and normal attribute). Some of the objects are instanced and thus use additional buffer for instancing. Since instanced objects need a different vertex array object (they need additional vertex attributes for instanced data). Means that I will need to change the vao to render these. However they can use the same buffer as non-instanced objects, because they have the same format for the mesh data.

So my question is if two objects are going to use different vaos, but they have same format, would you recommend to put them into the same buffer, or separate buffers?

I’d have no specific recommendation around this - just organize your buffers to suit whatever way you need to manage them in your own program.

Just for clarity, a buffer object is just a block of typeless memory; the GPU (more strictly-speaking, the GL object) equivalent of a void* pointer. There are no constraints around mixing vertex formats in buffer objects, and you can freely put data with multiple different vertex formats into the same buffer object.

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