static int describeDrawable(Wine_GLContext* ctx, Drawable drawable) { int tmp; int draw_vis_id; if (3 > wine_glx.version || NULL == wine_glx.p_glXQueryDrawable) { /** glXQueryDrawable not available so returns not supported */ return -1; } TRACE(" Drawable %p have :\n", (void*) drawable); wine_glx.p_glXQueryDrawable(ctx->display, drawable, GLX_FBCONFIG_ID, (unsigned int*) &tmp); TRACE(" - FBCONFIG_ID as 0x%x\n", tmp); /* wine_glx.p_glXQueryDrawable(ctx->display, drawable, GLX_VISUAL_ID, (unsigned int*) &tmp);*/ /* Calling glXQueryDrawable this way is not allowed according to GLX 1.3 specification. wine_glx.p_glXQueryDrawable(ctx->display, drawable, GLX_VISUAL_ID, (unsigned int*) &tmp); Get the GLXFBConfig from GLX_FBCONFIG_ID. According to the GLX 1.3 spec, if GLX_FBCONFIG_ID is specified as an ID, only one GLXFBConfig that matches the XID will be returned. */ GLXFBConfig* fbconfig; int* attribs; attribs[0] = GLX_FBCONFIG_ID; int nCfgs = 1; fbconfig = wine_glx.p_glXChooseFBConfig(ctx->display, DefaultScreen(ctx->display), attribs, &nCfgs); TRACE(" - glXChooseFBConfig returns 0x%x\n", *fbconfig); if (fbconfig != NULL) { wine_glx.p_glXGetFBConfigAttrib(ctx->display, *fbconfig, GLX_VISUAL_ID, &tmp); TRACE(" - VISUAL_ID as 0x%x\n", tmp); draw_vis_id = tmp; } else ERR("Failed to get GLX_VISUAL_ID for the Drawable. Expect problems.\n"); wine_glx.p_glXQueryDrawable(ctx->display, drawable, GLX_WIDTH, (unsigned int*) &tmp); TRACE(" - WIDTH as %d\n", tmp); wine_glx.p_glXQueryDrawable(ctx->display, drawable, GLX_HEIGHT, (unsigned int*) &tmp); TRACE(" - HEIGHT as %d\n", tmp); return draw_vis_id;}