v.sergeev Posted April 24, 2013 Share 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 Link to comment
frustum Posted April 24, 2013 Share Posted April 24, 2013 Thanks. And same thing for other Objects. Link to comment
v.sergeev Posted April 24, 2013 Author Share 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); Link to comment
Recommended Posts