]> git.sesse.net Git - movit/blobdiff - effect_chain.h
Support rendering to a given FBO instead of to the screen.
[movit] / effect_chain.h
index 1c50b1631ba6c51db2231235b24a1cb33bb2f586..989a0199e460689110a709c5d508284bc9e35f4a 100644 (file)
@@ -92,7 +92,14 @@ public:
        void finalize();
 
        //void render(unsigned char *src, unsigned char *dst);
-       void render_to_screen();
+       void render_to_screen()
+       {
+               render_to_fbo(0, 0, 0);
+       }
+
+       // Render the effect chain to the given FBO. If width=height=0, keeps
+       // the current viewport.
+       void render_to_fbo(GLuint fbo, unsigned width, unsigned height);
 
        Effect *last_added_effect() {
                if (nodes.empty()) {