PDA

View Full Version : VAO and VBO permutations



Ruggero Visitnin
01-05-2015, 02:24 PM
You're off the OpenGL map at this point into application-specific land. It depends on what a scene is, and what is necessary to update and render it. Think about the data and the processing involved? Can you share it? Does it even make sense to share it? You're on your own there!

Thanks for the answer, i thought about it and i think for now is too far away from my actual situation, i have other things to work with.
Coming back on planet OpenGL what are the pros/cons of using one single VAO and multiples VBOs, which combination guarantees highest performance?

- multiples VAOs and VBOs
- one VAO multiples VBOs
- multiples VAOs one VBO
- other solutions that you might use

Again thanks for the time you are dedicating to me.

Alfonse Reinheart
01-05-2015, 04:04 PM
Coming back on planet OpenGL what are the pros/cons of using one single VAO and multiples VBOs, which combination guarantees highest performance?

You should be advised that you can specify vertex formats separately from the buffers that use them (https://www.opengl.org/wiki/Vertex_Specification), on more recent implementations. The extension specifically states (in the issues section) that it's expected that changing the buffer binding will be far cheaper than changing the vertex format. So in theory, the expected way to use this functionality is to change VAOs only for different vertex formats.

Dark Photon
01-05-2015, 04:57 PM
Some related info I found out years back. NOTE: NVidia specific:

* Re: Efficiency of VAO with VBO for every Model (https://www.opengl.org/discussion_boards/showthread.php/182867-Efficiency-of-VAO-with-VBO-for-every-Model?p=1255362&viewfull=1#post1255362)
* Re: Performance advise for OpenGL 4+ ? (https://www.opengl.org/discussion_boards/showthread.php/177686-Performance-advise-for-OpenGL-4)


...which combination guarantees highest performance?
;) Heh heh. Nice try! OpenGL makes no guarantees on performance. That's up to the GL driver implementation. So I'd strongly encourage you to verify or refute anything you read on the GPU hardware and drivers that matter to you.

Ruggero Visitnin
01-06-2015, 03:25 AM
oh well, i tried. I immagine i'm going to read a lot.

EDIT:
After some reading i think the approach that better fits to my situation is one VAO and multiples VBOs. ( i will think to a better approach in the future )
Now concerning VBOs, i'm thinking to the situation when a user (i mean of the editor) wants to modify a texture of the model, it's, divide the model into a VBO for every Material/Texture while editing and when editing is finished use a texture atlas and bind the model into one VBO, a good choice ? are there other solutions?

I know i'm asking lot of stuff but since you are "Guru" i want to take advantage of your experience