mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-24 06:45:07 +00:00
Add deleters to functions that exist both in core and extensions.
Parts of later GL versions are often published as extension too, so these functions may be queried twice.
This commit is contained in:
parent
951cdeba89
commit
0c1a32c5e4
@ -113,7 +113,7 @@ $(EXT)/.dummy: $(REGISTRY)/.dummy
|
||||
@echo "Creating descriptors"
|
||||
@echo "--------------------------------------------------------------------"
|
||||
rm -rf $(EXT)
|
||||
$(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST)
|
||||
$(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST) $(CORE)
|
||||
$(BIN)/$(FILTER) $(EXT)
|
||||
ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
|
||||
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
|
||||
@ -199,8 +199,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy $(SRC)/glew_init_hash.c
|
||||
cp -f $(SRC)/glew_license.h $@
|
||||
cat $(SRC)/glew_head.c >> $@
|
||||
echo -e "\n#if !defined(_WIN32) || !defined(GLEW_MX)" >> $@
|
||||
$(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) >> $@
|
||||
$(BIN)/make_def_fun.pl GL $(GL_EXT_SPEC) >> $@
|
||||
$(BIN)/make_def_fun.pl GL $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
|
||||
echo -e "\n#endif /* !WIN32 || !GLEW_MX */" >> $@
|
||||
echo -e "\n#if !defined(GLEW_MX)" >> $@;
|
||||
echo -e "\nGLboolean __GLEW_VERSION_1_1 = GL_FALSE;" >> $@
|
||||
|
@ -307,8 +307,10 @@ sub parse_spec($)
|
||||
|
||||
my @speclist = ();
|
||||
my %extensions = ();
|
||||
my %fcn_in_core = ();
|
||||
|
||||
my $ext_dir = shift;
|
||||
my $core_dir = shift;
|
||||
my $reg_http = "http://www.opengl.org/registry/specs/";
|
||||
|
||||
# Take command line arguments or read list from file
|
||||
@ -320,6 +322,24 @@ if (@ARGV)
|
||||
@speclist = split "\n", (<>);
|
||||
}
|
||||
|
||||
# Get functions moved to the GL core
|
||||
my %core_fnc = ();
|
||||
foreach my $spec (<$core_dir/GL_VERSION_*>)
|
||||
{
|
||||
my $vsn = $spec;
|
||||
$vsn =~ s/.*\/GL_VERSION_(\d+)_(\d+)/$1.$2/;
|
||||
|
||||
open SPEC, "<$spec";
|
||||
while (<SPEC>)
|
||||
{
|
||||
if ($_ =~ qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)\s*(~.*)?$/i )
|
||||
{
|
||||
$core_fnc{$2} = $vsn;
|
||||
}
|
||||
}
|
||||
close SPEC;
|
||||
}
|
||||
|
||||
foreach my $spec (sort @speclist)
|
||||
{
|
||||
my ($extname, $extnames, $tokens, $functions) = parse_spec($spec);
|
||||
@ -371,7 +391,13 @@ foreach my $spec (sort @speclist)
|
||||
{
|
||||
if ($function =~ /^$prefix.*/i)
|
||||
{
|
||||
print EXT "\t" . ${$functions}{$function}{rtype} . " " . $function . " (" . ${$functions}{$function}{parms} . ")" . "\n";
|
||||
my $deleter = "";
|
||||
|
||||
if ($core_fnc{$function})
|
||||
{
|
||||
$deleter = " ~ " . $core_fnc{$function};
|
||||
}
|
||||
print EXT "\t" . ${$functions}{$function}{rtype} . " " . $function . " (" . ${$functions}{$function}{parms} . ")" . $deleter . "\n";
|
||||
}
|
||||
}
|
||||
close EXT;
|
||||
|
@ -20,6 +20,6 @@ if [ ! -d $1 ] ; then
|
||||
|
||||
# Parse each of the extensions in the registry
|
||||
find $2 -name doc -type d -prune -o -name "*.txt" -print | \
|
||||
grep -v -f $3 | sort | bin/parse_spec.pl $1
|
||||
grep -v -f $3 | sort | bin/parse_spec.pl $1 $4
|
||||
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user