+FrameFormat SequenceBuilder::create_frame_format() const
+{
+ unsigned samples = min(tmpl.get_maximum_multisample(), DeviceInfo::get_global().limits.max_samples);
+ if(samples<tmpl.get_required_multisample())
+ throw invalid_operation("SequenceBuilder::create_frame_format");
+
+ PixelComponents color_comp = (tmpl.get_alpha() ? RGBA : RGB);
+ DataType color_type = (tmpl.get_hdr() ? HALF_FLOAT : UNSIGNED_BYTE);
+ PixelFormat color_pf = make_pixelformat(color_comp, color_type);
+
+ return (COLOR_ATTACHMENT,color_pf, DEPTH_ATTACHMENT).set_samples(samples);
+}
+