X-Git-Url: http://git.treefish.org/~alex/seamulator.git/blobdiff_plain/e729e891d35b7405434f4fc5a7dadcc8f3b9e414..ba8f356e863ed4a418f93c155e64eecaea0819bf:/src/seamulator.cpp diff --git a/src/seamulator.cpp b/src/seamulator.cpp index 4211109..aec8da1 100644 --- a/src/seamulator.cpp +++ b/src/seamulator.cpp @@ -27,6 +27,7 @@ #include "sea.h" #include "seaview.h" +#include "synthesizer.h" #include "watersurface.h" const int INIT_WINDOW_POS_X{50}; @@ -40,6 +41,7 @@ const char WINDOW_TITLE[]{"seamulator"}; SeaPtr sea; WaterSurfacePtr surface; std::unique_ptr seaView; +std::unique_ptr synthesizer; struct Settings { double windSpeed; @@ -62,13 +64,14 @@ int main(int argc, char** argv) std::srand(std::time(0)); surface = std::make_shared(settings.latticeSize, - settings.latticeExtend); + settings.latticeExtend); sea = std::make_shared(surface, - settings.windSpeed, - settings.amplitudeFactor); + settings.windSpeed, + settings.amplitudeFactor); seaView = std::make_unique(settings.latticeExtend * 1.5, - INIT_VIEW_AZIMUTH, - INIT_VIEW_ALTITUDE); + INIT_VIEW_AZIMUTH, + INIT_VIEW_ALTITUDE); + synthesizer = std::make_unique(surface); glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE); @@ -134,6 +137,7 @@ void glDisplayFunc() seaView->setupView(); sea->update(); surface->draw(); + synthesizer->tick(); glutSwapBuffers(); glutPostRedisplay();