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));
+ env_seq = make_unique<GL::Sequence>();
+ env_seq->set_clear_enabled(true);
+ env_seq->set_debug_name("Environment sequence");
+
+ global_env = make_unique<GL::EnvironmentMap>(32, GL::RGB16F, 2, content, *env_seq);
+ global_env->set_fixed_position(GL::Vector3(0.0f, 0.0f, 0.0f));
+ global_env->set_debug_name("Global environment");
+
GL::DirectionalLight &sun = resources.get<GL::DirectionalLight>("Sun.light");
- sky = make_unique<GL::Sky>(content, sun);
+ sky = make_unique<GL::Sky>(*global_env, sun);
sky->set_debug_name("Sky");
shadow_seq = make_unique<GL::Sequence>();
seq_bld.set_debug_name("Main sequence");
sequence.reset(seq_bld.build(view));
- 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::LEQUAL);