hanno
hanno

Reputation: 6513

Swizzling Vertex Arrays, Vertex Buffer Objects and Shaders

I have a basic understanding of Vertex Arrays, Vertex Buffer Objects and Shaders. However, I am not sure if I can reuse them or whether the association is bijective.

For example:

Upvotes: 0

Views: 499

Answers (1)

fen
fen

Reputation: 10105

Yes you can :)

VBO - controls where your data is stored

VAO - controls layout and binding (you can have several VAO that points to the same VBO, but in different ordering)

Shaders - are responsible for doing something with the data, they can be used with different VAO/VBO combinations (but that combination must match attribute layout in the shader of course)

Upvotes: 3

Related Questions