Rémi Bernon (@rbernon) commented about dlls/opengl32/unix_wgl.c:
- if (!(ctx = get_current_context( teb, NULL, NULL ))) return TRUE;
- for (const int *attr = ctx->attribs; attr && attr[0]; attr += 2)
if (attr[0] == WGL_CONTEXT_MAJOR_VERSION_ARB) return attr[1];- return 1;
-}
/* Check if a GL extension is supported */ -static BOOL is_extension_supported( TEB *teb, const char *extension ) +static BOOL is_extension_supported( TEB *teb, struct context *ctx, const char *extension ) { char *available_extensions = NULL; BOOL ret = FALSE;
- if (get_context_major_version( teb ) < 3) available_extensions = strdup( (const char *)wrap_glGetString( teb, GL_EXTENSIONS ) );
- sync_context_version( teb, ctx );
We could do that query after the context is made current (or perhaps we could try making it current right after creation, then restore the previous one, idk if that's better) instead of spreading `sync_context_version` here and there.