URL: https://graphicscomputing.fr/cgp/reference/opengl_vbo_structure/
Description: OpenGL vertex buffer (VBO) holding one per-vertex or per-instance array of vec2, vec3 or vec4.

# opengl_vbo_structure

OpenGL vertex buffer (VBO) holding one per-vertex or per-instance array of vec2, vec3 or vec4.

Fields:

- `GLuint divisor` - Instancing divisor given to initialize_data_on_gpu: 0 for per-vertex data, 1 to advance once per instance (applied by opengl_set_vao_location).
- `GLuint id` - OpenGL id of the buffer, 0 when it is not allocated.
- `GLuint size` - Number of elements in the buffer (a vec3 or a uint3 counts as one element), 0 when empty.
- `GLenum type` - OpenGL target of the buffer, GL_ARRAY_BUFFER for a VBO and GL_ELEMENT_ARRAY_BUFFER for an EBO.
- `opengl_gpu_buffer_details details` - Allocated size in bytes, number of components per element (2, 3 or 4) and component type (GL_FLOAT), used to describe the buffer to the VAO.

Functions taking it:

- `void opengl_set_vao_location(opengl_vbo_structure const& vbo, GLuint location_index)` - Bind a VBO to a shader attribute location of the current VAO (glVertexAttribPointer), also setting the instancing divisor if the VBO has one.
