Partial fix for objects not being cleaned up when they should. There's more left
This commit is contained in:
parent
4f6bb4565f
commit
fe569797a3
@ -88,6 +88,7 @@ LODNode* ModelDefinitionLoader::instanciateAsLOD(const XMLNode* node, scene::ISc
|
|||||||
a_mesh->grab();
|
a_mesh->grab();
|
||||||
//cache.push_back(a_mesh);
|
//cache.push_back(a_mesh);
|
||||||
irr_driver->grabAllTextures(a_mesh);
|
irr_driver->grabAllTextures(a_mesh);
|
||||||
|
m_track->addCachedMesh(a_mesh);
|
||||||
scene::IMeshSceneNode* scene_node = irr_driver->addMesh(a_mesh);
|
scene::IMeshSceneNode* scene_node = irr_driver->addMesh(a_mesh);
|
||||||
|
|
||||||
m_track->handleAnimatedTextures( scene_node, *group[m].m_xml );
|
m_track->handleAnimatedTextures( scene_node, *group[m].m_xml );
|
||||||
|
@ -654,7 +654,11 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
void setActualNumberOfLaps(unsigned int laps)
|
void setActualNumberOfLaps(unsigned int laps)
|
||||||
{ m_actual_number_of_laps = laps; }
|
{ m_actual_number_of_laps = laps; }
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
bool operator<(const Track &other) const;
|
bool operator<(const Track &other) const;
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
/** Adds mesh to cleanup list */
|
||||||
|
void addCachedMesh(scene::IMesh* mesh) { m_all_cached_meshes.push_back(mesh); }
|
||||||
}; // class Track
|
}; // class Track
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user