Thank you.  That also shows me where the new code is--the serializers directory 
next to the deprecated-dotosg, right?  Looks like the equivalent writing code 
uses a << operator on the data.

Following that code around to OutputStream.cpp, it looks like the writeArray() 
method does a static cast of the arrays to ByteArray, FloatArray, etc.  I think 
that's the same problem we had before.  But writeArrayImplementation() takes a 
pointer to the array of actual data.  That would work for us.  So I _think_ it 
depends on the particular cast between things like FloatArray and float*.

While I look into this, could you tell me if I'm in the correct code?

thanks,
andy

> -----Original Message-----
> From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
> boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
> Sent: Monday, December 06, 2010 9:46 AM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] plugin source code
> 
> Hi Andy,
> 
> The deprecated DotOsgWrappers can now be found in
> src/osgWrappers/deprecated-dotosg/*/*.
> 
> Robert.
> 
> On Mon, Dec 6, 2010 at 2:34 PM, Andy Skinner
> <andy.skin...@mathworks.com> wrote:
> > I was looking at submitting a fix for the osg plugin.  We use shared
> arrays
> > (see osgsharedarray example) in the last stable release of OSG.  We
> had a
> > problem writing osg files of our scene because of a static cast in
> the osg
> > plugin.  It assumed it knew what the array was (FloatArray, for
> example) and
> > cast to it.  Our arrays weren't implemented with that, and we
> crashed.
> >
> >
> >
> > We had a fix where we get the actual array memory out and use that,
> so it
> > worked with either kind of array.  I was going to submit that, but I
> don't
> > see the problem in the trunk.  (I added writing a file to the
> osgsharedarray
> > example.)  So I went to check out Geometry.cpp in the osg plugin, and
> it
> > isn't there.
> >
> >
> >
> > Seems the plugins have been refactored.  Could someone point me to
> the code
> > equivalent to the Array_writeLocalData function that was in
> Geometry.cpp in
> > src/osgPlugins/osg before?  Is the new code set up to handle shared
> arrays
> > without assuming what they are?
> >
> >
> >
> > I want to make sure I didn't get lucky with the shared array
> example.  Seems
> > unlikely that the memory would just happen to work, but I figure
> someone
> > will be familiar with the plugins and can reassure me.
> >
> >
> >
> > thanks
> >
> > andy
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users@lists.openscenegraph.org
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
> >
> >
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-
> openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to