- combine_texturing.attach(1, src);
- Bind bind_texturing(combine_texturing);
- Bind bind_shader(combine_shader);
- combine_shdata.apply();
- quad.draw();
+ combine_texturing.attach(0, src);
+ renderer.set_texturing(&combine_texturing);
+ renderer.set_shader_program(&combine_shader);
+ quad.draw(renderer);
+}
+
+
+Bloom::Template::Template():
+ radius(2.0f),
+ strength(0.2f)
+{ }
+
+Bloom *Bloom::Template::create(unsigned width, unsigned height) const
+{
+ RefPtr<Bloom> bloom = new Bloom(width/size_divisor, height/size_divisor);
+ bloom->set_radius(radius);
+ bloom->set_strength(strength);
+ return bloom.release();
+}
+
+
+Bloom::Template::Loader::Loader(Template &t):
+ DataFile::DerivedObjectLoader<Template, PostProcessor::Template::Loader>(t)
+{
+ add("strength", &Template::strength);
+ add("radius", &Template::radius);