diff --git a/auto/Makefile b/auto/Makefile index dbe9083..5c42291 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -1,31 +1,10 @@ -## The OpenGL Extension Wrangler Library -## Copyright (C) 2003, 2002, Milan Ikits -## Copyright (C) 2003, 2002, Marcelo E. Magallon -## Copyright (C) 2002, Lev Povalahev -## All rights reserved. -## -## Redistribution and use in source and binary forms, with or without -## modification, are permitted provided that the following conditions are met: -## -## * Redistributions of source code must retain the above copyright notice, -## this list of conditions and the following disclaimer. -## * Redistributions in binary form must reproduce the above copyright notice, -## this list of conditions and the following disclaimer in the documentation -## and/or other materials provided with the distribution. -## * The name of the author may be used to endorse or promote products -## derived from this software without specific prior written permission. -## -## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -## THE POSSIBILITY OF SUCH DAMAGE. +# +# Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits +# +# This program is distributed under the terms and conditions of the GNU +# General Public License Version 2 as published by the Free Software +# Foundation or, at your option, any later version. SHELL := bash REGISTRY := registry @@ -40,8 +19,9 @@ PARSE_SPEC := parse_spec.pl TOP := .. I.DEST := $(TOP)/include/GL S.DEST := $(TOP)/src +D.DEST := $(TOP)/doc -TARGETS = $(I.DEST)/glew.h $(I.DEST)/wglew.h $(I.DEST)/glxew.h $(S.DEST)/glew.c $(S.DEST)/glewinfo.c +TARGETS = $(I.DEST)/glew.h $(I.DEST)/wglew.h $(I.DEST)/glxew.h $(S.DEST)/glew.c $(S.DEST)/glewinfo.c $(D.DEST)/glew.html $(D.DEST)/wglew.html $(D.DEST)/glxew.html all: $(TARGETS) @@ -127,6 +107,23 @@ $(S.DEST)/glewinfo.c: $(EXT)/.dummy cat $(SRC)/glewinfo_post.c >> $@ $(BIN)/fix_OML_sync_control.sh $@ +#doc: $(D.DEST)/glew.html $(D.DEST)/wglew.html $(D.DEST)/glxew.html + +$(D.DEST)/glew.html: $(EXT)/.dummy + cp -f $(SRC)/glew_pre.html $@ + $(BIN)/make_html.pl $(EXT)/GL_* >> $@ + cat $(SRC)/glew_post.html >> $@ + +$(D.DEST)/wglew.html: $(EXT)/.dummy + cp -f $(SRC)/wglew_pre.html $@ + $(BIN)/make_html.pl $(EXT)/WGL_* >> $@ + cat $(SRC)/glew_post.html >> $@ + +$(D.DEST)/glxew.html: $(EXT)/.dummy + cp -f $(SRC)/glxew_pre.html $@ + $(BIN)/make_html.pl $(EXT)/GLX_* >> $@ + cat $(SRC)/glew_post.html >> $@ + clean: rm -rf $(TARGETS) rm -rf $(EXT) diff --git a/auto/bin/fix_OML_sync_control.sh b/auto/bin/fix_OML_sync_control.sh index c96297d..91bed8a 100755 --- a/auto/bin/fix_OML_sync_control.sh +++ b/auto/bin/fix_OML_sync_control.sh @@ -1,2 +1,10 @@ +# +# Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits +# +# This program is distributed under the terms and conditions of the GNU +# General Public License Version 2 as published by the Free Software +# Foundation or, at your option, any later version. + sed -i -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /' $1 sed -i -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /' $1 diff --git a/auto/bin/make.pl b/auto/bin/make.pl index a5c137f..21b982a 100755 --- a/auto/bin/make.pl +++ b/auto/bin/make.pl @@ -1,5 +1,6 @@ # # Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software @@ -7,6 +8,7 @@ my %regex = ( extname => qr/^[A-Z][A-Za-z0-9_]+$/, + exturl => qr/^http.+$/, function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i, token => qr/^([A-Z][A-Z0-9_]*)\s+((?:0x)?[0-9A-F]+)$/, type => qr/^typedef\s+(.+)\s+([\*A-Za-z0-9_]+)$/, @@ -60,6 +62,7 @@ sub parse_ext($) my %types = (); my @exacts = (); my $extname = ""; + my $exturl = ""; open EXT, "<$filename" or return; @@ -71,6 +74,10 @@ sub parse_ext($) $extname = $_; next; } + elsif (/$regex{exturl}/) + { + $exturl = $_; + } elsif (s/^\s+//) { if (/$regex{exact}/) @@ -100,7 +107,7 @@ sub parse_ext($) close EXT; - return ($extname, \%types, \%tokens, \%functions, \@exacts); + return ($extname, $exturl, \%types, \%tokens, \%functions, \@exacts); } sub output_tokens($$) diff --git a/auto/bin/make_header.pl b/auto/bin/make_header.pl index 1639271..fb5cce7 100755 --- a/auto/bin/make_header.pl +++ b/auto/bin/make_header.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl # # Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software @@ -59,7 +60,7 @@ if (@ARGV) foreach my $ext (sort @extlist) { - my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext); + my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); make_separator($extname); print "#ifndef $extname\n#define $extname 1\n"; @@ -71,10 +72,7 @@ foreach my $ext (sort @extlist) output_decls($functions, \&make_pfn_alias); my $extvar = $extname; - my $extvardef = $extname; $extvar =~ s/GL(X*)_/GL$1EW_/; - $extvardef=~ s/(W*)GL(X*)_/\l$1gl\l$2ew_/; - print "\nGLEWAPI GLboolean $extvar;\n"; - print "#define $extvardef $extvar\n\n"; + print "\nGLEWAPI GLboolean $extvar;\n\n"; print "#endif /* $extname */\n\n"; } diff --git a/auto/bin/make_html.pl b/auto/bin/make_html.pl new file mode 100755 index 0000000..effdf13 --- /dev/null +++ b/auto/bin/make_html.pl @@ -0,0 +1,49 @@ +#!/usr/bin/perl +# +# Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits +# +# This program is distributed under the terms and conditions of the GNU +# General Public License Version 2 as published by the Free Software +# Foundation or, at your option, any later version. + +use strict; +use warnings; + +do 'bin/make.pl'; + +#--------------------------------------------------------------------------------------- + +my @extlist = (); +my %extensions = (); +my $group = ""; +my $cur_group = ""; + +if (@ARGV) +{ + @extlist = @ARGV; +} else { + local $/; + @extlist = split "\n", (<>); +} + +foreach my $ext (sort @extlist) +{ + my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); + $cur_group = $extname; + $cur_group =~ s/^(?:W?)GL(?:X?)_([A-Z0-9]+?)_.*$/$1/; + $extname =~ s/^(?:W?)GL(?:X?)_(.*)$/$1/; + if ($cur_group ne $group) + { + $group = $cur_group; + print "
\n"; + } + if ($exturl) + { + print "$extname
\n"; + } + else + { + print "$extname
\n"; + } +} diff --git a/auto/bin/make_info.pl b/auto/bin/make_info.pl index 87fc6ab..938c18d 100755 --- a/auto/bin/make_info.pl +++ b/auto/bin/make_info.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl # # Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software @@ -35,7 +36,7 @@ if (@ARGV) foreach my $ext (sort @extlist) { - my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext); + my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); my $extvar = $extname; my $extvardef = $extname; $extvar =~ s/GL(X*)_/GL$1EW_/; diff --git a/auto/bin/make_info_list.pl b/auto/bin/make_info_list.pl index 57257e7..ed0c022 100755 --- a/auto/bin/make_info_list.pl +++ b/auto/bin/make_info_list.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl # # Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software @@ -41,7 +42,7 @@ if (@ARGV) foreach my $ext (sort @extlist) { - my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext); + my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); print "#ifdef $extname\n"; print " _glewInfo_$extname();\n"; diff --git a/auto/bin/make_init.pl b/auto/bin/make_init.pl index b5b36cd..e89f57e 100755 --- a/auto/bin/make_init.pl +++ b/auto/bin/make_init.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl # # Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software @@ -41,7 +42,7 @@ if (@ARGV) foreach my $ext (sort @extlist) { - my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext); + my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); make_separator($extname); print "#ifdef $extname\n"; diff --git a/auto/bin/make_list.pl b/auto/bin/make_list.pl index cf4ecef..c694108 100755 --- a/auto/bin/make_list.pl +++ b/auto/bin/make_list.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl # # Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software @@ -41,7 +42,7 @@ if (@ARGV) foreach my $ext (sort @extlist) { - my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext); + my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); my $extvar = $extname; $extvar =~ s/GL(X*)_/GL$1EW_/; diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl index cad8251..4007d98 100755 --- a/auto/bin/parse_spec.pl +++ b/auto/bin/parse_spec.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl # # Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits # # This program is distributed under the terms and conditions of the GNU # General Public License Version 2 as published by the Free Software @@ -258,6 +259,7 @@ my @speclist = (); my %extensions = (); my $ext_dir = shift; +my $reg_http = "http://oss.sgi.com/projects/ogl-sample/"; # Take command line arguments or read list from file if (@ARGV) @@ -277,6 +279,8 @@ foreach my $spec (sort @speclist) my $info = "$ext_dir/" . $ext; open EXT, ">$info"; print EXT $ext . "\n"; + print EXT $reg_http . $spec . "\n"; + my $prefix = $ext; $prefix =~ s/^(.+?)(_.+)$/$1/; foreach my $token (sort { hex ${$tokens}{$a} <=> hex ${$tokens}{$b} } keys %{$tokens}) diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh index b9f33ea..e1ffc77 100755 --- a/auto/bin/update_ext.sh +++ b/auto/bin/update_ext.sh @@ -1,4 +1,11 @@ #!/bin/bash +# +# Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits +# +# This program is distributed under the terms and conditions of the GNU +# General Public License Version 2 as published by the Free Software +# Foundation or, at your option, any later version. set -e diff --git a/auto/bin/update_registry.sh b/auto/bin/update_registry.sh index 68966b4..c15aab5 100755 --- a/auto/bin/update_registry.sh +++ b/auto/bin/update_registry.sh @@ -1,4 +1,11 @@ #!/bin/sh +# +# Copyright (C) 2003 Marcelo E. Magallon +# Copyright (C) 2003 Milan Ikits +# +# This program is distributed under the terms and conditions of the GNU +# General Public License Version 2 as published by the Free Software +# Foundation or, at your option, any later version. set -e diff --git a/auto/src/glew_post.html b/auto/src/glew_post.html index d1da271..d2eab58 100644 --- a/auto/src/glew_post.html +++ b/auto/src/glew_post.html @@ -1,3 +1,4 @@ +
diff --git a/auto/src/glew_pre.html b/auto/src/glew_pre.html index 5613563..f28cdc6 100644 --- a/auto/src/glew_pre.html +++ b/auto/src/glew_pre.html @@ -8,7 +8,7 @@ -GLEW: Supported OpenGL Extensions +GLEW: OpenGL Extensions Supported @@ -17,5 +17,7 @@ GLEW: Supported OpenGL Extensions
- - +

GLEW: Supported OpenGL Extensions

+
The OpenGL Extension Wrangler + Library

+OpenGL Extensions Supported

diff --git a/auto/src/glxew_pre.html b/auto/src/glxew_pre.html index 1fa2d88..ec5eb8d 100644 --- a/auto/src/glxew_pre.html +++ b/auto/src/glxew_pre.html @@ -8,7 +8,7 @@ -GLEW: Supported GLX Extensions +GLEW: GLX Extensions Supported @@ -17,5 +17,7 @@ GLEW: Supported GLX Extensions

- - +

GLEW: Supported GLX Extensions

+
The OpenGL Extension Wrangler + Library

+GLX Extensions Supported

diff --git a/auto/src/wglew_pre.html b/auto/src/wglew_pre.html index 687ea2f..40288ec 100644 --- a/auto/src/wglew_pre.html +++ b/auto/src/wglew_pre.html @@ -8,7 +8,7 @@ -GLEW: Supported WGL Extensions +GLEW: WGL Extensions Supported @@ -17,5 +17,7 @@ GLEW: Supported WGL Extensions

- - +

GLEW: Supported WGL Extensions

+
The OpenGL Extension Wrangler + Library

+WGL Extensions Supported