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: vbo and delete

  1. #1
    Junior Member Regular Contributor
    Join Date
    Apr 2010
    Posts
    110

    vbo and delete

    hello.
    I have a simple project that creates some vertex buffer , then bind them to a shader that does the render of the buffers.
    I see in some application that i find in google that the vertex buffers are deleted after the drawing.
    Why?
    if i must render a teapot why i must delete and recreate the vbos every cicle of drawing?

    Is possible to store the vbo and reuse it?
    and for shaders and textures ?
    the same question
    thanks.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,726
    I see in some application that i find in google that the vertex buffers are deleted after the drawing.
    Where? Indeed, if you see such an example, then odds are good that you should flee from that site immediately if not sooner.

  3. #3
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421
    ------------------------------
    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);

Posting Permissions

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