Hazel icon indicating copy to clipboard operation
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?

Open thePZH opened this issue 1 year ago • 1 comments

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 : )

thePZH avatar Nov 03 '23 02:11 thePZH

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.

Ggjorven avatar Mar 02 '24 18:03 Ggjorven