[vtkusers] slow rendering
Matthias Härtel
metty87 at googlemail.com
Fri Nov 30 05:00:02 EST 2012
Hey,
you can try to use the immediate mode on your polyDataMapper. This mode
is default off. To turn on use something like this:
mapper->ImmediateRenderModeOn();
I have read last month this post:
http://vtk.1045678.n5.nabble.com/Speeding-up-Vector-Representation-td1224530.html
and figure out, that turning the immediate mode on for my polydata,
there is a great performance boost!
Many Greetings,
Matthias
Am 30.11.2012 10:52, schrieb abusq:
> Hi everyone,
> i have a problem with slow rendering of my model when I interact with him.
> Here's a code snippet to explain better my problem:
>
> void MouseInteractorStylePP::OnMouseMove()
>
> // Capturing interaction //
> // ... //
>
> // Getting point's reference of my figure. pdfigure is my model's
> polydata
> float* figure_points =
> reinterpret_cast<float*>(pdfigure->GetPoints()->GetVoidPointer(0));
>
> // computing my new points coordinates and write it on figure_points
> pointer
>
> // Updating polydata
> this->pdfigure->Modified();
>
> // Render
> this->GetCurrentRenderer()->GetRenderWindow()->Render();
>
> The computation of points coordinates takes about 20 ms (no problem) but
> calling Modified() and Render() about 1-2 secs. So it's too slow!
> I'm working with 543.652 vertices and 1.087.716 triangles and using
> vtkPolyData.
> So... there're another way to do better/faster?
>
> Thanks a lot!
>
>
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/slow-rendering-tp5717346.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list