if(h==hdr)
return;
+ bool old_hdr= hdr;
hdr = h;
- create_targets(2);
+ try
+ {
+ create_targets(2);
+ }
+ catch(...)
+ {
+ hdr = old_hdr;
+ throw;
+ }
}
void Pipeline::set_multisample(unsigned s)
void Pipeline::add_postprocessor(PostProcessor &pp)
{
postproc.push_back(&pp);
- create_targets(0);
+ try
+ {
+ create_targets(0);
+ }
+ catch(...)
+ {
+ postproc.pop_back();
+ throw;
+ }
}
void Pipeline::setup_frame() const