title: This just shows a blank black screen, and if I do not put glutSwapBuffers() in both places it shows a blank white screen?
body: <p>When I compile it, it makes a blank blac screen, if I take out glut swap buffers from either location, or both at the same time I get a blank white screen, whats the problem?</p>
  
  <pre><code>#ifdef __APPLE__
  #include &lt;GLUT/glut.h&gt;
  #else
  #include &lt;GL/glut.h&gt;
  #endif
  
  #include &lt;stdlib.h&gt;
  
  
  
   void ProcessSpecialKeys(int key, int x, int y){
  
      switch(key){
  
         case GLUT_KEY_RIGHT:
  
  exit(0);
  
         case GLUT_KEY_LEFT:
  
  exit(0);
  
         case GLUT_KEY_UP:
  
  exit(0);
  
         case GLUT_KEY_DOWN:
  
  exit(0);
  
         default:
  
  exit(0);
  
      }
  
  }
  
  
  
  
  void renderPrimitive(void){
  
      glBegin(GL_QUADS);
      glVertex3f(-1.0f,-1.0f,0.0f);
      glVertex3f(-1.0f,1.0f,0.0f);
      glVertex3f(1.0f,1.0f,0.0f);
      glVertex3f(1.0f,-1.0f,0.0f);
      glEnd();
  }
  
  void display(void){
  
      glTranslatef(0.0f,0.0f,-0.5f);
      renderPrimitive();
      glutSwapBuffers();
  }
  
  int main(int argc, char **argv) {
  
  glutInit(&amp;argc, argv);
  glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
  glutInitWindowPosition(100,100);
  glutInitWindowSize(320,320);
  glutCreateWindow("Dimension");
  glutDisplayFunc(display);
  
      glLoadIdentity();
  
      glutSpecialFunc(ProcessSpecialKeys);
  
  glutMainLoop();
  
  return 0;
  }
  </code></pre>