Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fps counter #1886

Merged
merged 9 commits into from
Jan 12, 2025
Prev Previous commit
Next Next commit
Fixed elapsed time argument name, shouldn't be microseconds
  • Loading branch information
GabrielNakamoto committed Jan 6, 2025
commit e42a67cf4a22525bcce7546def89aeec44841f1d
4 changes: 2 additions & 2 deletions vtkext/private/module/vtkF3DUIActor.cxx
Original file line number Diff line number Diff line change
@@ -69,9 +69,9 @@ void vtkF3DUIActor::SetFpsCounterVisibility(bool show)
}

//----------------------------------------------------------------------------
void vtkF3DUIActor::UpdateFpsValue(const double elapsedMicroSeconds)
void vtkF3DUIActor::UpdateFpsValue(const double elapsedFrameTime)
{
this->FrameTimes.push_back(elapsedMicroSeconds);
this->FrameTimes.push_back(elapsedFrameTime);

// add window size check here
if (this->FrameTimes.size() == 6)
GabrielNakamoto marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion vtkext/private/module/vtkF3DUIActor.h
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ class vtkF3DUIActor : public vtkProp
* Updates the fps value
* 0 by default
*/
void UpdateFpsValue(const double elapsedMicroSeconds);
void UpdateFpsValue(const double elapsedFrameTime);

/**
* Set the font file path
Loading