width(0),
height(0),
target{0, 0},
- target_ms(0)
+ target_ms(0),
+ clear_enabled(false)
{ }
Sequence::Sequence(unsigned w, unsigned h, const FrameFormat &f):
width(w),
height(h),
target_format(f),
- target_ms(0)
+ target_ms(0),
+ clear_enabled(false)
{
if(target_format.empty())
throw invalid_argument("Sequence::Sequence");
delete target_ms;
}
+void Sequence::set_clear_enabled(bool c)
+{
+ clear_enabled = c;
+}
+
Sequence::Step &Sequence::add_step(Tag tag, Renderable &r)
{
steps.push_back(Step(tag, &r));
const Framebuffer *out_fbo = renderer.get_framebuffer();
if(target[0])
- {
renderer.set_framebuffer(&(target_ms ? target_ms : target[0])->get_framebuffer());
+
+ if(clear_enabled)
renderer.clear();
- }
for(const Step &s: steps)
{