[osg-users] [Toward BufferObject serialization] Geometry serializer FinishedObjectReadCallback???

Robert Osfield robert.osfield at gmail.com
Mon May 23 01:53:27 PDT 2016


Hi Julian,

I have a vague recollection that this callback had to be used to force
the VBO to be built or something along those lines.  Off the top of my
head I don't recall the exact problem that instigated the change and
the contributor that came up with this solution.  Perhaps git log for
the files in question might help piece together why it's done.

Robert.

On 20 May 2016 at 17:35, Julien Valentin <julienvalentin51 at gmail.com> wrote:
> Hi,all
> I would like to provide osg TransformFeedback serialization feature but something weird forbid BufferObject serialization:
> This callback calls setUseVertexBufferObjects(false) and just kill all BufferObject attached the geometry's BufferDatas
>
>
> Code:
> struct GeometryFinishedObjectReadCallback : public osgDB::FinishedObjectReadCallback
> {
>     virtual void objectRead(osgDB::InputStream&, osg::Object& obj)
>     {
>         osg::Geometry& geometry = static_cast<osg::Geometry&>(obj);
>         if (geometry.getUseVertexBufferObjects())
>         {
>             geometry.setUseVertexBufferObjects(false);
>             geometry.setUseVertexBufferObjects(true);
>         }
>     }
> };
>
>
> I don't understand the utility of this callback (surely because I want to remove it:) )
> Does anyone know its purpose?
>
> Thank you!
>
> Cheers,
> Julien
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67181#67181
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list