diff --git a/examples/osgcomputeshaders/osgcomputeshaders.cpp b/examples/osgcomputeshaders/osgcomputeshaders.cpp index 73265b522..fa75987bf 100644 --- a/examples/osgcomputeshaders/osgcomputeshaders.cpp +++ b/examples/osgcomputeshaders/osgcomputeshaders.cpp @@ -54,7 +54,7 @@ int main( int argc, char** argv ) tex2D->setSourceFormat( GL_RED ); tex2D->setSourceType( GL_FLOAT ); // So we can use 'image2D' in the compute shader - osg::ref_ptr imagbinding = new osg::BindImageTexture(0, tex2D, osg::BindImageTexture::WRITE_ONLY, GL_R32F); + osg::ref_ptr imagbinding = new osg::BindImageTexture(0, tex2D.get(), osg::BindImageTexture::WRITE_ONLY, GL_R32F); // The compute shader can't work with other kinds of shaders diff --git a/examples/osggpucull/osggpucull.cpp b/examples/osggpucull/osggpucull.cpp index ddf045f83..9001c8616 100644 --- a/examples/osggpucull/osggpucull.cpp +++ b/examples/osggpucull/osggpucull.cpp @@ -324,7 +324,7 @@ struct IndirectTarget indirectCommandTextureBuffer->setInternalFormat( GL_R32I ); indirectCommandTextureBuffer->setUnRefImageDataAfterApply(false); - indirectCommandImageBinding=new osg::BindImageTexture(index, indirectCommandTextureBuffer, osg::BindImageTexture::READ_WRITE, GL_R32I); + indirectCommandImageBinding=new osg::BindImageTexture(index, indirectCommandTextureBuffer.get(), osg::BindImageTexture::READ_WRITE, GL_R32I); // add proper primitivesets to geometryAggregators if( !useMultiDrawArraysIndirect ) // use glDrawArraysIndirect() @@ -367,7 +367,7 @@ struct IndirectTarget instanceTarget = new osg::TextureBuffer(instanceTargetImage); instanceTarget->setInternalFormat( internalFormat ); - instanceTargetimagebinding = new osg::BindImageTexture(OSGGPUCULL_MAXIMUM_INDIRECT_TARGET_NUMBER+index, instanceTarget, osg::BindImageTexture::READ_WRITE, internalFormat); + instanceTargetimagebinding = new osg::BindImageTexture(OSGGPUCULL_MAXIMUM_INDIRECT_TARGET_NUMBER+index, instanceTarget.get(), osg::BindImageTexture::READ_WRITE, internalFormat); } diff --git a/examples/osgsampler/osgSampler.cpp b/examples/osgsampler/osgSampler.cpp index 1ab2104fa..4c09d13c1 100644 --- a/examples/osgsampler/osgSampler.cpp +++ b/examples/osgsampler/osgSampler.cpp @@ -104,7 +104,7 @@ int main(int argc, char* argv[]) osg::ref_ptr loadedModel = osgDB::readRefNodeFiles(arguments); osg::ref_ptr geode ; - osg::ref_ptr sampler1, sampler2; + osg::ref_ptr sampler1, sampler2; if (loadedModel) { ///ensure loaded have Sampler @@ -121,7 +121,7 @@ int main(int argc, char* argv[]) } if(sampler1.valid()&&sampler2.valid()){ OSG_WARN<<"2samplers manipulator setted"<addUniform(new osg::Uniform("tex2",(int)1)); ss->setAttribute(program.get()); - viewer.addEventHandler(new SamplersKeyboardEventHandler(sampler1, sampler2)); + viewer.addEventHandler(new SamplersKeyboardEventHandler(sampler1.get(), sampler2.get())); } viewer.addEventHandler(new osgViewer::StatsHandler); diff --git a/src/osgViewer/CompositeViewer.cpp b/src/osgViewer/CompositeViewer.cpp index c035fec53..df4a9fcba 100644 --- a/src/osgViewer/CompositeViewer.cpp +++ b/src/osgViewer/CompositeViewer.cpp @@ -1119,7 +1119,7 @@ void CompositeViewer::eventTraversal() ++vitr) { OSG_INFO<<"Sending EVENT_FOR_ALL_VIEWS event "<get()<get()].push_back( event ); } break; }