Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Creating Vertex Buffer Objects

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2006
    Location
    Redmond, WA
    Posts
    19

    Creating Vertex Buffer Objects

    Hello, I recently switched my interleaved rendering system back over to vertex buffer objects to allow for more rendering flexibility. Now I'm trying to decide how to lay out the vertex buffer objects. Ideally, each renderable peice for every mesh could be its own vertex buffer object, but I'm worried that it will create HUGE numbers of VBO's, in most cases, it will create hundreds. What I'm wondering is if there is an optimal number of VBO's or an optimal way to store the data into a VBO. Should I create a seperate VBO for each renderable piece in my app or should I batch multiple peices of geometry into 1 VBO. If I batch, what's the optimal size for one? I can't say I understand VBO's that well and how things work internally, info on this would be useful as well. What kind of overhead is there for creating tons of VBO's, what's the drawbacks.

    I guess what I'm asking is, what do you all think is the best implementation for potentially large sets of geometry, each with different textures, shaders, etc to allow for a fast and efficient renderer using VBO's? Thanks!

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: Creating Vertex Buffer Objects

    www.ati.com/developer/gdc/PerformanceTuning.pdf

    Tips for ATI and NV included.

    Nothing specific about size of VBOs, but don't make them too small.
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2006
    Location
    Redmond, WA
    Posts
    19

    Re: Creating Vertex Buffer Objects

    Thanks for the info.

Posting Permissions

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