From 59caf4a48e80a9dc4895b05033d72380e29f9215 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 1 Oct 2013 19:34:21 +0000 Subject: [PATCH] Fixed build with no automatic ref_ptr<> conversion --- src/osgPresentation/Cursor.cpp | 6 +++--- src/osgPresentation/Image.cpp | 2 +- src/osgPresentation/Movie.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osgPresentation/Cursor.cpp b/src/osgPresentation/Cursor.cpp index 07b8fc36a..f73545a69 100644 --- a/src/osgPresentation/Cursor.cpp +++ b/src/osgPresentation/Cursor.cpp @@ -78,7 +78,7 @@ void Cursor::initializeCursor() osg::ref_ptr image = osgDB::readImageFile(osgDB::findDataFile(_filename)); - osg::ref_ptr texture = (image.valid()) ? new osg::Texture2D(image) : 0; + osg::ref_ptr texture = (image.valid()) ? new osg::Texture2D(image.get()) : 0; // full cursor { @@ -90,7 +90,7 @@ void Cursor::initializeCursor() stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF); stateset->setRenderBinDetails(1001, "DepthSortedBin"); - if (texture.valid()) stateset->setTextureAttributeAndModes(0, texture,osg::StateAttribute::ON|osg::StateAttribute::PROTECTED); + if (texture.valid()) stateset->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON|osg::StateAttribute::PROTECTED); } { @@ -107,7 +107,7 @@ void Cursor::initializeCursor() stateset->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF); stateset->setRenderBinDetails(1000, "DepthSortedBin"); - if (texture.valid()) stateset->setTextureAttributeAndModes(0, texture,osg::StateAttribute::ON|osg::StateAttribute::PROTECTED); + if (texture.valid()) stateset->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON|osg::StateAttribute::PROTECTED); } diff --git a/src/osgPresentation/Image.cpp b/src/osgPresentation/Image.cpp index fcc2001bd..03c1bbbc8 100644 --- a/src/osgPresentation/Image.cpp +++ b/src/osgPresentation/Image.cpp @@ -45,7 +45,7 @@ bool Image::load() texture->setResizeNonPowerOfTwoHint(false); texture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR); texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR); - geometry->getOrCreateStateSet()->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); + geometry->getOrCreateStateSet()->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON); osg::ref_ptr geode = new osg::Geode; geode->addDrawable(geometry.get()); diff --git a/src/osgPresentation/Movie.cpp b/src/osgPresentation/Movie.cpp index c5094c85c..f7685fbba 100644 --- a/src/osgPresentation/Movie.cpp +++ b/src/osgPresentation/Movie.cpp @@ -49,7 +49,7 @@ bool Movie::load() texture->setResizeNonPowerOfTwoHint(false); texture->setFilter(osg::Texture::MIN_FILTER, osg::Texture::LINEAR); texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR); - geometry->getOrCreateStateSet()->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); + geometry->getOrCreateStateSet()->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON); osg::ref_ptr geode = new osg::Geode; geode->addDrawable(geometry.get());