Huw Davies : opengl: Use indirect contexts if the surface is a pixmap.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 11 05:35:25 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 586ed7d458d443211780ccb27e6d683ac4a01966
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=586ed7d458d443211780ccb27e6d683ac4a01966

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Jan 11 12:10:04 2006 +0100

opengl: Use indirect contexts if the surface is a pixmap.

---

 dlls/opengl32/wgl.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 5af2c29..afb4c86 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
       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;




More information about the wine-cvs mailing list