Revert "Added initial framebuffer sRGB support."
This reverts commit 07260cb76870253ac95ab230895990c86b36ba0c.
diff --git a/include/GL/glfw3.h b/include/GL/glfw3.h
index b23e2d9..6b3077d 100644
--- a/include/GL/glfw3.h
+++ b/include/GL/glfw3.h
@@ -329,12 +329,11 @@
#define GLFW_STEREO 0x00020010
#define GLFW_WINDOW_NO_RESIZE 0x00020011
#define GLFW_FSAA_SAMPLES 0x00020012
-#define GLFW_SRGB_CAPABLE 0x00020013
-#define GLFW_OPENGL_VERSION_MAJOR 0x00020014
-#define GLFW_OPENGL_VERSION_MINOR 0x00020015
-#define GLFW_OPENGL_FORWARD_COMPAT 0x00020016
-#define GLFW_OPENGL_DEBUG_CONTEXT 0x00020017
-#define GLFW_OPENGL_PROFILE 0x00020018
+#define GLFW_OPENGL_VERSION_MAJOR 0x00020013
+#define GLFW_OPENGL_VERSION_MINOR 0x00020014
+#define GLFW_OPENGL_FORWARD_COMPAT 0x00020015
+#define GLFW_OPENGL_DEBUG_CONTEXT 0x00020016
+#define GLFW_OPENGL_PROFILE 0x00020017
/* GLFW_OPENGL_PROFILE bit tokens */
#define GLFW_OPENGL_CORE_PROFILE 0x00000001
diff --git a/readme.html b/readme.html
index dd5ab49..90a7247 100644
--- a/readme.html
+++ b/readme.html
@@ -273,7 +273,6 @@
<li>Added <code>glfwSetWindowIconifyCallback</code> function and <code>GLFWwindowiconifyfun</code> type for receiving window iconification events</li>
<li>Added <code>glfwGetCurrentWindow</code> function for retrieving the window whose OpenGL context is current</li>
<li>Added <code>GLFW_OPENGL_ES2_PROFILE</code> profile for creating OpenGL ES 2.0 contexts using the <code>GLX_EXT_create_context_es2_profile</code> and <code>WGL_EXT_create_context_es2_profile</code> extensions</li>
- <li>Added <code>GLFW_SRGB_CAPABLE</code> hint for creating sRGB-capable contexts using the <code>GL_ARB_framebuffer_sRGB</code> and <code>GL_EXT_framebuffer_sRGB</code> extensions</li>
<li>Added <code>windows</code> simple multi-window test program</li>
<li>Added <code>sharing</code> simple OpenGL object sharing test program</li>
<li>Added a parameter to <code>glfwOpenWindow</code> for specifying a context the new window's context will share objects with</li>
diff --git a/src/internal.h b/src/internal.h
index 08931cc..07c75bb 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -94,7 +94,6 @@
GLboolean stereo;
GLboolean windowNoResize;
int samples;
- GLboolean sRGB;
int glMajor;
int glMinor;
GLboolean glForward;
@@ -146,7 +145,6 @@
int auxBuffers;
GLboolean stereo;
int samples;
- GLboolean sRGB;
GLFWintptr platformID;
};
@@ -192,7 +190,6 @@
int auxBuffers;
GLboolean stereo;
int samples;
- GLboolean sRGB;
// OpenGL extensions and context attributes
GLboolean accelerated; // GL_TRUE if OpenGL context is "accelerated"
diff --git a/src/win32/platform.h b/src/win32/platform.h
index 9295ff6..354eef0 100644
--- a/src/win32/platform.h
+++ b/src/win32/platform.h
@@ -228,8 +228,6 @@
PFNWGLCREATECONTEXTATTRIBSARBPROC CreateContextAttribsARB;
GLboolean has_WGL_EXT_swap_control;
GLboolean has_WGL_ARB_multisample;
- GLboolean has_WGL_EXT_framebuffer_sRGB;
- GLboolean has_WGL_ARB_framebuffer_sRGB;
GLboolean has_WGL_ARB_pixel_format;
GLboolean has_WGL_ARB_create_context;
GLboolean has_WGL_ARB_create_context_profile;
diff --git a/src/win32/win32_window.c b/src/win32/win32_window.c
index ee321dd..e9c2626 100644
--- a/src/win32/win32_window.c
+++ b/src/win32/win32_window.c
@@ -251,11 +251,6 @@
}
else
result[*found].samples = 0;
-
- if (window->WGL.has_WGL_EXT_framebuffer_sRGB || window->WGL.has_WGL_ARB_framebuffer_sRGB)
- result[*found].sRGB = getPixelFormatAttrib(window, i, WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB);
- else
- result[*found].sRGB = GL_FALSE;
}
else
{
@@ -299,9 +294,8 @@
result[*found].auxBuffers = pfd.cAuxBuffers;
result[*found].stereo = (pfd.dwFlags & PFD_STEREO) ? GL_TRUE : GL_FALSE;
- // PFD pixel formats do not support FSAA or sRGB
+ // PFD pixel formats do not support FSAA
result[*found].samples = 0;
- result[*found].sRGB = GL_FALSE;
}
result[*found].platformID = i;
@@ -1030,8 +1024,6 @@
window->WGL.has_WGL_EXT_swap_control = GL_FALSE;
window->WGL.has_WGL_ARB_pixel_format = GL_FALSE;
window->WGL.has_WGL_ARB_multisample = GL_FALSE;
- window->WGL.has_WGL_EXT_framebuffer_sRGB = GL_FALSE;
- window->WGL.has_WGL_ARB_framebuffer_sRGB = GL_FALSE;
window->WGL.has_WGL_ARB_create_context = GL_FALSE;
window->WGL.has_WGL_ARB_create_context_profile = GL_FALSE;
@@ -1048,12 +1040,6 @@
if (_glfwPlatformExtensionSupported("WGL_ARB_multisample"))
window->WGL.has_WGL_ARB_multisample = GL_TRUE;
- if (_glfwPlatformExtensionSupported("WGL_EXT_framebuffer_sRGB"))
- window->WGL.has_WGL_EXT_framebuffer_sRGB = GL_TRUE;
-
- if (_glfwPlatformExtensionSupported("WGL_ARB_framebuffer_sRGB"))
- window->WGL.has_WGL_ARB_framebuffer_sRGB = GL_TRUE;
-
if (_glfwPlatformExtensionSupported("WGL_ARB_create_context"))
{
window->WGL.CreateContextAttribsARB = (PFNWGLCREATECONTEXTATTRIBSARBPROC)
diff --git a/src/window.c b/src/window.c
index edb8729..ce260b3 100644
--- a/src/window.c
+++ b/src/window.c
@@ -288,12 +288,6 @@
continue;
}
- if (desired->sRGB && !current->sRGB)
- {
- // sRGB framebuffer is a hard constraint
- continue;
- }
-
// Count number of missing buffers
{
missing = 0;
@@ -473,7 +467,6 @@
fbconfig.auxBuffers = Max(_glfwLibrary.hints.auxBuffers, 0);
fbconfig.stereo = _glfwLibrary.hints.stereo ? GL_TRUE : GL_FALSE;
fbconfig.samples = Max(_glfwLibrary.hints.samples, 0);
- fbconfig.sRGB = _glfwLibrary.hints.sRGB ? GL_TRUE : GL_FALSE;
// Set up desired window config
wndconfig.mode = mode;
@@ -758,9 +751,6 @@
case GLFW_FSAA_SAMPLES:
_glfwLibrary.hints.samples = hint;
break;
- case GLFW_SRGB_CAPABLE:
- _glfwLibrary.hints.sRGB = hint;
- break;
case GLFW_OPENGL_VERSION_MAJOR:
_glfwLibrary.hints.glMajor = hint;
break;
@@ -1070,8 +1060,6 @@
return window->windowNoResize;
case GLFW_FSAA_SAMPLES:
return window->samples;
- case GLFW_SRGB_CAPABLE:
- return window->sRGB;
case GLFW_OPENGL_VERSION_MAJOR:
return window->glMajor;
case GLFW_OPENGL_VERSION_MINOR:
diff --git a/src/x11/platform.h b/src/x11/platform.h
index ea7cba5..c5ca74a 100644
--- a/src/x11/platform.h
+++ b/src/x11/platform.h
@@ -100,9 +100,6 @@
GLboolean has_GLX_SGI_swap_control;
GLboolean has_GLX_EXT_swap_control;
GLboolean has_GLX_ARB_multisample;
- GLboolean has_GLX_ARB_fbconfig_float;
- GLboolean has_GLX_ARB_framebuffer_sRGB;
- GLboolean has_GLX_EXT_framebuffer_sRGB;
GLboolean has_GLX_ARB_create_context;
GLboolean has_GLX_ARB_create_context_profile;
GLboolean has_GLX_EXT_create_context_es2_profile;
diff --git a/src/x11/x11_window.c b/src/x11/x11_window.c
index c3a69b1..981acae 100644
--- a/src/x11/x11_window.c
+++ b/src/x11/x11_window.c
@@ -458,11 +458,6 @@
result[*found].auxBuffers = getFBConfigAttrib(window, fbconfigs[i], GLX_AUX_BUFFERS);
result[*found].stereo = getFBConfigAttrib(window, fbconfigs[i], GLX_STEREO);
- if (window->GLX.has_GLX_EXT_framebuffer_sRGB || window->GLX.has_GLX_ARB_framebuffer_sRGB)
- result[*found].sRGB = getFBConfigAttrib(window, fbconfigs[i], GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB);
- else
- result[*found].sRGB = GL_FALSE;
-
if (window->GLX.has_GLX_ARB_multisample)
result[*found].samples = getFBConfigAttrib(window, fbconfigs[i], GLX_SAMPLES);
else
@@ -707,12 +702,6 @@
if (_glfwPlatformExtensionSupported("GLX_ARB_multisample"))
window->GLX.has_GLX_ARB_multisample = GL_TRUE;
- if (_glfwPlatformExtensionSupported("GLX_EXT_framebuffer_sRGB"))
- window->GLX.has_GLX_EXT_framebuffer_sRGB = GL_TRUE;
-
- if (_glfwPlatformExtensionSupported("GLX_ARB_framebuffer_sRGB"))
- window->GLX.has_GLX_ARB_framebuffer_sRGB = GL_TRUE;
-
if (_glfwPlatformExtensionSupported("GLX_ARB_create_context"))
{
window->GLX.CreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC)