Fix for extractSubset() not copying the region.

This commit is contained in:
Matt Williams 2011-04-24 20:52:53 +02:00
parent fce8089264
commit 6b4c7686e6

View File

@ -400,6 +400,8 @@ namespace PolyVox
polyvox_shared_ptr< SurfaceMesh<VertexType> > extractSubset(SurfaceMesh<VertexType>& inputMesh, std::set<uint8_t> setMaterials)
{
polyvox_shared_ptr< SurfaceMesh<VertexType> > result(new SurfaceMesh<VertexType>);
result->m_Region = inputMesh.m_Region;
if(inputMesh.m_vecVertices.size() == 0) //FIXME - I don't think we should need this test, but I have seen crashes otherwise...
{