X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=demos%2Fdesertpillars%2Fsource%2Fdesertpillars.cpp;h=b5db8afd1f05d02867376819a160f2d2fea0fbc0;hp=6cde69b008e00ab47431dda0d939fde7489498fe;hb=d4e380914f02800b7d915a8748ac9ccd7029bc3b;hpb=e03a752116ab28283bf89dddf1228804cc853a7b diff --git a/demos/desertpillars/source/desertpillars.cpp b/demos/desertpillars/source/desertpillars.cpp index 6cde69b0..b5db8afd 100644 --- a/demos/desertpillars/source/desertpillars.cpp +++ b/demos/desertpillars/source/desertpillars.cpp @@ -36,31 +36,37 @@ DesertPillars::DesertPillars(int, char **): GL::Light &sun = resources.get("Sun.light"); sky = make_unique(content, sun); + sky->set_debug_name("Sky"); - unsigned shadow_size = 8192; - shadow_seq = make_unique(shadow_size, shadow_size); + shadow_seq = make_unique(); + shadow_seq->set_debug_name("Shadow sequence"); GL::Sequence::Step *step = &shadow_seq->add_step("shadow", content); - step->set_depth_test(&GL::DepthTest::lequal()); + step->set_depth_test(GL::LEQUAL); - shadow_map = make_unique(shadow_size, *sky, sun, *shadow_seq); + shadow_map = make_unique(8192, *sky, sun, *shadow_seq); + shadow_map->set_debug_name("Shadow map"); shadow_map->set_target(GL::Vector3(0.0f, 0.0f, 0.0f), 20.0f); GL::SequenceBuilder seq_bld(resources.get("Desert.seq")); seq_bld.set_renderable("content", *shadow_map); + seq_bld.set_debug_name("Main sequence"); sequence.reset(seq_bld.build(view)); - unsigned env_size = 256; - env_seq = make_unique(env_size, env_size); + env_seq = make_unique(); + env_seq->set_debug_name("Environment sequence"); step = &env_seq->add_step("", *shadow_map); step->set_lighting(&resources.get("Desert.lightn")); - step->set_depth_test(&GL::DepthTest::lequal()); + step->set_depth_test(GL::LEQUAL); env_map = make_unique(256, GL::RGB16F, 7, sphere, *env_seq); + env_map->set_debug_name("Environment map"); sphere.set_matrix(GL::Matrix::translation(GL::Vector3(0.0f, 0.0f, 3.3f))); content.add(resources.get("Background.scene")); content.add(*env_map); + camera.set_debug_name("Main camera"); + view.set_content(sequence.get()); view.set_camera(&camera);