Merge branch 'jmt/ref_ptr-conv' into next
This commit is contained in:
commit
9b0ba10b0b
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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<EffectGeode*>(&geode);
|
||||
if (eg) {
|
||||
eg->setEffect(effect);
|
||||
|
@ -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]);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user