View Full Version : vertex buffer object
I have lot's of small meshes (hold in lot's of small vertex buffer objects). There is initialisiation work done every time I call glVertexPointer(..). I asked myself if it is wise to stuff all the small meshes into one big vertex buffer object (calling glVertexPointer once) and rendering from it? Any other advices because I have a lot of small meshes.. (say 500 faces per mesh)?
Thanks in advance & regards,
08-01-2004, 05:47 PM
I asked myself if it is wise to stuff all the small meshes into one big vertex buffer object (calling glVertexPointer once) and rendering from it?Sound like a good plan to me. In general, the less often you send data over the bus, the better. And, as you know, calling glVertexPointer() is a faily heavy-weight operation with VBOs, so avoid it when possible.
I like to think of VBOs as "vertex textures". You wouldn't want to upload a texture every time you used it. Likewise, with a VBO, you want to get it into video memory, and leave it there, untouched, for as long as possible. In the same way that you can update a sub-region of a texture, you can update a sub-region of a VBO, but it's not free. I would try to configure my scene graph in such a way that I modify my vertex buffers the least. Same goes for textures, shaders, or anything else that's resident.
I also think it's good. I post this to say however that this kind of vertex management is very complicated.
Until you have the whole app running and you're not limited in vertex performance, I don't raccomand to implement this. It could take some time to get it running.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.