- Update osggraph/Scenery

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@5980 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: ad3439ccf964960096e4059d3558afb30c4bbe29
Former-commit-id: a9b05e013ee7d5d8e8927626fe4d3d9618edd94f
This commit is contained in:
torcs-ng 2015-04-20 00:25:49 +00:00
parent 9e78c837fb
commit 6b201aa7e8
2 changed files with 7 additions and 8 deletions

View file

@ -43,8 +43,8 @@ void SDBackground::build(bool type, int grWrldX, int grWrldY, int grWrldZ, const
osgDB::FilePathList pathList = osgDB::Registry::instance()->getDataFilePathList();
pathList.push_back(TrackPath);
pathList.push_back(LocalPath+"data/objects");
pathList.push_back(LocalPath+"data/textures");
pathList.push_back(LocalPath+"data/objects/");
pathList.push_back(LocalPath+"data/textures/");
osgDB::Registry::instance()->setDataFilePathList(pathList);
osg::ref_ptr<osg::MatrixTransform> _background_transform = new osg::MatrixTransform;

View file

@ -134,7 +134,7 @@ void SDScenery::LoadScene(tTrack *track)
}
std::string strPath = GetDataDir();
sprintf(buf, "tracks/%s/%s", SDTrack->category, SDTrack->internalname);
sprintf(buf, "tracks/%s/%/", SDTrack->category, SDTrack->internalname);
std::string ext = osgDB::getFileExtension(acname);
@ -145,7 +145,6 @@ void SDScenery::LoadScene(tTrack *track)
GfOut("Load 3D Model Scene ACC\n");
strPath+=buf;
_strTexturePath = strPath;
strPath+="/";
strPath+=acname;
LoadTrack(strPath);
@ -159,8 +158,8 @@ void SDScenery::LoadScene(tTrack *track)
strTPath += buf;
osgDB::FilePathList pathList = osgDB::Registry::instance()->getDataFilePathList();
pathList.push_back(strPath);
pathList.push_back(strTPath+"data/objects");
pathList.push_back(strTPath+"data/textures");
pathList.push_back(strTPath+"data/objects/");
pathList.push_back(strTPath+"data/textures/");
osgDB::Registry::instance()->setDataFilePathList(pathList);
osg::ref_ptr<osg::Node> pTrack = osgDB::readNodeFile(acname);
@ -191,8 +190,8 @@ void SDScenery::LoadScene(tTrack *track)
osgDB::FilePathList pathList = osgDB::Registry::instance()->getDataFilePathList();
pathList.push_back(strPath);
pathList.push_back(strTPath+"data/objects");
pathList.push_back(strTPath+"data/textures");
pathList.push_back(strTPath+"data/objects/");
pathList.push_back(strTPath+"data/textures/");
osgDB::Registry::instance()->setDataFilePathList(pathList);
osg::ref_ptr<osg::Node> pTrack = osgDB::readNodeFile( osgname );
_scenery->addChild(pTrack.get());