[vtkusers] Integrating with Qt Quick by rendering VTK to a Framebuffer Object (FBO)
Taylor Braun-Jones
taylor at braun-jones.org
Tue May 20 11:15:48 EDT 2014
Hello vtkusers,
I'm working on integrating VTK in into the Qt Quick Scene Graph using an
FBO approach.
I currently have something that is close, but not quite there - the first
frame rendered to the FBO by VTK works as expected - the VTK rendered scene
shows up in the Qt Quick window with correct layering and Qt Quick Item
properties and animations work like any other Qt Quick component. Great!
But then... the second time the Qt Scene graph requests VTK to render to
the FBO nothing shows up.
Here is my minimal example to demonstrate the problem I'm having:
https://gist.github.com/nocnokneo/c3fb01bb7ecaf437f7d6
It includes a README.md with some simple build instructions. To trigger a
second VTK-render-to-FBO, you can resize the window by one pixel (or
uncomment the update() call at line 64 of QVTKFrameBufferObjectItem.cpp)
Thanks in advance for any pointers or suggestions!
Taylor
PS - Here are some links to provide more context and information:
Relevant Qt Quick 2 Docs
http://qt-project.org/doc/qt-5/qquickframebufferobject.html
http://qt-project.org/doc/qt-5/qsgsimpletexturenode.html
http://qt-project.org/doc/qt-5/qtquick-visualcanvas-scenegraph-renderer.html
Presentation by James Turner at Qt Developer Days
http://www.qtdeveloperdays.com/sites/default/files/presentation_pdf/james-turner-devdays-2013-talk.pdf
(video:
https://www.youtube.com/watch?v=BfIaTccy6HQ)
Qt's example of what I'm trying to do except using "raw" OpenGL instead of
VTK and not using the QQuickFramebufferObject convenience class:
http://qt-project.org/doc/qt-5/qtquick-scenegraph-textureinsgnode-example.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140520/43935e6f/attachment.html>
More information about the vtkusers
mailing list