[vtkusers] VTK in a MultiTouch Environment

David Gobbi david.gobbi at gmail.com
Sat Oct 24 13:59:43 EDT 2009


On Sat, Oct 24, 2009 at 8:05 AM, Christopher Denter
<dennda at the-space-station.com> wrote:

> I now see two different possibilities for making this work:
> a) Somehow find a way to attach the RenderWindow on all platforms AND find a
> way to draw other PyMT widgets (as UI elements) on top of what VTK renders,
> so you can actually have a UI.

Yes, that would work.


> b) Write the class you just described.
>
> Ad a): I guess nobody has had a moment of enlightenment, so no solution
> here. Even if we could make it work, it would still not be as flexible as
> option b).
>
> Ad b): You said this would mean spending a lot of time. Can you elaborate a
> bit why you think so? You further said that the class I'd have to create
> would be a "vtkRenderWidget". I'm just not precisely sure *where* in the VTK
> class hierarchy this would fit in (i.e., what the base classes are, etc) and
> *what* the actual job would be. Any resources are appreciated.

I mean that it's "hard" compared to simply passing a WindowId from one
toolkit to another.  Ten years ago when I first started using VTK with
PyOpenGL, that was honestly the only thing that I had to do.  Also,
"vtkRenderWidget" was a typo, I meant to say "vtkRenderWindow".

The "job" for (b) would be to make a vtkRawOpenGLRenderWindow, derived
from vtkOpenGLRenderWindow, that skips all initialization steps.
That's about all I can say, the rest still has to be "figgered out".

Also, note:  What you should focus on now is getting VTK and pyglet to
play nice with each other.  After you've accomplished that, getting
VTK to work with PyMT should be trivial.

    David



More information about the vtkusers mailing list