diff --git a/Makefile b/Makefile index de33c2f..f731d70 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ #!gmake ## The OpenGL Extension Wrangler Library -## Copyright (C) 2003, 2002, Milan Ikits -## Copyright (C) 2003, 2002, Marcelo E. Magallon -## Copyright (C) 2002, Lev Povalahev +## Copyright (C) 2004, 2003, 2002, Milan Ikits +## Copyright (C) 2004, 2003, 2002, Marcelo E. Magallon +## Copyright (C) 2002, Lev Povalahev ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without diff --git a/README.txt b/README.txt index 86e81b5..38c6ea0 100644 --- a/README.txt +++ b/README.txt @@ -12,7 +12,7 @@ If you downloaded the tarball from the GLEW website, you just need to: If you wish to build GLEW from scratch (update the extension data from the net or add your own extension information), you need a Unix -environment (wget and a reasonable set of binutils -- e.g. sed v4). The -extension data is regenerated from the top level source directory with: +environment (including wget, perl, and GNU make). The extension data +is regenerated from the top level source directory with: make extensions diff --git a/TODO.txt b/TODO.txt index e45322e..f7672b7 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,4 @@ -bug fix - ARB_shader_objects const correctness +add -display argument to glewinfo make install relinking (Darwin) Web page and documentation update Web poll on separating glew, glxew and wglew diff --git a/auto/Makefile b/auto/Makefile index 4dfba1b..4a585d4 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -1,10 +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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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. GLEW_MAJOR = 1 GLEW_MINOR = 2 @@ -64,7 +64,7 @@ $(I.DEST)/glew.h: $(EXT)/.dummy # grep -v 'glBlendEquation' > $@; rm tmp; $(BIN)/make_header.pl GLAPIENTRY GL $(EXT)/GL_* >> $@ $(BIN)/make_struct.pl GL $(CORE)/GL_VERSION* $(EXT)/GL_* >> $@ - perl -e 's/ GLboolean __GLEW_VERSION_1_2;/\n GLboolean __GLEW_VERSION_1_1;\n GLboolean __GLEW_VERSION_1_2;/' -pi.bak $@ + perl -e 's/ GLboolean __GLEW_VERSION_1_2;/ GLboolean __GLEW_VERSION_1_1;\n GLboolean __GLEW_VERSION_1_2;/' -pi.bak $@ rm -f $@.bak cat $(SRC)/glew_post.h >> $@ @@ -76,8 +76,9 @@ $(I.DEST)/wglew.h: $(EXT)/.dummy $(I.DEST)/glxew.h: $(EXT)/.dummy cp -f $(SRC)/glxew_pre.h $@ - $(BIN)/make_header.pl '' $(CORE)/GLX_VERSION* >> $@ - $(BIN)/make_header.pl '' $(EXT)/GLX_* >> $@ + $(BIN)/make_header.pl '' GLX $(CORE)/GLX_VERSION* >> $@ + $(BIN)/make_header.pl '' GLX $(EXT)/GLX_* >> $@ + $(BIN)/make_struct.pl GLX $(CORE)/GLX_VERSION* $(EXT)/GLX_* >> $@ cat $(SRC)/glxew_post.h >> $@ $(BIN)/fix_OML_sync_control.sh $@ diff --git a/auto/bin/fix_OML_sync_control.sh b/auto/bin/fix_OML_sync_control.sh index f83a0fe..603d11e 100755 --- a/auto/bin/fix_OML_sync_control.sh +++ b/auto/bin/fix_OML_sync_control.sh @@ -1,10 +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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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. perl -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include /;' -pi.bak $1 rm -f $1.bak diff --git a/auto/bin/make.pl b/auto/bin/make.pl index 0dd1727..f3ca567 100755 --- a/auto/bin/make.pl +++ b/auto/bin/make.pl @@ -1,10 +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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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. my %regex = ( extname => qr/^[A-Z][A-Za-z0-9_]+$/, @@ -27,7 +27,7 @@ sub prefixname($) sub prefix_varname($) { my $name = $_[0]; - $name =~ s/^(.*)GLEW/__$1GLEW/; + $name =~ s/^(.*)GL(X*)EW/__$1GL$2EW/; return $name; } diff --git a/auto/bin/make_header.pl b/auto/bin/make_header.pl index ec3ac82..29b70c3 100755 --- a/auto/bin/make_header.pl +++ b/auto/bin/make_header.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; diff --git a/auto/bin/make_html.pl b/auto/bin/make_html.pl index effdf13..54a8fa6 100755 --- a/auto/bin/make_html.pl +++ b/auto/bin/make_html.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; diff --git a/auto/bin/make_info.pl b/auto/bin/make_info.pl index e884dad..6fc89f9 100755 --- a/auto/bin/make_info.pl +++ b/auto/bin/make_info.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; diff --git a/auto/bin/make_info_list.pl b/auto/bin/make_info_list.pl index ad4fdf4..56bbab6 100755 --- a/auto/bin/make_info_list.pl +++ b/auto/bin/make_info_list.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; diff --git a/auto/bin/make_init.pl b/auto/bin/make_init.pl index 4872c1a..2c05548 100755 --- a/auto/bin/make_init.pl +++ b/auto/bin/make_init.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; diff --git a/auto/bin/make_list.pl b/auto/bin/make_list.pl index aa818d3..d12ec48 100755 --- a/auto/bin/make_list.pl +++ b/auto/bin/make_list.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; diff --git a/auto/bin/make_struct.pl b/auto/bin/make_struct.pl index ac2b1eb..2c985e1 100755 --- a/auto/bin/make_struct.pl +++ b/auto/bin/make_struct.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; @@ -40,6 +40,8 @@ foreach my $ext (sort @extlist) output_decls($functions, \&make_pfn_decl); } +print "\n"; + foreach my $ext (sort @extlist) { my ($extname, $exturl, $types, $tokens, $functions, $exacts) = parse_ext($ext); diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl index c9c4ab3..97db6dd 100755 --- a/auto/bin/parse_spec.pl +++ b/auto/bin/parse_spec.pl @@ -1,11 +1,11 @@ #!/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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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; diff --git a/auto/bin/update_ext.sh b/auto/bin/update_ext.sh index cffeca5..137e4d5 100755 --- a/auto/bin/update_ext.sh +++ b/auto/bin/update_ext.sh @@ -1,17 +1,17 @@ #!/bin/bash -# -# Copyright (C) 2003-2004 Marcelo E. Magallon -# Copyright (C) 2003-2004 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. -# -# Parameters: -# -# $1: Extensions directory -# $2: Registry directory -# $3: The black list +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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. +## +## Parameters: +## +## $1: Extensions directory +## $2: Registry directory +## $3: The black list set -e diff --git a/auto/bin/update_registry.sh b/auto/bin/update_registry.sh index c7efa51..ed3d0da 100755 --- a/auto/bin/update_registry.sh +++ b/auto/bin/update_registry.sh @@ -1,11 +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. +## +## Copyright (C) 2004, 2003 Marcelo E. Magallon +## Copyright (C) 2004, 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_pre.c b/auto/src/glew_pre.c index c4432f6..9bcd17b 100644 --- a/auto/src/glew_pre.c +++ b/auto/src/glew_pre.c @@ -1,8 +1,8 @@ /* ** The OpenGL Extension Wrangler Library -** Copyright (C) 2003, 2002, Milan Ikits -** Copyright (C) 2003, 2002, Marcelo E. Magallon -** Copyright (C) 2002, Lev Povalahev +** Copyright (C) 2004, 2003, 2002, Milan Ikits +** Copyright (C) 2004, 2003, 2002, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without diff --git a/auto/src/glew_pre.h b/auto/src/glew_pre.h index ec546cf..6f7c7ba 100644 --- a/auto/src/glew_pre.h +++ b/auto/src/glew_pre.h @@ -1,8 +1,8 @@ /* ** The OpenGL Extension Wrangler Library -** Copyright (C) 2003, 2002, Milan Ikits -** Copyright (C) 2003, 2002, Marcelo E. Magallon -** Copyright (C) 2002, Lev Povalahev +** Copyright (C) 2004, 2003, 2002, Milan Ikits +** Copyright (C) 2004, 2003, 2002, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without diff --git a/auto/src/glewinfo_pre.c b/auto/src/glewinfo_pre.c index 01e93c5..9db0cc4 100644 --- a/auto/src/glewinfo_pre.c +++ b/auto/src/glewinfo_pre.c @@ -1,8 +1,8 @@ /* ** The OpenGL Extension Wrangler Library -** Copyright (C) 2003, 2002, Milan Ikits -** Copyright (C) 2003, 2002, Marcelo E. Magallon -** Copyright (C) 2002, Lev Povalahev +** Copyright (C) 2004, 2003, 2002, Milan Ikits +** Copyright (C) 2004, 2003, 2002, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without diff --git a/auto/src/glxew_post.h b/auto/src/glxew_post.h index 06a3ae3..074f8fc 100644 --- a/auto/src/glxew_post.h +++ b/auto/src/glxew_post.h @@ -1,5 +1,16 @@ /* ------------------------------------------------------------------------ */ +typedef struct GLXEWContextStruct GLXEWContext; +GLEWAPI GLXEWContext* glxewDefaultContext; + +#ifdef GLEW_MX +extern GLXEWContext* glxewGetContext(); +# define GLXEW_GET_CONTEXT(x) glxewGetContext()->##x +#else +# define GLXEW_GET_CONTEXT(x) glxewDefaultContext->##x +#endif /* GLEW_MX */ + +extern GLenum glxewContextInit (GLXEWContext* ctx); extern GLboolean glxewGetExtension (const GLubyte* name); #ifdef __cplusplus diff --git a/auto/src/glxew_pre.h b/auto/src/glxew_pre.h index b57e2ef..d0e7966 100644 --- a/auto/src/glxew_pre.h +++ b/auto/src/glxew_pre.h @@ -1,8 +1,8 @@ /* ** The OpenGL Extension Wrangler Library -** Copyright (C) 2003, 2002, Milan Ikits -** Copyright (C) 2003, 2002, Marcelo E. Magallon -** Copyright (C) 2002, Lev Povalahev +** Copyright (C) 2004, 2003, 2002, Milan Ikits +** Copyright (C) 2004, 2003, 2002, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without diff --git a/auto/src/wglew_pre.h b/auto/src/wglew_pre.h index 221e061..ede192b 100644 --- a/auto/src/wglew_pre.h +++ b/auto/src/wglew_pre.h @@ -1,8 +1,8 @@ /* ** The OpenGL Extension Wrangler Library -** Copyright (C) 2003, 2002, Milan Ikits -** Copyright (C) 2003, 2002, Marcelo E. Magallon -** Copyright (C) 2002, Lev Povalahev +** Copyright (C) 2004, 2003, 2002, Milan Ikits +** Copyright (C) 2004, 2003, 2002, Marcelo E. Magallon +** Copyright (C) 2002, Lev Povalahev ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without