[osg-users] DISPLAY ignored by osgViewer?

Paul Martz pmartz at skew-matrix.com
Wed Oct 24 08:23:50 PDT 2007

I understand DISPLAY is an X11 environment variable. However, the OSG code
for handling it doesn't appear to be X11-specific, se setting DISPLAY=0.1
should indicate screen 1, even on Windows. However, that's not the behavior
I'm seeing.

For example, do the following on any 2-head Windows box:
  set OSG_WINDOW=10 10 640 480
  set DISPLAY=0.1
  osgviewer cow.osg
I'm expecting to see osgviewer run in a window on screen 1. Instead it comes
up on screen 0.

>From looking at the code, it appears the same behavior would happen on X11.
If this is not the case, and OSG is in fact handling this differently for
X11, then I'll simply document this as applying only to X11.

> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org 
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf 
> Of Robert Osfield
> Hi Paul,
> You are mis-reading the View::setUpView* code, they all read 
> the display variable and then pass this on to the final 
> GraphicsTraits used to set up the windows.
> The DISPLAY variable is an X11 variable for controlling where 
> the window will appear.
> Robert.

More information about the osg-users mailing list