summaryrefslogtreecommitdiff
path: root/Editor/main.cpp
blob: 58e5f046e6b7f3eec77a52d64aae42abca5d80ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
extern "C" {
#include "wog.h"
}

#include <glad/glad.h>
#include <windows.h>

wog_Window * wnd ;

void* proc(const char *name) {
	return wglGetProcAddress(name);
}

int main(int argc, char* argv[]) {
	wnd = wog_createWindow("GameLab" , 800, 600, 500, 500, 0);
	wog_show(wnd);

	wog_GLContext* ctx = wog_createGLContext(wnd);
	wog_makeCurrent(wnd, ctx);

	//gladLoadGLLoader(proc);
	int load = gladLoadGL();

//	wog_makeCurrent(wnd, ctx);

	while (true) {
		wog_Event e;
		while (wog_pollEvent(wnd, &e)) {
			if (e.type == WOG_ECLOSE)
				goto quit;
		}
		//glViewport(0, 0, 500, 500);
		glClearColor(0.16, 0.16, 0.16, 1);
		glClear(GL_COLOR_BUFFER_BIT);
		glFlush();

		wog_swapBuffers(wnd);
	}

quit:

	return 0;
}