标签:
#include <osgDB/ReadFile> #include <osgViewer/Viewer> int main(int argc, char **argv) { //命令行参数读取 osg::ArgumentParser arguments(&argc, argv); std::string filename; arguments.read("--model", filename); osg::ref_ptr<osg::Node> root = osgDB::readNodeFile(filename); osgViewer::Viewer viewer; viewer.setSceneData(root.get()); return viewer.run(); }
osg学习笔记2, 命令行参数解析器ArgumentParser
标签:
原文地址:http://www.cnblogs.com/yaoyu126/p/5761755.html