You could do similar thing with SSBO, I think?

That is for SSBOs. u_nodes is a pointer to an SSBO in this case. That SSBO then has lots of more pointers to various different SSBOs that contain the vertex data.

I'm thinking of declaring array of SSBOs that contain array of data structs. Address would be represented by index of SSBO binding and offset within that buffer. Though that limits maximum number of used SSBOs within drawcall to GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS.

To my knowledge you can't have an array of SSBOs in OpenGL. You could have one SSBO for everything, but that makes other things very difficult, like how to deal with dynamically growing scenes, loading and unloading models, etc.

From https://registry.khronos.org/OpenGL/extensions/ARB/ARB_shade...:

   (3) "Do we allow arrays of shader storage blocks?

        RESOLVED:  Yes; we already allow arrays of uniform blocks, where each
        block instance has an identical layout but is backed by a separate
        buffer object.  It seems like we should do this here for consistency.
PS: You could also access data through bindless textures, though you would need to deal with ugly wrappers to unpack structs from image formats.

Do you have an example for that? I can't find any.

Regarding bindless textures, they're really ugly to use. Shader buffer load is so much better, being able to access everything with simple pointers.

Here's some code: https://github.com/KhronosGroup/OpenGL-API/issues/46 But yeah, GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS limits usefulness of that.

I wanted to say that with some compiler hacking it should be possible to lower SPIR-V using GL_EXT_buffer_reference into bindless image loads, but SPIR-V doesn't have standardized bindless texture, duh!