[vtk-developers] Performance improvement of vtkCornerAnnotation class using vtkTextActor

Roger Bramon Feixas rogerbramon at gmail.com
Wed Apr 6 02:31:43 EDT 2011


Hi,

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
usage.

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.

Roger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110406/c050692b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: performance_vtkCornerAnnotation.zip
Type: application/zip
Size: 16544 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110406/c050692b/attachment-0001.zip>


More information about the vtk-developers mailing list