X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=demos%2Fdesertpillars%2Fsource%2Fdesertpillars.cpp;h=dee2c490148c2ea2ad95325785e1be05137edb88;hb=2b2676392aff2eb6b38c3e463cc67f4d67a4ef8b;hp=bdbc069e3e153d31bc69747c5a4f4a203c0dce2d;hpb=a266f0f915827b20591f6244ccc36129e844f408;p=libs%2Fgl.git diff --git a/demos/desertpillars/source/desertpillars.cpp b/demos/desertpillars/source/desertpillars.cpp index bdbc069e..dee2c490 100644 --- a/demos/desertpillars/source/desertpillars.cpp +++ b/demos/desertpillars/source/desertpillars.cpp @@ -24,7 +24,7 @@ DesertPillars::DesertPillars(int, char **): keyboard(window), view(window, gl_ctx), camera(resources.get("Camera.camera")), - sphere(resources.get("sphere_phong.object")), + sphere(resources.get("Sphere.object")), sphere_morph(0.0f), sphere_frozen(false), sphere_stopped(false), @@ -36,31 +36,39 @@ 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->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->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->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, sphere, *env_seq); + 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);