title: OpenGL cutting off part of screen
body: <p>I'm learning OpenGL, and I am reading a book to help me a long. I've followed it through half way and have decided to go off on my own path now that I'm familiar with the basics. I've started to develop an application, the intention is to just show a grid.</p>
  
  <p>I've pretty much nailed it, but when I run my application, part of the grid is cut off. I've attached a condensed version of the code (which has the same result) - does anyone know what I am doing wrong to make it cut off part of the screen? I've tinkered about a lot and I've run through a few values but I just cannot get this thing sorted. Any help or a nudge in the right direction is much appreciated.</p>
  
  <p>Code:</p>
  
  <pre><code>#include &lt;Windows.h&gt;
  #include &lt;GL/gl.h&gt;
  #include &lt;GL/glu.h&gt;
  #include "deps\glut\glut.h"
  
  void display();
  
  int main(int argc, char **argv) {
      glutInit(&amp;argc, argv);
      glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
      glutInitWindowSize(800, 600);
      glutCreateWindow("");
      glutDisplayFunc(display);
      glClearColor(1.0, 1.0, 1.0, 1.0);
      glColor3f(0.0, 0.0, 0.0);
  
      // Init
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      glOrtho(-8.0, 8.0, -8.0, 8.0, -8.0, 8.0);
  
      glutMainLoop();
      return 0;
  }
  
  void display() {
      float f;
  
      // Clear the screen
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
      gluLookAt(1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0);
  
      // This next bit of code just creates the grid
      glColor3f(0.0f, 0.0f, 0.0f);
      glPointSize(1.0);
      for(f=-10.0f;f&lt;10.0f;f++) {
          glBegin(GL_LINES);
              glVertex3f(f, 0.0f, -10.0f);
              glVertex3f(f, 0.0f, 10.0f);
          glEnd();
      }
      glRotatef(90, 0.0, 1.0, 0.0);
      for(f=-10.0f;f&lt;10.0f;f++) {
          glBegin(GL_LINES);
              glVertex3f(f, 0.0f, -10.0f);
              glVertex3f(f, 0.0f, 10.0f);
          glEnd();
      }
  
      // Swap the buffers
      glutSwapBuffers();
  }
  </code></pre>