]> git.sesse.net Git - movit/blobdiff - input.cpp
Add missing file image_format.h, and add grayscale support.
[movit] / input.cpp
index 453620c41df023353fc943c920cd117673c0f1b2..cf0210c8fcfca822ff1d5b8d463ed9069dabf369 100644 (file)
--- a/input.cpp
+++ b/input.cpp
@@ -41,6 +41,9 @@ void Input::finalize()
        } else if (image_format.pixel_format == FORMAT_BGRA) {
                format = GL_BGRA;
                bytes_per_pixel = 4;
+       } else if (image_format.pixel_format == FORMAT_GRAYSCALE) {
+               format = GL_LUMINANCE;
+               bytes_per_pixel = 1;
        } else {
                assert(false);
        }