X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Ftweaked_inputs.h;h=3b70a13cbd691f70f83e78f15064af7a3c83353f;hb=575a3feeaa7420f65a4468b997167d7555794c08;hp=0ca13ced94877a3084fec7609bdc0cdd93a39f8b;hpb=eeda8995329601f9f4e35047358400833eeae68e;p=nageru diff --git a/nageru/tweaked_inputs.h b/nageru/tweaked_inputs.h index 0ca13ce..3b70a13 100644 --- a/nageru/tweaked_inputs.h +++ b/nageru/tweaked_inputs.h @@ -3,6 +3,7 @@ // Some tweaked variations of Movit inputs. +#include #include namespace movit { @@ -26,21 +27,9 @@ public: // 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: @@ -69,5 +58,4 @@ private: GLuint texture_unit; }; - #endif // !defined(_TWEAKED_INPUTS_H)