// Some tweaked variations of Movit inputs.
+#include <movit/flat_input.h>
#include <movit/ycbcr_input.h>
namespace movit {
// or not. (FlatInput deals with this if you give it pixels, but we give it
// already uploaded textures.)
//
-// If we have GL_EXT_texture_sRGB_decode (very common, as far as I can tell),
-// we can just always upload with the sRGB flag turned on, and then turn it off
-// if not requested; that's sRGBSwitchingFlatInput. If not, we just need to
-// turn off the functionality altogether, which is NonsRGBCapableFlatInput.
-//
-// If you're using NonsRGBCapableFlatInput, upload with GL_RGBA8.
-// If using sRGBSwitchingFlatInput, upload with GL_SRGB8_ALPHA8.
-
-class NonsRGBCapableFlatInput : public movit::FlatInput {
-public:
- NonsRGBCapableFlatInput(movit::ImageFormat format, movit::MovitPixelFormat pixel_format, GLenum type, unsigned width, unsigned height)
- : movit::FlatInput(format, pixel_format, type, width, height) {}
-
- bool can_output_linear_gamma() const override { return false; }
-};
+// Since we require GL_EXT_texture_sRGB_decode (very common, as far as I can tell),
+// we can just always upload with the sRGB flag turned on (upload your texture with
+// GL_SRGB8_ALPHA8), and then sRGBSwitchingFlatInput will turn it off if not requested.
class sRGBSwitchingFlatInput : public movit::FlatInput {
public:
GLuint texture_unit;
};
-
#endif // !defined(_TWEAKED_INPUTS_H)