Build fixes with ref_ptr<> autoconversion disabled
This commit is contained in:
parent
3c6f569360
commit
068f47d91f
@ -773,7 +773,7 @@ void ComputeNode::initComputingSetup()
|
|||||||
_dataArray->setBufferObject(_ssbo.get());
|
_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);
|
statesetComputation->setAttributeAndModes(_ssbb.get(), osg::StateAttribute::ON);
|
||||||
|
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ struct IndirectTarget
|
|||||||
}
|
}
|
||||||
void endRegister(unsigned int index, unsigned int rowsPerInstance, GLenum pixelFormat, GLenum type, GLint internalFormat, bool useMultiDrawArraysIndirect )
|
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->setInternalFormat( GL_R32I );
|
||||||
indirectCommandTextureBuffer->bindToImageUnit(index, osg::Texture::READ_WRITE);
|
indirectCommandTextureBuffer->bindToImageUnit(index, osg::Texture::READ_WRITE);
|
||||||
indirectCommandTextureBuffer->setUnRefImageDataAfterApply(false);
|
indirectCommandTextureBuffer->setUnRefImageDataAfterApply(false);
|
||||||
@ -201,7 +201,7 @@ struct IndirectTarget
|
|||||||
|
|
||||||
for(unsigned int j=0;j<indirectCommands->size(); ++j){
|
for(unsigned int j=0;j<indirectCommands->size(); ++j){
|
||||||
osg::DrawArraysIndirect *ipr=new osg::DrawArraysIndirect( GL_TRIANGLES, j );
|
osg::DrawArraysIndirect *ipr=new osg::DrawArraysIndirect( GL_TRIANGLES, j );
|
||||||
ipr->setIndirectCommandArray( indirectCommands);
|
ipr->setIndirectCommandArray( indirectCommands.get());
|
||||||
newPrimitiveSets.push_back(ipr);
|
newPrimitiveSets.push_back(ipr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ struct IndirectTarget
|
|||||||
else // use glMultiDrawArraysIndirect()
|
else // use glMultiDrawArraysIndirect()
|
||||||
{
|
{
|
||||||
osg::MultiDrawArraysIndirect *ipr=new osg::MultiDrawArraysIndirect( GL_TRIANGLES );
|
osg::MultiDrawArraysIndirect *ipr=new osg::MultiDrawArraysIndirect( GL_TRIANGLES );
|
||||||
ipr->setIndirectCommandArray( indirectCommands );
|
ipr->setIndirectCommandArray( indirectCommands.get() );
|
||||||
geometryAggregator->getAggregatedGeometry()->removePrimitiveSet(0,geometryAggregator->getAggregatedGeometry()->getNumPrimitiveSets() );
|
geometryAggregator->getAggregatedGeometry()->removePrimitiveSet(0,geometryAggregator->getAggregatedGeometry()->getNumPrimitiveSets() );
|
||||||
geometryAggregator->getAggregatedGeometry()->addPrimitiveSet( ipr );
|
geometryAggregator->getAggregatedGeometry()->addPrimitiveSet( ipr );
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ int main( int argc, char**argv )
|
|||||||
for(int i=0; i<MAXY*MAXX; ++i)
|
for(int i=0; i<MAXY*MAXX; ++i)
|
||||||
{
|
{
|
||||||
osg::DrawElementsUInt *dre=new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLE_STRIP,4,myIndicesUI) ;
|
osg::DrawElementsUInt *dre=new osg::DrawElementsUInt(osg::PrimitiveSet::TRIANGLE_STRIP,4,myIndicesUI) ;
|
||||||
dre->setElementBufferObject(ebo);
|
dre->setElementBufferObject(ebo.get());
|
||||||
geom->addPrimitiveSet(dre);
|
geom->addPrimitiveSet(dre);
|
||||||
for(int z=0; z<4; z++)myIndicesUI[z]+=4;
|
for(int z=0; z<4; z++)myIndicesUI[z]+=4;
|
||||||
}
|
}
|
||||||
|
@ -168,8 +168,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// get command array of this indirect primitive set
|
/// get command array of this indirect primitive set
|
||||||
inline IndirectCommandDrawElements* getIndirectCommandArray() { return _indirectCommandArray; }
|
inline IndirectCommandDrawElements* getIndirectCommandArray() { return _indirectCommandArray.get(); }
|
||||||
inline const IndirectCommandDrawElements* getIndirectCommandArray() const { return _indirectCommandArray; }
|
inline const IndirectCommandDrawElements* getIndirectCommandArray() const { return _indirectCommandArray.get(); }
|
||||||
|
|
||||||
///Further methods are for advanced DI when you plan to use your own IndirectCommandElement (stride)
|
///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)
|
///or if you want to draw a particular command index of the IndirectCommandElement(FirstCommandToDraw)
|
||||||
@ -616,8 +616,8 @@ public:
|
|||||||
if(!dynamic_cast<DrawIndirectBufferObject* >(_indirectCommandArray->getBufferObject()))
|
if(!dynamic_cast<DrawIndirectBufferObject* >(_indirectCommandArray->getBufferObject()))
|
||||||
_indirectCommandArray->setBufferObject(new DrawIndirectBufferObject());
|
_indirectCommandArray->setBufferObject(new DrawIndirectBufferObject());
|
||||||
}
|
}
|
||||||
inline const IndirectCommandDrawArrays* getIndirectCommandArray() const { return _indirectCommandArray; }
|
inline const IndirectCommandDrawArrays* getIndirectCommandArray() const { return _indirectCommandArray.get(); }
|
||||||
inline IndirectCommandDrawArrays* getIndirectCommandArray() { return _indirectCommandArray; }
|
inline IndirectCommandDrawArrays* getIndirectCommandArray() { return _indirectCommandArray.get(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ osg::Node* VertexData::readPlyFile( const char* filename, const bool ignoreColor
|
|||||||
}
|
}
|
||||||
else if (_texcoord.valid())
|
else if (_texcoord.valid())
|
||||||
{
|
{
|
||||||
geom->setTexCoordArray(0, _texcoord);
|
geom->setTexCoordArray(0, _texcoord.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the model has normals, add them to the geometry
|
// If the model has normals, add them to the geometry
|
||||||
|
Loading…
Reference in New Issue
Block a user