summaryrefslogtreecommitdiff
path: root/frontend/shared_cpp/WebglContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/shared_cpp/WebglContext.h')
-rw-r--r--frontend/shared_cpp/WebglContext.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/shared_cpp/WebglContext.h b/frontend/shared_cpp/WebglContext.h
index 1ea1c91..017498f 100644
--- a/frontend/shared_cpp/WebglContext.h
+++ b/frontend/shared_cpp/WebglContext.h
@@ -7,8 +7,12 @@
struct WebglContext {
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context;
+ int width = 640;
+ int height = 480;
- void init(const char* query, int width = 640, int height = 480) {
+ void init(const char* query, int inWidth = 640, int inHeight = 480) {
+ width = inWidth;
+ height = inHeight;
emscripten_set_canvas_element_size( query, width, height);
EmscriptenWebGLContextAttributes attrs;