diff --git a/examples/osgdrawinstanced/osgdrawinstanced.cpp b/examples/osgdrawinstanced/osgdrawinstanced.cpp index f031d087b..a0a223374 100644 --- a/examples/osgdrawinstanced/osgdrawinstanced.cpp +++ b/examples/osgdrawinstanced/osgdrawinstanced.cpp @@ -103,7 +103,7 @@ createStateSet() osg::notify( osg::ALWAYS ) << "Can't open image file osg128.png" << std::endl; return( NULL ); } - osg::Texture2D* texLogo = new osg::Texture2D( iLogo ); + osg::Texture2D* texLogo = new osg::Texture2D( iLogo.get() ); texLogo->setFilter( osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR ); texLogo->setFilter( osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR ); @@ -136,7 +136,7 @@ int main( int argc, char **argv ) geom->setInitialBound( bb ); // Add geometric data and the PrimitiveSet. Specify numInstances as 32*32 or 1024. createDAIGeometry( *geom, 32*32 ); - geode->addDrawable( geom ); + geode->addDrawable( geom.get() ); // Create a StateSet to render the instanced Geometry. osg::ref_ptr< osg::StateSet > ss = createStateSet(); diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index d24fcfeb9..9a2f29103 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -1249,9 +1249,9 @@ int main( int argc, char **argv ) osg::ref_ptr volume = new osgVolume::Volume; osg::ref_ptr tile = new osgVolume::VolumeTile; - volume->addChild(tile); + volume->addChild(tile.get()); - osg::ref_ptr layer = new osgVolume::ImageLayer(image_3d); + osg::ref_ptr layer = new osgVolume::ImageLayer(image_3d.get()); if (matrix) {