Don,
If there's no DISPLAY env var set then producer will report
"Unable to open display ":0.0". Is the DISPLAY environmental variable set?"
when trying to start e.g. osgviewer. I see in the code that producer
doesn't actually attempt to open :0.0, but what is set in the DISPLAY
var (because of passing "" to XOpenDisplay).
Perhaps an idea to change the error message to show XDisplayName("") as
this is more accurate (in my case I actually set the DISPLAY var to
":0.0" to get producer to open ":0.0", which it reports is has
attempted to open, but really hasn't ;-)).
Paul
[src/RenderSurface_X11.cpp]
unsigned int RenderSurface::getNumberOfScreens()
{
if( _numScreens == UnknownAmount )
{
Display *dpy = XOpenDisplay("");
if( dpy == NULL )
{
std::cerr << "Unable to open display \"" << XDisplayName(
":0.0") << "\". Is the DISPLAY environmental variable set?\n";
return 0;
}
_numScreens = ScreenCount(dpy);
XCloseDisplay(dpy);
}
return _numScreens;
}
--
Paul Melis
VR Specialist,
Center for High-Performance Computing & Visualization,
University of Groningen,
The Netherlands
T: +31 50 363 9298
E: [EMAIL PROTECTED]
W: http://www.rug.nl/rc/hpcv/index
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/