]> git.sesse.net Git - movit/blobdiff - flat_input.cpp
Minor stylistic fix in the deconvolution test.
[movit] / flat_input.cpp
index 0516083bf30c13dc32cf2447718141ed08e4a038..6481bc25e9543927480999cb32c838781db6b082 100644 (file)
@@ -71,13 +71,13 @@ void FlatInput::finalize()
        check_error();
        glBindTexture(GL_TEXTURE_2D, texture_num);
        check_error();
-       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, needs_mipmaps ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR);
        check_error();
        glPixelStorei(GL_UNPACK_ROW_LENGTH, pitch);
        check_error();
        // Intel/Mesa seems to have a broken glGenerateMipmap() for non-FBO textures, so do it here
        // instead of calling glGenerateMipmap().
-       glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, needs_mipmaps);
+       glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, needs_mipmaps ? GL_TRUE : GL_FALSE);
        check_error();
        glTexImage2D(GL_TEXTURE_2D, 0, internal_format, width, height, 0, format, type, NULL);
        check_error();