title: C++ OpenGL - How to make a 2D square move on screen?
body: <p>How do I make a 2D square move on the screen? I try to move it but it just stays there.</p>
  
  <pre><code>int x = 100;
  int y = 100;
  int width = 50;
  int height = 50;
  
  x += 1;
  
  glBegin(GL_QUADS);
      glColor3f(r, g, b);
      glVertex2f(x, y);
      glVertex2f(x + width, y);
      glVertex2f(x + width, y + height);
      glVertex2f(x, y + height);
  glEnd();
  </code></pre>
  
  <p>It all loads fine, it draws the square and everything, but it just doesn't move the square, I'm using SDL to draw the window incase you want to know.</p>