]> git.sesse.net Git - nageru/blobdiff - nageru/tweaked_inputs.h
Always require GL_EXT_texture_sRGB_decode.
[nageru] / nageru / tweaked_inputs.h
index 0ca13ced94877a3084fec7609bdc0cdd93a39f8b..3b70a13cbd691f70f83e78f15064af7a3c83353f 100644 (file)
@@ -3,6 +3,7 @@
 
 // Some tweaked variations of Movit inputs.
 
+#include <movit/flat_input.h>
 #include <movit/ycbcr_input.h>
 
 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)