#include "overlay_effect.h"
#include "util.h"
-OverlayEffect::OverlayEffect() {}
+using namespace std;
-std::string OverlayEffect::output_fragment_shader()
+namespace movit {
+
+OverlayEffect::OverlayEffect()
+ : swap_inputs(false)
{
- return read_file("overlay_effect.frag");
+ register_int("swap_inputs", (int *)&swap_inputs);
}
+
+string OverlayEffect::output_fragment_shader()
+{
+ char buf[256];
+ snprintf(buf, sizeof(buf), "#define SWAP_INPUTS %d\n", swap_inputs);
+ return buf + read_file("overlay_effect.frag");
+}
+
+} // namespace movit