[vtkusers] Performance improvement of vtkCornerAnnotation class using vtkTextActor

Roger Bramon Feixas rogerbramon at gmail.com
Mon Jun 7 08:29:27 EDT 2010


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://www.vtk.org/pipermail/vtkusers/attachments/20100607/58262732/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: performance_vtkCornerAnnotation.zip
Type: application/zip
Size: 16544 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100607/58262732/attachment.zip>


More information about the vtkusers mailing list