summaryrefslogtreecommitdiff
path: root/frontend/shared_cpp/WebglContext.h
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-03-27 20:54:27 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-03-27 20:54:27 -0400
commitcc05fdc7396532b329f30decde5583853da92a44 (patch)
treefc05dd91ef0245acfea1dcf539d4c968a081b5c5 /frontend/shared_cpp/WebglContext.h
parent58488f8eabcc61089e0ae4297f38f10cc28d78c7 (diff)
Drawing an ellipse
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;