VBO (Vertex Buffer Object) Performance Issue

Started by
23 comments, last by Gumpngreen 20 years ago
Vic:

"All of the above was proven to be true in my researches, that''s why my program calls glVertexPointer only once at startup"

Which works, if you only have a single VBO format. If you use different VBO formats (for instance, if your first VBO contains data with coords, UV, and colors, and your second VBO contains only coords), then you will need to set up your vertex pointers whenever you switch VBOs.

I would love to be wrong, but I think DarkWing has it right.
Advertisement
I would not mix different types in one VBO just for the clarity (plus, you get several smaller VBO''s and this case seems to be better than one huge VBO)
BrianL:

Paper: http://developer.nvidia.com/attach/6115

I haven''t implemented VBOs until now, but as I understand it, nvidia say in their paper, that you have to set your vertex array pointer just one time for each vbo. So you create your vbo, bind it, fill it with data (if its static) set up your vertex arrays. You can just refill your vbo (if its dynamic) without changing or resetting your pointers. As I unterstand, you don''t have to set the pointer the next time you bind your vbo, as it uses the last settings you made with that vbo. So you could just create different vbos with different vertex formats.

PS: Sorry, my english isn''t that good.

Bye,
Oesi
how compatible with ATI''s drivers is that? that is the question...
Sorry about the ambiguity, by ''mix'', I meant multiple VBOs, not putting multiple type of data in a single VBO (I am just starting out with graphics too!)

Oesi: I made the same assuption you did when I started with vertex buffers. I assumed that the pointers/offsets were associated with the buffer. Once I started getting crashes when I used multiple VBOs with different offsets.

When I thought about the fact that the rest of GL is a state machine, it seemed to make sense that the VBO offsets would be as well. This would mean that the pointers would have to be reset whenever a VBO with a new format was ''used''.

Again, this is all just a hunch based on my experience with them.

This topic is closed to new replies.

Advertisement