Having scrapped everything I know about OpenGL, I think I finally have got the grasp on a few of the deal breaking difficulties of "modern" OpenGL. I can now make a shader from scratch, compile, and connect inputs and outputs and make uniforms to scale, rotate or transform an object. I have also struggled a bit understand VAOs and VBOs, and how they are connected, but I think I am starting to grasp the concept now.
My project is to make a very simple 3D editor. That sort of makes the data dynamic, although the data in a different setting most likely will be static. That makes me philosophise a bit about how to organise the objects (models) that you can make in the editor. I want an as efficient way to handle objects as possible.
I have been thinking about three methods:
1. One oversized buffer object to handle incoming vertex (color, etc...) data.
2. One VAO, then one VBO for each object.
3. One VAO for each object.
I don't like option 1. I don't like to guesstimate, or the complications that will arise when you fail on your estimate, then need to rebuild buffers or handle removal of objects, etc. I like to allocate just the right amount of buffer that I need to hold my data, and I want a structure that makes it easy to organise a list of objects. Besides, I am picturing a tree structure in my head. That is what I desire. (Or just a linked list to begin with.)
Option 2 is the one I actually prototyped. That didn't work. All I got to screen was the last object, no matter what I did.
Option 3 is the one that I have come to understand is the way to go. I don't oppose to this option. It is much better than 1, but it will incur state changes that I don't need.
I actually want to go for option 2. Is that possible? Can anyone tell me the exact steps needed for this to work, if it works at all? If not, I will just implement option 3. I have already tested that scenario, and it works.