osgViewer应用基础

#ifdef _WIN32
#include <windows.h>
#endif
#include <osgViewer/Viewer>
#include <osgDB/ReadFile>

int main()
{
  osgViewer::Viewer viewer;
  osg::Node *node = new osg::Node;
  node = osgDB::readNodeFile("D:\\参考手册\\BIM\\osg\\library.OSGB");
  viewer.setSceneData(node);
  viewer.setUpViewInWindow(200, 200, 500, 500, 0);

  return viewer.run();
}

 

 

posted @ 2019-05-12 16:07  西北逍遥  阅读(446)  评论(0编辑  收藏  举报