Roderick Colenbrander : wgl: We were already advertising GL_EXT_framebuffer_sRGB but not the corresponding WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT .

Alexandre Julliard julliard at winehq.org
Wed Apr 30 06:57:28 CDT 2008


Module: wine
Branch: master
Commit: 5fe5def3d1cdc3a3bdeec172a6860986a9a53028
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5fe5def3d1cdc3a3bdeec172a6860986a9a53028

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Tue Apr 29 22:42:09 2008 +0000

wgl: We were already advertising GL_EXT_framebuffer_sRGB but not the corresponding WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT.

---

 dlls/winex11.drv/opengl.c |   12 ++++++++++++
 include/wine/wgl.h        |    5 +++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index de3d137..cf5dff7 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -780,6 +780,11 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
        *  TODO: wglChoosePixelFormat
        */
       break ;
+    case WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT:
+      pop = iWGLAttr[++cur];
+      PUSH2(oGLXAttr, GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, pop);
+      TRACE("pAttr[%d] = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT: %x\n", cur, pop);
+      break ;
 
     default:
       FIXME("unsupported %x WGL Attribute\n", iWGLAttr[cur]);
@@ -2840,6 +2845,10 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
                 curGLXAttr = GLX_FLOAT_COMPONENTS_NV;
                 break;
 
+            case WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT:
+                curGLXAttr = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT;
+                break;
+
             case WGL_ACCUM_RED_BITS_ARB:
                 curGLXAttr = GLX_ACCUM_RED_SIZE;
                 break;
@@ -3362,6 +3371,9 @@ static void X11DRV_WineGL_LoadExtensions(void)
      * Games like Call of Duty and K.O.T.O.R. rely on it. Further our emulation is good enough. */
     register_extension(&WGL_EXT_swap_control);
 
+    if(glxRequireExtension("GLX_EXT_framebuffer_sRGB"))
+        register_extension_string("WGL_EXT_framebuffer_sRGB");
+
     /* The OpenGL extension GL_NV_vertex_array_range adds wgl/glX functions which aren't exported as 'real' wgl/glX extensions. */
     if(strstr(WineGLInfo.glExtensions, "GL_NV_vertex_array_range") != NULL)
         register_extension(&WGL_NV_vertex_array_range);
diff --git a/include/wine/wgl.h b/include/wine/wgl.h
index 14dfa42..8de19f8 100644
--- a/include/wine/wgl.h
+++ b/include/wine/wgl.h
@@ -176,6 +176,11 @@
 #define GL_FLOAT_CLEAR_COLOR_VALUE_NV     0x888D
 #define GL_FLOAT_RGBA_MODE_NV             0x888E
 
+/** WGL_EXT_framebuffer_sRGB */
+#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT  0x20A9
+#ifndef GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT
+# define GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20B2
+#endif
 
 /** 
  * WGL_ATI_pixel_format_float / WGL_ARB_color_buffer_float




More information about the wine-cvs mailing list