1

Imagine I want to draw a pyramid made of triangles.

-Should I create a VBO for each triangle or one containing all triangles?

1
  • According to my tests i made once, over 1MB buffers start to slow down rendering, I usually use 512k buffers or less, just to play it safe. Commented Jun 18, 2012 at 22:16

1 Answer 1

3

Selecting a VBO into a context is a rather expensive state change, so using fewer VBOs is definitely advantageous.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks a lot. But should I then feed the vbo an array of all vertices of all faces? (same vertex will be given more than one time)
@JoãoSilva yes, you should, but to avoid duplicated vertices, you should use indexed rendering, this will not only reduce the size of vbo, but also make it more likely you hit the post-transform-cache
Also see this guide
Careful... vertices may not be repeated even if they overlap. Even if the x,y,z coordinates are the same, the normal vector probably is not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.