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.

49 lines
1.2KB

  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_def($%)
  16. {
  17. return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
  18. }
  19. # function pointer definition
  20. sub make_init_call($%)
  21. {
  22. my $name = prefixname($_[0]);
  23. return " r = r || (" . $name . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress((const GLubyte*)\"" . $name . "\")) == NULL;";
  24. }
  25. #---------------------------------------------------------------------------------------
  26. my @extlist = ();
  27. my %extensions = ();
  28. if (@ARGV)
  29. {
  30. @extlist = @ARGV;
  31. foreach my $ext (sort @extlist)
  32. {
  33. my ($extname, $exturl, $extstring, $reuse, $types, $tokens, $functions, $exacts) = parse_ext($ext);
  34. print "#ifdef $extname\n";
  35. print " _glewInfo_$extname();\n";
  36. print "#endif /* $extname */\n";
  37. }
  38. }