[vtkusers] Updating color of actor without call renderWindow->Render()
Ken Martin
ken.martin at kitware.com
Thu May 3 08:39:48 EDT 2018
If the events/actions that cause a color change can happen significantly
faster than your render rate then you should break apart the two actions
(changing the color and rendering). Have a queue of color changes that you
push to and then on the next render pop all the ones that have accumulated.
The rendering can be driven by a timer. That way you can have 500 Hz of
color changes and a 30Hz render rate for example.
On Thu, May 3, 2018 at 3:53 AM, Voigteri <eric.voigt at outlook.de> wrote:
> Hi all,
>
> I have a long list of actors and I periodically (very short time intervals)
> update the color of these actors with
>
> actors[i]->GetProperty()->SetColor(r,g,b);
> renderWindow->Render()
>
> after each color change. However, this redraws the entire scene, not just
> the actor I am updating and causes my application to become quite sluggish
> since the colors can be changed interactively by the user at a fast pace.
>
> Is there a better/more efficient way to do this?
>
> Kind regards,
>
> Eric
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>
--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
101 East Weaver Street
Carrboro, North Carolina
27510 USA
This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee. Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180503/3a555082/attachment.html>
More information about the vtkusers
mailing list