From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/opengl32/make_opengl | 45 +++------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 645ece29d0f..4e7193f623f 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -54,18 +54,6 @@ use File::Basename; my $spec_file = "opengl32.spec"; my $wgl_file = "../../include/wine/wgl.h"; -# -# List of norm categories -# -my %cat_1_0 = ( "GL_VERSION_1_0" => 1 ); -my %cat_1_1 = ( %cat_1_0, "GL_VERSION_1_1" => 1 ); -my %cat_1_2 = ( %cat_1_1, "GL_VERSION_1_2" => 1 ); -my %cat_1_3 = ( %cat_1_2, "GL_VERSION_1_3" => 1 ); -my %cat_1_4 = ( %cat_1_3, "GL_VERSION_1_4" => 1 ); -my %cat_1_5 = ( %cat_1_4, "GL_VERSION_1_5" => 1 ); - -my %norm_categories = (); - # # This hash table gives the conversion between OpenGL types and # the .spec type and debug format @@ -835,31 +823,6 @@ sub get_arg_name($) return $name[0]->textContent(); } -# -# Extract and checks the number of arguments -# -if (@ARGV > 1) { - my $name0=$0; - $name0=~s%^.*/%%; - die "Usage: $name0 [version]\n"; -} -my $version = $ARGV[0] || "1.1"; -if ($version eq "1.0") { - %norm_categories = %cat_1_0; -} elsif ($version eq "1.1") { - %norm_categories = %cat_1_1; -} elsif ($version eq "1.2") { - %norm_categories = %cat_1_2; -} elsif ($version eq "1.3") { - %norm_categories = %cat_1_3; -} elsif ($version eq "1.4") { - %norm_categories = %cat_1_4; -} elsif ($version eq "1.5") { - %norm_categories = %cat_1_5; -} else { - die "Incorrect OpenGL version.\n"; -} - # # Fetch the registry files # @@ -878,9 +841,7 @@ chdir(dirname($0)); # # Then, create the list of all OpenGL functions using the registry -# files. This will create two hash-tables, one with all the function -# whose category matches the one listed in '@norm_categories', the other -# with all other functions. +# files. # # An element of the hash table is a reference to an array with these # elements : @@ -1282,7 +1243,7 @@ sub parse_file($) $all_enums{$enum->{name}} = $enums{$enum->{name}}; } } - next unless defined $norm_categories{$feature->{name}}; + next unless $feature->{name} =~ /^GL_VERSION_1_[01]$/; foreach my $cmd ($feature->findnodes("./require/command")) { $norm_functions{$cmd->{name}} = $functions{$cmd->{name}}; @@ -1310,7 +1271,7 @@ sub parse_file($) { next unless is_supported_api( $feature->{api} ); } - next if defined $norm_categories{$feature_name}; + next if $feature->{name} =~ /^GL_VERSION_1_[01]$/; foreach my $cmd ($feature->findnodes("./require/command")) { my $name = $cmd->{name}; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10582