Index: game-gui-glfw.cpp
===================================================================
--- game-gui-glfw.cpp	(revision d5f2b42822ceb964aa43e90cf4cb4ab7c43a3920)
+++ game-gui-glfw.cpp	(revision d8cb15ee5e7f8fa3b941f86ed5f6802c89277201)
@@ -1,6 +1,19 @@
 #include "game-gui-glfw.hpp"
 
+string GameGui_GLFW::s_errorMessage;
+
+void glfw_error_callback(int error, const char* description) {
+   GameGui_GLFW::s_errorMessage = description;
+}
+
+string& GameGui_GLFW::GetError() {
+   return GameGui_GLFW::s_errorMessage;
+}
+
 bool GameGui_GLFW::Init() {
-   return glfwInit() == GLFW_TRUE ? RTWO_SUCCESS : RTWO_SUCCESS;
+   GameGui_GLFW::s_errorMessage = "No error";
+   glfwSetErrorCallback(glfw_error_callback);
+
+   return glfwInit() == GLFW_TRUE ? RTWO_SUCCESS : RTWO_ERROR;
 }
 
Index: game-gui-glfw.hpp
===================================================================
--- game-gui-glfw.hpp	(revision d5f2b42822ceb964aa43e90cf4cb4ab7c43a3920)
+++ game-gui-glfw.hpp	(revision d8cb15ee5e7f8fa3b941f86ed5f6802c89277201)
@@ -12,4 +12,8 @@
 class GameGui_GLFW : public GameGui {
    public:
+      string& GetError();
+
+      static string s_errorMessage; // Has to be public so that glfw_error_callback can access it
+
       bool Init();
       void Shutdown();
@@ -29,3 +33,5 @@
 };
 
+void glfw_error_callback(int error, const char* description);
+
 #endif // _GAME_GUI_GLFW_H
Index: makefile
===================================================================
--- makefile	(revision d5f2b42822ceb964aa43e90cf4cb4ab7c43a3920)
+++ makefile	(revision d8cb15ee5e7f8fa3b941f86ed5f6802c89277201)
@@ -25,5 +25,5 @@
 	$(CC) $^ $(DEP) $(CFLAGS) -o $@
 
-openglgame: main-opengl.cpp opengl-game.cpp
+openglgame: main-opengl.cpp opengl-game.cpp game-gui-glfw.cpp
 	$(CC) $^ $(DEP) $(CFLAGS) -o $@
 
Index: opengl-game.cpp
===================================================================
--- opengl-game.cpp	(revision d5f2b42822ceb964aa43e90cf4cb4ab7c43a3920)
+++ opengl-game.cpp	(revision d8cb15ee5e7f8fa3b941f86ed5f6802c89277201)
@@ -3,7 +3,11 @@
 #include <iostream>
 
+#include "game-gui-glfw.hpp"
+
 using namespace std;
 
 OpenGLGame::OpenGLGame() {
+   gui = nullptr;
+   window = nullptr;
 }
 
@@ -12,4 +16,45 @@
 
 void OpenGLGame::run() {
-   cout << "Running like a boss!" << endl;
+   if (initWindow() == RTWO_ERROR) {
+      return;
+   }
+   initOpenGL();
+   mainLoop();
+   cleanup();
 }
+
+bool OpenGLGame::initWindow() {
+   gui = new GameGui_GLFW();
+
+   if (gui->Init() == RTWO_ERROR) {
+      cout << "UI library could not be initialized!" << endl;
+      cout << gui->GetError() << endl;
+      return RTWO_ERROR;
+   }
+   cout << "GUI init succeeded" << endl;
+
+   window = (GLFWwindow*) gui->CreateWindow("OpenGL Game", SCREEN_WIDTH, SCREEN_HEIGHT);
+   if (window == nullptr) {
+      cout << "Window could not be created!" << endl;
+      return RTWO_ERROR;
+   }
+
+   return RTWO_SUCCESS;
+}
+
+void OpenGLGame::initOpenGL() {
+}
+
+void OpenGLGame::mainLoop() {
+   while (!glfwWindowShouldClose(window)) {
+      glfwPollEvents();
+
+      glfwSwapBuffers(window);
+   }
+}
+
+void OpenGLGame::cleanup() {
+   gui->DestroyWindow();
+   gui->Shutdown();
+   delete gui;
+}
Index: opengl-game.hpp
===================================================================
--- opengl-game.hpp	(revision d5f2b42822ceb964aa43e90cf4cb4ab7c43a3920)
+++ opengl-game.hpp	(revision d8cb15ee5e7f8fa3b941f86ed5f6802c89277201)
@@ -3,4 +3,7 @@
 
 #include "game-gui-glfw.hpp"
+
+const int SCREEN_WIDTH = 800;
+const int SCREEN_HEIGHT = 600;
 
 class OpenGLGame {
@@ -12,4 +15,11 @@
 
    private:
+      GameGui* gui;
+      GLFWwindow* window;
+
+      bool initWindow();
+      void initOpenGL();
+      void mainLoop();
+      void cleanup();
 };
 
