From 8b7098794d33cec06124a37dcdc33249a33a0b5c Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Fri, 16 Dec 2005 19:29:52 +0100 Subject: [PATCH] x11drv: Get the visual for the GLXPixmap from the current pixel format. --- dlls/x11drv/opengl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/x11drv/opengl.c b/dlls/x11drv/opengl.c index 3a400c1396..c119e7cd0a 100644 --- a/dlls/x11drv/opengl.c +++ b/dlls/x11drv/opengl.c @@ -588,13 +588,17 @@ XID create_glxpixmap(X11DRV_PDEVICE *physDev) XVisualInfo *vis; XVisualInfo template; int num; + GLXFBConfig *cfgs; wine_tsx11_lock(); - template.visualid = XVisualIDFromVisual(visual); + cfgs = pglXGetFBConfigs(gdi_display, DefaultScreen(gdi_display), &num); + pglXGetFBConfigAttrib(gdi_display, cfgs[physDev->current_pf - 1], GLX_VISUAL_ID, (int *)&template.visualid); + vis = XGetVisualInfo(gdi_display, VisualIDMask, &template, &num); ret = pglXCreateGLXPixmap(gdi_display, vis, physDev->bitmap->pixmap); XFree(vis); + XFree(cfgs); wine_tsx11_unlock(); TRACE("return %lx\n", ret); return ret; -- 2.32.0.93.g670b81a890