6 #include "watersurface.h"
8 const int LATTICE_SIZE = 10;
9 const double LATTICE_UNIT = 1;
12 WaterSurfacePtr surface;
16 glMatrixMode(GL_PROJECTION);
18 gluPerspective(50, (GLfloat)300 / (GLfloat)300, 0, 1000);
19 gluLookAt(0,-10,10, 0,0,0, 0,1,0);
26 glMatrixMode(GL_MODELVIEW);
29 glClear(GL_COLOR_BUFFER_BIT);
39 int main(int argc, char** argv)
41 std::srand(std::time(0));
43 surface = std::make_shared<WaterSurface>(LATTICE_SIZE, LATTICE_UNIT);
44 sea = std::make_shared<Sea>(surface);
46 glutInit(&argc, argv);
47 glutInitDisplayMode(GLUT_DOUBLE);
48 glutInitWindowSize(300, 300);
49 glutInitWindowPosition(100, 100);
50 glutCreateWindow("seamulator");
52 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
54 glutDisplayFunc(displayMe);