src/video/windows/SDL_windowsopengl.c
changeset 7853 4861edda71d1
parent 7559 0dd3b05797f9
child 7865 f2a42ca4ddf0
     1.1 --- a/src/video/windows/SDL_windowsopengl.c	Sun Oct 20 20:24:00 2013 -0400
     1.2 +++ b/src/video/windows/SDL_windowsopengl.c	Sun Oct 20 21:18:05 2013 -0400
     1.3 @@ -67,6 +67,11 @@
     1.4  #define WGL_CONTEXT_ES_PROFILE_BIT_EXT            0x00000004
     1.5  #endif
     1.6  
     1.7 +#ifndef WGL_ARB_framebuffer_sRGB
     1.8 +#define WGL_ARB_framebuffer_sRGB
     1.9 +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB                0x20A9
    1.10 +#endif
    1.11 +
    1.12  typedef HGLRC(APIENTRYP PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC,
    1.13                                                              HGLRC
    1.14                                                              hShareContext,
    1.15 @@ -495,6 +500,11 @@
    1.16          *iAttr++ = _this->gl_config.multisamplesamples;
    1.17      }
    1.18  
    1.19 +    if (_this->gl_config.framebuffer_srgb_capable) {
    1.20 +        *iAttr++ = WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB;
    1.21 +        *iAttr++ = _this->gl_config.framebuffer_srgb_capable;
    1.22 +    }
    1.23 +
    1.24      /* We always choose either FULL or NO accel on Windows, because of flaky
    1.25         drivers. If the app didn't specify, we use FULL, because that's
    1.26         probably what they wanted (and if you didn't care and got FULL, that's