Commit 5c9ddc55 authored by Alexandre Julliard's avatar Alexandre Julliard

opengl32: Make it possible to use an alternative in wglGetProcAddress when an extension is missing.

parent 571dc0fa
......@@ -878,6 +878,19 @@ PROC WINAPI wglGetProcAddress( LPCSTR name )
if (!is_extension_supported(ext_ret->extension))
{
unsigned int i;
static const struct { const char *name, *alt; } alternatives[] =
{
{ "glCopyTexSubImage3DEXT", "glCopyTexSubImage3D" }, /* needed by RuneScape */
};
for (i = 0; i < sizeof(alternatives)/sizeof(alternatives[0]); i++)
{
if (strcmp( name, alternatives[i].name )) continue;
WARN("Extension %s required for %s not supported, trying %s\n",
ext_ret->extension, name, alternatives[i].alt );
return wglGetProcAddress( alternatives[i].alt );
}
WARN("Extension %s required for %s not supported\n", ext_ret->extension, name);
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment