As this looks very much like my code the code I currently have is nearly exactly the same. The only differences I can see are these:
I use
Code:
PolyVox::SurfaceMesh< PolyVox::PositionMaterial > mesh;
as mesh extractor and
Code:
const std::vector< PolyVox::PositionMaterial >& vVertices = mesh.getVertices();
when getting the vertices. Here's how you can calculate the normals in the shader:
http://www.thermite3d.org/phpBB3/viewtopic.php?f=2&t=81The end of the code looks something like this:
Code:
PVWorld->end();
node->attachObject(PVWorld);
I'm not sure why your program crashes if these are not the problems. Did you look at the Ogre log if you use it? Or maybe you should just put some simple printf's in there to see where it crashes.
paycheck wrote:
One oddity is that the fps drops in half at some viewing angles of the sphere...
I experience something similar here. However this could also have other causes as I do not have only one volume right now.