[vtkusers] Frame Rate and moving actors

list at kobenetz.de list at kobenetz.de
Wed Mar 28 09:39:35 EDT 2007


Thanks,

I found the setting, it was set to 'application-specific'. Is there a way
in VTK to set the vertical synchronization?

Still I'm looking for a way to limit the Framerate myself, I don't want to
use 100% cpu ... so I will write my own class to manage this. If anybodys
knows about some VTK-class that might be of help, thanks in advance,

Chris

> Looks a bit that the exchange of the render-buffers is synchronized with
> the screen refresh. This is a default setting of many drivers. This
> prevents flicker-effects, but is not that good for benchmarking. You may
> change this behaviour in advanced settings of the displaydriver. A small
> test can be done by changing the display-refresh-rate and run the bench
> again.
>
> Hth,
> Tom
>
> list at kobenetz.de wrote:
>> Hi,
>> I'm trying to create an application where an actor moves from A to B on
>> mouse-click. I want to combine this with a vtkRenderWindowInteractor, so
>> I
>> can watch the actor move.
>>
>> I've set up a timer using vtkRenderWindowInteractor::CreateTimer, which
>> triggers a function that calculates the new position of the actor and
>> calls the Render method to update the RenderWindow. So far, everythings
>> works fine.
>>
>> My question is:
>>
>> How can I set the maximum frame rate? I could calculate the actors
>> position 1000 times per second, but that doesn't make any sense to me.
>>
>> Is there any mechanism that takes care of the frame rate already or do I
>> have to write some class from scratch to do that?
>>
>> I wonder where the frame rate comes from. Look at the cone2 example:
>>
>> ...
>>
>>   for (i = 0; i < 360; ++i)
>>     {
>>     // render the image
>>     renWin->Render();
>>     // rotate the active camera by one degree
>>     ren1->GetActiveCamera()->Azimuth( 1 );
>>     }
>>
>> ...
>>
>> On my Windows PC this example runs with exactly 60 frames per second,
>> somethings obviously limits the frame Rate.
>>
>> On my new Mac with Windows this runs much faster, apparently without
>> limit
>> (approx 400 frames per second).
>>
>> WHY?
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>





More information about the vtkusers mailing list