diff options
author | Matthew Kosarek <mattkae@protonmail.com> | 2021-09-19 19:53:42 -0400 |
---|---|---|
committer | Matthew Kosarek <mattkae@protonmail.com> | 2021-09-19 19:53:42 -0400 |
commit | 9d33d175b5cd564e77bda07fcbce252477f7c40f (patch) | |
tree | 21eedba8ca61e6f4e6c5fc20bdfd0488b4c166c3 /themes/WebglContext.h | |
parent | de850676e79da39aec6f1ce0400cfa94cecbd744 (diff) |
Decently working autumn theme
Diffstat (limited to 'themes/WebglContext.h')
-rw-r--r-- | themes/WebglContext.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/themes/WebglContext.h b/themes/WebglContext.h index cbbfbe9..366c675 100644 --- a/themes/WebglContext.h +++ b/themes/WebglContext.h @@ -5,6 +5,8 @@ #include <GLES2/gl2.h> #include <EGL/egl.h> +EM_BOOL onScreenSizeChanged(int eventType, const EmscriptenUiEvent *uiEvent, void *userData); + struct WebglContext { EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context; int width = 800; @@ -26,6 +28,8 @@ struct WebglContext { makeCurrentContext(); glClearColor(0, 0, 0, 0.0f); + + emscripten_set_resize_callback(query, this, false, onScreenSizeChanged); }; void makeCurrentContext() { |