4 open XS, "< opengl_words.txt";
5 open CPP, "| cpp - > OpenGL.cx";
24 open FP, "< OpenGL.cx"
25 or die "Couldn't open OpenGL.cx\n";
31 my ($junk,$goodstuff) = split "--cut--", $text;
33 $goodstuff =~ s/#(GL[U]?_[A-Z0-9_]+)\s+([0-9xa-fA-F]+)/sub main::$1 { $2 }/g;
35 for (split "\n",$goodstuff) {
36 if (/sub main::(GL[U]?_[A-Z0-9_]+)/ ) {
46 print STDERR "Failed to find word $_" unless ($words{$_});
49 open OGL, "> ../lib/SDL/OpenGL/Constants.pm";
51 $words = join(" ",@words);
54 # SDL::OpenGL::Constants
56 # This is an autogenerate file, don't bother editing.
57 # Names are read from a list in opengl_words.txt and written by gl_const.pl.
59 # Copyright (C) 2003 David J. Goehrig <dave\@sdlperl.org>
61 package SDL::OpenGL::Constants;
69 system("rm OpenGL.cx");