Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: VBO performance

  1. #1
    Junior Member Regular Contributor
    Join Date
    Oct 2007
    Phoenix, AZ

    VBO performance

    I have a situation where there are 3 million points. Broken up among 255 thousand separate entities. (GL_LINE_STRIP, GL_TRIANGLE_STRIP, etc..)

    I have created 255 thousand VBOs. One for each entity.
    The performance is the same as if I had simply done glBegin() vert, vert, vert, glEnd(). (which sends all 3 million points from CPU to GPU on every draw)

    Is having the data broken up into so many separate VBOs the performance problem?

    Should I make a single, giant VBO and draw each entity using an offset into that?

    Other theories?

  2. #2
    Member Regular Contributor malexander's Avatar
    Join Date
    Aug 2009
    Is having the data broken up into so many separate VBOs the performance problem?

    There is a lot of driver intervention going on there, causing a great deal of drawing overhead. You're drawing roughly 12 vertices per draw call, so your gl function calls are becoming a very large bottleneck.

    You don't need to create one huge VBO if it's not convenient, but I wouldn't create much more than 100 for this case. Try grouping your lines and triangles together so that you can draw a large number at once. If you need to change GL state often, such as the color, consider using a VBO for the color changes instead. For things you can't place in VBOs, like texture changes or line changes, try grouping those primitives with the same state together so that you can minimize GL state changes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts