I have figured out a solution. The steps are as the following, the core file 
for the solution lies in OutputStream::writeImage function.

1. To write a image (e.g., *.jpg) inside a file, we need the WRITE_INLINE_FILE 
mode, which is set by 

Code:

osgDB::Options options;
options.setOptionString("WriteImageHint=IncludeFile");
osgDB::writeNodeFile(*node, "out.osgb", &options);




2. The image has to be first write to disk and a proper search path is needed. 
A node visitor will do the image write correctly and the search path is set by

Code:
osgDB::setDataFilePathList(lists);



Cheers,
Han

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68647#68647





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

Reply via email to