tpath.append(tname);
string fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
if (fullTexPath.empty()) {
- tpath = SGPath("Textures");
+ tpath.set("Textures");
tpath.append(tname);
fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
if (fullTexPath.empty()) {
tpath.append(tname);
string fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
if (fullTexPath.empty()) {
- tpath = SGPath("Textures");
+ tpath.set("Textures");
tpath.append(tname);
fullTexPath = SGModelLib::findDataFile(tpath.str(), options);
if (fullTexPath.empty() ) {
string fullMaskPath = SGModelLib::findDataFile(ompath.str(), options);
if (fullMaskPath.empty()) {
- ompath = SGPath("Textures");
+ ompath.set("Textures");
ompath.append(omname);
fullMaskPath = SGModelLib::findDataFile(ompath.str(), options);
}
tree_texture = SGModelLib::findDataFile(treePath.str(), options);
if (tree_texture.empty()) {
- treePath = SGPath("Textures");
+ treePath.set("Textures");
treePath.append(treeTexPath);
tree_texture = SGModelLib::findDataFile(treePath.str(), options);
}
// Get or create geometry.
osg::ref_ptr<osg::Geometry> geom;
- osg::Vec3Array* v = new osg::Vec3Array;
- osg::Vec2Array* t = new osg::Vec2Array;
- osg::Vec4Array* c = new osg::Vec4Array; // single value
- osg::Vec3Array* n = new osg::Vec3Array;
+ osg::Vec3Array* v;
+ osg::Vec2Array* t;
+ osg::Vec4Array* c;
+ osg::Vec3Array* n;
if (geode->getNumDrawables() == 0) {
geom = new osg::Geometry;