[vtkusers] GTKmm + VTK

Horst horstausprag at gmx.de
Fri Oct 14 05:53:55 EDT 2016


Hello everybody,

I am trying to integrate a VTK rendering into a GTKmm based window. The
GTK widget contains a GLarea
(https://developer.gnome.org/gtkmm/stable/classGtk_1_1GLArea.html), and
I want to render into that context.

The problem is, that I end up with two windows. One by GTK and one by
VTK. I was inspired by this:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/GLUT but

renWin->InitializeFromCurrentContext();

is maybe not the way to go?
In the VTK blog I read about the ExternalVTKWidget and
vtkExternalOpenGLRenderWindow. But this still did not work
(https://gitlab.kitware.com/vtk/vtk/blob/0b7d6de3dddbcdb5dd9267a9586d59962464819e/Rendering/External/Testing/Cxx/TestGLUTRenderWindow.cxx)
for me.

So my question: What is the proper way of rendering into a GTK::GLArea
(or in general using VTK with GTK), while still get the proper event
from VTK (pointing on a cone in the view and get the event-position). Or
do I need to use a separate event loop instead of the one provided by
vtkRenderWindowInteractor?

Thanks a lot and every hint is welcome!

Kind regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161014/1719ecf3/attachment.html>


More information about the vtkusers mailing list