diff options
author | mattkae <mattkae@protonmail.com> | 2022-12-23 12:47:10 -0500 |
---|---|---|
committer | mattkae <mattkae@protonmail.com> | 2022-12-23 12:47:10 -0500 |
commit | 7228b2e1a2d0a8399facce3493d71a3569d250d5 (patch) | |
tree | 8eb5e4b686bf68fa12fcbb270ef88dd29aa1d704 /themes/MainLoop.h | |
parent | f63d0af456f76d713e56ca17be114fba0af22f6c (diff) |
Improved the makefile considerably
Diffstat (limited to 'themes/MainLoop.h')
-rw-r--r-- | themes/MainLoop.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/themes/MainLoop.h b/themes/MainLoop.h deleted file mode 100644 index 2573bb8..0000000 --- a/themes/MainLoop.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once - -#include <emscripten.h> -#include <emscripten/html5.h> -#include <GLES2/gl2.h> -#include <EGL/egl.h> - -EM_BOOL loop(double time, void* loop); - -struct MainLoop { - bool isRunning = false; - double lastTime = 0, elapsedTime = 0; - int numFrames = 0; - void (*updateFunc)(float dtSeconds, void *userData); - - void run(void (*cb)(float dtSeconds, void *userData)) { - isRunning = true; - lastTime = 0; - elapsedTime = 0; - numFrames = 0; - updateFunc = cb; - - emscripten_request_animation_frame_loop(loop, this); - } - - void stop() { - isRunning = false; - } -};
\ No newline at end of file |