From f0807fc44dde14531759306317611bab87c8fccf Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 19 Oct 2020 09:13:58 +0800 Subject: +gamelab proj --- Editor/main.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Editor/main.cpp (limited to 'Editor/main.cpp') diff --git a/Editor/main.cpp b/Editor/main.cpp new file mode 100644 index 0000000..58e5f04 --- /dev/null +++ b/Editor/main.cpp @@ -0,0 +1,43 @@ +extern "C" { +#include "wog.h" +} + +#include +#include + +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; +} -- cgit v1.1-26-g67d0