Index: new-game.cpp
===================================================================
--- new-game.cpp	(revision d0b95962c3e4a536ba085aaf78bf8b52972c3523)
+++ new-game.cpp	(revision 93baa0eb78d26906de296f1966308b97fe496e17)
@@ -9,4 +9,5 @@
 #include <iostream>
 #include <fstream>
+#include <cmath>
 
 using namespace std;
@@ -74,17 +75,29 @@
    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);
+
    GLfloat points[] = {
       0.0f,  0.5f,  0.0f,
+     -0.5f, -0.5f,  0.0f,
       0.5f, -0.5f,  0.0f,
-     -0.5f, -0.5f,  0.0f,
    };
 
    GLfloat colors[] = {
      1.0, 0.0, 0.0,
+     0.0, 0.0, 1.0,
      0.0, 1.0, 0.0,
-     0.0, 0.0, 1.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.5f, 0.0f, 0.0f, 1.0f, // column 4
    };
 
@@ -119,8 +132,27 @@
    glLinkProgram(shader_program);
 
+   GLint location = glGetUniformLocation(shader_program, "model");
+
+   float speed = 1.0f;
+   float last_position = 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 (fabs(last_position) > 1.0f) {
+         speed = -speed;
+      }
+
+      model[12] = last_position + speed*elapsed_seconds;
+      last_position = model[12];
+      glUseProgram(shader_program);
+      glUniformMatrix4fv(location, 1, GL_FALSE, model);
+
       glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-      glUseProgram(shader_program);
       glBindVertexArray(vao);
+
       glDrawArrays(GL_TRIANGLES, 0, 3);
 
Index: test.vert
===================================================================
--- test.vert	(revision d0b95962c3e4a536ba085aaf78bf8b52972c3523)
+++ test.vert	(revision 93baa0eb78d26906de296f1966308b97fe496e17)
@@ -1,3 +1,5 @@
 #version 410
+
+uniform mat4 model;
 
 layout(location = 0) in vec3 vertex_position;
@@ -8,4 +10,4 @@
 void main() {
   color = vertex_color;
-  gl_Position = vec4(vertex_position, 1.0);
+  gl_Position = model * vec4(vertex_position, 1.0);
 }
