Small OpenGL based c++ rendering library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fpsmanager.h 310B

123456789101112131415161718192021222324
  1. #ifndef __FPSMANAGER_H
  2. #define __FPSMANAGER_H
  3. #include <SDL.h>
  4. namespace segl {
  5. class FPSManager {
  6. private:
  7. Uint32 lastticks;
  8. int frames;
  9. float tickrate;
  10. float framerate;
  11. public:
  12. FPSManager(int _fps);
  13. void setFPS(int _fps);
  14. void delay();
  15. float getFPS();
  16. };
  17. } // namespace segl
  18. #endif