Merge branch 'jmt/ref_ptr-conv' into next

This commit is contained in:
Tim Moore 2010-05-05 10:42:41 +02:00
commit 9b0ba10b0b
7 changed files with 11 additions and 11 deletions

View File

@ -59,7 +59,7 @@ Technique::Technique(bool alwaysValid)
Technique::Technique(const Technique& rhs, const osg::CopyOp& copyop) : Technique::Technique(const Technique& rhs, const osg::CopyOp& copyop) :
_contextMap(rhs._contextMap), _alwaysValid(rhs._alwaysValid), _contextMap(rhs._contextMap), _alwaysValid(rhs._alwaysValid),
_shadowingStateSet(copyop(rhs._shadowingStateSet)), _shadowingStateSet(copyop(rhs._shadowingStateSet.get())),
_validExpression(rhs._validExpression), _validExpression(rhs._validExpression),
_contextIdLocation(rhs._contextIdLocation) _contextIdLocation(rhs._contextIdLocation)
{ {

View File

@ -98,7 +98,7 @@ public:
_bvhPolicy.buildBVH(fileName, optimizedNode.get()); _bvhPolicy.buildBVH(fileName, optimizedNode.get());
_cachePolicy.addToCache(fileName, optimizedNode.get()); _cachePolicy.addToCache(fileName, optimizedNode.get());
} }
return ReaderWriter::ReadResult(optimizedNode); return ReaderWriter::ReadResult(optimizedNode.get());
} }
protected: protected:
static osgDB::ReaderWriter::ReadResult static osgDB::ReaderWriter::ReadResult

View File

@ -264,7 +264,7 @@ void MakeEffectVisitor::apply(osg::Geode& geode)
makeParametersFromStateSet(ssRoot, ss); makeParametersFromStateSet(ssRoot, ss);
SGPropertyNode_ptr effectRoot = new SGPropertyNode; SGPropertyNode_ptr effectRoot = new SGPropertyNode;
effect::mergePropertyTrees(effectRoot, ssRoot, _currentEffectParent); effect::mergePropertyTrees(effectRoot, ssRoot, _currentEffectParent);
Effect* effect = makeEffect(effectRoot, true, _options); Effect* effect = makeEffect(effectRoot, true, _options.get());
EffectGeode* eg = dynamic_cast<EffectGeode*>(&geode); EffectGeode* eg = dynamic_cast<EffectGeode*>(&geode);
if (eg) { if (eg) {
eg->setEffect(effect); eg->setEffect(effect);

View File

@ -138,7 +138,7 @@ void
SGModelPlacement::setReferenceTime(const double& referenceTime) SGModelPlacement::setReferenceTime(const double& referenceTime)
{ {
SGSceneUserData* userData; SGSceneUserData* userData;
userData = SGSceneUserData::getOrCreateSceneUserData(_transform); userData = SGSceneUserData::getOrCreateSceneUserData(_transform.get());
SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity(); SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity();
vel->referenceTime = referenceTime; vel->referenceTime = referenceTime;
} }
@ -147,7 +147,7 @@ void
SGModelPlacement::setBodyLinearVelocity(const SGVec3d& linear) SGModelPlacement::setBodyLinearVelocity(const SGVec3d& linear)
{ {
SGSceneUserData* userData; SGSceneUserData* userData;
userData = SGSceneUserData::getOrCreateSceneUserData(_transform); userData = SGSceneUserData::getOrCreateSceneUserData(_transform.get());
SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity(); SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity();
vel->linear = SGVec3d(-linear[0], linear[1], -linear[2]); vel->linear = SGVec3d(-linear[0], linear[1], -linear[2]);
} }
@ -156,7 +156,7 @@ void
SGModelPlacement::setBodyAngularVelocity(const SGVec3d& angular) SGModelPlacement::setBodyAngularVelocity(const SGVec3d& angular)
{ {
SGSceneUserData* userData; SGSceneUserData* userData;
userData = SGSceneUserData::getOrCreateSceneUserData(_transform); userData = SGSceneUserData::getOrCreateSceneUserData(_transform.get());
SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity(); SGSceneUserData::Velocity* vel = userData->getOrCreateVelocity();
vel->angular = SGVec3d(-angular[0], angular[1], -angular[2]); vel->angular = SGVec3d(-angular[0], angular[1], -angular[2]);
} }

View File

@ -333,7 +333,7 @@ TileEntry::loadTileByFileName(const string& fileName,
if (found_tile_base) { if (found_tile_base) {
// load tile if found ... // load tile if found ...
opt->setCalcLights(true); opt->setCalcLights(true);
obj_load( object_base.str(), new_tile, true, opt); obj_load( object_base.str(), new_tile, true, opt.get());
} else { } else {
// ... or generate an ocean tile on the fly // ... or generate an ocean tile on the fly
@ -354,7 +354,7 @@ TileEntry::loadTileByFileName(const string& fileName,
SGPath custom_path = obj->path; SGPath custom_path = obj->path;
custom_path.append( obj->name ); custom_path.append( obj->name );
opt->setCalcLights(true); 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) { } else if (obj->type == OBJECT_SHARED || obj->type == OBJECT_STATIC) {
// object loading is deferred to main render thread, // object loading is deferred to main render thread,

View File

@ -194,7 +194,7 @@ Effect* getLightEffect(float size, const Vec3& attenuation,
point->setDistanceAttenuation(attenuation); point->setDistanceAttenuation(attenuation);
attenuationPass->setAttributeAndModes(point); attenuationPass->setAttributeAndModes(point);
Pass *spritePass = clone(basicPass, CopyOp::SHALLOW_COPY); Pass *spritePass = clone(basicPass, CopyOp::SHALLOW_COPY);
spritePass->setTextureAttributeAndModes(0, pointSprite, spritePass->setTextureAttributeAndModes(0, pointSprite.get(),
osg::StateAttribute::ON); osg::StateAttribute::ON);
Texture2D* texture = gen_standard_light_sprite(); Texture2D* texture = gen_standard_light_sprite();
spritePass->setTextureAttribute(0, texture); spritePass->setTextureAttribute(0, texture);

View File

@ -52,8 +52,8 @@ Group* SplicingVisitor::pushResultNode(Group* node, Group* newNode,
result->addChild(itr->get()); result->addChild(itr->get());
} }
_childStack.back().push_back(result); _childStack.back().push_back(result);
recordNewNode(node, result); recordNewNode(node, result.get());
return result; return result.get();
} }
Node* SplicingVisitor::pushResultNode(Node* node, Node* newNode) Node* SplicingVisitor::pushResultNode(Node* node, Node* newNode)