On 04/04/17 12:11, Alexandre Julliard wrote:
Miklós Máté <mtmkls(a)gmail.com> writes:
@@ -1334,21 +1334,21 @@ static void free_gl_drawable( struct gl_drawable *gl ) /*********************************************************************** * create_gl_drawable */ -static BOOL create_gl_drawable( HWND hwnd, struct gl_drawable *gl ) +static BOOL create_gl_drawable( HWND hwnd, struct gl_drawable *gl, struct x11drv_win_data *data ) { gl->drawable = 0;
if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow()) /* top-level window */ { - struct x11drv_win_data *data = get_win_data( hwnd ); - if (data) { gl->type = DC_GL_WINDOW; gl->window = create_client_window( data, gl->visual ); if (gl->window) + { gl->drawable = pglXCreateWindow( gdi_display, gl->format->fbconfig, gl->window, NULL ); - release_win_data( data ); + XSync( gdi_display, False ); Do you really need all the extra XSync calls? We try to avoid server round-trips as much as possible.
Yes. We must ensure that glXCreateWindow() and glXDestroyWindow() refer to a valid X window, so the command queue of data->display and gdi_display have to be in sync around those calls. MM