[vtkusers] Get a VTKRender to draw inside an external QWidget (ver5) (or QOpenGLWidget)

Steve Petruzza spetruzza at sci.utah.edu
Thu Feb 22 15:10:05 EST 2018


Hi,

I have a QOpenGLWidget that draws using gl calls. I would like to use a VTK render to draw inside the same canvas.

I tried to use a QVTKRenderWindowInteractor passing the canvas as parent, but the canvas starts flickering and I cannot see any rendering.
The same VTK render (using the same QVTKRenderWindowInteractor) works correctly in a separate vtkrenderwindow.

Is there any simple way to just get the VTKRender to draw directly into the glRender loop of the canvas using the existing rendering window? 
Or any other suggestions.

I am using VTK 8.1.0 and Qt 5.10 and this QVTKRenderWindowInteractor: https://gitlab.kitware.com/alextsui05/vtk/blob/e9e9ffcfbbad68343a0782a1d9024735b7649a46/Wrapping/Python/vtk/qt5/QVTKRenderWindowInteractor.py

Thank you,
Steve





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180222/322d62c5/attachment.html>


More information about the vtkusers mailing list