Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-06 Thread Ravi Mathur
Thanks guys for figuring this out. I ran into the exact same problem earlier this week with Ubuntu 18.04. I'm using CompositeViewer similar to the "-3" case of the osgcompositeviewer example (multiple Views in one window). I call osg::GraphicsContext::createGraphicsContext(traits) with my custom

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Omar Álvarez
Sorry, I meant the samples that use it. You're right. On Wed, Sep 5, 2018, 18:37 Robert Osfield wrote: > Hi Omar, > > On Wed, 5 Sep 2018 at 17:07, Omar Álvarez wrote: > > Thank you very much for your time. If nobody else feels like doing it, I > can help with updating

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Robert Osfield
Hi Omar, On Wed, 5 Sep 2018 at 17:07, Omar Álvarez wrote: > Thank you very much for your time. If nobody else feels like doing it, I can > help with updating osg::GraphicsContext::WindowingSystemInterface. This hasn't looked like an OSG bug too me, just a usage issue. What specifically do you

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Omar Álvarez
Hi Robert, Your answer almost fixed my issue. There is just one problem wsi->getScreenSettings(), still queries the wrong session: 1 screen(s) detected Invalid MIT-MAGIC-COOKIE-1 keyUnable to open display ":0.1". Screen #0 : 0x0 0Hz 0 bit The problem is screen_id(screen), since it is not 0.

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Julien Valentin
Okay that's how it works it would be good to integrate these changes in all examples using osg::GraphicsContext::WindowingSystemInterface robertosfield wrote: > I missed changing one of the getScreen() calls in main, so please use > the attached version. > >

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Robert Osfield
I missed changing one of the getScreen() calls in main, so please use the attached version. #include #include int main(int argc, char** argv) { osg::ArgumentParser arguments(, argv); osgViewer::Viewer viewer(arguments); osg::GraphicsContext::WindowingSystemInterface* wsi =

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Robert Osfield
On Wed, 5 Sep 2018 at 15:22, Julien Valentin wrote: > for your code you should replace > wsi->getNumScreens() > with > wsi->getNumScreens(osg::GraphicsContext::ScreenIdentifier(1)) > to work on DISPLAY=:1.0 Sounds like we are getting to the bottom of things now :-) FYI,

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Julien Valentin
Sorry again After a lot of bullshit here's a correct answer for your code you should replace wsi->getNumScreens() with wsi->getNumScreens(osg::GraphicsContext::ScreenIdentifier(1)) to work on DISPLAY=:1.0 mp3butcher wrote: > Sorry I misinterpreted the code and said bullshit > there's really

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Julien Valentin
Sorry I misinterpreted the code and said bullshit there's really bug in X11WindowingSystemInterface reporting 0 screens mp3butcher wrote: > WindowingSystemInterface is an interface implemented in system dependant > osgViewer::XXXWindowingSystemInterface > What may be done is to add a system

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Robert Osfield
HI Julian, On Wed, 5 Sep 2018 at 15:10, Julien Valentin wrote: > WindowingSystemInterface is an interface implemented in system dependant > osgViewer::XXXWindowingSystemInterface > What may be done is to add a system agnotistic windowInterface in osgviewer > > #ifdef SYS > typedef

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Julien Valentin
WindowingSystemInterface is an interface implemented in system dependant osgViewer::XXXWindowingSystemInterface What may be done is to add a system agnotistic windowInterface in osgviewer #ifdef SYS typedef osgViewer::SYSWindowingSystemInterface osgViewer::WindowingInterface #else if SYS2

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Omar Álvarez
Hi Robert, Thanks for the quick response. I have created an example: https://github.com/omaralvarez/osgtest osgviewer runs fine, no errors in console. But if I use INFO, I can see: Viewer::realize() - No valid contexts found, setting up view across all screens. It may be related, but I'm not

Re: [osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Robert Osfield
Hi Omar, What happens when you run osgviewer? Do you get errors output to the console? Do any of the OSG examples fail? If we can't see the error in standard OSG examples then it may be worth creating a small test program so that others can run it on their own systems to see if we can

[osg-users] getWindowingSystemInterface() fails on Ubuntu 18.04

2018-09-05 Thread Omar Álvarez
osg::GraphicsContext::WindowingSystemInterface* wsi = osg::GraphicsContext::getWindowingSystemInterface(); if ( !wsi ) { std::cout << "ERROR. Could not access the Windowing System Interface" << std::endl; throw -1; } std::cout << wsi->getNumScreens() << "