Revert "Added initial framebuffer sRGB support."

This reverts commit 07260cb768.
This commit is contained in:
Camilla Berglund
2011-01-02 00:11:47 +01:00
parent 15c4a2bd02
commit 77e3b428c5
8 changed files with 6 additions and 53 deletions
-3
View File
@@ -94,7 +94,6 @@ struct _GLFWhints
GLboolean stereo;
GLboolean windowNoResize;
int samples;
GLboolean sRGB;
int glMajor;
int glMinor;
GLboolean glForward;
@@ -146,7 +145,6 @@ struct _GLFWfbconfig
int auxBuffers;
GLboolean stereo;
int samples;
GLboolean sRGB;
GLFWintptr platformID;
};
@@ -192,7 +190,6 @@ struct _GLFWwindow
int auxBuffers;
GLboolean stereo;
int samples;
GLboolean sRGB;
// OpenGL extensions and context attributes
GLboolean accelerated; // GL_TRUE if OpenGL context is "accelerated"
-2
View File
@@ -228,8 +228,6 @@ typedef struct _GLFWcontextWGL
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;
+1 -15
View File
@@ -251,11 +251,6 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
}
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 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
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 @@ static void initWGLExtensions(_GLFWwindow* window)
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 @@ static void initWGLExtensions(_GLFWwindow* window)
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)
-12
View File
@@ -288,12 +288,6 @@ const _GLFWfbconfig* _glfwChooseFBConfig(const _GLFWfbconfig* desired,
continue;
}
if (desired->sRGB && !current->sRGB)
{
// sRGB framebuffer is a hard constraint
continue;
}
// Count number of missing buffers
{
missing = 0;
@@ -473,7 +467,6 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
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 @@ GLFWAPI void glfwOpenWindowHint(int target, int hint)
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 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow window, int param)
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:
-3
View File
@@ -100,9 +100,6 @@ typedef struct _GLFWcontextGLX
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;
-11
View File
@@ -458,11 +458,6 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window, unsigned int* found)
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 @@ static void initGLXExtensions(_GLFWwindow* window)
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)