X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=fft_pass_effect.h;h=53428bd8d31a3f82360615a2ec20b0cac3653cd5;hp=90e88bc1fddd94650c1deae08011e9c2d0e5395e;hb=974b5c837c24179f9ab29f4ffdcdd1172288172b;hpb=daca930fb2f404e8800c35715f1fc5c4897d19fb diff --git a/fft_pass_effect.h b/fft_pass_effect.h index 90e88bc..53428bd 100644 --- a/fft_pass_effect.h +++ b/fft_pass_effect.h @@ -85,6 +85,7 @@ public: // in our own phase, which is exactly what we want. virtual bool needs_texture_bounce() const { return true; } virtual bool changes_output_size() const { return true; } + virtual bool sets_virtual_output_size() const { return false; } virtual void inform_input_size(unsigned input_num, unsigned width, unsigned height) { @@ -101,16 +102,27 @@ public: virtual void inform_added(EffectChain *chain) { this->chain = chain; } - enum Direction { HORIZONTAL = 0, VERTICAL = 1 }; + enum Direction { INVALID = -1, HORIZONTAL = 0, VERTICAL = 1 }; private: + void generate_support_texture(); + EffectChain *chain; int input_width, input_height; GLuint tex; + float uniform_num_repeats; + GLint uniform_support_tex; + int fft_size; Direction direction; int pass_number; // From 1..n. int inverse; // 0 = forward (FFT), 1 = reverse (IFFT). + + int last_fft_size; + Direction last_direction; + int last_pass_number; + int last_inverse; + int last_input_size; }; } // namespace movit