fix osggraph
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@6529 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 4ee77ff1f0659b66959e6d1cac5b89ac4793b003 Former-commit-id: 3ab1826950510dcb3d962bfb6b08655a2bc2d086
This commit is contained in:
parent
c9a3226f71
commit
d176b39198
4 changed files with 338 additions and 324 deletions
|
@ -72,9 +72,12 @@ SDCar::SDCar(void) :
|
|||
}
|
||||
|
||||
SDCar::~SDCar(void)
|
||||
{
|
||||
if(car_root != NULL)
|
||||
{
|
||||
car_root->removeChildren(0, car_root->getNumChildren());
|
||||
car_root = NULL;
|
||||
}
|
||||
|
||||
delete shader;
|
||||
delete reflectionMapping;
|
||||
|
|
|
@ -120,6 +120,8 @@ SDRender::SDRender(void) :
|
|||
}
|
||||
|
||||
SDRender::~SDRender(void)
|
||||
{
|
||||
if(m_scene != NULL)
|
||||
{
|
||||
m_scene->removeChildren(0, m_scene->getNumChildren());
|
||||
m_CarRoot->removeChildren(0, m_CarRoot->getNumChildren());
|
||||
|
@ -132,6 +134,7 @@ SDRender::~SDRender(void)
|
|||
m_CarRoot = NULL;
|
||||
skyGroup = NULL;
|
||||
m_RealRoot = NULL;
|
||||
}
|
||||
|
||||
delete thesky;
|
||||
|
||||
|
|
|
@ -30,10 +30,13 @@ SDBackground::SDBackground(void) :
|
|||
}
|
||||
|
||||
SDBackground::~SDBackground(void)
|
||||
{
|
||||
if(_background != NULL)
|
||||
{
|
||||
_background->removeChildren(0, _background->getNumChildren());
|
||||
_background = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void SDBackground::build(bool type, int grWrldX, int grWrldY, int grWrldZ, const std::string& TrackPath)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,12 @@ SDScenery::~SDScenery(void)
|
|||
//delete m_pit;
|
||||
delete SDTrack;
|
||||
|
||||
if(_scenery != NULL)
|
||||
{
|
||||
_scenery->removeChildren(0, _scenery->getNumChildren());
|
||||
_scenery = NULL;
|
||||
}
|
||||
|
||||
SDTrack = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue