Text archives Help
- From: Thiago Ize <thiago@cs.utah.edu>
- To: Carson Brownlee <brownlee@cs.utah.edu>
- Cc: "ma >> \"'manta@sci.utah.edu'\"" <manta@sci.utah.edu>
- Subject: Re: [MANTA] framerate? profilers?
- Date: Thu, 21 Jun 2007 20:46:12 -0700
Hello peoples,
anyone know how to get the displayed frame rate to be an average
over some set time in make_scene? Or perhaps a function I can make
that is called every frame so I can do it myself? As the framerate
gets higher it gets more spastic.
Carson
In class FooClass, do this:
#include <Interface/MantaInterface.h>
#include <SCIRun/Core/Thread/Time.h>
then call this once (probably put it in your constructor or preprocess
function):
context.manta_interface->registerSerialPreRenderCallback(
Callback::create(this, &FooClass::YourFunctionName));
Then in your class do:
void FooClass::YourFunctionName(int proc, int numProcs)
{
//insert time code to measure fps.
}
YourFunctionName will then get called once per frame. In there you can
add some timing code (look in Time.h for how to do it).
Thiago
Archive powered by MHonArc 2.6.16.