Hazel
Hazel copied to clipboard
Why does a VertexArray use a vector<> to store the reference of a VertexBuffer, even though there is only one throughout its entire lifetime?
std::vector<Ref<VertexBuffer>> m_VertexBuffers;
I don't know if I missed anything? perhaps this container might increase to more than 2 at some point , or in the future?
I'm a newbie, please don't laugh at me : )
I think it's because a VertexArray in OpenGL can hold on to multiple vertexbuffers. Even though in this engine it is not used it is nice to have the option to do that. And makes it easier to scale the engine.
Just to clarify, I do not work on this project. This is just what I think.