summaryrefslogtreecommitdiff
path: root/themes/WebglContext.h
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-09-19 19:53:42 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-09-19 19:53:42 -0400
commit9d33d175b5cd564e77bda07fcbce252477f7c40f (patch)
tree21eedba8ca61e6f4e6c5fc20bdfd0488b4c166c3 /themes/WebglContext.h
parentde850676e79da39aec6f1ce0400cfa94cecbd744 (diff)
Decently working autumn theme
Diffstat (limited to 'themes/WebglContext.h')
-rw-r--r--themes/WebglContext.h4
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() {