Remove wgl/glx from hookset.pl - unused. Also skip blank lines

This commit is contained in:
baldurk
2014-11-08 10:49:00 +00:00
parent 9b02d4a73e
commit d3650cc73d
4 changed files with 8 additions and 88 deletions
+1 -7
View File
@@ -86,7 +86,7 @@ struct GLHookSet
PFNGLVIEWPORTPROC glViewport;
// --
// ++ gl
// ++ glext
PFNGLACTIVETEXTUREPROC glActiveTexture;
PFNGLTEXSTORAGE1DPROC glTexStorage1D;
PFNGLTEXSTORAGE2DPROC glTexStorage2D;
@@ -563,12 +563,6 @@ struct GLHookSet
PFNGLTEXTURESUBIMAGE3DEXTPROC glTextureSubImage3DEXT;
PFNGLUNMAPNAMEDBUFFEREXTPROC glUnmapNamedBufferEXT;
// --
// ++ wgl
// --
// ++ glx
// --
};
#include "gl_hookset_defs.h"
-20
View File
@@ -88,16 +88,6 @@
// wgl extensions
#define HookCheckWGLExtensions() \
// glx extensions
#define HookCheckGLXExtensions() \
// gl extensions
#define HookCheckGLExtensions() \
HookExtension(PFNGLACTIVETEXTUREPROC, glActiveTexture); \
@@ -701,16 +691,6 @@
// wgl extensions
#define DefineWGLExtensionHooks() \
// glx extensions
#define DefineGLXExtensionHooks() \
// gl extensions
#define DefineGLExtensionHooks() \
HookWrapper1(void, glActiveTexture, GLenum, texture); \
+7 -58
View File
@@ -12,8 +12,6 @@ my $printdefs = $ARGV[$1] eq "defs";
open(HOOKSET, "<gl_hookset.h") || die "Couldn't open gl_hookset.h - run in driver/gl/";
my @dllexport = ();
my @wglext = ();
my @glxext = ();
my @glext = ();
my $mode = "";
@@ -29,14 +27,16 @@ while(<HOOKSET>)
elsif($line =~ /\/\/ \+\+ ([a-z]*)/)
{
$mode = "dllexport" if $1 eq "dllexport";
$mode = "wglext" if $1 eq "wgl";
$mode = "glxext" if $1 eq "glx";
$mode = "glext" if $1 eq "gl";
$mode = "glext" if $1 eq "glext";
}
elsif($line =~ /^\s*\/\/ .*/)
{
# skip comments
}
elsif($line =~ /^\s*$/)
{
# skip blank lines
}
elsif($mode ne "")
{
if($line =~ /(PFN.*PROC) (.*);( \/\/ aliases )?([a-zA-Z0-9_ ,]*)?/)
@@ -66,18 +66,16 @@ while(<HOOKSET>)
my %func = ('name', $name, 'typedef', $typedef, 'macro', $funcdefmacro, 'ret', $returnType, 'args', $origargs, 'aliases', $aliases);
push @dllexport, { %func } if $mode eq "dllexport";
push @wglext, { %func } if $mode eq "wglext";
push @glxext, { %func } if $mode eq "glxext";
push @glext, { %func } if $mode eq "glext";
}
else
{
print "MALFORMED $mode DEFINITION OR NO DEFINITION FOUND FOR $typedef: $def\n";
print "MALFORMED $mode DEFINITION OR NO DEFINITION FOUND FOR $typedef: '$def'\n";
}
}
else
{
print "MALFORMED $mode LINE IN gl_hookset.h: $line";
print "MALFORMED $mode LINE IN gl_hookset.h: '$line'\n";
}
}
}
@@ -91,11 +89,6 @@ if($printdefs)
print " IMPLEMENT_FUNCTION_SERIALISED($el->{ret}, $el->{name}($el->{args}));\n";
}
print "\n";
foreach my $el (@wglext)
{
print " IMPLEMENT_FUNCTION_SERIALISED($el->{ret}, $el->{name}($el->{args}));\n";
}
print "\n";
foreach my $el (@glext)
{
print " IMPLEMENT_FUNCTION_SERIALISED($el->{ret}, $el->{name}($el->{args}));\n";
@@ -115,32 +108,6 @@ foreach my $el (@dllexport)
print "\n";
print "\n";
print "\n";
print "// wgl extensions\n";
print "#define HookCheckWGLExtensions() \\\n";
foreach my $el (@wglext)
{
print " HookExtension($el->{typedef}, $el->{name}); \\\n";
foreach(split(/, */, $el->{aliases}))
{
print " HookExtensionAlias($el->{typedef}, $el->{name}, $_); \\\n";
}
}
print "\n";
print "\n";
print "\n";
print "// glx extensions\n";
print "#define HookCheckGLXExtensions() \\\n";
foreach my $el (@wglext)
{
print " HookExtension($el->{typedef}, $el->{name}); \\\n";
foreach(split(/, */, $el->{aliases}))
{
print " HookExtensionAlias($el->{typedef}, $el->{name}, $_); \\\n";
}
}
print "\n";
print "\n";
print "\n";
print "// gl extensions\n";
print "#define HookCheckGLExtensions() \\\n";
foreach my $el (@glext)
@@ -167,24 +134,6 @@ foreach my $el (@dllexport)
print "\n";
print "\n";
print "\n";
print "// wgl extensions\n";
print "#define DefineWGLExtensionHooks() \\\n";
foreach my $el (@wglext)
{
print " $el->{macro} \\\n"
}
print "\n";
print "\n";
print "\n";
print "// glx extensions\n";
print "#define DefineGLXExtensionHooks() \\\n";
foreach my $el (@wglext)
{
print " $el->{macro} \\\n"
}
print "\n";
print "\n";
print "\n";
print "// gl extensions\n";
print "#define DefineGLExtensionHooks() \\\n";
foreach my $el (@glext)
-3
View File
@@ -483,7 +483,6 @@ class OpenGLHook : LibraryHook
return (PROC)&wglGetPixelFormatAttribivARB_hooked;
}
HookCheckWGLExtensions();
HookCheckGLExtensions();
// claim not to know this extension!
@@ -541,14 +540,12 @@ class OpenGLHook : LibraryHook
#define HookExtensionAlias(funcPtrType, function, alias)
DLLExportHooks();
HookCheckWGLExtensions();
HookCheckGLExtensions();
return true;
}
DefineDLLExportHooks();
DefineWGLExtensionHooks();
DefineGLExtensionHooks();
};