[osg-submissions] fix DISPLAY detection in osg::GraphicsContext::ScreenIdentifier::setScreenIdentifier

Robert Osfield robert.osfield at gmail.com
Fri Jan 4 03:28:05 PST 2008


Hi Tim,

On Jan 4, 2008 11:20 AM, Tim Moore <timoore at redhat.com> wrote:
> I couldn't find one. There is some code in osgViewer/View.cpp to deal with the case in
> setUpViewAcrossAllScreens(), which is probably the common code path for osgviewer. I
> suspect that you hit the problem if your application initializes a Traits structure and
> creates a graphics context itself.

If the catch blocks in osgViewer::View aren't been used then the only
place to catch this case is within GrpahicsWindowX11, Win32 and
Carbon, this should be a straight forward addition though.  I believe
added entries to these is better than hacking the catch for when no
screen number is defined, -1 is deliberately used to tell the
developer than the DISPLAY string didn't explicitly specify a screen
number, remove this and you also remove the ability for the
application developer to do their own handling of the fallback.

Robert.


More information about the osg-submissions mailing list