From 586ed7d458d443211780ccb27e6d683ac4a01966 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Wed, 11 Jan 2006 12:10:04 +0100 Subject: [PATCH] opengl: Use indirect contexts if the surface is a pixmap. --- dlls/opengl32/wgl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 5af2c2925de..afb4c86953e 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -537,10 +537,10 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, vis = XGetVisualInfo(ctx->display, VisualIDMask, &template, &num); TRACE(" Creating GLX Context\n"); - ctx->ctx = glXCreateContext(ctx->display, vis, NULL, True); + ctx->ctx = glXCreateContext(ctx->display, vis, NULL, type == OBJ_MEMDC ? False : True); } else { TRACE(" Creating GLX Context\n"); - ctx->ctx = glXCreateContext(ctx->display, ctx->vis, NULL, True); + ctx->ctx = glXCreateContext(ctx->display, ctx->vis, NULL, type == OBJ_MEMDC ? False : True); } TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx); } @@ -574,8 +574,8 @@ BOOL WINAPI wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) Drawable d_read = get_drawable( hReadDC ); if (ctx->ctx == NULL) { - ctx->ctx = glXCreateContext(ctx->display, ctx->vis, NULL, True); - TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx); + ctx->ctx = glXCreateContext(ctx->display, ctx->vis, NULL, GetObjectType(hDrawDC) == OBJ_MEMDC ? False : True); + TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx); } ret = wine_glx.p_glXMakeContextCurrent(ctx->display, d_draw, d_read, ctx->ctx); } @@ -648,7 +648,7 @@ BOOL WINAPI wglShareLists(HGLRC hglrc1, if (org->ctx == NULL) { ENTER_GL(); describeContext(org); - org->ctx = glXCreateContext(org->display, org->vis, NULL, True); + org->ctx = glXCreateContext(org->display, org->vis, NULL, GetObjectType(org->hdc) == OBJ_MEMDC ? False : True); LEAVE_GL(); TRACE(" created a delayed OpenGL context (%p) for Wine context %p\n", org->ctx, org); } @@ -656,7 +656,7 @@ BOOL WINAPI wglShareLists(HGLRC hglrc1, ENTER_GL(); describeContext(dest); /* Create the destination context with display lists shared */ - dest->ctx = glXCreateContext(org->display, dest->vis, org->ctx, True); + dest->ctx = glXCreateContext(org->display, dest->vis, org->ctx, GetObjectType(org->hdc) == OBJ_MEMDC ? False : True); LEAVE_GL(); TRACE(" created a delayed OpenGL context (%p) for Wine context %p sharing lists with OpenGL ctx %p\n", dest->ctx, dest, org->ctx); return TRUE;