GM_Riscvul wrote:
I have been looking at the Thermite Engine source and find the SurfacePatchRenderable, VolumeManager, and Volume Resource files very interesting. It looks like they have a great way of organizing and rendering chunks of landscape.
I wouldn't assume that - I just pieced this together by looking at examples in the Ogre3D docs and wiki. I did it a while ago so I'm actually a little hazy on how it works

In the Ogre docs you should have a look at the Renderable class (which SurfacePatchRenderable is derived from) and also the RenderOperation class (which SurfacePatchRenderable contains an instance of).
The SurfacePatchRenderable::buildRenderOperationFrom(...) functions take a PolyVox mesh and builds an Ogre::RenderOperation by working directly with the Ogre::HardwareBuffer. These functions could more or less copy the data acrross, but actually they each have an extra trick:
1) The cubic version packs the material into the 'w' component of the vertex, meaning the whole vertex data fits into a single position stream. This requires a custom vertex shader to avoid messing up the projection.
2) The marching cubes version inserts some extra triangles which are used for blending between materials.
These tricks are not essential (or even a good idea!) - they are just ideas I was playing with. For the actual rendering I think '_updateRenderQueue()' is the important function to have a look at. Check in the Ogre docs to see how it fits together.
You should also look at the ManualObject class which provides an easier interface - I was using that initially before I got brave
