Index: common/controls-new.cpp
===================================================================
--- common/controls-new.cpp	(revision 8a6d19d6c4540451e6eec71a5309028c58372af5)
+++ common/controls-new.cpp	(revision 92bc4fe40a6eb28c94402c92e71a3f2f414b29c2)
@@ -2,4 +2,8 @@
 #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
@@ -22,5 +26,5 @@
 
 // Initial position : on +Z
-glm::vec3 position = glm::vec3(4,3,-3); //glm::vec3( 0, 0, 5 );
+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;
@@ -36,5 +40,5 @@
 
 
-void computeMatricesFromInputs(){
+void computeMatricesFromInputs(int windowWidth, int windowHeight) {
 
 	// glfwGetTime is called only once, the first time this function is called
@@ -52,5 +56,5 @@
   // The call has no effect the first several times it's called
   if (centeredCount < 100) {
-    glfwSetCursorPos(window, 1024/2, 768/2);
+    glfwSetCursorPos(window, windowWidth/2, windowHeight/2);
     centeredCount++;
   }
@@ -58,6 +62,6 @@
 	// Compute new orientation
   /* STOP ROTATION FOR NOW */
-  float horizontalAngle = horizontalAngleBase + mouseSpeed * float(1024/2 - xpos );
-  // verticalAngle   += mouseSpeed * float( 768/2 - ypos );
+  float horizontalAngle = horizontalAngleBase + mouseSpeed * float(windowWidth/2 - xpos );
+  // verticalAngle   += mouseSpeed * float( windowHeight/2 - ypos );
 
 	// Direction : Spherical coordinates to Cartesian coordinates conversion
@@ -67,4 +71,10 @@
 		cos(verticalAngle) * cos(horizontalAngle)
 	);
+  glm::vec3 lookDirection(
+    0.0f,
+    -3.0f,
+    0.0f
+  );
+  lookDirection = lookDirection + 3.0f * direction;
 
 	// Right vector
@@ -105,5 +115,5 @@
                 // and looks here : at the same position, plus "direction"
 								// position+glm::vec3(-4,0,0), // position+glm::vec3(-4,-3,3),
-								position+direction,
+								position+lookDirection,
 								glm::vec3(0,1,0) //up                  // Head is up (set to 0,-1,0 to look upside-down)
 						   );
Index: common/controls.cpp
===================================================================
--- common/controls.cpp	(revision 8a6d19d6c4540451e6eec71a5309028c58372af5)
+++ common/controls.cpp	(revision 92bc4fe40a6eb28c94402c92e71a3f2f414b29c2)
@@ -35,5 +35,5 @@
 
 
-void computeMatricesFromInputs(){
+void computeMatricesFromInputs(int windowWidth, int windowHeight) {
 
 	// glfwGetTime is called only once, the first time this function is called
Index: common/controls.hpp
===================================================================
--- common/controls.hpp	(revision 8a6d19d6c4540451e6eec71a5309028c58372af5)
+++ common/controls.hpp	(revision 92bc4fe40a6eb28c94402c92e71a3f2f414b29c2)
@@ -2,5 +2,5 @@
 #define CONTROLS_HPP
 
-void computeMatricesFromInputs();
+void computeMatricesFromInputs(int windowWidth, int windowHeight);
 glm::mat4 getViewMatrix();
 glm::mat4 getProjectionMatrix();
Index: mygame.cpp
===================================================================
--- mygame.cpp	(revision 8a6d19d6c4540451e6eec71a5309028c58372af5)
+++ mygame.cpp	(revision 92bc4fe40a6eb28c94402c92e71a3f2f414b29c2)
@@ -2,4 +2,7 @@
 #include <stdio.h>
 #include <stdlib.h>
+
+#include <iostream>
+using namespace std;
 
 // Include GLEW
@@ -34,6 +37,8 @@
 	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);
+  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 ){
 		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" );
@@ -43,4 +48,5 @@
 	}
 	glfwMakeContextCurrent(window);
+  glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
 
 	// Initialize GLEW
@@ -213,13 +219,13 @@
 	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);
-
-		computeMatricesFromInputs();
+  do {
+
+    // Clear the screen
+    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+    // Use our shader
+    glUseProgram(programID);
+
+    computeMatricesFromInputs(mode->width, mode->height);
 
     // Projection matrix : 45� Field of View, 4:3 ratio, display range : 0.1 unit <-> 100 units
@@ -239,47 +245,46 @@
 
     // Remember, matrix multiplication is the other way around
-	  glm::mat4 MVP = Projection * View * Model;
+    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 );
+    // 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
