wgl: Fix usage of non-GLX visual in glXCreateContext.

This commit is contained in:
Roderick Colenbrander 2009-07-31 22:50:36 +02:00 committed by Alexandre Julliard
parent 09436d69f1
commit 390d3929f2
1 changed files with 2 additions and 7 deletions

View File

@ -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 */