Alexandre Julliard : winex11: Properly update the hdc in the GL
context.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Aug 23 07:26:00 CDT 2007
Module: wine
Branch: master
Commit: f36536f7ab422ee7073a4e02110e418b4eeeda6d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f36536f7ab422ee7073a4e02110e418b4eeeda6d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Aug 23 12:50:29 2007 +0200
winex11: Properly update the hdc in the GL context.
---
dlls/winex11.drv/opengl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 09a1d6a..1e96b49 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1662,6 +1662,7 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
NtCurrentTeb()->glContext = ctx;
if(ret)
{
+ ctx->hdc = hdc;
ctx->physDev = physDev;
ctx->pReadDev = physDev;
@@ -1712,6 +1713,7 @@ BOOL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* pDrawDev, X11DRV_PDEVICE* p
ctx->ctx = pglXCreateContext(gdi_display, ctx->vis, NULL, GetObjectType(pDrawDev->hdc) == OBJ_MEMDC ? False : True);
TRACE(" created a delayed OpenGL context (%p)\n", ctx->ctx);
}
+ ctx->hdc = pDrawDev->hdc;
ctx->physDev = pDrawDev;
ctx->pReadDev = pReadDev;
ret = pglXMakeContextCurrent(gdi_display, d_draw, d_read, ctx->ctx);
@@ -1749,7 +1751,7 @@ BOOL X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
describeContext(org);
if(org->vis)
- org->ctx = pglXCreateContext(gdi_display, org->vis, NULL, GetObjectType(org->physDev->hdc) == OBJ_MEMDC ? False : True);
+ org->ctx = pglXCreateContext(gdi_display, org->vis, NULL, GetObjectType(org->hdc) == OBJ_MEMDC ? False : True);
else /* Create a GLX Context for a pbuffer */
org->ctx = pglXCreateNewContext(gdi_display, org->fmt->fbconfig, org->fmt->render_type, NULL, True);
wine_tsx11_unlock();
@@ -1760,7 +1762,7 @@ BOOL X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
describeContext(dest);
/* Create the destination context with display lists shared */
if(dest->vis)
- dest->ctx = pglXCreateContext(gdi_display, dest->vis, org->ctx, GetObjectType(org->physDev->hdc) == OBJ_MEMDC ? False : True);
+ dest->ctx = pglXCreateContext(gdi_display, dest->vis, org->ctx, GetObjectType(org->hdc) == OBJ_MEMDC ? False : True);
else /* Create a GLX Context for a pbuffer */
dest->ctx = pglXCreateNewContext(gdi_display, dest->fmt->fbconfig, dest->fmt->render_type, org->ctx, True);
wine_tsx11_unlock();
More information about the wine-cvs
mailing list