Module: wine
Branch: master
Commit: e7590fcfb51bb149a6cf8272f5576861f2193183
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e7590fcfb51bb149a6cf8272f…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com>
Date: Fri Nov 13 12:28:48 2009 +0100
wgl: Make sure we set a valid value for GLX_DRAWABLE_TYPE. Right now we default to 0 which is illegal.
---
dlls/winex11.drv/opengl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index b680bb9..45da479 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -795,8 +795,10 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
++cur;
}
- /* Apply the OR'd drawable type bitmask now EVEN when WGL_DRAW_TO* is unset.
- * It is needed in all cases because GLX_DRAWABLE_TYPE default to GLX_WINDOW_BIT. */
+ /* By default glXChooseFBConfig defaults to GLX_WINDOW_BIT. wglChoosePixelFormatARB searches through
+ * all formats. Unless drawattrib is set to a non-zero value override it with ~0, so that pixmap and pbuffer
+ * formats appear as well. */
+ if(!drawattrib) drawattrib = ~0;
PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib);
TRACE("pAttr[?] = GLX_DRAWABLE_TYPE: %#x\n", drawattrib);