]> git.sesse.net Git - movit/blobdiff - resample_effect.cpp
Add a function to let non-input effects override texture bounce.
[movit] / resample_effect.cpp
index 95f5575186ef476b3b8452af0a70838d7a8a37d7..a7315689532e85a98a9c2b7884ec52b85f2ed7db 100644 (file)
@@ -717,10 +717,12 @@ void SingleResamplePassEffect::set_gl_state(GLuint glsl_program_num, const strin
        // We specifically do not want mipmaps on the input texture;
        // they break minification.
        Node *self = chain->find_node_for_effect(this);
-       glActiveTexture(chain->get_input_sampler(self, 0));
-       check_error();
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-       check_error();
+       if (chain->has_input_sampler(self, 0)) {
+               glActiveTexture(chain->get_input_sampler(self, 0));
+               check_error();
+               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+               check_error();
+       }
 }
 
 }  // namespace movit