]> git.sesse.net Git - mlt/blob - src/modules/opengl/fbo_input.h
Change how the Movit chain is built.
[mlt] / src / modules / opengl / fbo_input.h
1 /*
2  * fbo_input.h
3  * Copyright (C) 2013 Dan Dennedy <dan@dennedy.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software Foundation,
17  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef FBO_INPUT_H
21 #define FBO_INPUT_H
22
23 #include <movit/input.h>
24
25 class FBOInput : public Input
26 {
27 public:
28         FBOInput(unsigned width, unsigned height);
29
30         virtual std::string effect_type_id() const { return "FBOInput"; }
31         void finalize() {}
32         bool can_output_linear_gamma() const { return false; }
33         AlphaHandling alpha_handling() const { return OUTPUT_POSTMULTIPLIED_ALPHA; }
34         std::string output_fragment_shader();
35         void set_gl_state(GLuint glsl_program_num, const std::string& prefix, unsigned *sampler_num);
36         unsigned get_width() const { return width; }
37         unsigned get_height() const { return height; }
38         Colorspace get_color_space() const { return COLORSPACE_sRGB; }
39         GammaCurve get_gamma_curve() const { return GAMMA_sRGB; }
40         void set_texture(GLuint texture) {
41                 texture_num = texture;
42         }
43
44 private:
45         GLuint texture_num;
46         int needs_mipmaps;
47         unsigned width, height;
48 };
49
50 #endif // FBO_INPUT_H