Fixed build with no automatic ref_ptr<> conversion

This commit is contained in:
Robert Osfield
2013-10-01 19:34:21 +00:00
parent fcc14e467a
commit 59caf4a48e
3 changed files with 5 additions and 5 deletions

View File

@@ -78,7 +78,7 @@ void Cursor::initializeCursor()
osg::ref_ptr<osg::Image> image = osgDB::readImageFile(osgDB::findDataFile(_filename));
osg::ref_ptr<osg::Texture2D> texture = (image.valid()) ? new osg::Texture2D(image) : 0;
osg::ref_ptr<osg::Texture2D> 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);
}

View File

@@ -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<osg::Geode> geode = new osg::Geode;
geode->addDrawable(geometry.get());

View File

@@ -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<osg::Geode> geode = new osg::Geode;
geode->addDrawable(geometry.get());