Index: README.txt
===================================================================
--- README.txt	(revision c55614aa8c698a1ffb2b855ca2f2bb1af19c4908)
+++ README.txt	(revision e6bc0f47c2fbd0b7f60877c8d76f4f48aec199d8)
@@ -16,5 +16,5 @@
 
 brew install glew
-brew install glfw3 --without-shared-library
+brew install glfw --without-shared-library
 brew install glm
 
Index: TODO.txt
===================================================================
--- TODO.txt	(revision c55614aa8c698a1ffb2b855ca2f2bb1af19c4908)
+++ TODO.txt	(revision e6bc0f47c2fbd0b7f60877c8d76f4f48aec199d8)
@@ -26,5 +26,4 @@
 MAJOR TASKS TODO
 ==================
--Figure out why rendering doesn't work on the Windows laptop
 
 MAJOR TASKS DONE
@@ -35,4 +34,5 @@
   -When the time comes, maybe just try using the networking and audio components of SFML
 -Implement lasers
+-Figure out why rendering doesn't work on the Windows laptop
 
 STEPS TO SWITCH OFF OF GLOBAL VBOS
@@ -47,2 +47,8 @@
 3. In copyObjectData, set vertex_vbo_offset for the object type only using numPoints, not vbo_base
 4. in renderScene, change the glDrawArrays call to use an offset of 0
+
+LONGTERM TODO
+==============
+
+- Switch from IMGUI to Allegro
+   - Correctly align UI elements when the window is resized
Index: makefile
===================================================================
--- makefile	(revision c55614aa8c698a1ffb2b855ca2f2bb1af19c4908)
+++ makefile	(revision e6bc0f47c2fbd0b7f60877c8d76f4f48aec199d8)
@@ -4,5 +4,5 @@
 
 ifeq ($(OS),Darwin)
-	DEP = -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw3 -lglew
+	DEP = -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo -lglfw -lglew
 endif
 ifeq ($(OS),Linux)
Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision c55614aa8c698a1ffb2b855ca2f2bb1af19c4908)
+++ new-game.cpp	(revision e6bc0f47c2fbd0b7f60877c8d76f4f48aec199d8)
@@ -167,4 +167,5 @@
 void mouse_button_callback(GLFWwindow* window, int button, int action, int mods);
 void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
+void window_size_callback(GLFWwindow* window, int width, int height);
 
 void APIENTRY debugGlCallback(
@@ -261,6 +262,6 @@
 bool key_down[NUM_KEYS];
 
-int width = 640;
-int height = 480;
+int windowWidth = 640;
+int windowHeight = 480;
 
 vec3 cam_pos;
@@ -329,9 +330,9 @@
       const GLFWvidmode* vmode = glfwGetVideoMode(mon);
 
-      width = vmode->width;
-      height = vmode->height;
+      windowWidth = vmode->width;
+      windowHeight = vmode->height;
       cout << "Fullscreen resolution " << vmode->width << "x" << vmode->height << endl;
    }
-   window = glfwCreateWindow(width, height, "New OpenGL Game", mon, NULL);
+   window = glfwCreateWindow(windowWidth, windowHeight, "New OpenGL Game", mon, NULL);
 
    if (!window) {
@@ -342,4 +343,6 @@
 
    glfwMakeContextCurrent(window);
+   glViewport(0, 0, windowWidth, windowHeight);
+
    glewExperimental = GL_TRUE;
    glewInit();
@@ -351,5 +354,5 @@
       cout << "Bound debug callback" << endl;
    } else {
-     cout << "OpenGL debugg message callback is not supported" << endl;
+      cout << "OpenGL debug message callback is not supported" << endl;
    }
 
@@ -394,4 +397,6 @@
    glfwSetMouseButtonCallback(window, mouse_button_callback);
    glfwSetKeyCallback(window, key_callback);
+
+   glfwSetWindowSizeCallback(window, window_size_callback);
 
    const GLubyte* renderer = glGetString(GL_RENDERER);
@@ -590,5 +595,5 @@
    // (Maybe I should just use glm::perspective, after making sure it matches what I have now)
    float fov = 67.0f * ONE_DEG_IN_RAD;
-   float aspect = (float)width / (float)height;
+   float aspect = (float)windowWidth / (float)windowHeight;
 
    float range = tan(fov * 0.5f) * NEAR_CLIP;
@@ -961,4 +966,7 @@
       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
+      // Anton's book suggests placing this here, after glClear(). Check it's impact on framerate
+      //glViewport(0, 0, windowWidth, windowHeight);
+
       switch (curState) {
          case STATE_MAIN_MENU:
@@ -1002,6 +1010,6 @@
       selectedObject = NULL;
 
-      float x = (2.0f*mouse_x) / width - 1.0f;
-      float y = 1.0f - (2.0f*mouse_y) / height;
+      float x = (2.0f*mouse_x) / windowWidth - 1.0f;
+      float y = 1.0f - (2.0f*mouse_y) / windowHeight;
 
       cout << "x: " << x << ", y: " << y << endl;
@@ -1051,4 +1059,18 @@
    // should be true for GLFW_PRESS and GLFW_REPEAT
    key_down[key] = (action != GLFW_RELEASE);
+}
+
+void window_size_callback(GLFWwindow* window, int width, int height) {
+   cout << "Window resized to (" << width << ", " << height << ")" << endl;
+
+   windowWidth = width;
+   windowHeight = height;
+
+   // TODO: Ideally, remove the window title bar when the window is maximized
+   // Check https://github.com/glfw/glfw/issues/778
+
+   // This requires glfw3.3. I think I have to upgrade
+   // Doesn't seem to be needed in OSX and also causes a segfault there
+   //glfwSetWindowAttrib(window, GLFW_DECORATED, GLFW_FALSE);
 }
 
@@ -2444,5 +2466,5 @@
       int padding = 4;
       ImGui::SetNextWindowPos(ImVec2(-padding, -padding), ImGuiCond_Once);
-      ImGui::SetNextWindowSize(ImVec2(width + 2 * padding, height + 2 * padding), ImGuiCond_Once);
+      ImGui::SetNextWindowSize(ImVec2(windowWidth + 2 * padding, windowHeight + 2 * padding), ImGuiCond_Always);
       ImGui::Begin("WndMain", NULL,
          ImGuiWindowFlags_NoTitleBar |
