Login  Register

Re: Performance Issues with VBOs

Posted by jmaasing on Dec 31, 2013; 6:40pm
URL: https://forum.jogamp.org/Performance-Issues-with-VBOs-tp4031089p4031097.html

bgroenks96 wrote
I'm going to try rewriting some of the abstraction code to allow for more control over the buffer allocation process.  The code above is being called every frame 100 times (100 objects) with each object also having the 'draw' method called.  It seems to me because of how VBOs work that maybe it would be more efficient to allocate a big VBO that can hold all of the vertex data for all 100 objects, then draw them all at once.
I'm playing around with making a little game, not very optimized code but very small meshes so I had decent frame rate until I started drawing more objects (not many though, around 50 per frame). That hit my FPS pretty hard, so I batch all meshes that used the same shader into one big array and draw with gl.glMultiDrawArrays

That really made a difference, almost back to 60 FPS now :-) So yeah, in my scenario the draw calls was really costly.