fix examples context creation for X11

(when display not :0.0)
This commit is contained in:
mp3butcher
2018-09-08 18:18:33 +02:00
committed by Robert Osfield
parent 960f4d1ef2
commit 385cfa0cbf
18 changed files with 144 additions and 64 deletions

View File

@@ -142,6 +142,8 @@ int main( int argc, char **argv )
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->pbuffer = false;
traits->readDISPLAY();
traits->setUndefinedScreenDetailsToDefaultScreen();
osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get());
if (!gc || !gc->valid())