unsigned int width, height;

  //获取系统分辨率
 osg::GraphicsContext::WindowingSystemInterface *wsInterface = osg::GraphicsContext::getWindowingSystemInterface();
  if (!wsInterface)
  {
      return;
  }

wsInterface->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height);
osg::ref_ptr<osg::GraphicsContext::Traits> traits1 = new osg::GraphicsContext::Traits;
    
traits1->x = 0;
traits1->y = 0;
traits1->width = width;
traits1->height = height;
traits1->windowDecoration = false;
traits1->doubleBuffer = true;
traits1->sharedContext = 0;

 

相关文章:

  • 2021-12-18
  • 2021-05-26
  • 2022-03-14
  • 2022-02-03
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-22
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
相关资源
相似解决方案