Discussion:
[osg-users] OSG and Xinerama
Eric Sokolowsky
2018-09-07 11:58:26 UTC
Permalink
I have been using OpenSceneGraph 3.4 with my application. Recently I tried
out OSG 3.6 and everything seems to work, with the following difference.
When I run my app with OSG 3.4 on a dual-monitor setup (Linux using
Xinerama) the application only uses one monitor, while the same application
using OSG 3.6 spreads the window across both monitors. I actually prefer my
application to just use one monitor. Once upon a time, Producer had these
text-based configuration files which I found to be very useful, but I'm not
sure if such configuration is possible any more. Is there a way to indicate
that only one monitor is to be used, using OSG API calls, environment
variables, or some sort of configuration file?

Eric
Robert Osfield
2018-09-08 07:39:37 UTC
Permalink
HI Eric,

The change in behaviour is actually a fix for a regressions that
happened when the Linux window managers changed. It's just the
default behavior that has changed for setUpViewAcrossAllScreens(), so
it now behaves as it should. You can adjust what happens by default
using the Producer config files still if you want, or one of the env
vars. Run osgviewer --help-env to see the env vars. The env vars

You don't have to rely upon defaults in your application for window
creation, you can explicitly set up the views windowing via on of the
include/osgViewer/config/*, or st up the Camera and Windows manually
as per the osgcamera example.

Robert.
Eric Sokolowsky
2018-10-12 11:46:57 UTC
Permalink
In case this helps someone else, here are the variables that Robert
referred to:

OSG_CONFIG_FILE - set to a filename where a configuration is read. I'm
still trying to determine the format of this.
OSG_SCREEN - Set to a screen number. Under Linux it appears to refer to an
X11 screen number (seems like it would be more useful to be an Xinerama
screen number, though).
OSG_WINDOW - Same as using --window. Set to 4 values separated by spaces: x
y w h; where x and y give the origin of the window and w and h is the size
of the window. The window will have decorations (window bar etc.)
OSG_BORDERLESS_WINDOW - same as OSG_WINDOW but without a border. This is
what I was originally looking for.
Post by Robert Osfield
HI Eric,
The change in behaviour is actually a fix for a regressions that
happened when the Linux window managers changed. It's just the
default behavior that has changed for setUpViewAcrossAllScreens(), so
it now behaves as it should. You can adjust what happens by default
using the Producer config files still if you want, or one of the env
vars. Run osgviewer --help-env to see the env vars. The env vars
You don't have to rely upon defaults in your application for window
creation, you can explicitly set up the views windowing via on of the
include/osgViewer/config/*, or st up the Camera and Windows manually
as per the osgcamera example.
Robert.
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Loading...