X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=demos%2Fforestpond%2Fsource%2Fforestpond.cpp;h=39f4ce6c2382e1e6b7af114557124e4bc9773be6;hp=e480d209582d6568119e7362e16c94ca65305ed3;hb=HEAD;hpb=8e863afa468425807d53b9c935428029c3c8a15b diff --git a/demos/forestpond/source/forestpond.cpp b/demos/forestpond/source/forestpond.cpp index e480d209..b327489d 100644 --- a/demos/forestpond/source/forestpond.cpp +++ b/demos/forestpond/source/forestpond.cpp @@ -12,15 +12,21 @@ ForestPond::ForestPond(int, char **): because it requires Mesh to have its vertex format ready. */ resources(nullptr), view(window), - camera(resources.get("Camera.camera")) + camera(resources.get("Camera.camera")), + water(resources.get("Water.object"), resources, { resources.get("Terrain.mesh"), -10.0f, -3.0f, 2.0f, 6.0f }) { window.set_title("Forest Pond"); - window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &DesertPillars::exit), 0)); + window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &ForestPond::exit), 0)); GL::SequenceBuilder seq_bld(resources.get("Forest.seq")); seq_bld.set_debug_name("Main sequence"); + seq_bld.set_renderable("content", content); sequence.reset(seq_bld.build(view)); + content.add(resources.get("Forest.scene")); + content.add(water); + water.set_matrix(GL::Matrix::translation(GL::Vector3(-3, 2, 0))); + view.set_content(sequence.get()); view.set_camera(&camera); }