Changed build OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION to ON and then fixed all the resulting build errors.
This commit is contained in:
@@ -26,7 +26,7 @@ osgAnimation::Action::Callback* osgAnimation::Action::getFrameCallback(unsigned
|
||||
{
|
||||
if (_framesCallback.find(frame) != _framesCallback.end())
|
||||
{
|
||||
return _framesCallback[frame];
|
||||
return _framesCallback[frame].get();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void osgAnimation::ClearActionVisitor::apply(Timeline& tm)
|
||||
_remove.clear();
|
||||
tm.traverse(*this);
|
||||
for (int i = 0; i < (int)_remove.size(); i++)
|
||||
tm.removeAction(_remove[i]);
|
||||
tm.removeAction(_remove[i].get());
|
||||
}
|
||||
void osgAnimation::ClearActionVisitor::apply(Action& action)
|
||||
{
|
||||
|
||||
@@ -377,7 +377,7 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
||||
timeLabelValue->setPosition(pos + osg::Vec3(startBlocks, 0,0));
|
||||
timeLabelValue->setText("0.0");
|
||||
|
||||
timeLabelValue->setDrawCallback(new ValueTextDrawCallback(stats,"Timeline"));
|
||||
timeLabelValue->setDrawCallback(new ValueTextDrawCallback(stats.get(),"Timeline"));
|
||||
}
|
||||
}
|
||||
{
|
||||
@@ -389,11 +389,11 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
||||
_statsWidth - 2 * backgroundMargin,
|
||||
(3 + 4.5 * 1) * characterSize + 2 * backgroundMargin,
|
||||
backgroundColor);
|
||||
geode->addDrawable(_background);
|
||||
geode->addDrawable(_background.get());
|
||||
_group->addChild(geode);
|
||||
}
|
||||
|
||||
return _group;
|
||||
return _group.get();
|
||||
}
|
||||
|
||||
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
|
||||
@@ -435,7 +435,7 @@ struct ValueTextDrawCallback : public virtual osg::Drawable::DrawCallback
|
||||
if (_actions.find(name) == _actions.end()) {
|
||||
osg::Vec4 color(getRandomValueinRange(255)/255.0, getRandomValueinRange(255)/255.0, getRandomValueinRange(255)/255.0, 1.0);
|
||||
_actions[name].init(visitor->getStats(), name, pos, width, height, color);
|
||||
_group->addChild(_actions[name]._group);
|
||||
_group->addChild(_actions[name]._group.get());
|
||||
//_actions[name].touch();
|
||||
} else {
|
||||
_actions[name].setPosition(pos);
|
||||
@@ -624,7 +624,7 @@ void StatsHandler::setUpHUDCamera(osgViewer::ViewerBase* viewer)
|
||||
_camera->setAllowEventFocus(false);
|
||||
_camera->setCullMask(0x1);
|
||||
osgViewer::Viewer* v = dynamic_cast<osgViewer::Viewer*>(viewer);
|
||||
v->getSceneData()->asGroup()->addChild(_camera);
|
||||
v->getSceneData()->asGroup()->addChild(_camera.get());
|
||||
_initialized = true;
|
||||
}
|
||||
|
||||
@@ -647,11 +647,11 @@ void StatsHandler::setUpScene(osgViewer::Viewer* viewer)
|
||||
|
||||
_group = new osg::Group;
|
||||
_camera->addChild(_switch.get());
|
||||
_switch->addChild(_group);
|
||||
_switch->addChild(_group.get());
|
||||
|
||||
for (int i = 0; i < (int)finder._timelines.size(); i++) {
|
||||
StatsTimeline* s = new StatsTimeline;
|
||||
osg::MatrixTransform* m = s->createStatsForTimeline(finder._timelines[i]);
|
||||
osg::MatrixTransform* m = s->createStatsForTimeline(finder._timelines[i].get());
|
||||
m->setUpdateCallback(s);
|
||||
_group->addChild(m);
|
||||
}
|
||||
@@ -671,7 +671,7 @@ void StatAction::init(osg::Stats* stats, const std::string& name, const osg::Vec
|
||||
|
||||
_label = new osg::Geode;
|
||||
_textLabel = new osgText::Text;
|
||||
_label->addDrawable(_textLabel);
|
||||
_label->addDrawable(_textLabel.get());
|
||||
_textLabel->setDataVariance(osg::Object::DYNAMIC);
|
||||
_textLabel->setColor(color);
|
||||
_textLabel->setFont(font);
|
||||
@@ -684,8 +684,8 @@ void StatAction::init(osg::Stats* stats, const std::string& name, const osg::Vec
|
||||
graph->addStatGraph(stats, stats, color, 1.0, name);
|
||||
_graph = graph;
|
||||
|
||||
_group->addChild(_label);
|
||||
_group->addChild(_graph);
|
||||
_group->addChild(_label.get());
|
||||
_group->addChild(_graph.get());
|
||||
}
|
||||
void StatAction::setAlpha(float v)
|
||||
{
|
||||
|
||||
@@ -71,9 +71,9 @@ void osgAnimation::Timeline::traverse(ActionVisitor& visitor)
|
||||
|
||||
|
||||
void osgAnimation::Timeline::setStats(osg::Stats* stats) { _stats = stats;}
|
||||
osg::Stats* osgAnimation::Timeline::getStats() { return _stats;}
|
||||
osg::Stats* osgAnimation::Timeline::getStats() { return _stats.get();}
|
||||
void osgAnimation::Timeline::collectStats(bool state) { _collectStats = state;}
|
||||
osgAnimation::StatsActionVisitor* osgAnimation::Timeline::getStatsVisitor() { return _statsVisitor; }
|
||||
osgAnimation::StatsActionVisitor* osgAnimation::Timeline::getStatsVisitor() { return _statsVisitor.get(); }
|
||||
|
||||
void osgAnimation::Timeline::clearActions()
|
||||
{
|
||||
@@ -98,7 +98,7 @@ void osgAnimation::Timeline::update(double simulationTime)
|
||||
{
|
||||
if (!_statsVisitor)
|
||||
_statsVisitor = new osgAnimation::StatsActionVisitor();
|
||||
_statsVisitor->setStats(_stats);
|
||||
_statsVisitor->setStats(_stats.get());
|
||||
_statsVisitor->setFrame(_currentFrame);
|
||||
_statsVisitor->reset();
|
||||
accept(*_statsVisitor);
|
||||
@@ -123,7 +123,7 @@ void osgAnimation::Timeline::update(double simulationTime)
|
||||
{
|
||||
if (!_statsVisitor)
|
||||
_statsVisitor = new StatsActionVisitor;
|
||||
_statsVisitor->setStats(_stats);
|
||||
_statsVisitor->setStats(_stats.get());
|
||||
_statsVisitor->setFrame(_currentFrame);
|
||||
_statsVisitor->reset();
|
||||
accept(*_statsVisitor);
|
||||
|
||||
Reference in New Issue
Block a user