]> git.sesse.net Git - movit/blobdiff - effect_chain.cpp
Upload textures in BGRA format instead of RGB. Somewhat faster on nVidia, somewhat...
[movit] / effect_chain.cpp
index 0f2e69d36be2a1a06409a3a750710947b98d7d2d..a90f5f3a64db0ffea0427cc009fc106c56eebf0a 100644 (file)
@@ -209,6 +209,10 @@ void EffectChain::render_to_screen(unsigned char *src)
                format = GL_RGB;
        } else if (input_format.pixel_format == FORMAT_RGBA) {
                format = GL_RGBA;
                format = GL_RGB;
        } else if (input_format.pixel_format == FORMAT_RGBA) {
                format = GL_RGBA;
+       } else if (input_format.pixel_format == FORMAT_BGR) {
+               format = GL_BGR;
+       } else if (input_format.pixel_format == FORMAT_BGRA) {
+               format = GL_BGRA;
        } else {
                assert(false);
        }
        } else {
                assert(false);
        }