I am currently using standard modern OpenGL way to render a mesh via VBO and attributes
glEnableVertexAttribArray(aVertexPosition); glBindBuffer(GL_ARRAY_BUFFER, VBO); glVertexAttribPointer(aVertexPosition, 3, GL_FLOAT, GL_FALSE, 0,0); glBindBuffer(GL_ARRAY_BUFFER, 0);
and in the GLSL code also the standard way to received into as
in vec3 aVertexPosition.
However, I wonder if there is anyway to make this for a dynamic amount of VBOs. Let's say my software creates a number of VBOs that depend on the inputs, and I successfully create and allocate memory for all of them, how do I pass all of them to the shader? Does the number need to be constant? If so, what is the best way to do it?