Index: imgui_example.cpp
===================================================================
--- imgui_example.cpp	(revision c58ebc3899e898504313cf42b9c1c05170b13f8f)
+++ imgui_example.cpp	(revision c1ca5b55021392978b68e9f786332e7124db0ff4)
@@ -15,5 +15,5 @@
 }
 
-int main(int, char**)
+int mainimgui(int, char**)
 {
    // Setup window
Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision c58ebc3899e898504313cf42b9c1c05170b13f8f)
+++ new-game.cpp	(revision c1ca5b55021392978b68e9f786332e7124db0ff4)
@@ -17,4 +17,7 @@
 #include <glm/gtc/matrix_transform.hpp>
 #include <glm/gtc/type_ptr.hpp>
+
+#include "IMGUI/imgui.h"
+#include "imgui_impl_glfw_gl3.h"
 
 #include <GL/glew.h>
@@ -52,4 +55,6 @@
 int height = 480;
 
+double fps;
+
 vec3 cam_pos;
 
@@ -62,5 +67,8 @@
 SceneObject* selectedObject;
 
-double fps;
+float NEAR_CLIP = 0.1f;
+float FAR_CLIP = 100.0f;
+
+ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
 
 bool faceClicked(array<vec3, 3> points, SceneObject* obj, vec4 world_ray, vec4 cam, vec4& click_point);
@@ -74,6 +82,5 @@
 void print4DVector(string label, vec4 v);
 
-float NEAR_CLIP = 0.1f;
-float FAR_CLIP = 100.0f;
+void renderGui();
 
 void glfw_error_callback(int error, const char* description) {
@@ -135,5 +142,5 @@
 }
 
-int realmain(int argc, char* argv[]) {
+int main(int argc, char* argv[]) {
    cout << "New OpenGL Game" << endl;
 
@@ -175,9 +182,21 @@
    }
 
-   glfwSetMouseButtonCallback(window, mouse_button_callback);
-
    glfwMakeContextCurrent(window);
    glewExperimental = GL_TRUE;
    glewInit();
+
+   // Setup Dear ImGui binding
+   IMGUI_CHECKVERSION();
+   ImGui::CreateContext();
+   ImGuiIO& io = ImGui::GetIO(); (void)io;
+   //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;  // Enable Keyboard Controls
+   //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;   // Enable Gamepad Controls
+   ImGui_ImplGlfwGL3_Init(window, true);
+
+   // Setup style
+   ImGui::StyleColorsDark();
+   //ImGui::StyleColorsClassic();
+
+   glfwSetMouseButtonCallback(window, mouse_button_callback);
 
    const GLubyte* renderer = glGetString(GL_RENDERER);
@@ -596,4 +615,6 @@
       }
 
+      renderGui();
+
       glfwSwapBuffers(window);
 
@@ -646,5 +667,10 @@
    }
 
+   ImGui_ImplGlfwGL3_Shutdown();
+   ImGui::DestroyContext();
+
+   glfwDestroyWindow(window);
    glfwTerminate();
+
    return 0;
 }
@@ -782,2 +808,47 @@
    cout << label << " -> (" << v.x << "," << v.y << "," << v.z << "," << v.w << ")" << endl;
 }
+
+void renderGui() {
+   bool show_demo_window = true;
+   bool show_another_window = true;
+
+   ImGui_ImplGlfwGL3_NewFrame();
+
+   // 1. Show a simple window.
+   // Tip: if we don't call ImGui::Begin()/ImGui::End() the widgets automatically appears in a window called "Debug".
+   {
+      static float f = 0.0f;
+      static int counter = 0;
+      ImGui::Text("Hello, world!");                           // Display some text (you can use a format string too)
+      ImGui::SliderFloat("float", &f, 0.0f, 1.0f);            // Edit 1 float using a slider from 0.0f to 1.0f    
+      ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+      ImGui::Checkbox("Demo Window", &show_demo_window);      // Edit bools storing our windows open/close state
+      ImGui::Checkbox("Another Window", &show_another_window);
+
+      if (ImGui::Button("Button"))                            // Buttons return true when clicked (NB: most widgets return true when edited/activated)
+         counter++;
+      ImGui::SameLine();
+      ImGui::Text("counter = %d", counter);
+
+      ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+   }
+
+   // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows.
+   if (show_another_window) {
+      ImGui::Begin("Another Window", &show_another_window);
+      ImGui::Text("Hello from another window!");
+      if (ImGui::Button("Close Me"))
+         show_another_window = false;
+      ImGui::End();
+   }
+
+   // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow(). Read its code to learn more about Dear ImGui!
+   if (show_demo_window) {
+      ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver); // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
+      ImGui::ShowDemoWindow(&show_demo_window);
+   }
+
+   ImGui::Render();
+   ImGui_ImplGlfwGL3_RenderDrawData(ImGui::GetDrawData());
+}
