Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does a VertexArray use a vector<> to store the reference of a VertexBuffer, even though there is only one throughout its entire lifetime? #651

Open
thePZH opened this issue Nov 3, 2023 · 1 comment

Comments

@thePZH
Copy link

thePZH commented Nov 3, 2023

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

@Ggjorven
Copy link

Ggjorven commented Mar 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants