Hi Christian,

I would think that modifying the reader might be easier than
processing its generated output.

I would say the opposite - creating a NodeVisitor that you run over the loaded graph, which will massage the data to suit your needs, would be easier than modifying the reader plugin. The NodeVisitor you can write knowing only OSG and OpenGL. The reader plugin you need to also know the source format and idiosyncracies of it, which in the case of DAE could be opening a whole can of worms.

As an added benefit, you can even write your NodeVisitor such that it will be as general as you want. It could be able to post-process any loaded scene graph, independently of the original format, because it takes as input any OSG graph. Whereas modifying the reader would give you the expected result only with one file format; if you want to get the same results with another format you need to re-do all your modifications in that other reader plugin...

In the past I've written a NodeVisitor that eventually gave data structures renderable in DirectX, and in pure OpenGL without using OSG as the render backend. Writing such a visitor is not too hard, and it's easy to debug too.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay              jean_...@videotron.ca
                    http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to