Fixed build problems with the OSG_USE_REF_PTR_IMPLICIT_OUTPUT_CONVERSION off

This commit is contained in:
Robert Osfield
2013-10-24 17:43:02 +00:00
parent ded27b4971
commit 1861e025e9
3 changed files with 16 additions and 16 deletions

View File

@@ -66,20 +66,20 @@ void ScaleAxisDragger::setupDefaultGeometry()
{
_lineWidth = new osg::LineWidth();
_lineWidth->setWidth(_axisLineWidth);
_lineGeode->getOrCreateStateSet()->setAttributeAndModes(_lineWidth, osg::StateAttribute::ON);
_lineGeode->getOrCreateStateSet()->setAttributeAndModes(_lineWidth.get(), osg::StateAttribute::ON);
_lineGeode->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF);
}
// Add line to all the individual 1D draggers.
_xDragger->addChild(_lineGeode);
_yDragger->addChild(_lineGeode);
_zDragger->addChild(_lineGeode);
_xDragger->addChild(_lineGeode.get());
_yDragger->addChild(_lineGeode.get());
_zDragger->addChild(_lineGeode.get());
osg::Geode* geode = new osg::Geode;
// Create a box.
_box = new osg::Box(osg::Vec3(1.0f,0.0f,0.0f), _boxSize);
geode->addDrawable(new osg::ShapeDrawable(_box));
geode->addDrawable(new osg::ShapeDrawable(_box.get()));
// This ensures correct lighting for scaled draggers.
#if !defined(OSG_GLES2_AVAILABLE)

View File

@@ -123,7 +123,7 @@ void TrackballDragger::setupDefaultGeometry()
_cylinder = new osg::Cylinder;
_cylinder->setHeight(_pickCylinderHeight);
osg::ShapeDrawable* cylinderDrawable = new osg::ShapeDrawable(_cylinder, hints);
osg::ShapeDrawable* cylinderDrawable = new osg::ShapeDrawable(_cylinder.get(), hints);
_geode->addDrawable(cylinderDrawable);
setDrawableToAlwaysCull(*cylinderDrawable);
_geode->addDrawable(createCircleGeometry(1.0f, 100));
@@ -135,7 +135,7 @@ void TrackballDragger::setupDefaultGeometry()
polymode->setMode(osg::PolygonMode::FRONT_AND_BACK,osg::PolygonMode::LINE);
_geode->getOrCreateStateSet()->setAttributeAndModes(polymode,osg::StateAttribute::OVERRIDE|osg::StateAttribute::ON);
_lineWidth = new osg::LineWidth(_axisLineWidth);
_geode->getOrCreateStateSet()->setAttributeAndModes(_lineWidth, osg::StateAttribute::ON);
_geode->getOrCreateStateSet()->setAttributeAndModes(_lineWidth.get(), osg::StateAttribute::ON);
#if !defined(OSG_GLES2_AVAILABLE)
_geode->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
@@ -144,9 +144,9 @@ void TrackballDragger::setupDefaultGeometry()
}
// Add line to all the individual 1D draggers.
_xDragger->addChild(_geode);
_yDragger->addChild(_geode);
_zDragger->addChild(_geode);
_xDragger->addChild(_geode.get());
_yDragger->addChild(_geode.get());
_zDragger->addChild(_geode.get());
// Rotate X-axis dragger appropriately.

View File

@@ -67,21 +67,21 @@ void TranslateAxisDragger::setupDefaultGeometry()
{
_lineWidth = new osg::LineWidth();
_lineWidth->setWidth(_axisLineWidth);
_lineGeode->getOrCreateStateSet()->setAttributeAndModes(_lineWidth, osg::StateAttribute::ON);
_lineGeode->getOrCreateStateSet()->setAttributeAndModes(_lineWidth.get(), osg::StateAttribute::ON);
_lineGeode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
}
// Add line to all the individual 1D draggers.
_xDragger->addChild(_lineGeode);
_yDragger->addChild(_lineGeode);
_zDragger->addChild(_lineGeode);
_xDragger->addChild(_lineGeode.get());
_yDragger->addChild(_lineGeode.get());
_zDragger->addChild(_lineGeode.get());
osg::Geode* geode = new osg::Geode;
// Create a cone.
{
_cone = new osg::Cone (osg::Vec3(0.0f, 0.0f, 1.0f), _coneHeight * 0.25f, _coneHeight);
osg::ShapeDrawable* coneDrawable = new osg::ShapeDrawable(_cone);
osg::ShapeDrawable* coneDrawable = new osg::ShapeDrawable(_cone.get());
// coneDrawable->setColor(osg::Vec4(0.0f,0.0f,1.0f,1.0f));
geode->addDrawable(coneDrawable);
@@ -94,7 +94,7 @@ void TranslateAxisDragger::setupDefaultGeometry()
// Create an invisible cylinder for picking the line.
{
_cylinder = new osg::Cylinder (osg::Vec3(0.0f,0.0f,0.5f), _pickCylinderRadius, 1.0f);
osg::Drawable* geometry = new osg::ShapeDrawable(_cylinder);
osg::Drawable* geometry = new osg::ShapeDrawable(_cylinder.get());
setDrawableToAlwaysCull(*geometry);
geode->addDrawable(geometry);
}