Index: .gitignore
===================================================================
--- .gitignore	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ .gitignore	(revision f286a10b0fd936a0e1df97cc55c91cf553d79902)
@@ -1,7 +1,4 @@
 vulkangame
 newgame
-pong
-mygame
-demo
 
 gl.log
Index: enGLGame.sln
===================================================================
--- OpenGLGame.sln	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,28 +1,0 @@
-﻿
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.26430.14
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenGLGame", "OpenGLGame.vcxproj", "{592F30FE-3B41-4EE6-A544-23F924C8A1C0}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|x64 = Debug|x64
-		Debug|x86 = Debug|x86
-		Release|x64 = Release|x64
-		Release|x86 = Release|x86
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Debug|x64.ActiveCfg = Debug|x64
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Debug|x64.Build.0 = Debug|x64
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Debug|x86.ActiveCfg = Debug|Win32
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Debug|x86.Build.0 = Debug|Win32
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Release|x64.ActiveCfg = Release|x64
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Release|x64.Build.0 = Release|x64
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Release|x86.ActiveCfg = Release|Win32
-		{592F30FE-3B41-4EE6-A544-23F924C8A1C0}.Release|x86.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
Index: enGLGame.vcxproj
===================================================================
--- OpenGLGame.vcxproj	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,129 +1,0 @@
-﻿<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{592F30FE-3B41-4EE6-A544-23F924C8A1C0}</ProjectGuid>
-    <Keyword>Win32Proj</Keyword>
-    <WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>Application</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v141</PlatformToolset>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="Shared">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <IncludePath>include;$(IncludePath)</IncludePath>
-    <LibraryPath>lib;$(LibraryPath)</LibraryPath>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <IncludePath>include;$(IncludePath)</IncludePath>
-    <LibraryPath>lib;$(LibraryPath)</LibraryPath>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <IncludePath>C:\Users\dportnoy\Desktop\opengl-game\include;C:\Users\dportnoy\Desktop\opengl-game\include;$(IncludePath)</IncludePath>
-    <LibraryPath>C:\Users\dportnoy\Desktop\opengl-game\lib;C:\Users\dportnoy\Desktop\opengl-game\lib;$(LibraryPath)</LibraryPath>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;GLEW_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>
-      </AdditionalIncludeDirectories>
-    </ClCompile>
-    <Link>
-      <TargetMachine>MachineX86</TargetMachine>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Console</SubSystem>
-      <AdditionalLibraryDirectories>
-      </AdditionalLibraryDirectories>
-      <AdditionalDependencies>opengl32.lib;glfw3.lib;glew32s.lib;%(AdditionalDependencies)</AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;GLEW_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <WarningLevel>Level3</WarningLevel>
-      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <TargetMachine>MachineX86</TargetMachine>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <SubSystem>Windows</SubSystem>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalDependencies>opengl32.lib;glfw3.lib;glew32s.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <Link>
-      <AdditionalDependencies>
-      </AdditionalDependencies>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="common\controls-new.cpp" />
-    <ClCompile Include="common\shader.cpp" />
-    <ClCompile Include="mygame.cpp" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
Index: mmon/controls-new.cpp
===================================================================
--- common/controls-new.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,123 +1,0 @@
-// Include GLFW
-#include <GLFW/glfw3.h>
-extern GLFWwindow* window; // The "extern" keyword here is to access the variable "window" declared in tutorialXXX.cpp. This is a hack to keep the tutorials simple. Please avoid this.
-
-#include <iostream>
-
-using namespace std;
-
-// Include GLM
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-using namespace glm;
-
-#include "controls.hpp"
-
-glm::mat4 ViewMatrix;
-glm::mat4 ProjectionMatrix;
-
-glm::mat4 getViewMatrix(){
-	return ViewMatrix;
-}
-glm::mat4 getProjectionMatrix(){
-	return ProjectionMatrix;
-}
-
-
-// Initial position : on +Z
-glm::vec3 position = glm::vec3(4,6,-3); //glm::vec3( 0, 0, 5 );
-// Initial horizontal angle : toward -Z
-float horizontalAngleBase = 3.14f * 3.0f / 2.0f; // 3.14f;
-// Initial vertical angle : none
-float verticalAngle = 0.0f;
-// Initial Field of View
-float initialFoV = 45.0f;
-
-float speed = 3.0f; // 3 units / second
-float mouseSpeed = 0.005f;
-int centeredCount = 0;
-
-
-
-void computeMatricesFromInputs(int windowWidth, int windowHeight) {
-
-	// glfwGetTime is called only once, the first time this function is called
-	static double lastTime = glfwGetTime();
-
-	// Compute time difference between current and last frame
-	double currentTime = glfwGetTime();
-	float deltaTime = float(currentTime - lastTime);
-
-	// Get mouse position
-	double xpos, ypos;
-	glfwGetCursorPos(window, &xpos, &ypos);
-
-	// Stupid hack to set the cursor position correctly
-  // The call has no effect the first several times it's called
-  if (centeredCount < 100) {
-    glfwSetCursorPos(window, windowWidth/2, windowHeight/2);
-    centeredCount++;
-  }
-
-	// Compute new orientation
-  /* STOP ROTATION FOR NOW */
-  float horizontalAngle = horizontalAngleBase + mouseSpeed * float(windowWidth/2 - xpos );
-  // verticalAngle   += mouseSpeed * float( windowHeight/2 - ypos );
-
-	// Direction : Spherical coordinates to Cartesian coordinates conversion
-	glm::vec3 direction(
-		cos(verticalAngle) * sin(horizontalAngle),
-		sin(verticalAngle),
-		cos(verticalAngle) * cos(horizontalAngle)
-	);
-  glm::vec3 lookDirection(
-    0.0f,
-    -3.0f,
-    0.0f
-  );
-  lookDirection = lookDirection + 3.0f * direction;
-
-	// Right vector
-	glm::vec3 right = glm::vec3(
-		sin(horizontalAngle - 3.14f/2.0f),
-		0,
-		cos(horizontalAngle - 3.14f/2.0f)
-	);
-
-	// Up vector
-	// glm::vec3 up = glm::cross( right, direction );
-
-	// Move forward
-	if (glfwGetKey( window, GLFW_KEY_UP ) == GLFW_PRESS){
-		position += direction * deltaTime * speed;
-	}
-	// Move backward
-	if (glfwGetKey( window, GLFW_KEY_DOWN ) == GLFW_PRESS){
-		position -= direction * deltaTime * speed;
-	}
-	// Strafe right
-	if (glfwGetKey( window, GLFW_KEY_RIGHT ) == GLFW_PRESS){
-		position += right * deltaTime * speed;
-	}
-	// Strafe left
-	if (glfwGetKey( window, GLFW_KEY_LEFT ) == GLFW_PRESS){
-		position -= right * deltaTime * speed;
-	}
-
-	float FoV = initialFoV;// - 5 * glfwGetMouseWheel(); // Now GLFW 3 requires setting up a callback for this. It's a bit too complicated for this beginner's tutorial, so it's disabled instead.
-
-	// Projection matrix : 45� Field of View, 4:3 ratio, display range : 0.1 unit <-> 100 units
-	ProjectionMatrix = glm::perspective(FoV, 4.0f / 3.0f, 0.1f, 100.0f);
-	// Camera matrix
-	ViewMatrix       = glm::lookAt(
-								position,           // Camera is here
-                //position+direction,
-                // and looks here : at the same position, plus "direction"
-								// position+glm::vec3(-4,0,0), // position+glm::vec3(-4,-3,3),
-								position+lookDirection,
-								glm::vec3(0,1,0) //up                  // Head is up (set to 0,-1,0 to look upside-down)
-						   );
-
-	// For the next frame, the "last time" will be "now"
-	lastTime = currentTime;
-}
Index: mmon/controls.cpp
===================================================================
--- common/controls.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,105 +1,0 @@
-// Include GLFW
-#include <GLFW/glfw3.h>
-extern GLFWwindow* window; // The "extern" keyword here is to access the variable "window" declared in tutorialXXX.cpp. This is a hack to keep the tutorials simple. Please avoid this.
-
-// Include GLM
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-using namespace glm;
-
-#include "controls.hpp"
-
-glm::mat4 ViewMatrix;
-glm::mat4 ProjectionMatrix;
-
-glm::mat4 getViewMatrix(){
-	return ViewMatrix;
-}
-glm::mat4 getProjectionMatrix(){
-	return ProjectionMatrix;
-}
-
-
-// Initial position : on +Z
-glm::vec3 position = glm::vec3( 0, 0, 5 );
-// Initial horizontal angle : toward -Z
-float horizontalAngle = 3.14f;
-// Initial vertical angle : none
-float verticalAngle = 0.0f;
-// Initial Field of View
-float initialFoV = 45.0f;
-
-float speed = 3.0f; // 3 units / second
-float mouseSpeed = 0.005f;
-
-
-
-void computeMatricesFromInputs(int windowWidth, int windowHeight) {
-
-	// glfwGetTime is called only once, the first time this function is called
-	static double lastTime = glfwGetTime();
-
-	// Compute time difference between current and last frame
-	double currentTime = glfwGetTime();
-	float deltaTime = float(currentTime - lastTime);
-
-	// Get mouse position
-	double xpos, ypos;
-	glfwGetCursorPos(window, &xpos, &ypos);
-
-	// Reset mouse position for next frame
-	glfwSetCursorPos(window, 1024/2, 768/2);
-
-	// Compute new orientation
-    /* STOP ROTATION FOR NOW */
-    horizontalAngle += mouseSpeed * float(1024/2 - xpos );
-    verticalAngle   += mouseSpeed * float( 768/2 - ypos );
-
-	// Direction : Spherical coordinates to Cartesian coordinates conversion
-	glm::vec3 direction(
-		cos(verticalAngle) * sin(horizontalAngle),
-		sin(verticalAngle),
-		cos(verticalAngle) * cos(horizontalAngle)
-	);
-
-	// Right vector
-	glm::vec3 right = glm::vec3(
-		sin(horizontalAngle - 3.14f/2.0f),
-		0,
-		cos(horizontalAngle - 3.14f/2.0f)
-	);
-
-	// Up vector
-	glm::vec3 up = glm::cross( right, direction );
-
-	// Move forward
-	if (glfwGetKey( window, GLFW_KEY_UP ) == GLFW_PRESS){
-		position += direction * deltaTime * speed;
-	}
-	// Move backward
-	if (glfwGetKey( window, GLFW_KEY_DOWN ) == GLFW_PRESS){
-		position -= direction * deltaTime * speed;
-	}
-	// Strafe right
-	if (glfwGetKey( window, GLFW_KEY_RIGHT ) == GLFW_PRESS){
-		position += right * deltaTime * speed;
-	}
-	// Strafe left
-	if (glfwGetKey( window, GLFW_KEY_LEFT ) == GLFW_PRESS){
-		position -= right * deltaTime * speed;
-	}
-
-	float FoV = initialFoV;// - 5 * glfwGetMouseWheel(); // Now GLFW 3 requires setting up a callback for this. It's a bit too complicated for this beginner's tutorial, so it's disabled instead.
-
-	// Projection matrix : 45� Field of View, 4:3 ratio, display range : 0.1 unit <-> 100 units
-	ProjectionMatrix = glm::perspective(FoV, 4.0f / 3.0f, 0.1f, 100.0f);
-	// Camera matrix
-	ViewMatrix       = glm::lookAt(
-								position,           // Camera is here
-								position+direction, // and looks here : at the same position, plus "direction"
-								up                  // Head is up (set to 0,-1,0 to look upside-down)
-						   );
-
-	// For the next frame, the "last time" will be "now"
-	lastTime = currentTime;
-}
Index: mmon/controls.hpp
===================================================================
--- common/controls.hpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#ifndef CONTROLS_HPP
-#define CONTROLS_HPP
-
-void computeMatricesFromInputs(int windowWidth, int windowHeight);
-glm::mat4 getViewMatrix();
-glm::mat4 getProjectionMatrix();
-
-#endif
Index: mmon/shader.cpp
===================================================================
--- common/shader.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,110 +1,0 @@
-#include <stdio.h>
-#include <string>
-#include <vector>
-#include <iostream>
-#include <fstream>
-#include <algorithm>
-using namespace std;
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <GL/glew.h>
-
-#include "shader.hpp"
-
-string shaders_dir = "shaders/" ;
-
-GLuint LoadShaders(const char * vertex_file_path,const char * fragment_file_path){
-
-	// Create the shaders
-	GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER);
-	GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);
-
-	// Read the Vertex Shader code from the file
-	std::string VertexShaderCode;
-	std::ifstream VertexShaderStream(shaders_dir+vertex_file_path, std::ios::in);
-	if(VertexShaderStream.is_open()){
-		std::string Line = "";
-		while(getline(VertexShaderStream, Line))
-			VertexShaderCode += "\n" + Line;
-		VertexShaderStream.close();
-	}else{
-		printf("Impossible to open %s%s. Are you in the right directory ? Don't forget to read the FAQ !\n", shaders_dir.c_str(), vertex_file_path);
-		getchar();
-		return 0;
-	}
-
-	// Read the Fragment Shader code from the file
-	std::string FragmentShaderCode;
-	std::ifstream FragmentShaderStream(shaders_dir+fragment_file_path, std::ios::in);
-	if(FragmentShaderStream.is_open()){
-		std::string Line = "";
-		while(getline(FragmentShaderStream, Line))
-			FragmentShaderCode += "\n" + Line;
-		FragmentShaderStream.close();
-	}
-
-	GLint Result = GL_FALSE;
-	int InfoLogLength;
-
-
-	// Compile Vertex Shader
-	printf("Compiling shader : %s\n", vertex_file_path);
-	char const * VertexSourcePointer = VertexShaderCode.c_str();
-	glShaderSource(VertexShaderID, 1, &VertexSourcePointer , NULL);
-	glCompileShader(VertexShaderID);
-
-	// Check Vertex Shader
-	glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result);
-	glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
-	if ( InfoLogLength > 0 ){
-		std::vector<char> VertexShaderErrorMessage(InfoLogLength+1);
-		glGetShaderInfoLog(VertexShaderID, InfoLogLength, NULL, &VertexShaderErrorMessage[0]);
-		printf("%s\n", &VertexShaderErrorMessage[0]);
-	}
-
-
-
-	// Compile Fragment Shader
-	printf("Compiling shader : %s\n", fragment_file_path);
-	char const * FragmentSourcePointer = FragmentShaderCode.c_str();
-	glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , NULL);
-	glCompileShader(FragmentShaderID);
-
-	// Check Fragment Shader
-	glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result);
-	glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
-	if ( InfoLogLength > 0 ){
-		std::vector<char> FragmentShaderErrorMessage(InfoLogLength+1);
-		glGetShaderInfoLog(FragmentShaderID, InfoLogLength, NULL, &FragmentShaderErrorMessage[0]);
-		printf("%s\n", &FragmentShaderErrorMessage[0]);
-	}
-
-
-
-	// Link the program
-	printf("Linking program\n");
-	GLuint ProgramID = glCreateProgram();
-	glAttachShader(ProgramID, VertexShaderID);
-	glAttachShader(ProgramID, FragmentShaderID);
-	glLinkProgram(ProgramID);
-
-	// Check the program
-	glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result);
-	glGetProgramiv(ProgramID, GL_INFO_LOG_LENGTH, &InfoLogLength);
-	if ( InfoLogLength > 0 ){
-		std::vector<char> ProgramErrorMessage(InfoLogLength+1);
-		glGetProgramInfoLog(ProgramID, InfoLogLength, NULL, &ProgramErrorMessage[0]);
-		printf("%s\n", &ProgramErrorMessage[0]);
-	}
-
-
-	glDetachShader(ProgramID, VertexShaderID);
-	glDetachShader(ProgramID, FragmentShaderID);
-
-	glDeleteShader(VertexShaderID);
-	glDeleteShader(FragmentShaderID);
-
-	return ProgramID;
-}
Index: mmon/shader.hpp
===================================================================
--- common/shader.hpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#ifndef SHADER_HPP
-#define SHADER_HPP
-
-GLuint LoadShaders(const char * vertex_file_path,const char * fragment_file_path);
-
-#endif
Index: mmon/texture.cpp
===================================================================
--- common/texture.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,211 +1,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <GL/glew.h>
-
-#include <GLFW/glfw3.h>
-
-
-GLuint loadBMP_custom(const char * imagepath){
-
-	printf("Reading image %s\n", imagepath);
-
-	// Data read from the header of the BMP file
-	unsigned char header[54];
-	unsigned int dataPos;
-	unsigned int imageSize;
-	unsigned int width, height;
-	// Actual RGB data
-	unsigned char * data;
-
-	// Open the file
-	FILE * file = fopen(imagepath,"rb");
-	if (!file)							    {printf("%s could not be opened. Are you in the right directory ? Don't forget to read the FAQ !\n", imagepath); getchar(); return 0;}
-
-	// Read the header, i.e. the 54 first bytes
-
-	// If less than 54 bytes are read, problem
-	if ( fread(header, 1, 54, file)!=54 ){
-		printf("Not a correct BMP file\n");
-		return 0;
-	}
-	// A BMP files always begins with "BM"
-	if ( header[0]!='B' || header[1]!='M' ){
-		printf("Not a correct BMP file\n");
-		return 0;
-	}
-	// Make sure this is a 24bpp file
-	if ( *(int*)&(header[0x1E])!=0  )         {printf("Not a correct BMP file\n");    return 0;}
-	if ( *(int*)&(header[0x1C])!=24 )         {printf("Not a correct BMP file\n");    return 0;}
-
-	// Read the information about the image
-	dataPos    = *(int*)&(header[0x0A]);
-	imageSize  = *(int*)&(header[0x22]);
-	width      = *(int*)&(header[0x12]);
-	height     = *(int*)&(header[0x16]);
-
-	// Some BMP files are misformatted, guess missing information
-	if (imageSize==0)    imageSize=width*height*3; // 3 : one byte for each Red, Green and Blue component
-	if (dataPos==0)      dataPos=54; // The BMP header is done that way
-
-	// Create a buffer
-	data = new unsigned char [imageSize];
-
-	// Read the actual data from the file into the buffer
-	fread(data,1,imageSize,file);
-
-	// Everything is in memory now, the file wan be closed
-	fclose (file);
-
-	// Create one OpenGL texture
-	GLuint textureID;
-	glGenTextures(1, &textureID);
-
-	// "Bind" the newly created texture : all future texture functions will modify this texture
-	glBindTexture(GL_TEXTURE_2D, textureID);
-
-	// Give the image to OpenGL
-	glTexImage2D(GL_TEXTURE_2D, 0,GL_RGB, width, height, 0, GL_BGR, GL_UNSIGNED_BYTE, data);
-
-	// OpenGL has now copied the data. Free our own version
-	delete [] data;
-
-	// Poor filtering, or ...
-	//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-	//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
-	// ... nice trilinear filtering.
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
-	glGenerateMipmap(GL_TEXTURE_2D);
-
-	// Return the ID of the texture we just created
-	return textureID;
-}
-
-// Since GLFW 3, glfwLoadTexture2D() has been removed. You have to use another texture loading library,
-// or do it yourself (just like loadBMP_custom and loadDDS)
-//GLuint loadTGA_glfw(const char * imagepath){
-//
-//	// Create one OpenGL texture
-//	GLuint textureID;
-//	glGenTextures(1, &textureID);
-//
-//	// "Bind" the newly created texture : all future texture functions will modify this texture
-//	glBindTexture(GL_TEXTURE_2D, textureID);
-//
-//	// Read the file, call glTexImage2D with the right parameters
-//	glfwLoadTexture2D(imagepath, 0);
-//
-//	// Nice trilinear filtering.
-//	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
-//	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
-//	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-//	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
-//	glGenerateMipmap(GL_TEXTURE_2D);
-//
-//	// Return the ID of the texture we just created
-//	return textureID;
-//}
-
-
-
-#define FOURCC_DXT1 0x31545844 // Equivalent to "DXT1" in ASCII
-#define FOURCC_DXT3 0x33545844 // Equivalent to "DXT3" in ASCII
-#define FOURCC_DXT5 0x35545844 // Equivalent to "DXT5" in ASCII
-
-GLuint loadDDS(const char * imagepath){
-
-	unsigned char header[124];
-
-	FILE *fp;
-
-	/* try to open the file */
-	fp = fopen(imagepath, "rb");
-	if (fp == NULL){
-		printf("%s could not be opened. Are you in the right directory ? Don't forget to read the FAQ !\n", imagepath); getchar();
-		return 0;
-	}
-
-	/* verify the type of file */
-	char filecode[4];
-	fread(filecode, 1, 4, fp);
-	if (strncmp(filecode, "DDS ", 4) != 0) {
-		fclose(fp);
-		return 0;
-	}
-
-	/* get the surface desc */
-	fread(&header, 124, 1, fp);
-
-	unsigned int height      = *(unsigned int*)&(header[8 ]);
-	unsigned int width	     = *(unsigned int*)&(header[12]);
-	unsigned int linearSize	 = *(unsigned int*)&(header[16]);
-	unsigned int mipMapCount = *(unsigned int*)&(header[24]);
-	unsigned int fourCC      = *(unsigned int*)&(header[80]);
-
-
-	unsigned char * buffer;
-	unsigned int bufsize;
-	/* how big is it going to be including all mipmaps? */
-	bufsize = mipMapCount > 1 ? linearSize * 2 : linearSize;
-	buffer = (unsigned char*)malloc(bufsize * sizeof(unsigned char));
-	fread(buffer, 1, bufsize, fp);
-	/* close the file pointer */
-	fclose(fp);
-
-	// unsigned int components  = (fourCC == FOURCC_DXT1) ? 3 : 4;
-	unsigned int format;
-	switch(fourCC)
-	{
-	case FOURCC_DXT1:
-		format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
-		break;
-	case FOURCC_DXT3:
-		format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
-		break;
-	case FOURCC_DXT5:
-		format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
-		break;
-	default:
-		free(buffer);
-		return 0;
-	}
-
-	// Create one OpenGL texture
-	GLuint textureID;
-	glGenTextures(1, &textureID);
-
-	// "Bind" the newly created texture : all future texture functions will modify this texture
-	glBindTexture(GL_TEXTURE_2D, textureID);
-	glPixelStorei(GL_UNPACK_ALIGNMENT,1);
-
-	unsigned int blockSize = (format == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) ? 8 : 16;
-	unsigned int offset = 0;
-
-	/* load the mipmaps */
-	for (unsigned int level = 0; level < mipMapCount && (width || height); ++level)
-	{
-		unsigned int size = ((width+3)/4)*((height+3)/4)*blockSize;
-		glCompressedTexImage2D(GL_TEXTURE_2D, level, format, width, height,
-			0, size, buffer + offset);
-
-		offset += size;
-		width  /= 2;
-		height /= 2;
-
-		// Deal with Non-Power-Of-Two textures. This code is not included in the webpage to reduce clutter.
-		if(width < 1) width = 1;
-		if(height < 1) height = 1;
-
-	}
-
-	free(buffer);
-
-	return textureID;
-
-
-}
Index: mmon/texture.hpp
===================================================================
--- common/texture.hpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,16 +1,0 @@
-#ifndef TEXTURE_HPP
-#define TEXTURE_HPP
-
-// Load a .BMP file using our custom loader
-GLuint loadBMP_custom(const char * imagepath);
-
-//// Since GLFW 3, glfwLoadTexture2D() has been removed. You have to use another texture loading library, 
-//// or do it yourself (just like loadBMP_custom and loadDDS)
-//// Load a .TGA file using GLFW's own loader
-//GLuint loadTGA_glfw(const char * imagepath);
-
-// Load a .DDS file using GLFW's own loader
-GLuint loadDDS(const char * imagepath);
-
-
-#endif
Index: me04.cpp
===================================================================
--- game04.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,287 +1,0 @@
-// Include standard headers
-#include <stdio.h>
-#include <stdlib.h>
-
-// Include GLEW
-#include <GL/glew.h>
-
-// Include GLFW
-#include <GLFW/glfw3.h>
-GLFWwindow* window;
-
-// Include GLM
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-using namespace glm;
-
-#include "common/shader.hpp"
-
-int main( void )
-{
-	// Initialise GLFW
-	if( !glfwInit() )
-	{
-		fprintf( stderr, "Failed to initialize GLFW\n" );
-		getchar();
-		return -1;
-	}
-
-	glfwWindowHint(GLFW_SAMPLES, 4);
-	glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
-	glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
-	glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // To make MacOS happy; should not be needed
-	glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
-
-	// Open a window and create its OpenGL context
-	window = glfwCreateWindow( 1024, 768, "Tutorial 04 - Colored Cube", NULL, NULL);
-	if( window == NULL ){
-		fprintf( stderr, "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorials.\n" );
-		getchar();
-		glfwTerminate();
-		return -1;
-	}
-	glfwMakeContextCurrent(window);
-
-	// Initialize GLEW
-	glewExperimental = true; // Needed for core profile
-	if (glewInit() != GLEW_OK) {
-		fprintf(stderr, "Failed to initialize GLEW\n");
-		getchar();
-		glfwTerminate();
-		return -1;
-	}
-
-	// Ensure we can capture the escape key being pressed below
-	glfwSetInputMode(window, GLFW_STICKY_KEYS, GL_TRUE);
-
-	// Dark blue background
-	glClearColor(0.0f, 0.0f, 0.4f, 0.0f);
-
-	// Enable depth test
-	glEnable(GL_DEPTH_TEST);
-	// Accept fragment if it closer to the camera than the former one
-	glDepthFunc(GL_LESS);
-
-	GLuint VertexArrayID;
-	glGenVertexArrays(1, &VertexArrayID);
-	glBindVertexArray(VertexArrayID);
-
-	// Create and compile our GLSL program from the shaders
-	GLuint programID = LoadShaders( "TransformVertexShader-color.vertexshader", "ColorFragmentShader.fragmentshader" );
-
-	// Get a handle for our "MVP" uniform
-	GLuint MatrixID = glGetUniformLocation(programID, "MVP");
-
-	// Projection matrix : 45� Field of View, 4:3 ratio, display range : 0.1 unit <-> 100 units
-	glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.0f);
-	// Camera matrix
-	glm::mat4 View       = glm::lookAt(
-								glm::vec3(4,3,-3), // Camera is at (4,3,-3), in World Space
-								glm::vec3(0,0,0), // and looks at the origin
-								glm::vec3(0,1,0)  // Head is up (set to 0,-1,0 to look upside-down)
-						   );
-	// Model matrix : an identity matrix (model will be at the origin)
-	glm::mat4 Model      = glm::mat4(1.0f);
-	// Our ModelViewProjection : multiplication of our 3 matrices
-	glm::mat4 MVP        = Projection * View * Model; // Remember, matrix multiplication is the other way around
-
-	// Our vertices. Tree consecutive floats give a 3D vertex; Three consecutive vertices give a triangle.
-	// A cube has 6 faces with 2 triangles each, so this makes 6*2=12 triangles, and 12*3 vertices
-	static const GLfloat g_vertex_buffer_data[] = {
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 0.0f, 1.0f,
-		-1.0f, 2.0f, 1.0f,
-		 1.0f, 2.0f,-1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f, 1.0f,
-		-1.0f, 0.0f,-1.0f,
-		 1.0f, 0.0f,-1.0f,
-		 1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f,-1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 2.0f, 1.0f,
-		-1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f, 1.0f,
-		-1.0f, 0.0f, 1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 2.0f, 1.0f,
-		-1.0f, 0.0f, 1.0f,
-		 1.0f, 0.0f, 1.0f,
-		 1.0f, 2.0f, 1.0f,
-		 1.0f, 0.0f,-1.0f,
-		 1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f,-1.0f,
-		 1.0f, 2.0f, 1.0f,
-		 1.0f, 0.0f, 1.0f,
-		 1.0f, 2.0f, 1.0f,
-		 1.0f, 2.0f,-1.0f,
-		-1.0f, 2.0f,-1.0f,
-		 1.0f, 2.0f, 1.0f,
-		-1.0f, 2.0f,-1.0f,
-		-1.0f, 2.0f, 1.0f,
-		 1.0f, 2.0f, 1.0f,
-		-1.0f, 2.0f, 1.0f,
-		 1.0f, 0.0f, 1.0f,
-
-    // floor
-    10.0f, 0.0f,  10.0f,
-    10.0f, 0.0f, -10.0f,
-   -10.0f, 0.0f,  10.0f,
-    10.0f, 0.0f, -10.0f,
-   -10.0f, 0.0f,  10.0f,
-   -10.0f, 0.0f, -10.0f,
-
-    // back wall
-    10.0f, 5.0f,  10.0f,
-    10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f,  10.0f,
-    10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f,  10.0f,
-   -10.0f, 0.0f,  10.0f,
-
-    // right wall
-   -10.0f, 5.0f,  10.0f,
-   -10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f, -10.0f,
-   -10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f, -10.0f,
-   -10.0f, 0.0f, -10.0f,
-	};
-
-	// One color for each vertex. They were generated randomly.
-	static const GLfloat g_color_buffer_data[] = {
-		0.583f,  0.771f,  0.014f,
-		0.609f,  0.115f,  0.436f,
-		0.327f,  0.483f,  0.844f,
-		0.822f,  0.569f,  0.201f,
-		0.435f,  0.602f,  0.223f,
-		0.310f,  0.747f,  0.185f,
-		0.597f,  0.770f,  0.761f,
-		0.559f,  0.436f,  0.730f,
-		0.359f,  0.583f,  0.152f,
-		0.483f,  0.596f,  0.789f,
-		0.559f,  0.861f,  0.639f,
-		0.195f,  0.548f,  0.859f,
-		0.014f,  0.184f,  0.576f,
-		0.771f,  0.328f,  0.970f,
-		0.406f,  0.615f,  0.116f,
-		0.676f,  0.977f,  0.133f,
-		0.971f,  0.572f,  0.833f,
-		0.140f,  0.616f,  0.489f,
-		0.997f,  0.513f,  0.064f,
-		0.945f,  0.719f,  0.592f,
-		0.543f,  0.021f,  0.978f,
-		0.279f,  0.317f,  0.505f,
-		0.167f,  0.620f,  0.077f,
-		0.347f,  0.857f,  0.137f,
-		0.055f,  0.953f,  0.042f,
-		0.714f,  0.505f,  0.345f,
-		0.783f,  0.290f,  0.734f,
-		0.722f,  0.645f,  0.174f,
-		0.302f,  0.455f,  0.848f,
-		0.225f,  0.587f,  0.040f,
-		0.517f,  0.713f,  0.338f,
-		0.053f,  0.959f,  0.120f,
-		0.393f,  0.621f,  0.362f,
-		0.673f,  0.211f,  0.457f,
-		0.820f,  0.883f,  0.371f,
-		0.982f,  0.099f,  0.879f,
-
-    // floor
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-
-    // back wall
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-
-    // right wall
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-	};
-
-	GLuint vertexbuffer;
-	glGenBuffers(1, &vertexbuffer);
-	glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
-
-	GLuint colorbuffer;
-	glGenBuffers(1, &colorbuffer);
-	glBindBuffer(GL_ARRAY_BUFFER, colorbuffer);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(g_color_buffer_data), g_color_buffer_data, GL_STATIC_DRAW);
-
-	do {
-
-		// Clear the screen
-		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-		// Use our shader
-		glUseProgram(programID);
-
-		// Send our transformation to the currently bound shader,
-		// in the "MVP" uniform
-		glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP[0][0]);
-
-		// 1rst attribute buffer : vertices
-		glEnableVertexAttribArray(0);
-		glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
-		glVertexAttribPointer(
-			0,                  // attribute. No particular reason for 0, but must match the layout in the shader.
-			3,                  // size
-			GL_FLOAT,           // type
-			GL_FALSE,           // normalized?
-			0,                  // stride
-			(void*)0            // array buffer offset
-		);
-
-		// 2nd attribute buffer : colors
-		glEnableVertexAttribArray(1);
-		glBindBuffer(GL_ARRAY_BUFFER, colorbuffer);
-		glVertexAttribPointer(
-			1,                                // attribute. No particular reason for 1, but must match the layout in the shader.
-			3,                                // size
-			GL_FLOAT,                         // type
-			GL_FALSE,                         // normalized?
-			0,                                // stride
-			(void*)0                          // array buffer offset
-		);
-
-		// Draw the triangle !
-		glDrawArrays(GL_TRIANGLES, 0, 12*3+18); // 12*3 indices starting at 0 -> 12 triangles
-
-		glDisableVertexAttribArray(0);
-		glDisableVertexAttribArray(1);
-
-		// Swap buffers
-		glfwSwapBuffers(window);
-		glfwPollEvents();
-
-	} // Check if the ESC key was pressed or the window was closed
-	while( glfwGetKey(window, GLFW_KEY_ESCAPE ) != GLFW_PRESS &&
-		   glfwWindowShouldClose(window) == 0 );
-
-	// Cleanup VBO and shader
-	glDeleteBuffers(1, &vertexbuffer);
-	glDeleteBuffers(1, &colorbuffer);
-	glDeleteProgram(programID);
-	glDeleteVertexArrays(1, &VertexArrayID);
-
-	// Close OpenGL window and terminate GLFW
-	glfwTerminate();
-
-	return 0;
-}
Index: me06.cpp
===================================================================
--- game06.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,257 +1,0 @@
-// Include standard headers
-#include <stdio.h>
-#include <stdlib.h>
-
-// Include GLEW
-#include <GL/glew.h>
-
-// Include GLFW
-#include <GLFW/glfw3.h>
-GLFWwindow* window;
-
-// Include GLM
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-using namespace glm;
-
-#include "common/shader.hpp"
-#include "common/texture.hpp"
-#include "common/controls.hpp"
-
-int main( void )
-{
-	// Initialise GLFW
-	if( !glfwInit() )
-	{
-		fprintf( stderr, "Failed to initialize GLFW\n" );
-		getchar();
-		return -1;
-	}
-
-	glfwWindowHint(GLFW_SAMPLES, 4);
-	glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
-	glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
-	glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // To make MacOS happy; should not be needed
-	glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
-
-	// Open a window and create its OpenGL context
-	window = glfwCreateWindow( 1024, 768, "Tutorial 0 - Keyboard and Mouse", NULL, NULL);
-	if( window == NULL ){
-		fprintf( stderr, "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorials.\n" );
-		getchar();
-		glfwTerminate();
-		return -1;
-	}
-    glfwMakeContextCurrent(window);
-
-	// Initialize GLEW
-	glewExperimental = true; // Needed for core profile
-	if (glewInit() != GLEW_OK) {
-		fprintf(stderr, "Failed to initialize GLEW\n");
-		getchar();
-		glfwTerminate();
-		return -1;
-	}
-
-	// Ensure we can capture the escape key being pressed below
-	glfwSetInputMode(window, GLFW_STICKY_KEYS, GL_TRUE);
-    // Hide the mouse and enable unlimited mouvement
-    glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
-
-    // Set the mouse at the center of the screen
-    glfwPollEvents();
-    glfwSetCursorPos(window, 1024/2, 768/2);
-
-	// Dark blue background
-	glClearColor(0.0f, 0.0f, 0.4f, 0.0f);
-
-	// Enable depth test
-	glEnable(GL_DEPTH_TEST);
-	// Accept fragment if it closer to the camera than the former one
-	glDepthFunc(GL_LESS);
-
-	// Cull triangles which normal is not towards the camera
-	glEnable(GL_CULL_FACE);
-
-	GLuint VertexArrayID;
-	glGenVertexArrays(1, &VertexArrayID);
-	glBindVertexArray(VertexArrayID);
-
-	// Create and compile our GLSL program from the shaders
-	GLuint programID = LoadShaders( "TransformVertexShader.vertexshader", "TextureFragmentShader.fragmentshader" );
-
-	// Get a handle for our "MVP" uniform
-	GLuint MatrixID = glGetUniformLocation(programID, "MVP");
-
-	// Load the texture
-	GLuint Texture = loadDDS("uvtemplate.DDS");
-
-	// Get a handle for our "myTextureSampler" uniform
-	GLuint TextureID  = glGetUniformLocation(programID, "myTextureSampler");
-
-	// Our vertices. Tree consecutive floats give a 3D vertex; Three consecutive vertices give a triangle.
-	// A cube has 6 faces with 2 triangles each, so this makes 6*2=12 triangles, and 12*3 vertices
-	static const GLfloat g_vertex_buffer_data[] = {
-		-1.0f,-1.0f,-1.0f,
-		-1.0f,-1.0f, 1.0f,
-		-1.0f, 1.0f, 1.0f,
-		 1.0f, 1.0f,-1.0f,
-		-1.0f,-1.0f,-1.0f,
-		-1.0f, 1.0f,-1.0f,
-		 1.0f,-1.0f, 1.0f,
-		-1.0f,-1.0f,-1.0f,
-		 1.0f,-1.0f,-1.0f,
-		 1.0f, 1.0f,-1.0f,
-		 1.0f,-1.0f,-1.0f,
-		-1.0f,-1.0f,-1.0f,
-		-1.0f,-1.0f,-1.0f,
-		-1.0f, 1.0f, 1.0f,
-		-1.0f, 1.0f,-1.0f,
-		 1.0f,-1.0f, 1.0f,
-		-1.0f,-1.0f, 1.0f,
-		-1.0f,-1.0f,-1.0f,
-		-1.0f, 1.0f, 1.0f,
-		-1.0f,-1.0f, 1.0f,
-		 1.0f,-1.0f, 1.0f,
-		 1.0f, 1.0f, 1.0f,
-		 1.0f,-1.0f,-1.0f,
-		 1.0f, 1.0f,-1.0f,
-		 1.0f,-1.0f,-1.0f,
-		 1.0f, 1.0f, 1.0f,
-		 1.0f,-1.0f, 1.0f,
-		 1.0f, 1.0f, 1.0f,
-		 1.0f, 1.0f,-1.0f,
-		-1.0f, 1.0f,-1.0f,
-		 1.0f, 1.0f, 1.0f,
-		-1.0f, 1.0f,-1.0f,
-		-1.0f, 1.0f, 1.0f,
-		 1.0f, 1.0f, 1.0f,
-		-1.0f, 1.0f, 1.0f,
-		 1.0f,-1.0f, 1.0f
-	};
-
-	// Two UV coordinatesfor each vertex. They were created withe Blender.
-	static const GLfloat g_uv_buffer_data[] = {
-		0.000059f, 0.000004f,
-		0.000103f, 0.336048f,
-		0.335973f, 0.335903f,
-		1.000023f, 0.000013f,
-		0.667979f, 0.335851f,
-		0.999958f, 0.336064f,
-		0.667979f, 0.335851f,
-		0.336024f, 0.671877f,
-		0.667969f, 0.671889f,
-		1.000023f, 0.000013f,
-		0.668104f, 0.000013f,
-		0.667979f, 0.335851f,
-		0.000059f, 0.000004f,
-		0.335973f, 0.335903f,
-		0.336098f, 0.000071f,
-		0.667979f, 0.335851f,
-		0.335973f, 0.335903f,
-		0.336024f, 0.671877f,
-		1.000004f, 0.671847f,
-		0.999958f, 0.336064f,
-		0.667979f, 0.335851f,
-		0.668104f, 0.000013f,
-		0.335973f, 0.335903f,
-		0.667979f, 0.335851f,
-		0.335973f, 0.335903f,
-		0.668104f, 0.000013f,
-		0.336098f, 0.000071f,
-		0.000103f, 0.336048f,
-		0.000004f, 0.671870f,
-		0.336024f, 0.671877f,
-		0.000103f, 0.336048f,
-		0.336024f, 0.671877f,
-		0.335973f, 0.335903f,
-		0.667969f, 0.671889f,
-		1.000004f, 0.671847f,
-		0.667979f, 0.335851f
-	};
-
-	GLuint vertexbuffer;
-	glGenBuffers(1, &vertexbuffer);
-	glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
-
-	GLuint uvbuffer;
-	glGenBuffers(1, &uvbuffer);
-	glBindBuffer(GL_ARRAY_BUFFER, uvbuffer);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(g_uv_buffer_data), g_uv_buffer_data, GL_STATIC_DRAW);
-
-	do{
-
-		// Clear the screen
-		glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-		// Use our shader
-		glUseProgram(programID);
-
-		// Compute the MVP matrix from keyboard and mouse input
-		computeMatricesFromInputs(1024, 768);
-		glm::mat4 ProjectionMatrix = getProjectionMatrix();
-		glm::mat4 ViewMatrix = getViewMatrix();
-		glm::mat4 ModelMatrix = glm::mat4(1.0);
-		glm::mat4 MVP = ProjectionMatrix * ViewMatrix * ModelMatrix;
-
-		// Send our transformation to the currently bound shader,
-		// in the "MVP" uniform
-		glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP[0][0]);
-
-		// Bind our texture in Texture Unit 0
-		glActiveTexture(GL_TEXTURE0);
-		glBindTexture(GL_TEXTURE_2D, Texture);
-		// Set our "myTextureSampler" sampler to user Texture Unit 0
-		glUniform1i(TextureID, 0);
-
-		// 1rst attribute buffer : vertices
-		glEnableVertexAttribArray(0);
-		glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
-		glVertexAttribPointer(
-			0,                  // attribute. No particular reason for 0, but must match the layout in the shader.
-			3,                  // size
-			GL_FLOAT,           // type
-			GL_FALSE,           // normalized?
-			0,                  // stride
-			(void*)0            // array buffer offset
-		);
-
-		// 2nd attribute buffer : UVs
-		glEnableVertexAttribArray(1);
-		glBindBuffer(GL_ARRAY_BUFFER, uvbuffer);
-		glVertexAttribPointer(
-			1,                                // attribute. No particular reason for 1, but must match the layout in the shader.
-			2,                                // size : U+V => 2
-			GL_FLOAT,                         // type
-			GL_FALSE,                         // normalized?
-			0,                                // stride
-			(void*)0                          // array buffer offset
-		);
-
-		// Draw the triangle !
-		glDrawArrays(GL_TRIANGLES, 0, 12*3); // 12*3 indices starting at 0 -> 12 triangles
-
-		glDisableVertexAttribArray(0);
-		glDisableVertexAttribArray(1);
-
-		// Swap buffers
-		glfwSwapBuffers(window);
-		glfwPollEvents();
-
-	} // Check if the ESC key was pressed or the window was closed
-	while( glfwGetKey(window, GLFW_KEY_ESCAPE ) != GLFW_PRESS &&
-		   glfwWindowShouldClose(window) == 0 );
-
-	// Cleanup VBO and shader
-	glDeleteBuffers(1, &vertexbuffer);
-	glDeleteBuffers(1, &uvbuffer);
-	glDeleteProgram(programID);
-	glDeleteTextures(1, &TextureID);
-	glDeleteVertexArrays(1, &VertexArrayID);
-
-	// Close OpenGL window and terminate GLFW
-	glfwTerminate();
-
-	return 0;
-}
Index: makefile
===================================================================
--- makefile	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ makefile	(revision f286a10b0fd936a0e1df97cc55c91cf553d79902)
@@ -23,13 +23,4 @@
 
 newgame: new-game.cpp logger.cpp utils.cpp CrashLogger.cpp stb_image.cpp imgui_impl_glfw_gl3.cpp $(IMGUI_FILES)
-	$(CC) $^ $(DEP) $(CFLAGS) -o $@
-
-pong: pong.cpp logger.cpp
-	$(CC) $^ $(DEP) $(CFLAGS) -o $@
-
-mygame: mygame.cpp common/shader.cpp common/texture.cpp common/controls-new.cpp
-	$(CC) $^ $(DEP) $(CFLAGS) -o $@
-
-demo: game06.cpp common/shader.cpp common/texture.cpp common/controls.cpp
 	$(CC) $^ $(DEP) $(CFLAGS) -o $@
 
@@ -66,6 +57,3 @@
 clean:
 	rm -f newgame
-	rm -f pong
-	rm -f mygame
-	rm -f demo
 	rm -f vulkangame
Index: game.cpp
===================================================================
--- mygame.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,283 +1,0 @@
-#include <GL/glew.h>
-#include <GLFW/glfw3.h>
-
-#include <glm/glm.hpp>
-#include <glm/gtc/matrix_transform.hpp>
-
-#include <cstdio>
-#include <cstdlib>
-#include <iostream>
-
-GLFWwindow* window;
-
-#include "common/shader.hpp"
-#include "common/controls.hpp"
-
-using namespace std;
-using namespace glm;
-
-int main(int argc, char* argv[]) {
-	if (!glfwInit()) {
-		cerr << "Failed to initialize GLFW" << endl;;
-		getchar();
-		return -1;
-	}
-
-	glfwWindowHint(GLFW_SAMPLES, 4);
-	glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
-	glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
-	glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // To make MacOS happy; should not be needed
-	glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
-
-  const GLFWvidmode* mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
-
-  // Open a window and create its OpenGL context
-  window = glfwCreateWindow(mode->width, mode->height, "My Space Game", glfwGetPrimaryMonitor(), NULL);
-	if (window == NULL) {
-		cerr << "Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorials." << endl;
-		getchar();
-		glfwTerminate();
-		return -1;
-	}
-	glfwMakeContextCurrent(window);
-  glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
-
-	// Initialize GLEW
-	glewExperimental = true; // Needed for core profile
-	if (glewInit() != GLEW_OK) {
-		cout << "Failed to initialize GLEW\n" << endl;
-		getchar();
-		glfwTerminate();
-		return -1;
-	}
-
-	// Ensure we can capture the escape key being pressed below
-	glfwSetInputMode(window, GLFW_STICKY_KEYS, GL_TRUE);
-
-	// Dark blue background
-	glClearColor(0.0f, 0.0f, 0.4f, 0.0f);
-
-	// Enable depth test
-	glEnable(GL_DEPTH_TEST);
-	// Accept fragment if it closer to the camera than the former one
-	glDepthFunc(GL_LESS);
-
-	GLuint VertexArrayID;
-	glGenVertexArrays(1, &VertexArrayID);
-	glBindVertexArray(VertexArrayID);
-
-	// Create and compile our GLSL program from the shaders
-	GLuint programID = LoadShaders( "TransformVertexShader-color.vertexshader", "ColorFragmentShader.fragmentshader" );
-
-	// Get a handle for our "MVP" uniform
-	GLuint MatrixID = glGetUniformLocation(programID, "MVP");
-
-	// Our vertices. Tree consecutive floats give a 3D vertex; Three consecutive vertices give a triangle.
-	// A cube has 6 faces with 2 triangles each, so this makes 6*2=12 triangles, and 12*3 vertices
-	static const GLfloat g_vertex_buffer_data[] = {
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 0.0f, 1.0f,
-		-1.0f, 2.0f, 1.0f,
-		 1.0f, 2.0f,-1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f, 1.0f,
-		-1.0f, 0.0f,-1.0f,
-		 1.0f, 0.0f,-1.0f,
-		 1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f,-1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 2.0f, 1.0f,
-		-1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f, 1.0f,
-		-1.0f, 0.0f, 1.0f,
-		-1.0f, 0.0f,-1.0f,
-		-1.0f, 2.0f, 1.0f,
-		-1.0f, 0.0f, 1.0f,
-		 1.0f, 0.0f, 1.0f,
-		 1.0f, 2.0f, 1.0f,
-		 1.0f, 0.0f,-1.0f,
-		 1.0f, 2.0f,-1.0f,
-		 1.0f, 0.0f,-1.0f,
-		 1.0f, 2.0f, 1.0f,
-		 1.0f, 0.0f, 1.0f,
-		 1.0f, 2.0f, 1.0f,
-		 1.0f, 2.0f,-1.0f,
-		-1.0f, 2.0f,-1.0f,
-		 1.0f, 2.0f, 1.0f,
-		-1.0f, 2.0f,-1.0f,
-		-1.0f, 2.0f, 1.0f,
-		 1.0f, 2.0f, 1.0f,
-		-1.0f, 2.0f, 1.0f,
-		 1.0f, 0.0f, 1.0f,
-
-    // floor
-    10.0f, 0.0f,  10.0f,
-    10.0f, 0.0f, -10.0f,
-   -10.0f, 0.0f,  10.0f,
-    10.0f, 0.0f, -10.0f,
-   -10.0f, 0.0f,  10.0f,
-   -10.0f, 0.0f, -10.0f,
-
-    // back wall
-    10.0f, 5.0f,  10.0f,
-    10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f,  10.0f,
-    10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f,  10.0f,
-   -10.0f, 0.0f,  10.0f,
-
-    // right wall
-   -10.0f, 5.0f,  10.0f,
-   -10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f, -10.0f,
-   -10.0f, 0.0f,  10.0f,
-   -10.0f, 5.0f, -10.0f,
-   -10.0f, 0.0f, -10.0f,
-	};
-
-	// One color for each vertex. They were generated randomly.
-	static const GLfloat g_color_buffer_data[] = {
-		0.583f,  0.771f,  0.014f,
-		0.609f,  0.115f,  0.436f,
-		0.327f,  0.483f,  0.844f,
-		0.822f,  0.569f,  0.201f,
-		0.435f,  0.602f,  0.223f,
-		0.310f,  0.747f,  0.185f,
-		0.597f,  0.770f,  0.761f,
-		0.559f,  0.436f,  0.730f,
-		0.359f,  0.583f,  0.152f,
-		0.483f,  0.596f,  0.789f,
-		0.559f,  0.861f,  0.639f,
-		0.195f,  0.548f,  0.859f,
-		0.014f,  0.184f,  0.576f,
-		0.771f,  0.328f,  0.970f,
-		0.406f,  0.615f,  0.116f,
-		0.676f,  0.977f,  0.133f,
-		0.971f,  0.572f,  0.833f,
-		0.140f,  0.616f,  0.489f,
-		0.997f,  0.513f,  0.064f,
-		0.945f,  0.719f,  0.592f,
-		0.543f,  0.021f,  0.978f,
-		0.279f,  0.317f,  0.505f,
-		0.167f,  0.620f,  0.077f,
-		0.347f,  0.857f,  0.137f,
-		0.055f,  0.953f,  0.042f,
-		0.714f,  0.505f,  0.345f,
-		0.783f,  0.290f,  0.734f,
-		0.722f,  0.645f,  0.174f,
-		0.302f,  0.455f,  0.848f,
-		0.225f,  0.587f,  0.040f,
-		0.517f,  0.713f,  0.338f,
-		0.053f,  0.959f,  0.120f,
-		0.393f,  0.621f,  0.362f,
-		0.673f,  0.211f,  0.457f,
-		0.820f,  0.883f,  0.371f,
-		0.982f,  0.099f,  0.879f,
-
-    // floor
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-    0.000f, 0.600f, 0.600f,
-
-    // back wall
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-    1.000f, 0.600f, 0.600f,
-
-    // right wall
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-    1.000f, 0.000f, 0.000f,
-	};
-
-	GLuint vertexbuffer;
-	glGenBuffers(1, &vertexbuffer);
-	glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(g_vertex_buffer_data), g_vertex_buffer_data, GL_STATIC_DRAW);
-
-	GLuint colorbuffer;
-	glGenBuffers(1, &colorbuffer);
-	glBindBuffer(GL_ARRAY_BUFFER, colorbuffer);
-	glBufferData(GL_ARRAY_BUFFER, sizeof(g_color_buffer_data), g_color_buffer_data, GL_STATIC_DRAW);
-
-  do {
-
-    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-    glUseProgram(programID);
-
-    computeMatricesFromInputs(mode->width, mode->height);
-
-    // Projection matrix : 45� Field of View, 4:3 ratio, display range : 0.1 unit <-> 100 units
-    glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.0f);
-
-    glm::mat4 View = getViewMatrix();
-
-    glm::mat4 Model = glm::mat4(1.0f);
-
-    // Remember, matrix multiplication is the other way around
-    glm::mat4 MVP = Projection * View * Model;
-
-    // Send our transformation to the currently bound shader,
-    // in the "MVP" uniform
-    glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP[0][0]);
-
-    // 1rst attribute buffer : vertices
-    glEnableVertexAttribArray(0);
-    glBindBuffer(GL_ARRAY_BUFFER, vertexbuffer);
-    glVertexAttribPointer(
-      0,                  // attribute. No particular reason for 0, but must match the layout in the shader.
-      3,                  // size
-      GL_FLOAT,           // type
-      GL_FALSE,           // normalized?
-      0,                  // stride
-      (void*)0            // array buffer offset
-    );
-
-    // 2nd attribute buffer : colors
-    glEnableVertexAttribArray(1);
-    glBindBuffer(GL_ARRAY_BUFFER, colorbuffer);
-    glVertexAttribPointer(
-      1,                                // attribute. No particular reason for 1, but must match the layout in the shader.
-      3,                                // size
-      GL_FLOAT,                         // type
-      GL_FALSE,                         // normalized?
-      0,                                // stride
-      (void*)0                          // array buffer offset
-    );
-
-    // Draw the triangle !
-    glDrawArrays(GL_TRIANGLES, 0, 12*3+18); // 12*3 indices starting at 0 -> 12 triangles
-
-    glDisableVertexAttribArray(0);
-    glDisableVertexAttribArray(1);
-
-    // Swap buffers
-    glfwSwapBuffers(window);
-    glfwPollEvents();
-
-  // Check if the ESC key was pressed or the window was closed
-  } while( glfwGetKey(window, GLFW_KEY_ESCAPE ) != GLFW_PRESS && glfwWindowShouldClose(window) == 0 );
-
-	// Cleanup VBO and shader
-	glDeleteBuffers(1, &vertexbuffer);
-	glDeleteBuffers(1, &colorbuffer);
-	glDeleteProgram(programID);
-	glDeleteVertexArrays(1, &VertexArrayID);
-
-	// Close OpenGL window and terminate GLFW
-	glfwTerminate();
-
-	return 0;
-}
Index: ng.cpp
===================================================================
--- pong.cpp	(revision 1c6cd5ef9174904582802fdcecc853491b15cd4d)
+++ 	(revision )
@@ -1,332 +1,0 @@
-#include "logger.h"
-
-#include <GL/glew.h>
-#include <GLFW/glfw3.h>
-
-#include <cstdio>
-#include <iostream>
-#include <fstream>
-#include <cmath>
-
-using namespace std;
-
-GLuint loadShader(GLenum type, string file);
-GLuint createDataBuffer(size_t size, GLfloat* data);
-GLuint createArrayBuffer(GLuint points_vbo, GLuint colors_vbo);
-
-GLfloat* createCirclePoints(unsigned int smoothness, GLfloat centerX, GLfloat centerY, GLfloat radius);
-GLfloat* createCircleColors(unsigned int smoothness);
-
-const double PI = 3.1415926535897;
-const bool FULLSCREEN = false;
-
-void glfw_error_callback(int error, const char* description) {
-   gl_log_err("GLFW ERROR: code %i msg: %s\n", error, description);
-}
-
-int main(int argc, char* argv[]) {
-   cout << "New OpenGL Game" << endl;
-
-   if (!restart_gl_log()) {}
-   gl_log("starting GLFW\n%s\n", glfwGetVersionString());
-
-   glfwSetErrorCallback(glfw_error_callback);
-   if (!glfwInit()) {
-      fprintf(stderr, "ERROR: could not start GLFW3\n");
-      return 1;
-   }
-
-#ifdef __APPLE__
-   glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
-   glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
-   glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
-   glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
-#endif
-
-   glfwWindowHint(GLFW_SAMPLES, 4);
-
-   GLFWwindow* window = NULL;
-
-   int width = 640;
-   int height = 480;
-
-   if (FULLSCREEN) {
-      GLFWmonitor* mon = glfwGetPrimaryMonitor();
-      const GLFWvidmode* vmode = glfwGetVideoMode(mon);
-
-      cout << "Fullscreen resolution " << vmode->width << "x" << vmode->height << endl;
-      window = glfwCreateWindow(vmode->width, vmode->height, "Extended GL Init", mon, NULL);
-
-      width = vmode->width;
-      height = vmode->height;
-   } else {
-      window = glfwCreateWindow(width, height, "Hello Triangle", NULL, NULL);
-   }
-
-   if (!window) {
-      fprintf(stderr, "ERROR: could not open window with GLFW3\n");
-      glfwTerminate();
-      return 1;
-   }
-   glfwMakeContextCurrent(window);
-   glewExperimental = GL_TRUE;
-   glewInit();
-
-   // glViewport(0, 0, width*2, height*2);
-
-   const GLubyte* renderer = glGetString(GL_RENDERER);
-   const GLubyte* version = glGetString(GL_VERSION);
-   printf("Renderer: %s\n", renderer);
-   printf("OpenGL version supported %s\n", version);
-
-   glEnable(GL_DEPTH_TEST);
-   glDepthFunc(GL_LESS);
-
-   glEnable(GL_CULL_FACE);
-   // glCullFace(GL_BACK);
-   // glFrontFace(GL_CW);
-
-   unsigned int numBallPoints = 36;
-
-   GLfloat ballRadius = 0.2f;
-   GLfloat paddleThickness = 0.1f;
-
-   GLfloat* points = createCirclePoints(numBallPoints, 0.0f, 0.0f, ballRadius);
-   GLfloat* colors = createCircleColors(numBallPoints);
-
-   GLfloat points_paddle[] = {
-      -1.0f,  0.15f,  0.0f,
-      -1.0f, -0.15f,  0.0f,
-      -0.9f, -0.15f,  0.0f,
-      -1.0f,  0.15f,  0.0f,
-      -0.9f, -0.15f,  0.0f,
-      -0.9f,  0.15f,  0.0f,
-   };
-
-   GLfloat colors_paddle[] = {
-      1.0, 0.0, 0.0,
-      1.0, 0.0, 0.0,
-      1.0, 0.0, 0.0,
-      1.0, 0.0, 0.0,
-      1.0, 0.0, 0.0,
-      1.0, 0.0, 0.0,
-   };
-
-   GLfloat model[] = {
-     1.0f, 0.0f, 0.0f, 0.0f, // column 1
-     0.0f, 1.0f, 0.0f, 0.0f, // column 2
-     0.0f, 0.0f, 1.0f, 0.0f, // column 3
-     0.0f, 0.0f, 0.0f, 1.0f, // column 4
-   };
-
-   GLuint ball_points_vbo = createDataBuffer(numBallPoints*9*sizeof(GLfloat), points);
-   GLuint ball_colors_vbo = createDataBuffer(numBallPoints*9*sizeof(GLfloat), colors);
-   GLuint ball_vao = createArrayBuffer(ball_points_vbo, ball_colors_vbo);
-
-   GLuint paddle_points_vbo = createDataBuffer(sizeof(points_paddle), points_paddle);
-   GLuint paddle_colors_vbo = createDataBuffer(sizeof(colors_paddle), colors_paddle);
-   GLuint paddle_vao = createArrayBuffer(paddle_points_vbo, paddle_colors_vbo);
-
-   GLuint vs = loadShader(GL_VERTEX_SHADER, "./test.vert");
-   GLuint fs = loadShader(GL_FRAGMENT_SHADER, "./test.frag");
-
-   GLuint shader_program = glCreateProgram();
-   glAttachShader(shader_program, vs);
-   glAttachShader(shader_program, fs);
-
-   glLinkProgram(shader_program);
-   glUseProgram(shader_program);
-
-   GLint location = glGetUniformLocation(shader_program, "model");
-
-   float speedX = 1.0f;
-   float speedY = 0.0f;
-   float last_position_x = 0.0f;
-   float last_position_y = 0.0f;
-   float last_paddle_pos = 0.0f;
-
-   double previous_seconds = glfwGetTime();
-   while (!glfwWindowShouldClose(window)) {
-      double current_seconds = glfwGetTime();
-      double elapsed_seconds = current_seconds - previous_seconds;
-      previous_seconds = current_seconds;
-
-      if (last_position_x > 1.0f-ballRadius) {
-         speedX = -speedX;
-      }
-      if (last_position_y+ballRadius>1.0f || last_position_y-ballRadius<-1.0f) {
-         speedY = -speedY;
-      }
-
-      if (last_position_x < -1.0f+ballRadius+paddleThickness &&
-          last_position_x > -1.0f) {
-         if (fabs(last_paddle_pos-last_position_y) < 0.15f) {
-            speedX = -speedX;
-         } else {
-            // if the ball hits the paddle on a corner, make it bounce off
-            // at an angle
-            float horDist = fabs(paddleThickness-1.0f-last_position_x);
-            float verDist1 = fabs(last_paddle_pos+0.15f-last_position_y);
-            float verDist2 = fabs(last_paddle_pos-0.15f-last_position_y);
-
-            float dist1 = pow(horDist, 2)+pow(verDist1, 2);
-            float dist2 = pow(horDist, 2)+pow(verDist2, 2);
-
-            if (dist1 < ballRadius) {
-               if (speedX == -1.0f || speedY == 0.7f) {
-                  speedX = 0.7f;
-                  speedY = 0.7f;
-               } else {
-                  speedX = 1.0f;
-                  speedY = 0.0f;
-               }
-            } else if (dist2 < ballRadius) {
-               if (speedX == -1.0f || speedY == -0.7f) {
-                  speedX = 0.7f;
-                  speedY = -0.7f;
-               } else {
-                  speedX = 1.0f;
-                  speedY = 0.0f;
-               }
-            }
-         }
-      }
-
-      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-      model[12] = 0.0f;
-      model[13] = last_paddle_pos;
-      glUniformMatrix4fv(location, 1, GL_FALSE, model);
-
-      glBindVertexArray(paddle_vao);
-      glEnableVertexAttribArray(0);
-      glEnableVertexAttribArray(1);
-
-      glDrawArrays(GL_TRIANGLES, 0, sizeof(points_paddle)/sizeof(GLfloat)/3);
-
-      model[12] = last_position_x + speedX*elapsed_seconds;
-      last_position_x = model[12];
-      model[13] = last_position_y + speedY*elapsed_seconds;
-      last_position_y = model[13];
-      glUniformMatrix4fv(location, 1, GL_FALSE, model);
-
-      glBindVertexArray(ball_vao);
-      glEnableVertexAttribArray(0);
-      glEnableVertexAttribArray(1);
-
-      glDrawArrays(GL_TRIANGLES, 0, numBallPoints*3);
-
-      glfwPollEvents();
-      glfwSwapBuffers(window);
-
-      if (GLFW_PRESS == glfwGetKey(window, GLFW_KEY_ESCAPE)) {
-         glfwSetWindowShouldClose(window, 1);
-      }
-      if (GLFW_PRESS == glfwGetKey(window, GLFW_KEY_UP)) {
-         last_paddle_pos += 1.0f * elapsed_seconds;
-         if (last_paddle_pos > 0.85f) {
-            last_paddle_pos = 0.85f;
-         }
-      }
-      if (GLFW_PRESS == glfwGetKey(window, GLFW_KEY_DOWN)) {
-         last_paddle_pos -= 1.0f * elapsed_seconds;
-         if (last_paddle_pos < -0.85f) {
-            last_paddle_pos = -0.85f;
-         }
-      }
-   }
-
-   glfwTerminate();
-
-   delete points;
-   delete colors;
-
-   return 0;
-}
-
-GLuint loadShader(GLenum type, string file) {
-  cout << "Loading shader from file " << file << endl;
-
-  ifstream shaderFile(file);
-  GLuint shaderId = 0;
-
-  if (shaderFile.is_open()) {
-    string line, shaderString;
-
-    while(getline(shaderFile, line)) {
-      shaderString += line + "\n";
-    }
-    shaderFile.close();
-    const char* shaderCString = shaderString.c_str();
-
-    shaderId = glCreateShader(type);
-    glShaderSource(shaderId, 1, &shaderCString, NULL);
-    glCompileShader(shaderId);
-
-    cout << "Loaded successfully" << endl;
-  } else {
-    cout << "Failed to loade the file" << endl;
-  }
-
-  return shaderId;
-}
-
-GLuint createDataBuffer(size_t size, GLfloat* data) {
-   GLuint vbo = 0;
-   glGenBuffers(1, &vbo);
-   glBindBuffer(GL_ARRAY_BUFFER, vbo);
-   glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
-   return vbo;
-}
-
-GLuint createArrayBuffer(GLuint points_vbo, GLuint colors_vbo) {
-   GLuint vao = 0;
-   glGenVertexArrays(1, &vao);
-   glBindVertexArray(vao);
-   glBindBuffer(GL_ARRAY_BUFFER, points_vbo);
-   glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);
-   glBindBuffer(GL_ARRAY_BUFFER, colors_vbo);
-   glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, NULL);
-   return vao;
-}
-
-GLfloat* createCirclePoints(unsigned int smoothness, GLfloat centerX, GLfloat centerY, GLfloat radius) {
-   GLfloat* points = new GLfloat[smoothness*9];
-
-   GLfloat curX, curY, nextX, nextY;
-   curX = centerX;
-   curY = centerY+radius;
-
-   for (unsigned int i=0; i<smoothness; i++) {
-      double radians = PI/2 + 2*PI * (i+1)/smoothness;
-      nextX = centerX + cos(radians)*radius;
-      nextY = centerY + sin(radians)*radius;
-
-      points[i*9] = curX;
-      points[i*9+1] = curY;
-      points[i*9+2] = 0.5f;
-      points[i*9+3] = nextX;
-      points[i*9+4] = nextY;
-      points[i*9+5] = 0.5f;
-      points[i*9+6] = centerX;
-      points[i*9+7] = centerY;
-      points[i*9+8] = 0.5f;
-
-      curX = nextX;
-      curY = nextY;
-   }
-
-   return points;
-}
-
-GLfloat* createCircleColors(unsigned int smoothness) {
-   GLfloat* colors = new GLfloat[smoothness*9];
-
-   for (unsigned int i=0; i<smoothness*3; i++) {
-      colors[i*3] = 0.0f;
-      colors[i*3+1] = 1.0f;
-      colors[i*3+2] = 0.0f;
-   }
-
-   return colors;
-}
