*** empty log message ***

git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@96 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
ikits 2003-07-08 16:43:30 +00:00
parent 58f838d414
commit e68c8d8886
16 changed files with 136 additions and 48 deletions

View File

@ -1,31 +1,10 @@
## The OpenGL Extension Wrangler Library
## Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
## Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
## Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
## 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 <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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)

View File

@ -1,2 +1,10 @@
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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 <inttypes.h>/' $1
sed -i -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include <inttypes.h>/' $1

View File

@ -1,5 +1,6 @@
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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($$)

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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";
}

49
auto/bin/make_html.pl Executable file
View File

@ -0,0 +1,49 @@
#!/usr/bin/perl
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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 "<br>\n";
}
if ($exturl)
{
print "<a href=\"$exturl\">$extname</a><br>\n";
}
else
{
print "$extname<br>\n";
}
}

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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_/;

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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";

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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";

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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_/;

View File

@ -1,6 +1,7 @@
#!/usr/bin/perl
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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})

View File

@ -1,4 +1,11 @@
#!/bin/bash
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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

View File

@ -1,4 +1,11 @@
#!/bin/sh
#
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
# Copyright (C) 2003 Milan Ikits <milan.ikits@ieee.org>
#
# 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

View File

@ -1,3 +1,4 @@
<br></td></tr>
<tr>
<td bgcolor="#fff0d0">
<table border="0" cellspacing="0" cellpadding="0" width="100%">

View File

@ -8,7 +8,7 @@
<html>
<head>
<title>
GLEW: Supported OpenGL Extensions
GLEW: OpenGL Extensions Supported
</title>
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
<link href="glew.css" type=text/css rel=stylesheet>
@ -17,5 +17,7 @@ GLEW: Supported OpenGL Extensions
<center>
<table border="0" width="50%" cellpadding="5" cellspacing="10">
<tr>
<td align="center" bgcolor="#fff0d0"><h1>GLEW: Supported OpenGL Extensions</h1></td>
</tr>
<td align="left" bgcolor="#ffffff">
<center><font size="+1"><b>The OpenGL Extension Wrangler
Library</b></font><p>
<font size="+1">OpenGL Extensions Supported</font></center><p>

View File

@ -8,7 +8,7 @@
<html>
<head>
<title>
GLEW: Supported GLX Extensions
GLEW: GLX Extensions Supported
</title>
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
<link href="glew.css" type=text/css rel=stylesheet>
@ -17,5 +17,7 @@ GLEW: Supported GLX Extensions
<center>
<table border="0" width="50%" cellpadding="5" cellspacing="10">
<tr>
<td align="center" bgcolor="#fff0d0"><h1>GLEW: Supported GLX Extensions</h1></td>
</tr>
<td align="left" bgcolor="#ffffff">
<center><font size="+1"><b>The OpenGL Extension Wrangler
Library</b></font><p>
<font size="+1">GLX Extensions Supported</font></center><p>

View File

@ -8,7 +8,7 @@
<html>
<head>
<title>
GLEW: Supported WGL Extensions
GLEW: WGL Extensions Supported
</title>
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
<link href="glew.css" type=text/css rel=stylesheet>
@ -17,5 +17,7 @@ GLEW: Supported WGL Extensions
<center>
<table border="0" width="50%" cellpadding="5" cellspacing="10">
<tr>
<td align="center" bgcolor="#fff0d0"><h1>GLEW: Supported WGL Extensions</h1></td>
</tr>
<td align="left" bgcolor="#ffffff">
<center><font size="+1"><b>The OpenGL Extension Wrangler
Library</b></font><p>
<font size="+1">WGL Extensions Supported</font></center><p>