summaryrefslogtreecommitdiff
path: root/themes/MainLoop.h
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-12-23 12:47:10 -0500
committermattkae <mattkae@protonmail.com>2022-12-23 12:47:10 -0500
commit7228b2e1a2d0a8399facce3493d71a3569d250d5 (patch)
tree8eb5e4b686bf68fa12fcbb270ef88dd29aa1d704 /themes/MainLoop.h
parentf63d0af456f76d713e56ca17be114fba0af22f6c (diff)
Improved the makefile considerably
Diffstat (limited to 'themes/MainLoop.h')
-rw-r--r--themes/MainLoop.h29
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