summaryrefslogtreecommitdiff
path: root/themes/WebglContext.h
blob: 7b3cc1cef01e3c14883bac967086506434d2d215 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
	i32 width = 800;
	i32 height = 600;
	char query[128];;

	void init(const char* inQuery);
	void makeCurrentContext();
	void destroy() ;
};