summaryrefslogtreecommitdiff
path: root/themes/src/WebglContext.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/src/WebglContext.h
parentf63d0af456f76d713e56ca17be114fba0af22f6c (diff)
Improved the makefile considerably
Diffstat (limited to 'themes/src/WebglContext.h')
-rw-r--r--themes/src/WebglContext.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/themes/src/WebglContext.h b/themes/src/WebglContext.h
new file mode 100644
index 0000000..1956092
--- /dev/null
+++ b/themes/src/WebglContext.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "types.h"
+#include <cstring>
+#include <emscripten.h>
+#include <emscripten/html5.h>
+#include <GLES2/gl2.h>
+#include <EGL/egl.h>
+
+struct WebglContext {
+ EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context;
+ f32 width = 800;
+ f32 height = 600;
+ char query[128];;
+
+ void init(const char* inQuery);
+ void makeCurrentContext();
+ void destroy() ;
+};