It should be very simple - just add more data to VBO.
So, for example, if you want to display 3 triangles instead of 1, make sure you send 9 vertices to glBufferData . Then, to display all of them, use the glDrawArrays(GL_TRIANGLES, 0, 9); call glDrawArrays(GL_TRIANGLES, 0, 9); It really should be that simple.
However, the question about IBOs is that they really are not very different from VBOs, and I really would be used to using them. This is a really practical way to use VBOs. Since several triangles are usually designed to cover the same surface (for example, a cube requires twelve triangles), using only VBO causes many repetitions when specifying these vertices. Using the index buffer is still more efficient since any repetition is removed from the VBO. I found this one that gives a brief example of the transition from VBO to VBO / IBO only, and also gives a good explanation of the changes.
Ken Wayne VanderLinde
source share