- ImageFormat image_format;
- image_format.color_space = color_space;
- image_format.gamma_curve = gamma_curve;
- chain.add_output(image_format);
- chain.finalize();
+ ImageFormat format;
+ format.color_space = color_space;
+ format.gamma_curve = gamma_curve;
+
+ FlatInput *input = new FlatInput(format, pixel_format, GL_UNSIGNED_BYTE, width, height);
+ input->set_pixel_data(data);
+ chain.add_input(input);
+ return input;
+}
+
+void EffectChainTester::run(float *out_data, GLenum format, Colorspace color_space, GammaCurve gamma_curve)
+{
+ if (!finalized) {
+ ImageFormat image_format;
+ image_format.color_space = color_space;
+ image_format.gamma_curve = gamma_curve;
+ chain.add_output(image_format);
+ chain.finalize();
+ finalized = true;
+ }