[osg-users] Saving and Loading Scenes

2008-03-08 Thread Renan Mendes
Hi,

I need some help on saving and loading scenegraphs. Reading the OSG
documentation, specifically the osgDB namespace, I saw that I have no idea
where to begin! Can someone give me a reference?

Thanks,

Renan M Z Mendes
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Saving and Loading Scenes

2008-03-08 Thread Benjamin Eikel
On Saturday 08 March 2008 at 13:50:04, Renan Mendes wrote:
 Hi,

 I need some help on saving and loading scenegraphs. Reading the OSG
 documentation, specifically the osgDB namespace, I saw that I have no idea
 where to begin! Can someone give me a reference?

 Thanks,

 Renan M Z Mendes

Hello Renan,

I think you start with osgDB::writeNodeFile [1]. With that function you can 
write a whole scene graph into a .osg file for example.

Regards,
Benjamin


[1] 
http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a02205.html#a63
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Saving and Loading Scenes

2008-03-08 Thread Renan Mendes
Benjamin,

  I've used this function (it compiled alright), but when running my
aplication, there was an error message, saying that I didn't have the plugin
for reading and writing files...  I went to the OSG website and searched for
reading and writing plugins, but there were so many, I didn't know which one
to choose. Do you have a suggestion?

   Renan M Z Mendes
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Saving and Loading Scenes

2008-03-08 Thread Benjamin Eikel
On Saturday 08 March 2008 at 14:26:13, Renan Mendes wrote:
 Benjamin,

   I've used this function (it compiled alright), but when running my
 aplication, there was an error message, saying that I didn't have the
 plugin for reading and writing files...  I went to the OSG website and
 searched for reading and writing plugins, but there were so many, I didn't
 know which one to choose. Do you have a suggestion?

Renan M Z Mendes

Hello Renan,

the plugin is selected by the filename you give to this function. For writing 
files, I think the OpenSceneGraph format (file extenstion .osg) is the only 
one which supports most of the nodes. So you should call the function with 
something like MySceneGraph.osg as filename.
If it still complains about missing plugins maybe the plugins where not 
installed correctly. If you are using GNU/Linux and have installed 
OpenSceneGraph to /usr then there should be a directory 
called /usr/lib/osgPlugins-2.2.0 containing the plugins (if you installed 
version 2.2.0 of course).

Regards,
Benjamin
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org