PDA

View Full Version : some question about using VBO



somboon
03-19-2007, 10:23 PM
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 ?)

Overmind
03-20-2007, 01:02 AM
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 increasePerformance depends on many factors. When you see no increase, this propably just means that you are not data transfer limited.

somboon
03-20-2007, 01:42 AM
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.