[vtkusers] how to control the display refresh rate rate with vtk 4.2, any idea?

Cheung Bruce escaloy at hotmail.com
Thu Dec 8 22:22:48 EST 2005


Hi,all
   I am using vtk4.2 with c++ on winxp.
   My goal is to set the render refresh rate high to about 100 Hz which 
would keep up to my data source update rate. But there seems no machanism 
in vtk for doing this. The vtkRenderer::GetLastRenderTimeInSeconds has been 
used to get the render time of my objects every time. The result is very 
interesting, the render time shift between .1ms and 16 ms.The .1 ms shoud 
be the actully render time for all objects--I think so,because all this 
procs is running on a graphics workstation armed with Nvidia Qudra card and 
P4 3.0Ghz, and the objects is only a few simple tubes. But the where comes 
the 16ms, I thought it was due to the VSYNC of opengl swapbuffers, but when 
I set the VSYNC of global settings of OpenGL to be disabled, nothing 
changed in the result. So I am wonderring if the vtk render the scenes to 
its own desired frame rate,the default value is 1/16ms = 66Hz. And the 
render thread maybe ansychronized.If the vtkRenderWindows.Render() called 
right before the render cycle ends it would take only 0.1ms to give the 
render results, but if it's called right after the render cycle ends, the 
most terrible things happled,the vtkRenderWindows.Render() would be kept 
waiting for the whole cycle ends, that's about 16ms.Is all this conclusions 
right? Or what shall I do to get a minimal render rate up to 100Hz?Any 
suggestion is appreciated.
    Thanks.
Bruce Cheung
Fudan University,Shanghai,China

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  




More information about the vtkusers mailing list