Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
[GosuEx] A simple fps counter extension for libgosu
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
FpsCounter.hpp
README.md

README.md

FpsCounter

A simple fps counter extension for gosu

Screenshot.

Usage

  • FpsCounter::update() should be called after your scene is drawn and before FpsCounter::draw()
  • FpsCounter::draw() is not necessary for the calculation of the current fps

Example usage

class Window : public Gosu::Window
{
private:
    GosuEx::FpsCounter fps;

public:
    Window()
        :   Gosu::Window(1024, 768, false), fps(&graphics(), 1024-210, 10, 200, 100)
    {
        [...]
    }

    void draw()
    {
        [draw your scene here]
        fps.updateFPS();
        fps.draw();
    }
}
Something went wrong with that request. Please try again.