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: some question about using VBO

  1. #1
    Junior Member Regular Contributor
    Join Date
    Sep 2006
    Location
    thailand
    Posts
    130

    some question about using VBO

    After I upload vertex data to the GPU using VBO (glBufferData), Is it safe/possible to delete the original data store in main memory ?

    I tried deleting data in main memory but when i call glDrawPixel to render VBO the scene go blank

    I also noticed that there no performance increase
    comparing vbo to generic vertex array, the framerate are almost the same

    *note that i did'nt use indexing and draw as a GL_TRIANGLE

    I use Gefore 7600gt with 93.71 driver (windows XP)

    my code also work on Gefore4MX (does GF4MX even supported VBO ?)

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,142

    Re: some question about using VBO

    Is it safe/possible to delete the original data store in main memory ?
    Yes, after the glBufferData call returns, you can delete the original data.

    Are you sure deleting the data is the reason for your scene going blank? What happens if you don't delete it?

    I also noticed that there no performance increase
    Performance depends on many factors. When you see no increase, this propably just means that you are not data transfer limited.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Sep 2006
    Location
    thailand
    Posts
    130

    Re: some question about using VBO

    I have found the cause of problem . It my own mistake.

    I store vertex data in a vector(STL).

    After I delete data from vector (using vector::clear()) I still access number of element by using vector::size() which will alway return 0

    I have to apologize for bothering everyone for such a simple mistake.

Posting Permissions

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