[vtkusers] QVTKOpenGLWidget - update() or GetRenderWindow()->Render()
Elvis Stansvik
elvis.stansvik at orexplore.com
Tue Jun 19 10:20:33 EDT 2018
Hi all,
I was looking over calls to Render() in our application, trying to replace
them with update() which I think is a "nicer" way of requesting a re-render
(?).
But it seems to not be a drop-in replacements since it seems sometimes
update() doesn't cause a re-render (not even when control returns to the
event loop).
So then I looked again at the docs for QVTKOpenGLWidget, and they say:
"An alternative is to call update() on the widget instance to trigger a
render once the context gets validated"
It was this that sort of guided me to try to use update() instead of
Render().
But then I found e.g. this commit:
"
https://gitlab.kitware.com/vtk/vtk/commit/4c77c46025e737ad66e0b797a759e73d81c9f240
"
The commit message says: "QVTKOpenGLWidget now relies on VTK applications
calling `Render` on the window when data or rendering has changed.".
So now I'm a little confused: What is the correct way to request a
re-render once control returns to the event loop? Or must we always call
Render()?
I'm talking now about the QVTKOpenGLWidget that is in 8.1.1, not the new
one that is in master (though I guess the best practice should be the same
for the two?).
Many thanks in advance,
Elvis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180619/be74368a/attachment.html>
More information about the vtkusers
mailing list