v.sergeev Posted April 24, 2013 Posted April 24, 2013 Increase number of memory reserved in a stack when loading ObjectWaterMesh int ObjectWaterMesh::loadWorld(const Xml *xml) { ... // vertices if(xml->isChild("vertex")) { const Xml *x = xml->getChild("vertex"); int num_vertex = x->getIntArg("num_vertex"); //> SVA //VectorStack<float> data(num_vertex * 14); VectorStack<float, 1024> data(num_vertex * 14); //< SVA
v.sergeev Posted April 24, 2013 Author Posted April 24, 2013 Same with indices if(xml->isChild("indices")) { const Xml *x = xml->getChild("indices"); int num_indices = x->getIntArg("num_indices"); mesh_ptr->setIndicesArray(NULL,num_indices); unsigned short *indices = mesh_ptr->getIndices(); //VectorStack<int> data(num_indices); VectorStack<int, 1024> data(num_indices);
Recommended Posts