[vtkusers] VTK vs. straight OpenGL performance (was Re: VTK wireframe performance)

Mark Beall mbeall2 at simmetrix.com
Fri Feb 1 18:47:42 EST 2002


On 2/1/02 1:59 PM Sebastien BARRE (sebastien.barre at kitware.com) wrote:

>>On a related note, it does seem that rendering the same number of
>>polygons with VTK is signifcantly slower than with just plain
>>OpenGL. For example just using GLUT, I can use glutSphere with a
>>tesselation of over 1 million polygons and it runs quite nicely on my
>>Radeon 7500 card, but a VTK example with around 300,000 triangles (in
>>strips) is slower.
>
>On the other hand it has been reported that displaying *many* actors 
>(several thousands) would slow down rendering compared to a similar OpenGL 
>solution (or a single actor with the same total geometry, even if you 
>consider the actor overhead). There has been a whole discussion about that 
>in the past (I guess it was related to the fact that OenGL is 
>context/stack-based, and pushing/popping was kind of costly).

Actually, there were about a dozen things that we utilmately identified
as slowing down vtk with a large number of actors. A couple of them
were OpenGL related, but much of it was really vtk overhead. Ken
Martin (and probably others at Kitware) has addressed many of these 
issues in 4.0, but we haven't had the time to try it out yet (Sorry Ken, 
we've been very busy).
>From my best recollection (as Sebastien pointed out, it is Friday, so
I could be wrong) when we duplicated the exact same test with a
single actor in vtk and with opengl code, there was no significant 
difference in performance. However care had to be taken to make
sure that exactly the same things were being done (e.g. same lighting
models, # of lights, etc. etc. etc) or the results were different.
It's quite possible that the difference between your GLUT example
and vtk is that some OpenGL option is being turned on in vtk that
isn't in the GLUT code. When we were looking into this performance
issue we used a tool that captured the actual OpenGL commands and 
display lists (I forget its name) and were able to find some of these 
issues. The upshot of this is that in a more real test than a sphere,
where you may need whatever else is being used, you may not see much 
difference (or perhaps there is something that isn't needed that
could be eliminated)

mark




Mark W. Beall, Ph.D.                           mbeall at simmetrix.com
Simmetrix, Inc.                                (518) 348-1639 x101
10 Halfmoon Executive Park Drive
Clifton Park, NY  12065






More information about the vtkusers mailing list