opengl32: Make it possible to use an alternative in wglGetProcAddress when an extension is missing.
This commit is contained in:
parent
571dc0faa5
commit
5c9ddc55dc
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue