I am currently learning OpenGL and VAO's are confusing me. As far as I understand VAO's are just encapsulating the state of VBO's.
Bind VAO
load buffer data
Disable VAO
and then you can draw it like
activate VAO
DrawArray ...
deactivate VAO
But I am not sure if this is really useful in practice. Let's say I have a really huge scene that I want to render. Maybe 10km² and I obviously don't want to load every object to the GPU at one time, I probably want to separate the scene into different chunks.
Now I am moving around and at one point I have to load another chunk of objects to the GPU right? But as far as I know I can't change a VAO and I would have to create a new VAO every time something changes in my scene.
So what in my scene would be a VAO? Would the entire scene be a VAO? Or would every object be a VAO?
And for me to have multiple VAO's doesn't make too much sense because I can't compose the VAO's together I can only draw them on top of each other like this
activate VAO1
DrawArray ...
deactivate VAO1
activate VAO2
DrawArray ...
deactivate VAO2