void setupView()
 {
-  glMatrixMode(GL_PROJECTION); // Switch to the projection matrix so that we can manipulate how our scene is viewed  
-  glLoadIdentity(); // Reset the projection matrix to the identity matrix so that we don't get any artifacts (cleaning up)
-  gluPerspective(50, (GLfloat)300 / (GLfloat)300, 0, 1000); // Set the Field of view angle (in degrees), the aspect ratio of our window, and the new and far planes
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  gluPerspective(50, (GLfloat)300 / (GLfloat)300, 0, 1000);
   gluLookAt(0,-10,10, 0,0,0, 0,1,0);
 }
 
   sea->update();
   surface->draw();
 
-  glFlush();
+  glutSwapBuffers();
 
   glutPostRedisplay();
 }
   sea = std::make_shared<Sea>(surface);
 
   glutInit(&argc, argv);
-  glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB|GLUT_DEPTH);
-  glEnable(GL_DEPTH_TEST);
+  glutInitDisplayMode(GLUT_DOUBLE);
   glutInitWindowSize(300, 300);
   glutInitWindowPosition(100, 100);
   glutCreateWindow("seamulator");