diff options
| author | Matthew Kosarek <mattkae@protonmail.com> | 2021-05-16 19:50:15 -0400 |
|---|---|---|
| committer | Matthew Kosarek <mattkae@protonmail.com> | 2021-05-16 19:50:15 -0400 |
| commit | a00c0aab1eb5a7a55bef8ca08115bdd722ab5699 (patch) | |
| tree | 45b5c4cc8c380d0630a8e0185af7229f26dc754a /frontend/shared_cpp/MainLoop.h | |
| parent | 4941a1874b6ca9d142d94df70b2aec5e0b35b94e (diff) | |
Moved the frontend directory up so that it no longer exists
Diffstat (limited to 'frontend/shared_cpp/MainLoop.h')
| -rw-r--r-- | frontend/shared_cpp/MainLoop.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/frontend/shared_cpp/MainLoop.h b/frontend/shared_cpp/MainLoop.h deleted file mode 100644 index 2573bb8..0000000 --- a/frontend/shared_cpp/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 |
