Re: [osg-users] Loading osgt from string / Compile resources into binary

2019-01-23 Thread Robert Osfield
Hi Michael,

> is it possible to somehow compile resources like models/nodes into an 
> executable?
> How about putting the content of an osgt file as a string into my source code?
> But as far as I've seen, there is no readNodeFromString method in osgDB.

You can pass a std::stringstream to the ReaderWriter that support
reading from istream.  You'll need to get the osgDB::ReaderWriter from
the osgDB::Registry instance.

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


Re: [osg-users] Loading osgt from string / Compile resources into binary

2019-01-21 Thread Sam Brkopac
Hi Michael,

The portable way is to define a byte array. 

See this stackoverflow for more detail: 
https://stackoverflow.com/questions/7288279/how-to-embed-a-file-into-an-executable

Sent from my iPhone

> On Jan 21, 2019, at 4:02 AM, Michael Maurus  wrote:
> 
> Hi guys,
> 
> is it possible to somehow compile resources like models/nodes into an 
> executable?
> How about putting the content of an osgt file as a string into my source code?
> But as far as I've seen, there is no readNodeFromString method in osgDB.
> 
> Any ideas/suggestions?
> 
> Thank you!
> 
> Cheers,
> Michael
> 
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75519#75519
> 
> 
> 
> 
> 
> ___
> 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