X-Git-Url: http://git.treefish.org/~alex/seamulator.git/blobdiff_plain/8f1fd27636587d554e6e60ac45b9cb0efb01c5ce..refs/heads/noise:/src/seamulator.cpp?ds=inline
diff --git a/src/seamulator.cpp b/src/seamulator.cpp
index 0a1ff61..aec8da1 100644
--- a/src/seamulator.cpp
+++ b/src/seamulator.cpp
@@ -14,7 +14,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with Foobar. If not, see .
+ * along with Seamulator. If not, see .
*/
#include
@@ -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();