Alexandre Julliard : opengl32: Make it possible to use an alternative in wglGetProcAddress when an extension is missing.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Dec 9 09:47:26 CST 2015
Module: wine
Branch: master
Commit: 5c9ddc55dcf6e64d747b1a8ab01e408d4b8d55e1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c9ddc55dcf6e64d747b1a8ab01e408d4b8d55e1
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Dec 9 15:44:51 2015 +0900
opengl32: Make it possible to use an alternative in wglGetProcAddress when an extension is missing.
---
dlls/opengl32/wgl.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 42bf920..88aa564 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -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;
}
More information about the wine-cvs
mailing list