X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=e68895d7b8f40c8c30475b8f51e0e49c7f39a473;hp=00151977be63823288cd0d1c9497e7b9d2708fdb;hb=b5a446a44ee1f0379e8427f86f5dfa0d40bc0e60;hpb=37f56fcbe571b2322243f6de59494bf9e0cbb37a diff --git a/effect_chain.cpp b/effect_chain.cpp index 0015197..e68895d 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -55,6 +55,7 @@ EffectChain::~EffectChain() Input *EffectChain::add_input(Input *input) { + assert(!finalized); inputs.push_back(input); add_node(input); return input; @@ -62,6 +63,7 @@ Input *EffectChain::add_input(Input *input) void EffectChain::add_output(const ImageFormat &format, OutputAlphaFormat alpha_format) { + assert(!finalized); output_format = format; output_alpha_format = alpha_format; } @@ -157,6 +159,7 @@ void EffectChain::find_all_nonlinear_inputs(Node *node, std::vector *non Effect *EffectChain::add_effect(Effect *effect, const std::vector &inputs) { + assert(!finalized); assert(inputs.size() == effect->num_inputs()); Node *node = add_node(effect); for (unsigned i = 0; i < inputs.size(); ++i) { @@ -1559,6 +1562,8 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height // Last phase goes to the output the user specified. glBindFramebuffer(GL_FRAMEBUFFER, dest_fbo); check_error(); + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + assert(status == GL_FRAMEBUFFER_COMPLETE); glViewport(x, y, width, height); if (dither_effect != NULL) { CHECK(dither_effect->set_int("output_width", width)); @@ -1573,6 +1578,8 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height output_node->output_texture, 0); check_error(); + GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + assert(status == GL_FRAMEBUFFER_COMPLETE); glViewport(0, 0, phases[phase]->output_width, phases[phase]->output_height); }