can_output_linear_gamma() should never return true for float inputs.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Oct 2012 00:20:17 +0000 (02:20 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Oct 2012 00:20:17 +0000 (02:20 +0200)
flat_input.h

index 1820eaf..39419b1 100644 (file)
@@ -18,8 +18,9 @@ public:
 
        // TODO: Check that we actually have the required extension.
        virtual bool can_output_linear_gamma() const {
-               return (image_format.gamma_curve == GAMMA_LINEAR ||
-                       image_format.gamma_curve == GAMMA_sRGB);
+               return (type == GL_UNSIGNED_BYTE &&
+                       (image_format.gamma_curve == GAMMA_LINEAR ||
+                        image_format.gamma_curve == GAMMA_sRGB));
        }
 
        std::string output_fragment_shader();