[vtkusers] Problems using vtkRenderWindowInteractor under Mesa

Peter Wainwright prw at ceiriog.eclipse.co.uk
Sat Jun 7 06:05:43 EDT 2008


I am trying to create and attach an interactor to a window using the VTK
TCL shell.

vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
iren Initialize

I am working on a VNC display, and I have therefore had to put Mesa GL
libraries in my LD_LIBRARY_PATH to emulate the GLX stuff.

Unfortunately the interactor does not work; setting MESA_DEBUG=1 shows
that there are errors in glXSwapBuffers:

    Mesa warning: glXSwapBuffers: invalid drawable 0x1600002

and the window does not redraw when the mouse is moved.

What seems to be happening is this:  Each buffer in Mesa's software GL
is associated with a particular (display, drawable) pair.  However,
vtkXRenderWindowTclInteractor::Initialize() seems to modify the Display*
of the rendering window (so that it points to the first Display created
by the Tcl shell).  But the Mesa buffers were created in association
with a different Display object. Although the 2 Display objects should
be equivalent (they point to the same actual display device), Mesa
seemingly does not like changing the Display here.

Does anyone know how to work around this?  Is it a well-known bug?
Should I take it to the developers list, file a bug with VTK or with
Mesa?

Peter




More information about the vtkusers mailing list