I have near 10000 vertex buffers (different sizes) and corresponding integer data for each buffer. So when i render i do something like this:
Bind shader
For each vertex buffer:
Set uniform
Bind vertex buffer
Draw call
This many uniform changes really slow down the program.
So i was thinking of using a uniform buffer object or a ssbo and send an array of integers to the shader, then somehow index into the array with each draw call. Is there a way to somehow know which draw call is being processed in the shader?