osg反走樣

osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; traits->windowDecoration = false; traits->x = x; traits->y = y; traits->width = w; traits->height = h; traits->doubleBuffer = true; traits->samples = 8; 在窗口創建以前調用 return new osgQt::GraphicsWindowQt(traits.get(),parent)

 

或者ui

osg::ref_ptr< osg::DisplaySettings > displaySettings = new osg::DisplaySettings; displaySettings->setNumMultiSamples(16); this->setDisplaySettings( displaySettings.get()); 在窗口創建以前調用
相關文章
相關標籤/搜索