[vtk-developers] Patch to silence needless error message

Prabhu Ramachandran prabhu at aero.iitb.ac.in
Sat Mar 7 19:59:11 EST 2009


Hi,

Thanks for looking at this.

On 03/07/09 23:47, Francois Bertel wrote:
> This fix looks wrong to me.
> 
> If you use vtkXOpenGLRenderWindow.cxx, it means you use X11 for on
> screen rendering and OSMesa when switching to offscreen. If you have
> X11, XOpenDisplay should succeed in
> vtkXOpenGLRenderWindow::GetDisplayId() even if you use OSMesa for
> offscreen.

If you ssh to a machine without X11 forwarding and run code that uses 
vtkXOpenGLRenderWindow, the XOpenDisplay call fails and does not cause 
any trouble apart from the error message, everything else works. 
Likewise if you don't have X11 there is a problem.

> If you don't have X11, create an instance of
> vtkOSOpenGLRenderWindow.cxx instead.

Well, that would work but is a real pain (for example how would you run 
the test suite doing this?). Please look at this dashboard, you'll see 
the same exact warning indicating that vtkXOpenGLRenderWindow is used 
this way and works:

http://www.cdash.org/CDash/testDetails.php?test=18416791&build=286623

Notice the Test output prints the message the patch silences.

cheers,
prabhu



More information about the vtk-developers mailing list