HI Paul, J.P, et. al,

On Fri, May 15, 2009 at 8:56 AM, J.P. Delport <[email protected]> wrote:
> Not sure, but it looks like some code ignores the $DISPLAY setting and just
> tries to open :0.0.
>
> I can confirm that I get the same behaviour between two Debian machines:
> osgviewer cow.osg runs at a staggering 2fps
>
> osgkeyboardmouse fails with:
> No protocol specified
> Error: Unable to open display ":0.0".
> Error: unable to create graphics window.

The GraphicsContext::Traits structure is used to control how the
graphics window is created, and in it's default state the display and
screen settings (see osg::GraphicsContext::ScreenIndentifier) are 0:0.
  To override this default one needs to explictly call readDISPLAY()
which reads the DISPLAY env variable to set the display and screen
number.

Now the osgView::setUpView*() methods all call readDISPLAY(), but if
the example does use on of these methods, and instead creates the
GraphicsWindow it requires directly use GraphicsContext::Traits
without calling the readDISPLAY then it won't pick up your settings of
this variable, so you'll get different behavior.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to