summaryrefslogtreecommitdiff
path: root/Editor/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Editor/main.cpp')
-rw-r--r--Editor/main.cpp43
1 files changed, 43 insertions, 0 deletions
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 <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;
+}