X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=pbo_frame_allocator.cpp;h=ed1ddb5f9a1c0eb94588daa508c4ebf2fdaad858;hb=e7042ad94ffec1505feaf7f8c5a265b2165957a0;hp=e27aa6949cb65ee1d1a74575de0f5048bd8d8dfd;hpb=4d288e59bea313bbc2369eaad5cfdfb28bbcd960;p=nageru diff --git a/pbo_frame_allocator.cpp b/pbo_frame_allocator.cpp index e27aa69..ed1ddb5 100644 --- a/pbo_frame_allocator.cpp +++ b/pbo_frame_allocator.cpp @@ -7,6 +7,7 @@ #include #include +#include "flags.h" #include "v210_converter.h" using namespace std; @@ -143,7 +144,11 @@ PBOFrameAllocator::PBOFrameAllocator(bmusb::PixelFormat pixel_format, size_t fra glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); check_error(); if (field == 0) { - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + if (global_flags.can_disable_srgb_decoder) { // See the comments in tweaked_inputs.h. + glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB8_ALPHA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + } else { + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + } check_error(); } break;