[vtk-developers] Performance improvement of vtkCornerAnnotation class using vtkTextActor
Roger Bramon Feixas
rogerbramon at gmail.com
Wed Apr 6 11:38:24 EDT 2011
Sure, I can do that but the implementation is not good. It was just to show
you the benefits of using vtkTextActor instead of vtkActor2D. Does it not
On Wed, Apr 6, 2011 at 1:56 PM, David Doria <daviddoria at gmail.com> wrote:
> On Wed, Apr 6, 2011 at 2:31 AM, Roger Bramon Feixas <rogerbramon at gmail.com
> > wrote:
>> I'm developing on Mac OS X and I recently updated my VTK version from
>> 5.0.4 to 5.6. On Mac Os X, the frame rate of a 2D render window is
>> drastically reduced when vtkCornerAnnotation is set to on. I also noticed
>> that from VTK 5.2 the vtkTextActor implementation uses textures instead of
>> OpenGL sentences but the current implementation of vtkCornerAnnotation uses
>> vtkActor2D instead of vtkTextActor therefore it doesn't take the benefit of
>> using textures. I changed vtkCornerAnnotation implementation in order to
>> test the performance of using textures and the result is really interesting.
>> The frame rate increases from 6 frames/s to 60 frames/s which is the same
>> frame rate when vtkCornerAnnotation isn't used.
>> I attach a zip which includes the implementation (even thought it isn't a
>> nice implementation because I just did the minimum changes to be able to use
>> vtkTextActor), the patch file, and a pdf file which is a summary of my test
>> results done on Windows XP and Mac OS X. On Windows, if we just analyze the
>> frame rate, we could conclude that it isn't necessary to change the
>> implementation to use vtkTextActor, however, we could reduce a lot the CPU
>> I would like to know your opinion about it, and, perhaps, someone could
>> test it on Linux, or with ATI graphics card or on Windows with dual core
>> processor (I test it with quad core processor).
>> Thanks for your attention.
> Hi Roger,
> I think your patch would be better received if you pushed it to Gerrit:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtk-developers