Commit 3e68508e authored by Alexandre Julliard's avatar Alexandre Julliard

opengl32: Only store the glX name if different from the wgl name.

parent cac33018
......@@ -168,6 +168,7 @@ sub ConvertType($)
"GLsizeiptr" => "ptrdiff_t",
"GLhandleARB" => "unsigned int",
"GLcharARB" => "char",
"GLchar" => "char",
"GLhalfNV" => "unsigned short" );
foreach my $org (reverse sort keys %hash) {
......@@ -713,7 +714,14 @@ print EXT "const OpenGL_extension extension_registry[", ($#tmp + 1), "] = {\n";
my $i = 0;
foreach (sort keys %ext_functions) {
my $func_ref = $ext_functions{$_};
print EXT " { \"$func_ref->[0]\", \"$func_ref->[3]\", (void *) wine_$func_ref->[0], (void **) (&$ext_prefix$func_ref->[0]) }";
if ($func_ref->[0] eq $func_ref->[3])
{
print EXT " { \"$func_ref->[0]\", NULL, (void *) wine_$func_ref->[0], (void **) &$ext_prefix$func_ref->[0] }";
}
else
{
print EXT " { \"$func_ref->[0]\", \"$func_ref->[3]\", (void *) wine_$func_ref->[0], (void **) &$ext_prefix$func_ref->[0] }";
}
if ($i != $#tmp) {
print EXT ",";
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -458,8 +458,9 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc) {
return ret;
}
} else {
const char *glx_name = ext_ret->glx_name ? ext_ret->glx_name : ext_ret->name;
ENTER_GL();
local_func = p_glXGetProcAddressARB( (const GLubyte*) ext_ret->glx_name);
local_func = p_glXGetProcAddressARB( (const GLubyte*)glx_name);
LEAVE_GL();
/* After that, look at the extensions defined in the Linux OpenGL library */
......@@ -474,15 +475,15 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc) {
OpenGL drivers (moreover, it is only useful for old 1.0 apps
that query the glBindTextureEXT extension).
*/
memcpy(buf, ext_ret->glx_name, strlen(ext_ret->glx_name) - 3);
buf[strlen(ext_ret->glx_name) - 3] = '\0';
memcpy(buf, glx_name, strlen(glx_name) - 3);
buf[strlen(glx_name) - 3] = '\0';
TRACE(" extension not found in the Linux OpenGL library, checking against libGL bug with %s..\n", buf);
ret = GetProcAddress(opengl32_handle, buf);
if (ret != NULL) {
TRACE(" found function in main OpenGL library (%p) !\n", ret);
} else {
WARN("Did not find function %s (%s) in your OpenGL library !\n", lpszProc, ext_ret->glx_name);
WARN("Did not find function %s (%s) in your OpenGL library !\n", lpszProc, glx_name);
}
return ret;
......
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