From a00c0aab1eb5a7a55bef8ca08115bdd722ab5699 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Sun, 16 May 2021 19:50:15 -0400 Subject: Moved the frontend directory up so that it no longer exists --- frontend/shared_cpp/WebglContext.h | 39 -------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 frontend/shared_cpp/WebglContext.h (limited to 'frontend/shared_cpp/WebglContext.h') diff --git a/frontend/shared_cpp/WebglContext.h b/frontend/shared_cpp/WebglContext.h deleted file mode 100644 index 017498f..0000000 --- a/frontend/shared_cpp/WebglContext.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once -#include "types.h" -#include -#include -#include -#include - -struct WebglContext { - EMSCRIPTEN_WEBGL_CONTEXT_HANDLE context; - 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; - emscripten_webgl_init_context_attributes(&attrs); - - attrs.enableExtensionsByDefault = 1; - attrs.majorVersion = 3; - attrs.minorVersion = 0; - - context = emscripten_webgl_create_context(query, &attrs); - makeCurrentContext(); - - glClearColor(0.2f, 0.3f, 0.3f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - }; - - void makeCurrentContext() { - emscripten_webgl_make_context_current(context); - }; - - void destroy() { - emscripten_webgl_destroy_context(context); - } -}; \ No newline at end of file -- cgit v1.2.1