1     viewer.realize();//需要realize,否则窗口为null
2     osgViewer::GraphicsWindow *pWnd = dynamic_cast<osgViewer::GraphicsWindow*>(viewer.getCamera()->getGraphicsContext());
3     if (pWnd) {
4         pWnd->setWindowRectangle(20, 20, 600,600);
5 
6         pWnd->setWindowDecoration(true);
7     }

在main函数中添加,在viewer.run()之前。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2021-09-26
  • 2021-06-11
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-15
  • 2021-11-27
  • 2022-01-02
  • 2021-10-11
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案