You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.5KB

  1. #!/usr/bin/perl
  2. ##
  3. ## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
  4. ## Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
  5. ##
  6. ## This program is distributed under the terms and conditions of the GNU
  7. ## General Public License Version 2 as published by the Free Software
  8. ## Foundation or, at your option, any later version.
  9. use strict;
  10. use warnings;
  11. use lib '.';
  12. do 'bin/make.pl';
  13. #---------------------------------------------------------------------------------------
  14. # function pointer definition
  15. sub make_pfn_info($%)
  16. {
  17. my $name = $_[0];
  18. return " glewInfoFunc(\"$_[0]\", $name == NULL);";
  19. }
  20. #---------------------------------------------------------------------------------------
  21. my @extlist = ();
  22. my %extensions = ();
  23. if (@ARGV)
  24. {
  25. @extlist = @ARGV;
  26. foreach my $ext (sort @extlist)
  27. {
  28. my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
  29. my $extvar = $extname;
  30. $extvar =~ s/GL(X*)_/GL$1EW_/;
  31. my $extpre = $extname;
  32. $extpre =~ s/(GLX|GLW|GL).*/$1/;
  33. $extpre = lc $extpre;
  34. #make_separator($extname);
  35. print "#ifdef $extname\n\n";
  36. print "static void _glewInfo_$extname (void)\n{\n";
  37. if ($extvar =~ /VERSION/)
  38. {
  39. print " glewPrintExt(\"$extname\", $extvar, $extvar, $extvar);\n";
  40. }
  41. else
  42. {
  43. print " glewPrintExt(\"$extname\", $extvar, $extpre" .
  44. "ewIsSupported(\"$extname\"), $extpre" .
  45. "ewGetExtension(\"$extstring\"));\n";
  46. }
  47. output_decls($functions, \&make_pfn_info);
  48. print "}\n\n";
  49. print "#endif /* $extname */\n\n";
  50. }
  51. }