namespace Msp {
namespace GL {
+Sequence::Sequence():
+ width(0),
+ height(0),
+ target{0, 0},
+ target_ms(0)
+{ }
+
Sequence::Sequence(unsigned w, unsigned h, const FrameFormat &f):
width(w),
height(h),
- target_format(f)
+ target_format(f),
+ target_ms(0)
{
- if(!target_format.empty())
- {
- FrameFormat postproc_fmt = target_format;
- postproc_fmt.set_samples(1);
- target[0] = new RenderTarget(width, height, postproc_fmt);
- target[1] = new RenderTarget(width, height, postproc_fmt);
-
- if(target_format.get_samples()>1)
- target_ms = new RenderTarget(width, height, target_format);
- else
- target_ms = 0;
- }
- else
- {
- target_ms = 0;
- target[0] = 0;
- target[1] = 0;
- }
+ if(target_format.empty())
+ throw invalid_argument("Sequence::Sequence");
+
+ FrameFormat postproc_fmt = target_format;
+ postproc_fmt.set_samples(1);
+ target[0] = new RenderTarget(width, height, postproc_fmt);
+ target[1] = new RenderTarget(width, height, postproc_fmt);
+
+ if(target_format.get_samples()>1)
+ target_ms = new RenderTarget(width, height, target_format);
}
Sequence::~Sequence()