Merge pull request #119 from LaurensVoerman/Submissions2c
Fixed clone osgVolume::Scalarproperty and osg::TextureBuffer crash
This commit is contained in:
commit
c19b271586
@ -35,7 +35,9 @@ TextureBuffer::TextureBuffer(const TextureBuffer& text,const CopyOp& copyop):
|
|||||||
Texture(text,copyop),
|
Texture(text,copyop),
|
||||||
_textureWidth(text._textureWidth)
|
_textureWidth(text._textureWidth)
|
||||||
{
|
{
|
||||||
|
if (text._bufferData.valid()) {
|
||||||
setBufferData(osg::clone(text._bufferData.get(), copyop));
|
setBufferData(osg::clone(text._bufferData.get(), copyop));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureBuffer::~TextureBuffer()
|
TextureBuffer::~TextureBuffer()
|
||||||
|
@ -102,7 +102,7 @@ ScalarProperty::ScalarProperty(const std::string& scalarName, float value)
|
|||||||
ScalarProperty::ScalarProperty(const ScalarProperty& sp, const osg::CopyOp& copyop):
|
ScalarProperty::ScalarProperty(const ScalarProperty& sp, const osg::CopyOp& copyop):
|
||||||
Property(sp,copyop)
|
Property(sp,copyop)
|
||||||
{
|
{
|
||||||
_uniform = new osg::Uniform(sp._uniform->getName().c_str(), getValue());
|
_uniform = new osg::Uniform(*sp._uniform.get(), copyop);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user