VBO

Well I finally got around to changing my terrain renderer so it uses VBOs to store the land data. As promised here are some pictures –

Before – not using VBO, but “chunking” and frustum culling
terrain1

Notice the 160 FPS.

After – using an indexed VBO, but with no frustum culling yet
vbo1

VBO gives me an extra 80FPS when looking at the same spot. However, I’m still not happy with this. I think it will perform better if I still split the terrain up into smaller chunks, even just divided into four chunks, the performance will improve even more. I can use the same frustum culling technique as I did previously to decide which VBO objects to draw (it occurs to me now that if the camera is looking at the intersection of all four chunks, the FPS will still be 240, so maybe I should use 16 chunks instead..), hopefully 16 “is this box in the frustum” checks will be less expensive than drawing the whole VBO. I will find out soon!

Another thought is that so far this VBO contains only vertices and colours – eventually it’s going to contain vertices, normals, and tex coords, so that’s extra time needed to render (as I noticed a significant drop in performance when I went from vertices only to vertices and colours, I assume the same will happen with three sets of data). Hopefully my chunking mechanism will account for that… what’s the VBO limit in OpenGL? I better google that one…

~ by badgerr on March 8, 2009.

Leave a comment