Roderick Colenbrander : wgl: Fix usage of non-GLX visual in glXCreateContext.
Alexandre Julliard
julliard at winehq.org
Mon Aug 3 11:14:25 CDT 2009
Module: wine
Branch: master
Commit: 390d3929f2b2a9641ecc8114cf94ae09fa851a15
URL: http://source.winehq.org/git/wine.git/?a=commit;h=390d3929f2b2a9641ecc8114cf94ae09fa851a15
Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date: Fri Jul 31 22:50:36 2009 +0200
wgl: Fix usage of non-GLX visual in glXCreateContext.
---
dlls/winex11.drv/opengl.c | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index b2cf82a..4e4a3a0 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -275,15 +275,12 @@ MAKE_FUNCPTR(glFlush)
static BOOL infoInitialized = FALSE;
static BOOL X11DRV_WineGL_InitOpenglInfo(void)
{
-
int screen = DefaultScreen(gdi_display);
Window win = RootWindow(gdi_display, screen);
const char* str;
- Visual *visual;
- XVisualInfo template;
XVisualInfo *vis;
- int num;
GLXContext ctx = NULL;
+ int attribList[] = {GLX_RGBA, GLX_DOUBLEBUFFER, None};
if (infoInitialized)
return TRUE;
@@ -291,9 +288,7 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
wine_tsx11_lock();
- visual = DefaultVisual(gdi_display, screen);
- template.visualid = XVisualIDFromVisual(visual);
- vis = XGetVisualInfo(gdi_display, VisualIDMask, &template, &num);
+ vis = pglXChooseVisual(gdi_display, screen, attribList);
if (vis) {
WORD old_fs = wine_get_fs();
/* Create a GLX Context. Without one we can't query GL information */
More information about the wine-cvs
mailing list