- GL::PipelinePass *pass = &pipeline.add_pass(0);
- pass->lighting = &layout.get_lighting();
- pass->depth_test = &GL::DepthTest::lequal();
+ GL::Pipeline::Pass *pass = &pipeline.add_pass("sky");
+ pass->set_lighting(&layout.get_lighting());
+
+ pass = &pipeline.add_pass(0);
+ pass->set_lighting(&layout.get_lighting());
+ pass->set_depth_test(&GL::DepthTest::lequal());
+
+ pass = &pipeline.add_pass("translucent");
+ pass->set_lighting(&layout.get_lighting());
+ pass->set_depth_test(&GL::DepthTest::lequal());
+ pass->set_blend(&GL::Blend::alpha());
+
+ try
+ {
+ ambient_occlusion = new GL::AmbientOcclusion(w, h, 100);
+ pipeline.add_postprocessor(*ambient_occlusion);
+ }
+ catch(...)
+ {
+ delete ambient_occlusion;
+ ambient_occlusion = 0;
+ }
+
+ try
+ {
+ colorcurve = new GL::ColorCurve;
+ colorcurve->set_srgb();
+ pipeline.add_postprocessor(*colorcurve);
+ }
+ catch(...)
+ {
+ delete colorcurve;
+ colorcurve = 0;
+ }
+
+ update_shadow_area();
+ layout.get_layout().signal_object_added.connect(sigc::hide(sigc::mem_fun(this, &View3D::update_shadow_area)));