opengl: Sync a dibsection to its pixmap before drawing to it
via opengl
Alexandre Julliard
julliard at winehq.org
Fri Jan 27 10:50:29 CST 2006
Huw D M Davies <h.davies1 at physics.ox.ac.uk> writes:
> +void enter_gl(void)
> +{
> + GLXContext gl_ctx;
> + Wine_GLContext *ctx;
> + enum x11drv_escape_codes escape = X11DRV_SYNC_PIXMAP;
> +
> + wine_tsx11_lock_ptr(); /* unlock in LEAVE_GL */
> + gl_ctx = glXGetCurrentContext();
> + if(!gl_ctx) return;
> + ctx = get_context_from_GLXContext(gl_ctx);
> + if(!ctx || GetObjectType(ctx->hdc) == OBJ_DC)
> + return;
> +
> + ExtEscape(ctx->hdc, X11DRV_ESCAPE, sizeof(escape), (LPCSTR)&escape, 0, NULL);
You cannot make GDI calls while holding the X11 lock, this will
deadlock.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list