[osg-submissions] Fix to osg::Uniform's copy constructor

Jean-Sébastien Guay jean-sebastien.guay at cm-labs.com
Wed Jun 11 08:23:44 PDT 2008


Hello Robert,

When copying a node that had uniforms on it, the copy constructor of 
osg::Uniform would not copy the array of the original uniform (either 
_intArray or _floatArray) because none had been allocated and the copy 
constructor checks that *both* this's array and rhs's array are valid.

I added a call to allocateDataArray() if rhs has (at least) one valid 
array, which should allocate the right array according to the type. 
Since the type was copied from rhs, it should create the same array as 
rhs has, so then it should copy the data in the following lines.

(long description for a small change, but I wanted to be explicit)

J-S
-- 
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Uniform.zip
Type: application/x-zip-compressed
Size: 5138 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080611/49a757e2/attachment.bin>


More information about the osg-submissions mailing list