From ad3a40f35b3aeb6c2a0f3a4f3d479078cf4aa02a Mon Sep 17 00:00:00 2001 From: Doug Binks Date: Mon, 23 Jun 2014 20:29:25 +0200 Subject: [PATCH] _glfwAnalyzeContext adds check for sRGB --- src/wgl_context.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wgl_context.c b/src/wgl_context.c index 2fdb9a9a7..9a47e417d 100644 --- a/src/wgl_context.c +++ b/src/wgl_context.c @@ -571,6 +571,18 @@ int _glfwAnalyzeContext(const _GLFWwindow* window, } } + if (fbconfig->sRGB) + { + // We want sRGB, but can we get it? + // sRGB is not a hard constraint, so otherwise we just don't care + + if (window->wgl.ARB_framebuffer_sRGB && window->wgl.ARB_pixel_format) + { + // We appear to have both the extension and the means to ask for it + required = GL_TRUE; + } + } + if (required) return _GLFW_RECREATION_REQUIRED;