title: Drawing stripes in OpenGL (C++)
body: <p>I'm following the xoax.net tutorials for OpenGL in C++, and I am stuck on drawing the stripes in the U.S. flag using a for loop. I just get a blue screen (since I set the background colour to blue). Here is the code for the 'DrawStripes' function:</p>
  
  <pre><code>void DrawStripes() {
  for (int x = 0; x &lt; 13; ++x) {
      if (x % 2 == 0) {
          glColor3f(204/255, 0, 0);
      } else {
          glColor3f(1, 1, 1);
      }
  
      float fStartX = 0;
      float fEndX = 1;
      float fStartY = x * (1/13);
      float fEndY = (x + 1) * (1/13);
  
      if (x &gt; 5) {
          fStartX = .76/1.9;
      }
      glBegin(GL_QUADS);
      glVertex3f(fStartX, fStartY, 0);
      glVertex3f(fEndX, fStartY, 0);
      glVertex3f(fEndX, fEndY, 0);
      glVertex3f(fStartX, fEndY, 0);
      glEnd();
      }
  }
  </code></pre>
  
  <p>(I have put this function in the 'draw' function so it isn't just I'm not telling it to use the function)
  Any ideas?</p>
  
  <p>--- EDIT ---
  Here are the 'Draw' and 'Initialize' functions:</p>
  
  <pre><code>void Draw() {
  glClear(GL_COLOR_BUFFER_BIT);
      DrawStripes();
      glFlush();
  }
  
  void Initialize() {
  glClearColor(0.0, 0.0, 0.5, 0.0);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
  }
  </code></pre>