diff --git a/examples/osgSSBO/osgSSBO.cpp b/examples/osgSSBO/osgSSBO.cpp index 9db8161dc..c058664be 100644 --- a/examples/osgSSBO/osgSSBO.cpp +++ b/examples/osgSSBO/osgSSBO.cpp @@ -773,7 +773,7 @@ void ComputeNode::initComputingSetup() _dataArray->setBufferObject(_ssbo.get()); - _ssbb = new osg::ShaderStorageBufferBinding(0, _dataArray, 0, blockSize); + _ssbb = new osg::ShaderStorageBufferBinding(0, _dataArray.get(), 0, blockSize); statesetComputation->setAttributeAndModes(_ssbb.get(), osg::StateAttribute::ON); diff --git a/examples/osggpucull/osggpucull.cpp b/examples/osggpucull/osggpucull.cpp index 78650cc16..da9ab5c8f 100644 --- a/examples/osggpucull/osggpucull.cpp +++ b/examples/osggpucull/osggpucull.cpp @@ -188,7 +188,7 @@ struct IndirectTarget } void endRegister(unsigned int index, unsigned int rowsPerInstance, GLenum pixelFormat, GLenum type, GLint internalFormat, bool useMultiDrawArraysIndirect ) { - indirectCommandTextureBuffer = new osg::TextureBuffer(indirectCommands); + indirectCommandTextureBuffer = new osg::TextureBuffer(indirectCommands.get()); indirectCommandTextureBuffer->setInternalFormat( GL_R32I ); indirectCommandTextureBuffer->bindToImageUnit(index, osg::Texture::READ_WRITE); indirectCommandTextureBuffer->setUnRefImageDataAfterApply(false); @@ -201,7 +201,7 @@ struct IndirectTarget for(unsigned int j=0;jsize(); ++j){ osg::DrawArraysIndirect *ipr=new osg::DrawArraysIndirect( GL_TRIANGLES, j ); - ipr->setIndirectCommandArray( indirectCommands); + ipr->setIndirectCommandArray( indirectCommands.get()); newPrimitiveSets.push_back(ipr); } @@ -215,7 +215,7 @@ struct IndirectTarget else // use glMultiDrawArraysIndirect() { osg::MultiDrawArraysIndirect *ipr=new osg::MultiDrawArraysIndirect( GL_TRIANGLES ); - ipr->setIndirectCommandArray( indirectCommands ); + ipr->setIndirectCommandArray( indirectCommands.get() ); geometryAggregator->getAggregatedGeometry()->removePrimitiveSet(0,geometryAggregator->getAggregatedGeometry()->getNumPrimitiveSets() ); geometryAggregator->getAggregatedGeometry()->addPrimitiveSet( ipr ); } diff --git a/examples/osgsimpleMDI/osgsimpleMDI.cpp b/examples/osgsimpleMDI/osgsimpleMDI.cpp index bd94c4785..48b56074c 100644 --- a/examples/osgsimpleMDI/osgsimpleMDI.cpp +++ b/examples/osgsimpleMDI/osgsimpleMDI.cpp @@ -136,7 +136,7 @@ int main( int argc, char**argv ) for(int i=0; isetElementBufferObject(ebo); + dre->setElementBufferObject(ebo.get()); geom->addPrimitiveSet(dre); for(int z=0; z<4; z++)myIndicesUI[z]+=4; } diff --git a/include/osg/PrimitiveSetIndirect b/include/osg/PrimitiveSetIndirect index bf7b1a5ce..8ede4471c 100644 --- a/include/osg/PrimitiveSetIndirect +++ b/include/osg/PrimitiveSetIndirect @@ -168,8 +168,8 @@ public: } /// get command array of this indirect primitive set - inline IndirectCommandDrawElements* getIndirectCommandArray() { return _indirectCommandArray; } - inline const IndirectCommandDrawElements* getIndirectCommandArray() const { return _indirectCommandArray; } + inline IndirectCommandDrawElements* getIndirectCommandArray() { return _indirectCommandArray.get(); } + inline const IndirectCommandDrawElements* getIndirectCommandArray() const { return _indirectCommandArray.get(); } ///Further methods are for advanced DI when you plan to use your own IndirectCommandElement (stride) ///or if you want to draw a particular command index of the IndirectCommandElement(FirstCommandToDraw) @@ -616,8 +616,8 @@ public: if(!dynamic_cast(_indirectCommandArray->getBufferObject())) _indirectCommandArray->setBufferObject(new DrawIndirectBufferObject()); } - inline const IndirectCommandDrawArrays* getIndirectCommandArray() const { return _indirectCommandArray; } - inline IndirectCommandDrawArrays* getIndirectCommandArray() { return _indirectCommandArray; } + inline const IndirectCommandDrawArrays* getIndirectCommandArray() const { return _indirectCommandArray.get(); } + inline IndirectCommandDrawArrays* getIndirectCommandArray() { return _indirectCommandArray.get(); } protected: diff --git a/src/osgPlugins/ply/vertexData.cpp b/src/osgPlugins/ply/vertexData.cpp index 00ce08758..faeca766b 100644 --- a/src/osgPlugins/ply/vertexData.cpp +++ b/src/osgPlugins/ply/vertexData.cpp @@ -546,7 +546,7 @@ osg::Node* VertexData::readPlyFile( const char* filename, const bool ignoreColor } else if (_texcoord.valid()) { - geom->setTexCoordArray(0, _texcoord); + geom->setTexCoordArray(0, _texcoord.get()); } // If the model has normals, add them to the geometry