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.

26 lines
692B

  1. #ifndef WIDGETS_H
  2. #define WIDGETS_H
  3. #include "nanovg.h"
  4. struct DemoData {
  5. int fontNormal, fontBold, fontIcons;
  6. int images[12];
  7. };
  8. int loadDemoData(struct NVGcontext* vg, struct DemoData* data);
  9. void freeDemoData(struct NVGcontext* vg, struct DemoData* data);
  10. void renderDemo(struct NVGcontext* vg, float mx, float my, float width, float height, float t, int blowup, struct DemoData* data);
  11. #define FPS_HISTORY_COUNT 100
  12. struct FPScounter
  13. {
  14. float values[FPS_HISTORY_COUNT];
  15. int head;
  16. };
  17. void initFPS(struct FPScounter* fps);
  18. void updateFPS(struct FPScounter* fps, float frameTime);
  19. void renderFPS(struct NVGcontext* vg, float x, float y, struct FPScounter* fps);
  20. #endif // WIDGETS_H