So! I decided to try to optimize the drawing code a bit by implementing VBOs (Vertex Buffer Objects) to the BGE.
So what are VBOs? The old method of rendering is to pass the data to the GPU on every frame and the GPU does its thing and brings stuff to the screen. Now VBOs attemp to overcome the concept of passing data to the GPU and instead, STORE data INTO the GPU for fast data access.
This should make things render faster.
However I’m having some mixed results with my comp (sometimes faster, sometimes slower, sometimes neither…) so I need a bit of help with testing. So if anyone has the time to test my build. I would be very grateful ;). If possible, do some bench marking with different scenes (scenes with over 200K triangles are optimal for testing) and post your hardware specs and benchmark results into this thread. Also please do not enable the display lists since they override the VBOs.
NOTE: VBOs work only on hardware that supports them. (OpenGL 2.0 support I think…)
Are you going to submit the patch to the patch tracker?
If you can single out what cases they are faster in, you could code things so they automatically go into effect only when they are faster. I would think you learned a lot about coding with the old BlendX project (before Brecht, Ben, and others dramatically improved BGE).
Also can you implement this for the 3D view as well? As speeding up 3D view drawing is critical for things like sculpting and assembly of complex scenes.
Yeah I learned a lot ;). VBO should be faster for rendering in any case so they should be used at all times. Updating VBO data might be a bit slow but the rendering should make up for it.
I was hoping to submit this patch to the tracker once I was more sure that it actually works as its supposed to. If the hardware supports VBOs, they are enabled by default, so I really want them to work correctly.
3D viewport… I’m not that familiar with the drawing code but I could take a look 8|. The caveat is that whenever somebody is editing the mesh, the VBOs would have to be turned off for the mesh being edited. The others could keep rendering happily though. And when sculpting, the VBOs could be on all the time, atleast I think so. ( ! big plus!)
Sounds good… I can only test windows builds… i would suggest making some demo test scenes for people to use so you can bench mark it correctly. .eg. kinda like what they did in apricot… but not as complicated?
If the speedup is that much Brecht should commit the patch and have that in when Yo Frankie is released, it’ll only make good for those with computers that aren’t high end. Even though users on high end computers will benefit just as much too.
yes, it seems if i load a scene where turned off displaylist (128fps) it will be faster than when i run gbe agan (second launch 64 fps) and third (64fps) will be same as second.
and seems only happend if run fresh blender and run very fist bge with no display list.
You are doing a good thing Toonist, considering how Brecht and Campbell may not touch the BGE code even near as much in the future as during Apricot we’re glad you came in to continue what Brecht started with graphics and optimizations.