osg :: GraphicsContext :: WindowingSystemInterface Screen Resolution (screen resolution)

unsigned int width, height;

  // get the system resolution
 OSG GraphicsContext :: :: :: WindowingSystemInterface OSG * wsInterface 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;

 

Guess you like

Origin www.cnblogs.com/herd/p/11118857.html