From 9f9c4cf32c2cf774c7febd7fe2b4e65a7d205294 Mon Sep 17 00:00:00 2001 From: jmt Date: Mon, 3 May 2010 08:51:27 +0000 Subject: [PATCH] Compile even if OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION is not set. --- simgear/scene/material/Technique.cxx | 2 +- simgear/scene/model/ModelRegistry.hxx | 2 +- simgear/scene/model/model.cxx | 2 +- simgear/scene/model/placement.cxx | 6 +++--- simgear/scene/tgdb/TileEntry.cxx | 4 ++-- simgear/scene/tgdb/pt_lights.cxx | 2 +- simgear/scene/util/SplicingVisitor.cxx | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/simgear/scene/material/Technique.cxx b/simgear/scene/material/Technique.cxx index b8093f35..aeab9cf3 100644 --- a/simgear/scene/material/Technique.cxx +++ b/simgear/scene/material/Technique.cxx @@ -59,7 +59,7 @@ Technique::Technique(bool alwaysValid) Technique::Technique(const Technique& rhs, const osg::CopyOp& copyop) : _contextMap(rhs._contextMap), _alwaysValid(rhs._alwaysValid), - _shadowingStateSet(copyop(rhs._shadowingStateSet)), + _shadowingStateSet(copyop(rhs._shadowingStateSet.get())), _validExpression(rhs._validExpression), _contextIdLocation(rhs._contextIdLocation) { diff --git a/simgear/scene/model/ModelRegistry.hxx b/simgear/scene/model/ModelRegistry.hxx index 94931bca..5e303905 100644 --- a/simgear/scene/model/ModelRegistry.hxx +++ b/simgear/scene/model/ModelRegistry.hxx @@ -98,7 +98,7 @@ public: _bvhPolicy.buildBVH(fileName, optimizedNode.get()); _cachePolicy.addToCache(fileName, optimizedNode.get()); } - return ReaderWriter::ReadResult(optimizedNode); + return ReaderWriter::ReadResult(optimizedNode.get()); } protected: static osgDB::ReaderWriter::ReadResult diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index 41fe9a30..9d4d4172 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -264,7 +264,7 @@ void MakeEffectVisitor::apply(osg::Geode& geode) makeParametersFromStateSet(ssRoot, ss); SGPropertyNode_ptr effectRoot = new SGPropertyNode; effect::mergePropertyTrees(effectRoot, ssRoot, _currentEffectParent); - Effect* effect = makeEffect(effectRoot, true, _options); + Effect* effect = makeEffect(effectRoot, true, _options.get()); EffectGeode* eg = dynamic_cast(&geode); if (eg) { eg->setEffect(effect); diff --git a/simgear/scene/model/placement.cxx b/simgear/scene/model/placement.cxx index cd38181e..85284492 100644 --- a/simgear/scene/model/placement.cxx +++ b/simgear/scene/model/placement.cxx @@ -138,7 +138,7 @@ void SGModelPlacement::setReferenceTime(const double& referenceTime) { SGSceneUserData* userData; - userData = SGSceneUserData::getOrCreateSceneUserData(_transform); + userData = SGSceneUserData::getOrCreateSceneUserData(_transform.get()); SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity(); vel->referenceTime = referenceTime; } @@ -147,7 +147,7 @@ void SGModelPlacement::setBodyLinearVelocity(const SGVec3d& linear) { SGSceneUserData* userData; - userData = SGSceneUserData::getOrCreateSceneUserData(_transform); + userData = SGSceneUserData::getOrCreateSceneUserData(_transform.get()); SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity(); vel->linear = SGVec3d(-linear[0], linear[1], -linear[2]); } @@ -156,7 +156,7 @@ void SGModelPlacement::setBodyAngularVelocity(const SGVec3d& angular) { SGSceneUserData* userData; - userData = SGSceneUserData::getOrCreateSceneUserData(_transform); + userData = SGSceneUserData::getOrCreateSceneUserData(_transform.get()); SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity(); vel->angular = SGVec3d(-angular[0], angular[1], -angular[2]); } diff --git a/simgear/scene/tgdb/TileEntry.cxx b/simgear/scene/tgdb/TileEntry.cxx index 92782962..dae9ed26 100644 --- a/simgear/scene/tgdb/TileEntry.cxx +++ b/simgear/scene/tgdb/TileEntry.cxx @@ -333,7 +333,7 @@ TileEntry::loadTileByFileName(const string& fileName, if (found_tile_base) { // load tile if found ... opt->setCalcLights(true); - obj_load( object_base.str(), new_tile, true, opt); + obj_load( object_base.str(), new_tile, true, opt.get()); } else { // ... or generate an ocean tile on the fly @@ -354,7 +354,7 @@ TileEntry::loadTileByFileName(const string& fileName, SGPath custom_path = obj->path; custom_path.append( obj->name ); opt->setCalcLights(true); - obj_load( custom_path.str(), new_tile, false, opt); + obj_load( custom_path.str(), new_tile, false, opt.get()); } else if (obj->type == OBJECT_SHARED || obj->type == OBJECT_STATIC) { // object loading is deferred to main render thread, diff --git a/simgear/scene/tgdb/pt_lights.cxx b/simgear/scene/tgdb/pt_lights.cxx index bfe3c5ae..5b7cf375 100644 --- a/simgear/scene/tgdb/pt_lights.cxx +++ b/simgear/scene/tgdb/pt_lights.cxx @@ -194,7 +194,7 @@ Effect* getLightEffect(float size, const Vec3& attenuation, point->setDistanceAttenuation(attenuation); attenuationPass->setAttributeAndModes(point); Pass *spritePass = clone(basicPass, CopyOp::SHALLOW_COPY); - spritePass->setTextureAttributeAndModes(0, pointSprite, + spritePass->setTextureAttributeAndModes(0, pointSprite.get(), osg::StateAttribute::ON); Texture2D* texture = gen_standard_light_sprite(); spritePass->setTextureAttribute(0, texture); diff --git a/simgear/scene/util/SplicingVisitor.cxx b/simgear/scene/util/SplicingVisitor.cxx index 66558377..1f285949 100644 --- a/simgear/scene/util/SplicingVisitor.cxx +++ b/simgear/scene/util/SplicingVisitor.cxx @@ -52,8 +52,8 @@ Group* SplicingVisitor::pushResultNode(Group* node, Group* newNode, result->addChild(itr->get()); } _childStack.back().push_back(result); - recordNewNode(node, result); - return result; + recordNewNode(node, result.get()); + return result.get(); } Node* SplicingVisitor::pushResultNode(Node* node, Node* newNode) -- 2.39.5