   VBO Optimization Advice
  Hello everyone, I am in the process of optimizing my renderer, and I am wondering if I should change its caching behavior a bit. Right now it caches the smallest cullable bits of geometry on the video card, and calls them all individually. This results in about 1000 calls to glCallList() per pass, and there are many passes. I am planning to switch to use VBOs instead of display lists, and it brings up some interesting questions for me. I am wondering if I should minimize OpenGL calls as much as possible by culling my scene, sorting the geometry by material, and then filling in a single VBO for each material by using glMapBuffer or GL_STREAM_DRAW. These VBOs would change just about every frame, but given the small size of my geometry relative to the bandwidth of the video card, I wonder if it would be a win? What do you guys think? If I just migrate my renderer to VBOs as-is, the average VBO will be only 50 triangles. Of course there are a few tricks I can play to get that number up, but maybe someone experienced has some insight on how to strike the right balance?Thanks,Sean Purser-Haskell   
  It sounds like you aren't rendering much so why even bother with culling?Using VBOs is always a good idea since display lists are ancient history.http://www.opengl.org/wiki/VBOhttp://www.opengl.org/wiki/VBO_-_more#Dynamic_VBO   ;Hello V-man, That's not terribly accurate. I am testing with a single model, of which there may be many in a scene, which consists of about 50 000 triangles divided into about 1000 meshes, each with a material assigned. I will be implementing some optimizations to the depth peeling process to reduce the number of passes by an order of magnitude, but right now between 20 and 30 depth peeling passes are done over this model for each light in the scene. That's 1 000 000 triangles pushed for just one light. This is a fairly complex renderer that is not meant for games, but rather for rendering 3D animations for film. The reason I used display lists originally is that I read some benchmarks that suggested they were actually faster than VBOs on our target hardware for certain situations, and they provided satisfactory performance at the time. Things have now become complex enough that I don't think those assumptions are any longer true. Thanks, Sean;  "the average VBO will be only 50 triangles""This results in about 1000 calls"In my new engine I decided to only optimize when I need to. I have a huge forest and put all the objects as 1 model instead of 1,000's of other model. And the result is probably faster because culling takes cpu time and plus you then have to send still 300 or so calls. In your case though 50x1000 is not much. Just make it all one model and draw it. Of course that's only if the objects are not dynamic.   