Roderick Colenbrander : wgl: Make sure WGL_DRAW_TO_BITMAP_ARB is only seen on our duplicated bitmap-capable formats .

Alexandre Julliard julliard at winehq.org
Mon May 18 08:13:14 CDT 2009


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

Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date:   Sun May 17 21:50:56 2009 +0200

wgl: Make sure WGL_DRAW_TO_BITMAP_ARB is only seen on our duplicated bitmap-capable formats.

---

 dlls/winex11.drv/opengl.c |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 96158dc..3696072 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -693,12 +693,9 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
       break;
 
     case WGL_DRAW_TO_BITMAP_ARB:
+      /* This flag is set in a WineGLPixelFormat */
       pop = iWGLAttr[++cur];
       TRACE("pAttr[%d] = WGL_DRAW_TO_BITMAP_ARB: %d\n", cur, pop);
-      /* GLX_DRAWABLE_TYPE flags need to be OR'd together. See below. */
-      if (pop) {
-        drawattrib |= GLX_PIXMAP_BIT;
-      }
       break;
 
     case WGL_DRAW_TO_WINDOW_ARB:
@@ -2691,11 +2688,16 @@ static GLboolean WINAPI X11DRV_wglChoosePixelFormatARB(HDC hdc, const int *piAtt
      * using glXChooseFBConfig but we filter the result of glXChooseFBConfig later on by passing a dwFlags to 'ConvertPixelFormatGLXtoWGL'. */
     for(i=0; piAttribIList[i] != 0; i+=2)
     {
-        if(piAttribIList[i] == WGL_SUPPORT_GDI_ARB)
+        switch(piAttribIList[i])
         {
-            if(piAttribIList[i+1])
-                dwFlags |= PFD_SUPPORT_GDI;
-            break;
+            case WGL_DRAW_TO_BITMAP_ARB:
+                if(piAttribIList[i+1])
+                    dwFlags |= PFD_DRAW_TO_BITMAP;
+                break;
+            case WGL_SUPPORT_GDI_ARB:
+                if(piAttribIList[i+1])
+                    dwFlags |= PFD_SUPPORT_GDI;
+                break;
         }
     }
 
@@ -2891,14 +2893,17 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelF
                 piValues[i] = (fmt->dwFlags & PFD_SUPPORT_GDI) ? TRUE : FALSE;
                 continue;
 
-            case WGL_DRAW_TO_WINDOW_ARB:
             case WGL_DRAW_TO_BITMAP_ARB:
+                if (!fmt) goto pix_error;
+                piValues[i] = (fmt->dwFlags & PFD_DRAW_TO_BITMAP) ? TRUE : FALSE;
+                continue;
+
+            case WGL_DRAW_TO_WINDOW_ARB:
             case WGL_DRAW_TO_PBUFFER_ARB:
                 if (!fmt) goto pix_error;
                 hTest = pglXGetFBConfigAttrib(gdi_display, fmt->fbconfig, GLX_DRAWABLE_TYPE, &tmp);
                 if (hTest) goto get_error;
                 if((curWGLAttr == WGL_DRAW_TO_WINDOW_ARB && (tmp&GLX_WINDOW_BIT)) ||
-                   (curWGLAttr == WGL_DRAW_TO_BITMAP_ARB && (tmp&GLX_PIXMAP_BIT)) ||
                    (curWGLAttr == WGL_DRAW_TO_PBUFFER_ARB && (tmp&GLX_PBUFFER_BIT)))
                     piValues[i] = GL_TRUE;
                 else




More information about the wine-cvs mailing list