From cc05fdc7396532b329f30decde5583853da92a44 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sat, 27 Mar 2021 20:54:27 -0400 Subject: Drawing an ellipse --- frontend/shared_cpp/WebglContext.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'frontend/shared_cpp/WebglContext.h') 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; -- cgit v1.2.1