osg::ref_ptr<osgDB::ReaderWriter::Options> options =
new
osgDB::ReaderWriter::Options;
options->setOptionString(
"Compressor=zlib"
);
// 设置压缩
osgDB::writeNodeFile(*(node.get()), osgb_path, options);
osgconv a.osg a.osgb -O Compressor=zlib
不起作用的话,添上WriteImageHint=IncludeData