osgb文件过大,可以通过Compressor=zlib对纹理进行压缩

Posted coolbear

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了osgb文件过大,可以通过Compressor=zlib对纹理进行压缩相关的知识,希望对你有一定的参考价值。

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 

以上是关于osgb文件过大,可以通过Compressor=zlib对纹理进行压缩的主要内容,如果未能解决你的问题,请参考以下文章