keyboard(window),
view(window, gl_ctx),
camera(resources.get<GL::Camera>("Camera.camera")),
- sphere(resources.get<GL::Object>("sphere_phong.object")),
+ sphere(resources.get<GL::Object>("Sphere.object")),
sphere_morph(0.0f),
sphere_frozen(false),
sphere_stopped(false),
window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &DesertPillars::exit), 0));
keyboard.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &DesertPillars::key_press), false));
- const GL::Light &sun = resources.get<GL::Light>("Sun.light");
- sky = make_unique<GL::Sky>(resources, content, sun);
+ GL::Light &sun = resources.get<GL::Light>("Sun.light");
+ sky = make_unique<GL::Sky>(content, sun);
+ sky->set_debug_name("Sky");
- unsigned shadow_size = 8192;
- shadow_seq = make_unique<GL::Sequence>(shadow_size, shadow_size);
+ shadow_seq = make_unique<GL::Sequence>();
+ shadow_seq->set_clear_enabled(true);
+ 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<GL::ShadowMap>(resources, shadow_size, *sky, sun, *shadow_seq);
- shadow_map->set_darkness(0.9f);
+ shadow_map = make_unique<GL::ShadowMap>(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<GL::SequenceTemplate>("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<GL::Sequence>(env_size, env_size);
+ env_seq = make_unique<GL::Sequence>();
+ env_seq->set_clear_enabled(true);
+ env_seq->set_debug_name("Environment sequence");
step = &env_seq->add_step("", *shadow_map);
step->set_lighting(&resources.get<GL::Lighting>("Desert.lightn"));
- step->set_depth_test(&GL::DepthTest::lequal());
+ step->set_depth_test(GL::LEQUAL);
- env_map = make_unique<GL::EnvironmentMap>(resources, 256, GL::RGB16F, sphere, *env_seq);
+ env_map = make_unique<GL::EnvironmentMap>(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<GL::Scene>("Background.scene"));
content.add(*env_map);
+ camera.set_debug_name("Main camera");
+
view.set_content(sequence.get());
view.set_camera(&camera);