Merge https://github.com/nigels-com/glew.git into subset HEAD at Fri Aug 29 15:28:37 GMT 2014

This commit is contained in:
omniavinco 2014-08-30 00:28:37 +09:00
commit b8551808c2
194 changed files with 5449 additions and 1936 deletions

4
.gitignore vendored
View File

@ -2,6 +2,10 @@
/src/*.c /src/*.c
/include/GL/*.h /include/GL/*.h
/build/vc6/*.rc /build/vc6/*.rc
/build/*/*.sdf
/build/*/*.suo
/build/*/*.vcxproj.user
/build/*/tmp/
/auto/extensions /auto/extensions
/auto/registry /auto/registry
/bin /bin

265
Makefile
View File

@ -40,18 +40,22 @@ else
$(error "Platform '$(SYSTEM)' not supported") $(error "Platform '$(SYSTEM)' not supported")
endif endif
GLEW_PREFIX ?= /usr
GLEW_DEST ?= /usr GLEW_DEST ?= /usr
BINDIR ?= $(GLEW_DEST)/bin BINDIR ?= $(GLEW_DEST)/bin
LIBDIR ?= $(GLEW_DEST)/lib LIBDIR ?= $(GLEW_DEST)/lib
INCDIR ?= $(GLEW_DEST)/include/GL INCDIR ?= $(GLEW_DEST)/include/GL
TARDIR = ../glew-$(GLEW_VERSION) ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU)
TARBALL = ../glew-$(GLEW_VERSION).tar.gz LIBGLU = glu
endif
DIST_DIR = glew-$(GLEW_VERSION) DIST_NAME ?= glew-$(GLEW_VERSION)
DIST_WIN32 = glew-$(GLEW_VERSION)-win32.zip DIST_SRC_ZIP ?= $(shell pwd)/$(DIST_NAME).zip
DIST_SRC_ZIP = glew-$(GLEW_VERSION).zip DIST_SRC_TGZ ?= $(shell pwd)/$(DIST_NAME).tgz
DIST_SRC_TGZ = glew-$(GLEW_VERSION).tgz DIST_WIN32 ?= $(shell pwd)/$(DIST_NAME)-win32.zip
DIST_DIR := $(shell mktemp -d /tmp/glew.XXXXXX)/$(DIST_NAME)
# To disable stripping of binaries either: # To disable stripping of binaries either:
# - use STRIP= on gmake command-line # - use STRIP= on gmake command-line
@ -66,7 +70,7 @@ STRIP ?= strip
RM ?= rm -f RM ?= rm -f
LN ?= ln -sf LN ?= ln -sf
ifeq ($(MAKECMDGOALS), debug) ifneq (,$(filter debug,$(MAKECMDGOALS)))
OPT = -g OPT = -g
else else
OPT = $(POPT) OPT = $(POPT)
@ -123,15 +127,20 @@ tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wgl
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< $(CC) -DGLEW_NO_GLU $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
# Force re-write of glew.pc, GLEW_DEST can vary
.PHONY: glew.pc
glew.pc: glew.pc.in glew.pc: glew.pc.in
sed \ sed \
-e "s|@prefix@|$(GLEW_DEST)|g" \ -e "s|@prefix@|$(GLEW_PREFIX)|g" \
-e "s|@libdir@|$(LIBDIR)|g" \ -e "s|@libdir@|$(LIBDIR)|g" \
-e "s|@exec_prefix@|$(BINDIR)|g" \ -e "s|@exec_prefix@|$(BINDIR)|g" \
-e "s|@includedir@|$(INCDIR)|g" \ -e "s|@includedir@|$(INCDIR)|g" \
-e "s|@version@|$(GLEW_VERSION)|g" \ -e "s|@version@|$(GLEW_VERSION)|g" \
-e "s|@cflags@||g" \ -e "s|@cflags@||g" \
-e "s|@libname@|GLEW|g" \ -e "s|@libname@|$(NAME)|g" \
-e "s|@requireslib@|$(LIBGLU)|g" \
< $< > $@ < $< > $@
# GLEW MX static and shared libraries # GLEW MX static and shared libraries
@ -159,15 +168,20 @@ tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
$(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(CFLAGS.SO) -o $@ -c $< $(CC) -DGLEW_NO_GLU -DGLEW_MX $(CFLAGS) $(CFLAGS.SO) -o $@ -c $<
# Force re-write of glewmx.pc, GLEW_DEST can vary
.PHONY: glewmx.pc
glewmx.pc: glew.pc.in glewmx.pc: glew.pc.in
sed \ sed \
-e "s|@prefix@|$(GLEW_DEST)|g" \ -e "s|@prefix@|$(GLEW_PREFIX)|g" \
-e "s|@libdir@|$(LIBDIR)|g" \ -e "s|@libdir@|$(LIBDIR)|g" \
-e "s|@exec_prefix@|$(BINDIR)|g" \ -e "s|@exec_prefix@|$(BINDIR)|g" \
-e "s|@includedir@|$(INCDIR)|g" \ -e "s|@includedir@|$(INCDIR)|g" \
-e "s|@version@|$(GLEW_VERSION)|g" \ -e "s|@version@|$(GLEW_VERSION)|g" \
-e "s|@cflags@|-DGLEW_MX|g" \ -e "s|@cflags@|-DGLEW_MX|g" \
-e "s|@libname@|GLEWmx|g" \ -e "s|@libname@|$(NAME)mx|g" \
-e "s|@requireslib@|$(LIBGLU)|g" \
< $< > $@ < $< > $@
# GLEW utility programs # GLEW utility programs
@ -184,7 +198,13 @@ VISUALINFO.BIN.SRC := src/visualinfo.c
VISUALINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(VISUALINFO.BIN.SRC))) VISUALINFO.BIN.OBJ := $(addprefix tmp/$(SYSTEM)/default/shared/,$(notdir $(VISUALINFO.BIN.SRC)))
VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o) VISUALINFO.BIN.OBJ := $(VISUALINFO.BIN.OBJ:.c=.o)
# Don't build glewinfo or visualinfo for NaCL, yet.
ifneq ($(filter nacl%,$(SYSTEM)),)
glew.bin: glew.lib bin
else
glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
endif
bin: bin:
mkdir bin mkdir bin
@ -218,81 +238,81 @@ install: install.include install.lib install.pkgconfig
install.mx: install.include install.lib.mx install.pkgconfig.mx install.mx: install.include install.lib.mx install.pkgconfig.mx
install.lib: glew.lib install.lib: glew.lib
$(INSTALL) -d -m 0755 $(LIBDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)"
# runtime # runtime
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -d -m 0755 $(BINDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
$(INSTALL) -m 0755 lib/$(LIB.SHARED) $(BINDIR)/ $(INSTALL) -m 0755 lib/$(LIB.SHARED) "$(DESTDIR)$(BINDIR)/"
else else
$(INSTALL) -m 0644 lib/$(LIB.SHARED) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/"
endif endif
ifneq ($(LN),) ifneq ($(LN),)
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.SONAME) $(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)"
endif endif
# development files # development files
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.DEVLNK) "$(DESTDIR)$(LIBDIR)/"
endif endif
ifneq ($(LN),) ifneq ($(LN),)
$(LN) $(LIB.SHARED) $(LIBDIR)/$(LIB.DEVLNK) $(LN) $(LIB.SHARED) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)"
endif endif
$(INSTALL) -m 0644 lib/$(LIB.STATIC) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.STATIC) "$(DESTDIR)$(LIBDIR)/"
install.lib.mx: glew.lib.mx install.lib.mx: glew.lib.mx
$(INSTALL) -d -m 0755 $(LIBDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)"
# runtime # runtime
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -d -m 0755 $(BINDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
$(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) $(BINDIR)/ $(INSTALL) -m 0755 lib/$(LIB.SHARED.MX) "$(DESTDIR)$(BINDIR)/"
else else
$(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.SHARED.MX) "$(DESTDIR)$(LIBDIR)/"
endif endif
ifneq ($(LN),) ifneq ($(LN),)
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.SONAME.MX) $(LN) $(LIB.SHARED.MX) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME.MX)"
endif endif
# development files # development files
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.DEVLNK.MX) "$(DESTDIR)$(LIBDIR)/"
endif endif
ifneq ($(LN),) ifneq ($(LN),)
$(LN) $(LIB.SHARED.MX) $(LIBDIR)/$(LIB.DEVLNK.MX) $(LN) $(LIB.SHARED.MX) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK.MX)"
endif endif
$(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) $(LIBDIR)/ $(INSTALL) -m 0644 lib/$(LIB.STATIC.MX) "$(DESTDIR)$(LIBDIR)/"
install.bin: glew.bin install.bin: glew.bin
$(INSTALL) -d -m 0755 $(BINDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(BINDIR)"
$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) $(BINDIR)/ $(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
install.include: install.include:
$(INSTALL) -d -m 0755 $(INCDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(INCDIR)"
$(INSTALL) -m 0644 include/GL/wglew.h $(INCDIR)/ $(INSTALL) -m 0644 include/GL/wglew.h "$(DESTDIR)$(INCDIR)/"
$(INSTALL) -m 0644 include/GL/glew.h $(INCDIR)/ $(INSTALL) -m 0644 include/GL/glew.h "$(DESTDIR)$(INCDIR)/"
$(INSTALL) -m 0644 include/GL/glxew.h $(INCDIR)/ $(INSTALL) -m 0644 include/GL/glxew.h "$(DESTDIR)$(INCDIR)/"
install.pkgconfig: glew.pc install.pkgconfig: glew.pc
$(INSTALL) -d -m 0755 $(LIBDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)"
$(INSTALL) -d -m 0755 $(LIBDIR)/pkgconfig $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)/pkgconfig"
$(INSTALL) -m 0644 glew.pc $(LIBDIR)/pkgconfig/ $(INSTALL) -m 0644 glew.pc "$(DESTDIR)$(LIBDIR)/pkgconfig/"
install.pkgconfig.mx: glewmx.pc install.pkgconfig.mx: glewmx.pc
$(INSTALL) -d -m 0755 $(LIBDIR) $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)"
$(INSTALL) -d -m 0755 $(LIBDIR)/pkgconfig $(INSTALL) -d -m 0755 "$(DESTDIR)$(LIBDIR)/pkgconfig"
$(INSTALL) -m 0644 glewmx.pc $(LIBDIR)/pkgconfig/ $(INSTALL) -m 0644 glewmx.pc "$(DESTDIR)$(LIBDIR)/pkgconfig/"
uninstall: uninstall:
$(RM) $(INCDIR)/wglew.h $(RM) "$(DESTDIR)$(INCDIR)/wglew.h"
$(RM) $(INCDIR)/glew.h $(RM) "$(DESTDIR)$(INCDIR)/glew.h"
$(RM) $(INCDIR)/glxew.h $(RM) "$(DESTDIR)$(INCDIR)/glxew.h"
$(RM) $(LIBDIR)/$(LIB.DEVLNK) $(LIBDIR)/$(LIB.DEVLNK.MX) $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK)" "$(DESTDIR)$(LIBDIR)/$(LIB.DEVLNK.MX)"
ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),) ifeq ($(filter-out mingw% cygwin,$(SYSTEM)),)
$(RM) $(BINDIR)/$(LIB.SHARED) $(BINDIR)/$(LIB.SHARED.MX) $(RM) "$(DESTDIR)$(BINDIR)/$(LIB.SHARED)" "$(DESTDIR)$(BINDIR)/$(LIB.SHARED.MX)"
else else
$(RM) $(LIBDIR)/$(LIB.SONAME) $(LIBDIR)/$(LIB.SONAME.MX) $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME)" "$(DESTDIR)$(LIBDIR)/$(LIB.SONAME.MX)"
$(RM) $(LIBDIR)/$(LIB.SHARED) $(LIBDIR)/$(LIB.SHARED.MX) $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.SHARED)" "$(DESTDIR)$(LIBDIR)/$(LIB.SHARED.MX)"
endif endif
$(RM) $(LIBDIR)/$(LIB.STATIC) $(LIBDIR)/$(LIB.STATIC.MX) $(RM) "$(DESTDIR)$(LIBDIR)/$(LIB.STATIC)" "$(DESTDIR)$(LIBDIR)/$(LIB.STATIC.MX)"
$(RM) $(BINDIR)/$(GLEWINFO.BIN) $(BINDIR)/$(VISUALINFO.BIN) $(RM) "$(DESTDIR)$(BINDIR)/$(GLEWINFO.BIN)" "$(DESTDIR)$(BINDIR)/$(VISUALINFO.BIN)"
clean: clean:
$(RM) -r tmp/ $(RM) -r tmp/
@ -307,84 +327,81 @@ distclean: clean
# Distributions # Distributions
dist-win32: dist-win32:
$(RM) -r $(TARDIR) $(RM) -r $(DIST_DIR)
mkdir -p $(TARDIR) mkdir -p $(DIST_DIR)
mkdir -p $(TARDIR)/bin cp -a include $(DIST_DIR)
mkdir -p $(TARDIR)/lib cp -a doc $(DIST_DIR)
cp -a include $(TARDIR) cp -a *.txt $(DIST_DIR)
cp -a doc $(TARDIR) cp -a bin $(DIST_DIR)
cp -a *.txt $(TARDIR) cp -a lib $(DIST_DIR)
cp -a lib/glew32.lib $(TARDIR)/lib $(RM) -f $(DIST_DIR)/bin/*/*/*.pdb $(DIST_DIR)/bin/*/*/*.exp
cp -a lib/glew32s.lib $(TARDIR)/lib $(RM) -f $(DIST_DIR)/bin/*/*/glewinfo-*.exe $(DIST_DIR)/bin/*/*/visualinfo-*.exe
cp -a lib/glew32mx.lib $(TARDIR)/lib $(RM) -f $(DIST_DIR)/lib/*/*/*.pdb $(DIST_DIR)/lib/*/*/*.exp
cp -a lib/glew32mxs.lib $(TARDIR)/lib unix2dos $(DIST_DIR)/include/GL/*.h
cp -a bin/glew32.dll $(TARDIR)/bin unix2dos $(DIST_DIR)/doc/*.txt
cp -a bin/glew32mx.dll $(TARDIR)/bin unix2dos $(DIST_DIR)/doc/*.html
cp -a bin/glewinfo.exe $(TARDIR)/bin unix2dos $(DIST_DIR)/*.txt
cp -a bin/visualinfo.exe $(TARDIR)/bin rm -f $(DIST_WIN32)
find $(TARDIR) -name CVS -o -name .cvsignore | xargs $(RM) -r cd $(DIST_DIR)/.. && zip -rv9 $(DIST_WIN32) $(DIST_NAME)
find $(TARDIR) -name .svn | xargs $(RM) -r $(RM) -r $(DIST_DIR)
find $(TARDIR) -name "*.patch" | xargs $(RM) -r
unix2dos $(TARDIR)/include/GL/*.h
unix2dos $(TARDIR)/doc/*.txt
unix2dos $(TARDIR)/doc/*.html
unix2dos $(TARDIR)/*.txt
rm -f ../$(DIST_WIN32)
cd .. && zip -rv9 $(DIST_WIN32) $(DIST_DIR)
dist-src: dist-src:
$(RM) -r $(TARDIR) $(RM) -r $(DIST_DIR)
mkdir -p $(TARDIR) mkdir -p $(DIST_DIR)
mkdir -p $(TARDIR)/bin mkdir -p $(DIST_DIR)/bin
mkdir -p $(TARDIR)/lib mkdir -p $(DIST_DIR)/lib
cp -a auto $(TARDIR) cp -a auto $(DIST_DIR)
$(RM) -Rf $(TARDIR)/auto/registry $(RM) -Rf $(DIST_DIR)/auto/registry
cp -a build $(TARDIR) cp -a build $(DIST_DIR)
cp -a config $(TARDIR) cp -a config $(DIST_DIR)
cp -a src $(TARDIR) cp -a src $(DIST_DIR)
cp -a doc $(TARDIR) cp -a doc $(DIST_DIR)
cp -a include $(TARDIR) cp -a include $(DIST_DIR)
cp -a *.txt $(TARDIR) cp -a *.txt $(DIST_DIR)
cp -a Makefile $(TARDIR) cp -a Makefile $(DIST_DIR)
cp -a glew.pc.in $(TARDIR) cp -a glew.pc.in $(DIST_DIR)
find $(TARDIR) -name '*.o' | xargs $(RM) -r find $(DIST_DIR) -name '*.o' | xargs $(RM) -r
find $(TARDIR) -name '*~' | xargs $(RM) -r find $(DIST_DIR) -name '*~' | xargs $(RM) -r
find $(TARDIR) -name CVS -o -name .cvsignore | xargs $(RM) -r find $(DIST_DIR) -name CVS -o -name .cvsignore | xargs $(RM) -r
find $(TARDIR) -name .svn | xargs $(RM) -r find $(DIST_DIR) -name .svn | xargs $(RM) -r
find $(TARDIR) -name "*.patch" | xargs $(RM) -r find $(DIST_DIR) -name "*.patch" | xargs $(RM) -r
unix2dos $(TARDIR)/Makefile dos2unix $(DIST_DIR)/Makefile
unix2dos $(TARDIR)/config/* dos2unix $(DIST_DIR)/auto/Makefile
unix2dos $(TARDIR)/auto/core/* dos2unix $(DIST_DIR)/config/*
unix2dos $(TARDIR)/auto/extensions/* unix2dos $(DIST_DIR)/auto/core/*
find $(TARDIR) -name '*.h' | xargs unix2dos unix2dos $(DIST_DIR)/auto/extensions/*
find $(TARDIR) -name '*.c' | xargs unix2dos find $(DIST_DIR) -name '*.h' | xargs unix2dos
find $(TARDIR) -name '*.txt' | xargs unix2dos find $(DIST_DIR) -name '*.c' | xargs unix2dos
find $(TARDIR) -name '*.html' | xargs unix2dos find $(DIST_DIR) -name '*.txt' | xargs unix2dos
find $(TARDIR) -name '*.css' | xargs unix2dos find $(DIST_DIR) -name '*.html' | xargs unix2dos
find $(TARDIR) -name '*.sh' | xargs unix2dos find $(DIST_DIR) -name '*.css' | xargs unix2dos
find $(TARDIR) -name '*.pl' | xargs unix2dos find $(DIST_DIR) -name '*.sh' | xargs unix2dos
find $(TARDIR) -name 'Makefile' | xargs unix2dos find $(DIST_DIR) -name '*.pl' | xargs unix2dos
find $(TARDIR) -name '*.in' | xargs unix2dos find $(DIST_DIR) -name 'Makefile' | xargs unix2dos
find $(TARDIR) -name '*.pm' | xargs unix2dos find $(DIST_DIR) -name '*.in' | xargs unix2dos
find $(TARDIR) -name '*.rc' | xargs unix2dos find $(DIST_DIR) -name '*.pm' | xargs unix2dos
rm -f ../$(DIST_SRC_ZIP) find $(DIST_DIR) -name '*.rc' | xargs unix2dos
cd .. && zip -rv9 $(DIST_SRC_ZIP) $(DIST_DIR) rm -f $(DIST_SRC_ZIP)
dos2unix $(TARDIR)/Makefile cd $(DIST_DIR)/.. && zip -rv9 $(DIST_SRC_ZIP) $(DIST_NAME)
dos2unix $(TARDIR)/config/* dos2unix $(DIST_DIR)/Makefile
dos2unix $(TARDIR)/auto/core/* dos2unix $(DIST_DIR)/auto/Makefile
dos2unix $(TARDIR)/auto/extensions/* dos2unix $(DIST_DIR)/config/*
find $(TARDIR) -name '*.h' | xargs dos2unix dos2unix $(DIST_DIR)/auto/core/*
find $(TARDIR) -name '*.c' | xargs dos2unix dos2unix $(DIST_DIR)/auto/extensions/*
find $(TARDIR) -name '*.txt' | xargs dos2unix find $(DIST_DIR) -name '*.h' | xargs dos2unix
find $(TARDIR) -name '*.html' | xargs dos2unix find $(DIST_DIR) -name '*.c' | xargs dos2unix
find $(TARDIR) -name '*.css' | xargs dos2unix find $(DIST_DIR) -name '*.txt' | xargs dos2unix
find $(TARDIR) -name '*.sh' | xargs dos2unix find $(DIST_DIR) -name '*.html' | xargs dos2unix
find $(TARDIR) -name '*.pl' | xargs dos2unix find $(DIST_DIR) -name '*.css' | xargs dos2unix
find $(TARDIR) -name 'Makefile' | xargs dos2unix find $(DIST_DIR) -name '*.sh' | xargs dos2unix
find $(TARDIR) -name '*.in' | xargs dos2unix find $(DIST_DIR) -name '*.pl' | xargs dos2unix
find $(TARDIR) -name '*.pm' | xargs dos2unix find $(DIST_DIR) -name 'Makefile' | xargs dos2unix
find $(TARDIR) -name '*.rc' | xargs dos2unix find $(DIST_DIR) -name '*.in' | xargs dos2unix
cd .. && env GZIP=-9 tar cvzf $(DIST_SRC_TGZ) $(DIST_DIR) find $(DIST_DIR) -name '*.pm' | xargs dos2unix
find $(DIST_DIR) -name '*.rc' | xargs dos2unix
rm -f $(DIST_SRC_TGZ)
cd $(DIST_DIR)/.. && env GZIP=-9 tar cvzf $(DIST_SRC_TGZ) $(DIST_NAME)
$(RM) -r $(DIST_DIR)
extensions: extensions:
$(MAKE) -C auto $(MAKE) -C auto

View File

@ -6,6 +6,12 @@ If you downloaded the tarball from the GLEW website, you just need to:
make make
sudo -s
make install
make clean
Windows: Windows:
use the project file in build/vc6/ use the project file in build/vc6/

View File

@ -10,23 +10,43 @@ include ../config/version
#GLEW_SPLIT_SOURCE = yes #GLEW_SPLIT_SOURCE = yes
SHELL = bash SHELL = bash
REGISTRY = registry
### Use git repository for GL extension specifications
GIT_CLONE ?= git clone --branch glew https://github.com/nigels-com/glfixes.git
###
### Conventional desktop OpenGL settings
###
REGISTRY = registry/gl/specs
EXT = extensions/gl
FILTER = filter_gl_ext.sh
CORE = core/gl
REGISTRY_URL = http://www.opengl.org/registry/ REGISTRY_URL = http://www.opengl.org/registry/
#http://oss.sgi.com/projects/ogl-sample/registry/
###
### Experimental OpenGL ES settings
###
# REGISTRY = registry/gles
# EXT = extensions/gles
# FILTER = filter_gles_ext.sh
# CORE = core/gles
# REGISTRY_URL = http://www.khronos.org/registry/gles/
BIN = bin BIN = bin
SRC = src SRC = src
CORE = core
EXT = extensions
BLACKLIST = blacklist BLACKLIST = blacklist
GL_CORE_SPEC := $(CORE)/GL_VERSION* GL_CORE_SPEC := $(CORE)/GL_VERSION*
GLX_CORE_SPEC := $(CORE)/GLX_VERSION* GLX_CORE_SPEC := $(CORE)/GLX_VERSION*
ifeq (custom,$(MAKECMDGOALS)) ifeq (custom,$(MAKECMDGOALS))
#GL_CORE_SPEC := $(shell grep GL_VERSION custom.txt | sed 's/\(.*\)/$(CORE)\/\1/g;') #GL_CORE_SPEC := $(shell grep GL_VERSION custom.txt | perl -pi -e "s=^=$(CORE)/=g;")
GL_EXT_SPEC := $(shell grep "^[ \t]*GL_" custom.txt | grep -v GL_VERSION | sed 's/\(.*\)/$(EXT)\/\1/g;') GL_EXT_SPEC := $(shell grep "^[ \t]*GL_" custom.txt | grep -v GL_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
WGL_EXT_SPEC := $(shell grep "^[ \t]*WGL_" custom.txt | sed 's/\(.*\)/$(EXT)\/\1/g;') WGL_EXT_SPEC := $(shell grep "^[ \t]*WGL_" custom.txt | perl -pi -e "s=^=$(EXT)/=g;")
#GLX_CORE_SPEC := $(shell grep GLX_VERSION custom.txt | sed 's/\(.*\)/$(CORE)\/\1/g;') #GLX_CORE_SPEC := $(shell grep GLX_VERSION custom.txt | perl -pi -e "s=^=$(CORE)/=g;")
GLX_EXT_SPEC := $(shell grep "^[ \t]*GLX_" custom.txt | grep -v GLX_VERSION | sed 's/\(.*\)/$(EXT)\/\1/g;') GLX_EXT_SPEC := $(shell grep "^[ \t]*GLX_" custom.txt | grep -v GLX_VERSION | perl -pi -e "s=^=$(EXT)/=g;")
else else
GL_EXT_SPEC := $(EXT)/GL_* GL_EXT_SPEC := $(EXT)/GL_*
WGL_EXT_SPEC := $(EXT)/WGL_* WGL_EXT_SPEC := $(EXT)/WGL_*
@ -81,11 +101,11 @@ all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
registry: $(REGISTRY)/.dummy registry: $(REGISTRY)/.dummy
ext: $(EXT)/.dummy ext: $(EXT)/.dummy
$(REGISTRY)/.dummy: $(BIN)/update_registry.sh $(REGISTRY)/.dummy:
@echo "--------------------------------------------------------------------" @echo "--------------------------------------------------------------------"
@echo "Downloading registry" @echo "Downloading registry"
@echo "--------------------------------------------------------------------" @echo "--------------------------------------------------------------------"
$(BIN)/update_registry.sh $(REGISTRY) $(REGISTRY_URL) $(GIT_CLONE) registry
touch $@ touch $@
$(EXT)/.dummy: $(REGISTRY)/.dummy $(EXT)/.dummy: $(REGISTRY)/.dummy
@ -94,6 +114,7 @@ $(EXT)/.dummy: $(REGISTRY)/.dummy
@echo "--------------------------------------------------------------------" @echo "--------------------------------------------------------------------"
rm -rf $(EXT) rm -rf $(EXT)
$(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST) $(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST)
$(BIN)/$(FILTER) $(EXT)
ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin) ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \ find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
xargs -J % cp % $(EXT) xargs -J % cp % $(EXT)
@ -121,7 +142,7 @@ $(I.DEST)/glew.h: $(EXT)/.dummy
echo -e "\n#if defined(GLEW_MX) && !defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@ echo -e "\n#if defined(GLEW_MX) && !defined(_WIN32)\nstruct GLEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
$(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@ $(BIN)/make_struct_var.pl GLEW_VAR_EXPORT $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
echo -e "\n#ifdef GLEW_MX\n}; /* GLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@ echo -e "\n#ifdef GLEW_MX\n}; /* GLEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
perl -e 's/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/' -pi $@ perl -e "s/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_1;\nGLEW_VAR_EXPORT GLboolean __GLEW_VERSION_1_2;/" -pi $@
rm -f $@.bak rm -f $@.bak
cat $(SRC)/glew_tail.h >> $@ cat $(SRC)/glew_tail.h >> $@
@ -148,14 +169,14 @@ $(I.DEST)/glxew.h: $(EXT)/.dummy
cat $(SRC)/mesa_license.h >> $@ cat $(SRC)/mesa_license.h >> $@
cat $(SRC)/khronos_license.h >> $@ cat $(SRC)/khronos_license.h >> $@
cat $(SRC)/glxew_head.h >> $@ cat $(SRC)/glxew_head.h >> $@
$(BIN)/make_header.pl '' GLX $(GLX_CORE_SPEC) >> $@ $(BIN)/make_header.pl "" GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_header.pl '' GLX $(GLX_EXT_SPEC) >> $@ $(BIN)/make_header.pl "" GLX $(GLX_EXT_SPEC) >> $@
cat $(SRC)/glxew_mid.h >> $@ cat $(SRC)/glxew_mid.h >> $@
$(BIN)/make_struct_fun.pl GLXEW_FUN_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@ $(BIN)/make_struct_fun.pl GLXEW_FUN_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
echo -e "\n#if defined(GLEW_MX)\nstruct GLXEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@ echo -e "\n#if defined(GLEW_MX)\nstruct GLXEWContextStruct\n{\n#endif /* GLEW_MX */\n" >> $@
$(BIN)/make_struct_var.pl GLXEW_VAR_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@ $(BIN)/make_struct_var.pl GLXEW_VAR_EXPORT $(GLX_CORE_SPEC) $(GLX_EXT_SPEC) >> $@
echo -e "\n#ifdef GLEW_MX\n}; /* GLXEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@ echo -e "\n#ifdef GLEW_MX\n}; /* GLXEWContextStruct */\n#endif /* GLEW_MX */\n" >> $@
perl -e 's/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/' -pi $@ perl -e "s/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/GLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_0;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_1;\nGLXEW_VAR_EXPORT GLboolean __GLXEW_VERSION_1_2;/" -pi $@
cat $(SRC)/glxew_tail.h >> $@ cat $(SRC)/glxew_tail.h >> $@
$(S.DEST)/glew.c: $(EXT)/.dummy $(S.DEST)/glew.c: $(EXT)/.dummy
@ -188,7 +209,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
cat $(SRC)/glew_init_wgl.c >> $@ cat $(SRC)/glew_init_wgl.c >> $@
$(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@ $(BIN)/make_list.pl $(WGL_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}" >> $@; echo -e "\n return GLEW_OK;\n}" >> $@;
echo -e "\n#elif !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@ echo -e "\n#elif !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@ $(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@ $(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
echo -e "\n#if !defined(GLEW_MX)" >> $@; echo -e "\n#if !defined(GLEW_MX)" >> $@;
@ -203,7 +224,7 @@ $(S.DEST)/glew.c: $(EXT)/.dummy
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@ $(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
$(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@ $(BIN)/make_list.pl $(GLX_EXT_SPEC) >> $@
echo -e "\n return GLEW_OK;\n}" >> $@ echo -e "\n return GLEW_OK;\n}" >> $@
echo -e "\n#endif /* !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@; echo -e "\n#endif /* !defined(__ANDROID__) && !defined(__native_client__) && !defined(__HAIKU__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */\n" >> $@;
cat $(SRC)/glew_init_tail.c >> $@ cat $(SRC)/glew_init_tail.c >> $@
cat $(SRC)/glew_str_head.c >> $@ cat $(SRC)/glew_str_head.c >> $@
$(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@ $(BIN)/make_str.pl $(GL_CORE_SPEC) $(GL_EXT_SPEC) >> $@
@ -234,7 +255,7 @@ $(S.DEST)/glew_def.c: $(EXT)/.dummy
$(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@ $(BIN)/make_def_var.pl WGL $(WGL_EXT_SPEC) >> $@
echo -e "\n#endif /* _WIN32 */" >> $@ echo -e "\n#endif /* _WIN32 */" >> $@
echo -e "\n#endif /* !GLEW_MX */" >> $@; echo -e "\n#endif /* !GLEW_MX */" >> $@;
echo -e "\n#if !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@ echo -e "\n#if !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX))" >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@ $(BIN)/make_def_fun.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@ $(BIN)/make_def_fun.pl GLX $(GLX_EXT_SPEC) >> $@
echo -e "\n#if !defined(GLEW_MX)" >> $@; echo -e "\n#if !defined(GLEW_MX)" >> $@;
@ -243,7 +264,7 @@ $(S.DEST)/glew_def.c: $(EXT)/.dummy
$(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@ $(BIN)/make_def_var.pl GLX $(GLX_CORE_SPEC) >> $@
$(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@ $(BIN)/make_def_var.pl GLX $(GLX_EXT_SPEC) >> $@
echo -e "\n#endif /* !GLEW_MX */" >> $@; echo -e "\n#endif /* !GLEW_MX */" >> $@;
echo -e "\n#endif /* !defined(_WIN32) && !defined(__ANDROID__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */" >> $@; echo -e "\n#endif /* !defined(_WIN32) && !defined(__ANDROID__) && !defined(__native_client__) && (!defined(__APPLE__) || defined(GLEW_APPLE_GLX)) */" >> $@;
rm -f $@.bak rm -f $@.bak
$(S.DEST)/glew_init.c: $(EXT)/.dummy $(S.DEST)/glew_init.c: $(EXT)/.dummy
@ -365,4 +386,4 @@ clobber: clean
rm -rf $(EXT) rm -rf $(EXT)
destroy: clobber destroy: clobber
rm -rf $(REGISTRY) rm -rf registry

494
auto/bin/filter_gl_ext.sh Executable file
View File

@ -0,0 +1,494 @@
#!/bin/bash
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, 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.
##
## Parameters:
##
## $1: Extensions directory
set -e
# fix GL_NV_texture_compression_vtc
grep -v EXT $1/GL_NV_texture_compression_vtc > tmp
mv tmp $1/GL_NV_texture_compression_vtc
# remove duplicates from GL_ARB_vertex_program and GL_ARB_fragment_program
grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_fragment_program > tmp
mv tmp $1/GL_ARB_fragment_program
# remove duplicates from GLX_EXT_visual_rating and GLX_EXT_visual_info
grep -v -F -f $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp
mv tmp $1/GLX_EXT_visual_rating
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetBooleanIndexedvEXT but with different parameter names
grep -v glGetBooleanIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetIntegerIndexedvEXT but with different parameter names
grep -v glGetIntegerIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# remove duplicates from GL_NV_video_capture and GLX_NV_video_capture
grep -v glX $1/GL_NV_video_capture > tmp
mv tmp $1/GL_NV_video_capture
# add missing functions to GL_NV_video_capture
cat >> $1/GL_NV_video_capture <<EOT
void glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint* params)
void glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat* params)
void glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble* params)
void glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint* params)
void glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params)
void glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params)
EOT
# fix WGL_NV_video_capture
cat >> $1/WGL_NV_video_capture <<EOT
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
EOT
# fix GLX_NV_video_capture
cat >> $1/GLX_NV_video_capture <<EOT
typedef XID GLXVideoCaptureDeviceNV
EOT
# remove duplicates from GL_NV_present_video and GLX_NV_present_video
grep -v -F -f $1/GLX_NV_present_video $1/GL_NV_present_video > tmp
mv tmp $1/GL_NV_present_video
# fix WGL_NV_present_video
cat >> $1/WGL_NV_present_video <<EOT
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
EOT
# fix WGL_NV_video_output
cat >> $1/WGL_NV_video_output <<EOT
DECLARE_HANDLE(HPVIDEODEV);
EOT
# fix GL_NV_occlusion_query and GL_HP_occlusion_test
grep -v '_HP' $1/GL_NV_occlusion_query > tmp
mv tmp $1/GL_NV_occlusion_query
perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi \
$1/GL_HP_occlusion_test
perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi \
$1/GL_HP_occlusion_test
# add deprecated constants to GL_ATI_fragment_shader
cat >> $1/GL_ATI_fragment_shader <<EOT
GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
GL_NUM_PASSES_ATI 0x8970
GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
GL_COLOR_ALPHA_PAIRING_ATI 0x8975
GL_SWIZZLE_STRQ_ATI 0x897A
GL_SWIZZLE_STRQ_DQ_ATI 0x897B
EOT
# add deprecated constants to GL_NV_texture_shader
cat >> $1/GL_NV_texture_shader <<EOT
GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
EOT
# fix WGL_ATI_pixel_format_float
cat >> $1/WGL_ATI_pixel_format_float <<EOT
GL_RGBA_FLOAT_MODE_ATI 0x8820
GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
EOT
# fix WGL_ARB_make_current_read
cat >> $1/WGL_ARB_make_current_read <<EOT
ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
EOT
# fix WGL_EXT_make_current_read
cat >> $1/WGL_EXT_make_current_read <<EOT
ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
EOT
# add typedefs to GL_ARB_vertex_buffer_object; (from personal communication
# with Marco Fabbricatore).
#
# Rationale. The spec says:
#
# "Both types are defined as signed integers large enough to contain
# any pointer value [...] The idea of making these types unsigned was
# considered, but was ultimately rejected ..."
cat >> $1/GL_ARB_vertex_buffer_object <<EOT
typedef ptrdiff_t GLsizeiptrARB
typedef ptrdiff_t GLintptrARB
EOT
# add typedefs to GLX_EXT_import_context
cat >> $1/GLX_EXT_import_context <<EOT
typedef XID GLXContextID
EOT
# add tokens to GLX_OML_swap_method
cat >> $1/GLX_OML_swap_method <<EOT
GLX_SWAP_EXCHANGE_OML 0x8061
GLX_SWAP_COPY_OML 0x8062
GLX_SWAP_UNDEFINED_OML 0x8063
EOT
# add typedefs to GLX_SGIX_fbconfig
cat >> $1/GLX_SGIX_fbconfig <<EOT
typedef XID GLXFBConfigIDSGIX
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX
EOT
# add typedefs to GLX_SGIX_pbuffer
cat >> $1/GLX_SGIX_pbuffer <<EOT
typedef XID GLXPbufferSGIX
typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX
EOT
# add typedef to GL_NV_half_float
cat >> $1/GL_NV_half_float <<EOT
typedef unsigned short GLhalf
EOT
# add handle to WGL_ARB_pbuffer
cat >> $1/WGL_ARB_pbuffer <<EOT
DECLARE_HANDLE(HPBUFFERARB);
EOT
# add handle to WGL_EXT_pbuffer
cat >> $1/WGL_EXT_pbuffer <<EOT
DECLARE_HANDLE(HPBUFFEREXT);
EOT
# get rid of GL_SUN_multi_draw_arrays
rm -f $1/GL_SUN_multi_draw_arrays
# change variable names in GL_ARB_vertex_shader
perl -e 's/v0/x/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v1/y/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v2/z/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v3/w/g' -pi $1/GL_ARB_vertex_shader
# remove triplicates in GL_ARB_shader_objects, GL_ARB_fragment_shader,
# and GL_ARB_vertex_shader
grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_fragment_shader > tmp
mv tmp $1/GL_ARB_fragment_shader
grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove duplicates in GL_ARB_vertex_program and GL_ARB_vertex_shader
grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove triplicates in GL_ARB_fragment_program, GL_ARB_fragment_shader,
# and GL_ARB_vertex_shader
grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_fragment_shader > tmp
mv tmp $1/GL_ARB_fragment_shader
grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove duplicates in GL_EXT_direct_state_access
grep -v "glGetBooleanIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glGetIntegerIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glDisableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glEnableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glIsEnabledIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
# remove duplicates in GL_NV_explicit_multisample
grep -v "glGetBooleanIndexedvEXT" $1/GL_NV_explicit_multisample > tmp
mv tmp $1/GL_NV_explicit_multisample
grep -v "glGetIntegerIndexedvEXT" $1/GL_NV_explicit_multisample > tmp
mv tmp $1/GL_NV_explicit_multisample
# fix bugs in GL_ARB_vertex_shader
grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
perl -e 's/handle /GLhandleARB /g' -pi $1/GL_ARB_vertex_shader
# fix bugs in GL_ARB_shader_objects
grep -v "GL_FLOAT " $1/GL_ARB_shader_objects > tmp
mv tmp $1/GL_ARB_shader_objects
grep -v "GL_INT " $1/GL_ARB_shader_objects > tmp
mv tmp $1/GL_ARB_shader_objects
# add typedefs to GL_ARB_shader_objects
cat >> $1/GL_ARB_shader_objects <<EOT
typedef char GLcharARB
typedef unsigned int GLhandleARB
EOT
# add missing functions to GL_ARB_transpose_matrix
cat >> $1/GL_ARB_transpose_matrix <<EOT
void glLoadTransposeMatrixfARB (GLfloat m[16])
void glLoadTransposeMatrixdARB (GLdouble m[16])
void glMultTransposeMatrixfARB (GLfloat m[16])
void glMultTransposeMatrixdARB (GLdouble m[16])
EOT
# add missing tokens to GL_EXT_framebuffer_multisample
cat >> $1/GL_EXT_framebuffer_multisample <<EOT
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
GL_MAX_SAMPLES_EXT 0x8D57
EOT
# Filter out GL_NV_gpu_program_fp64 enums and functions
head -n3 $1/GL_NV_gpu_program_fp64 > tmp
mv tmp $1/GL_NV_gpu_program_fp64
# Filter glGetUniformui64vNV from GL_NV_shader_buffer_load
grep -v "glGetUniformui64vNV" $1/GL_NV_shader_buffer_load > tmp
mv tmp $1/GL_NV_shader_buffer_load
# Filter out profile enumerations from GLX_ARB_create_context
grep -v "_PROFILE_" $1/GLX_ARB_create_context > tmp
mv tmp $1/GLX_ARB_create_context
# Filter only profile related enumerations for GLX_ARB_create_context_profile
head -n3 $1/GLX_ARB_create_context_profile > tmp
grep "_PROFILE_" $1/GLX_ARB_create_context_profile >> tmp
mv tmp $1/GLX_ARB_create_context_profile
# Filter out profile enumerations from WGL_ARB_create_context
grep -v "_PROFILE_" $1/WGL_ARB_create_context > tmp
mv tmp $1/WGL_ARB_create_context
# Filter only profile related enumerations for WGL_ARB_create_context_profile
head -n3 $1/WGL_ARB_create_context_profile > tmp
grep "_PROFILE_" $1/WGL_ARB_create_context_profile >> tmp
mv tmp $1/WGL_ARB_create_context_profile
# add missing function to GLX_NV_copy_image
cat >> $1/GLX_NV_copy_image <<EOT
void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
EOT
# add missing function to WGL_NV_copy_image
cat >> $1/WGL_NV_copy_image <<EOT
BOOL wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
EOT
# Filter glProgramParameteri from GL_ARB_separate_shader_objects
# grep -v "glProgramParameteri" $1/GL_ARB_separate_shader_objects > tmp
# mv tmp $1/GL_ARB_separate_shader_objects
# Filter out EXT functions from GL_ARB_viewport_array
grep -v "EXT" $1/GL_ARB_viewport_array > tmp
mv tmp $1/GL_ARB_viewport_array
# Additional enumerations for GL_NV_vertex_buffer_unified_memory
# These are mentioned in GL_ARB_draw_indirect.txt
cat >> $1/GL_NV_vertex_buffer_unified_memory <<EOT
GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
EOT
# Filter glGetPointerv from GL_ARB_debug_output
# It's part of OpenGL 1.1, after all
grep -v "glGetPointerv" $1/GL_ARB_debug_output > tmp
mv tmp $1/GL_ARB_debug_output
# Filter glGetPointerv from GL_EXT_vertex_array
# It's part of OpenGL 1.1, after all
grep -v "glGetPointerv" $1/GL_EXT_vertex_array > tmp
mv tmp $1/GL_EXT_vertex_array
# add typedef to GL_AMD_debug_output
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_AMD_debug_output <<EOT
typedef void (GLAPIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, void* userParam)
EOT
# add typedef to GL_ARB_debug_output
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_ARB_debug_output <<EOT
typedef void (GLAPIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
EOT
# add typedef to GL_KHR_debug
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_KHR_debug <<EOT
typedef void (GLAPIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam)
EOT
# Remove glGetPointerv from GL_KHR_debug
grep -v "glGetPointerv" $1/GL_KHR_debug > tmp
mv tmp $1/GL_KHR_debug
# Remove GL_ARB_debug_group, GL_ARB_debug_label and GL_ARB_debug_output2, for now
rm -f $1/GL_ARB_debug_group
rm -f $1/GL_ARB_debug_label
rm -f $1/GL_ARB_debug_output2
# add typedefs to GL_ARB_cl_event
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_ARB_cl_event <<EOT
typedef struct _cl_context *cl_context
typedef struct _cl_event *cl_event
EOT
# Filter out EXT functions from GL_ARB_gpu_shader_fp64
grep -v 'EXT ' $1/GL_ARB_gpu_shader_fp64 > tmp
mv tmp $1/GL_ARB_gpu_shader_fp64
# add missing functions to GL_EXT_direct_state_access (GL_ARB_gpu_shader_fp64 related)
cat >> $1/GL_EXT_direct_state_access <<EOT
void glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x)
void glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y)
void glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z)
void glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
EOT
# add missing functions to GL_EXT_direct_state_access (GL_ARB_instanced_arrays related)
# https://sourceforge.net/p/glew/bugs/242/
cat >> $1/GL_EXT_direct_state_access <<EOT
void glVertexArrayVertexAttribDivisorEXT (GLuint vaobj, GLuint index, GLuint divisor)
EOT
# Filter out GL_UNSIGNED_INT and GL_FLOAT from GL_AMD_performance_monitor
grep -v 'GL_UNSIGNED_INT ' $1/GL_AMD_performance_monitor > tmp
mv tmp $1/GL_AMD_performance_monitor
grep -v 'GL_FLOAT ' $1/GL_AMD_performance_monitor > tmp
mv tmp $1/GL_AMD_performance_monitor
# Filter out GL_STORAGE_CACHED_APPLE and GL_STORAGE_SHARED_APPLE from GL_APPLE_texture_range
grep -v 'GL_STORAGE_CACHED_APPLE ' $1/GL_APPLE_texture_range > tmp
mv tmp $1/GL_APPLE_texture_range
grep -v 'GL_STORAGE_SHARED_APPLE ' $1/GL_APPLE_texture_range > tmp
mv tmp $1/GL_APPLE_texture_range
# Filter out GL_RED from GL_ARB_texture_rg
grep -v 'GL_RED ' $1/GL_ARB_texture_rg > tmp
mv tmp $1/GL_ARB_texture_rg
# Filter out _EXT enums from GL_ARB_texture_storage
grep -v '_EXT ' $1/GL_ARB_texture_storage > tmp
mv tmp $1/GL_ARB_texture_storage
# Filter out TEXTURE_3D enums from GL_EXT_paletted_texture
grep -v 'TEXTURE_3D' $1/GL_EXT_paletted_texture > tmp
mv tmp $1/GL_EXT_paletted_texture
# Filter out GL_VERSION_1_1 enums from GL_AMD_stencil_operation_extended
grep -v '0x150' $1/GL_AMD_stencil_operation_extended > tmp
mv tmp $1/GL_AMD_stencil_operation_extended
# Filter out from GL_APPLE_ycbcr_422
grep -v 'GL_UNSIGNED_SHORT_8_8_APPLE' $1/GL_APPLE_ycbcr_422 > tmp
mv tmp $1/GL_APPLE_ycbcr_422
grep -v 'GL_UNSIGNED_SHORT_8_8_REV_APPLE' $1/GL_APPLE_ycbcr_422 > tmp
mv tmp $1/GL_APPLE_ycbcr_422
# Filter out GL_FRAGMENT_DEPTH_EXT from GL_EXT_light_texture
grep -v 'GL_FRAGMENT_DEPTH_EXT' $1/GL_EXT_light_texture > tmp
mv tmp $1/GL_EXT_light_texture
# Filter out GL_MULTISAMPLE_BIT_EXT from GL_SGIS_multisample
grep -v 'GL_MULTISAMPLE_BIT_EXT' $1/GL_SGIS_multisample > tmp
mv tmp $1/GL_SGIS_multisample
# Filter out GL_COMPRESSED_RGB_S3TC_DXT1_EXT from GL_EXT_texture_compression_dxt1
grep -v 'GL_COMPRESSED_RGB_S3TC_DXT1_EXT' $1/GL_EXT_texture_compression_dxt1 > tmp
mv tmp $1/GL_EXT_texture_compression_dxt1
# Filter out GL_COMPRESSED_RGBA_S3TC_DXT1_EXT from GL_EXT_texture_compression_dxt1
grep -v 'GL_COMPRESSED_RGBA_S3TC_DXT1_EXT' $1/GL_EXT_texture_compression_dxt1 > tmp
mv tmp $1/GL_EXT_texture_compression_dxt1
# Append GLfixed to GL_ARB_ES2_compatibility
# Probably ought to be explicitly mentioned in the spec language
cat >> $1/GL_ARB_ES2_compatibility <<EOT
typedef int GLfixed
EOT
# Append GLclampx to GL_REGAL_ES1_0_compatibility
# Probably ought to be explicitly mentioned in the spec language
cat >> $1/GL_REGAL_ES1_0_compatibility <<EOT
typedef int GLclampx
EOT
# Append GLLOGPROCREGAL to GL_REGAL_log
# Probably ought to be explicitly mentioned in the spec language
cat >> $1/GL_REGAL_log <<EOT
typedef void (APIENTRY *LOGPROCREGAL)(GLenum stream, GLsizei length, const GLchar *message, void *context)
EOT
# Fixup LOGPROCREGAL -> GLLOGPROCREGAL
perl -e 's/LOGPROCREGAL/GLLOGPROCREGAL/g' -pi $1/GL_REGAL_log
# Filter out GL_BYTE from GL_OES_byte_coordinates
grep -v 'GL_BYTE' $1/GL_OES_byte_coordinates > tmp
mv tmp $1/GL_OES_byte_coordinates
# Filter out fp64 (not widely supported) from GL_EXT_direct_state_access
egrep -v 'glProgramUniform.*[1234]d[v]?EXT' $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
# Filter out all enums from GL_ANGLE_depth_texture
grep -v '0x' $1/GL_ANGLE_depth_texture > tmp
mv tmp $1/GL_ANGLE_depth_texture
# Filter out GL_NONE enum from GL_ANGLE_depth_texture
grep -v 'GL_NONE' $1/GL_ANGLE_texture_usage > tmp
mv tmp $1/GL_ANGLE_texture_usage
# Fixup REGAL and ANGLE urls
for i in $1/GL_REGAL_*; do perl -e 's#http://www.opengl.org/registry/specs/REGAL/.*#https://github.com/p3/regal/tree/master/doc/extensions#g' -pi $i; done
for i in $1/GL_ANGLE_*; do perl -e 's#http://www.opengl.org/registry/specs/ANGLE/.*#https://code.google.com/p/angleproject/source/browse/\#git%2Fextensions#g' -pi $i; done
# Filter out GL_NV_blend_equation_advanced_coherent enums and functions
head -n3 $1/GL_NV_blend_equation_advanced_coherent > tmp
mv tmp $1/GL_NV_blend_equation_advanced_coherent
# Filter out GL_AMD_gpu_shader_int64 enums and functions
head -n3 $1/GL_AMD_gpu_shader_int64 > tmp
mv tmp $1/GL_AMD_gpu_shader_int64
# Filter out GL_NO_ERROR enum from GL_KHR_robustness
grep -v 'GL_NO_ERROR' $1/GL_KHR_robustness > tmp
mv tmp $1/GL_KHR_robustness
# Filter out all enums from GL_KHR_blend_equation_advanced_coherent
grep -v '0x' $1/GL_KHR_blend_equation_advanced_coherent > tmp
mv tmp $1/GL_KHR_blend_equation_advanced_coherent
# Filter out glBlendBarrierKHR enum from GL_KHR_blend_equation_advanced_coherent
grep -v 'glBlendBarrierKHR' $1/GL_KHR_blend_equation_advanced_coherent > tmp
mv tmp $1/GL_KHR_blend_equation_advanced_coherent
# clean up
rm -f $1/*.bak

19
auto/bin/filter_gles_ext.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, 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.
##
## Parameters:
##
## $1: Extensions directory
## $2: Registry directory
## $3: The black list
set -e
# clean up
rm -f $1/*.bak

32
auto/bin/filter_spec.py Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/python
import re
section = re.compile('^(Name|Name Strings?|Number|Dependencies|New Procedures and Functions|New Tokens|Additions to .*|Changes to .*|Modifications to .*|Add new Section .*)\s*$')
token = re.compile('^\s+(([A-Z0-9][A-Z0-9_x]*):?\s+((?:0x)?[0-9A-F]+)([^\?]*))?\s*$')
if __name__ == '__main__':
from optparse import OptionParser
import os
parser = OptionParser('usage: %prog [options] [SOURCES...]')
(options, args) = parser.parse_args()
for i in args:
lines = open(i).readlines()
f = open(i,'w')
current = ''
for j in lines:
m = section.match(j)
if m:
current = m.group(1).strip()
if current in [ 'Name', 'Name String', 'Name Strings', 'Number', 'Dependencies', 'New Procedures and Functions', 'New Tokens']:
print >>f, j,
continue
if current=='New Tokens':
if token.match(j):
print >>f, j,
elif current in [ 'Name', 'Name String', 'Name Strings', 'Number', 'Dependencies', 'New Procedures and Functions']:
print >>f, j,

View File

@ -142,7 +142,25 @@ sub output_tokens($$)
{ {
local $, = "\n"; local $, = "\n";
print "\n"; print "\n";
print map { &{$fnc}($_, $tbl->{$_}) } sort { hex ${$tbl}{$a} <=> hex ${$tbl}{$b} } keys %{$tbl}; print map { &{$fnc}($_, $tbl->{$_}) } sort {
if (${$tbl}{$a} eq ${$tbl}{$b}) {
$a cmp $b
} else {
if (${$tbl}{$a} =~ /_/) {
if (${$tbl}{$b} =~ /_/) {
$a cmp $b
} else {
-1
}
} else {
if (${$tbl}{$b} =~ /_/) {
1
} else {
hex ${$tbl}{$a} <=> hex ${$tbl}{$b}
}
}
}
} keys %{$tbl};
print "\n"; print "\n";
} else { } else {
print STDERR "no keys in table!\n"; print STDERR "no keys in table!\n";

View File

@ -46,18 +46,18 @@ if (@ARGV)
if (length($extstring)) if (length($extstring))
{ {
print " CONST_CAST(" . $extvar . ") = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n"; print " " . $extvar . " = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n";
} }
if (keys %$functions) if (keys %$functions)
{ {
if ($extname =~ /WGL_.*/) if ($extname =~ /WGL_.*/)
{ {
print " if (glewExperimental || " . $extvar . "|| crippled) CONST_CAST(" . $extvar . ")= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n"; print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n";
} }
else else
{ {
print " if (glewExperimental || " . $extvar . ") CONST_CAST(" . $extvar . ") = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n"; print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n";
} }
} }
print "#endif /* $extname */\n"; print "#endif /* $extname */\n";

View File

@ -159,6 +159,7 @@ sub normalize_prototype
s/\s+/ /g; # multiple whitespace -> single space s/\s+/ /g; # multiple whitespace -> single space
s/\<.*\>//g; # remove <comments> from direct state access extension s/\<.*\>//g; # remove <comments> from direct state access extension
s/\<.*$//g; # remove incomplete <comments> from direct state access extension s/\<.*$//g; # remove incomplete <comments> from direct state access extension
s#/\*.*\*/##g; # remove /* ... */ comments
s/\s*\(\s*/ \(/; # exactly one space before ( and none after s/\s*\(\s*/ \(/; # exactly one space before ( and none after
s/\s*\)\s*/\)/; # no space before or after ) s/\s*\)\s*/\)/; # no space before or after )
s/\s*\*([a-zA-Z])/\* $1/; # "* identifier" s/\s*\*([a-zA-Z])/\* $1/; # "* identifier"
@ -236,9 +237,12 @@ sub parse_spec($)
{ {
# apply typemaps # apply typemaps
$return =~ s/$regex{types}/$typemap{$1}/og; $return =~ s/$regex{types}/$typemap{$1}/og;
$return =~ s/void\*/GLvoid */og; $return =~ s/GLvoid/void/og;
$return =~ s/void\*/void */og;
$parms =~ s/$regex{types}/$typemap{$1}/og; $parms =~ s/$regex{types}/$typemap{$1}/og;
$parms =~ s/$regex{voidtype}/$voidtypemap{$1}/og; $parms =~ s/$regex{voidtype}/$voidtypemap{$1}/og;
$parms =~ s/GLvoid/void/og;
$parms =~ s/ void\* / void */og;
} }
# add to functions hash # add to functions hash
$functions{$name} = { $functions{$name} = {
@ -306,7 +310,6 @@ my %extensions = ();
my $ext_dir = shift; my $ext_dir = shift;
my $reg_http = "http://www.opengl.org/registry/specs/"; my $reg_http = "http://www.opengl.org/registry/specs/";
#my $reg_http = "http://oss.sgi.com/projects/ogl-sample/";
# Take command line arguments or read list from file # Take command line arguments or read list from file
if (@ARGV) if (@ARGV)
@ -327,13 +330,31 @@ foreach my $spec (sort @speclist)
open EXT, ">$info"; open EXT, ">$info";
print EXT $ext . "\n"; # Extension name print EXT $ext . "\n"; # Extension name
my $specname = $spec; my $specname = $spec;
$specname =~ s/registry\///; $specname =~ s/registry\/gl\/specs\///;
print EXT $reg_http . $specname . "\n"; # Extension info URL print EXT $reg_http . $specname . "\n"; # Extension info URL
print EXT $ext . "\n"; # Extension string print EXT $ext . "\n"; # Extension string
my $prefix = $ext; my $prefix = $ext;
$prefix =~ s/^(.+?)(_.+)$/$1/; $prefix =~ s/^(.+?)(_.+)$/$1/;
foreach my $token (sort { hex ${$tokens}{$a} <=> hex ${$tokens}{$b} } keys %{$tokens}) foreach my $token (sort {
if (${$tokens}{$a} eq ${$tokens}{$b}) {
$a cmp $b
} else {
if (${$tokens}{$a} =~ /_/) {
if (${$tokens}{$b} =~ /_/) {
$a cmp $b
} else {
-1
}
} else {
if (${$tokens}{$b} =~ /_/) {
1
} else {
hex ${$tokens}{$a} <=> hex ${$tokens}{$b}
}
}
}
} keys %{$tokens})
{ {
if ($token =~ /^$prefix\_.*/i) if ($token =~ /^$prefix\_.*/i)
{ {

View File

@ -16,419 +16,10 @@
set -e set -e
if [ ! -d $1 ] ; then if [ ! -d $1 ] ; then
mkdir $1 mkdir -p $1
# Parse each of the extensions in the registry # Parse each of the extensions in the registry
find $2 -name doc -type d -prune -o -name \*.txt -print | \ find $2 -name doc -type d -prune -o -name \*.txt -print | \
grep -v -f $3 | sort | bin/parse_spec.pl $1 grep -v -f $3 | sort | bin/parse_spec.pl $1
# fix GL_NV_texture_compression_vtc
grep -v EXT $1/GL_NV_texture_compression_vtc > tmp
mv tmp $1/GL_NV_texture_compression_vtc
# remove duplicates from GL_ARB_vertex_program and GL_ARB_fragment_program
grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_fragment_program > tmp
mv tmp $1/GL_ARB_fragment_program
# remove duplicates from GLX_EXT_visual_rating and GLX_EXT_visual_info
grep -v -F -f $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp
mv tmp $1/GLX_EXT_visual_rating
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetBooleanIndexedvEXT but with different parameter names
grep -v glGetBooleanIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# GL_EXT_draw_buffers2 and GL_EXT_transform_feedback both define glGetIntegerIndexedvEXT but with different parameter names
grep -v glGetIntegerIndexedvEXT $1/GL_EXT_transform_feedback > tmp
mv tmp $1/GL_EXT_transform_feedback
# remove duplicates from GL_NV_video_capture and GLX_NV_video_capture
grep -v glX $1/GL_NV_video_capture > tmp
mv tmp $1/GL_NV_video_capture
# add missing functions to GL_NV_video_capture
cat >> $1/GL_NV_video_capture <<EOT
void glGetVideoCaptureStreamivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint* params)
void glGetVideoCaptureStreamfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat* params)
void glGetVideoCaptureStreamdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble* params)
void glVideoCaptureStreamParameterivNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint* params)
void glVideoCaptureStreamParameterfvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat* params)
void glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble* params)
EOT
# fix WGL_NV_video_capture
cat >> $1/WGL_NV_video_capture <<EOT
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
EOT
# fix GLX_NV_video_capture
cat >> $1/GLX_NV_video_capture <<EOT
typedef XID GLXVideoCaptureDeviceNV
EOT
# remove duplicates from GL_NV_present_video and GLX_NV_present_video
grep -v -F -f $1/GLX_NV_present_video $1/GL_NV_present_video > tmp
mv tmp $1/GL_NV_present_video
# fix WGL_NV_present_video
cat >> $1/WGL_NV_present_video <<EOT
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
EOT
# fix WGL_NV_video_output
cat >> $1/WGL_NV_video_output <<EOT
DECLARE_HANDLE(HPVIDEODEV);
EOT
# fix GL_NV_occlusion_query and GL_HP_occlusion_test
grep -v '_HP' $1/GL_NV_occlusion_query > tmp
mv tmp $1/GL_NV_occlusion_query
perl -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' -pi \
$1/GL_HP_occlusion_test
perl -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' -pi \
$1/GL_HP_occlusion_test
# fix GLvoid in GL_ARB_vertex_buffer_objects
perl -e 's/ void\*/ GLvoid\*/g' -pi \
$1/GL_ARB_vertex_buffer_object
# add deprecated constants to GL_ATI_fragment_shader
cat >> $1/GL_ATI_fragment_shader <<EOT
GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E
GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F
GL_NUM_PASSES_ATI 0x8970
GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971
GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972
GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973
GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974
GL_COLOR_ALPHA_PAIRING_ATI 0x8975
GL_SWIZZLE_STRQ_ATI 0x897A
GL_SWIZZLE_STRQ_DQ_ATI 0x897B
EOT
# add deprecated constants to GL_NV_texture_shader
cat >> $1/GL_NV_texture_shader <<EOT
GL_OFFSET_TEXTURE_2D_MATRIX_NV 0x86E1
GL_OFFSET_TEXTURE_2D_BIAS_NV 0x86E3
GL_OFFSET_TEXTURE_2D_SCALE_NV 0x86E2
EOT
# fix WGL_ATI_pixel_format_float
cat >> $1/WGL_ATI_pixel_format_float <<EOT
GL_RGBA_FLOAT_MODE_ATI 0x8820
GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
EOT
# fix WGL_ARB_make_current_read
cat >> $1/WGL_ARB_make_current_read <<EOT
ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
EOT
# fix WGL_EXT_make_current_read
cat >> $1/WGL_EXT_make_current_read <<EOT
ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
EOT
# add typedefs to GL_ARB_vertex_buffer_object; (from personal communication
# with Marco Fabbricatore).
#
# Rationale. The spec says:
#
# "Both types are defined as signed integers large enough to contain
# any pointer value [...] The idea of making these types unsigned was
# considered, but was ultimately rejected ..."
cat >> $1/GL_ARB_vertex_buffer_object <<EOT
typedef ptrdiff_t GLsizeiptrARB
typedef ptrdiff_t GLintptrARB
EOT
# add typedefs to GLX_EXT_import_context
cat >> $1/GLX_EXT_import_context <<EOT
typedef XID GLXContextID
EOT
# add tokens to GLX_OML_swap_method
cat >> $1/GLX_OML_swap_method <<EOT
GLX_SWAP_EXCHANGE_OML 0x8061
GLX_SWAP_COPY_OML 0x8062
GLX_SWAP_UNDEFINED_OML 0x8063
EOT
# add typedefs to GLX_SGIX_fbconfig
cat >> $1/GLX_SGIX_fbconfig <<EOT
typedef XID GLXFBConfigIDSGIX
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX
EOT
# add typedefs to GLX_SGIX_pbuffer
cat >> $1/GLX_SGIX_pbuffer <<EOT
typedef XID GLXPbufferSGIX
typedef struct { int type; unsigned long serial; Bool send_event; Display *display; GLXDrawable drawable; int event_type; int draw_type; unsigned int mask; int x, y; int width, height; int count; } GLXBufferClobberEventSGIX
EOT
# add typedef to GL_NV_half_float
cat >> $1/GL_NV_half_float <<EOT
typedef unsigned short GLhalf
EOT
# add handle to WGL_ARB_pbuffer
cat >> $1/WGL_ARB_pbuffer <<EOT
DECLARE_HANDLE(HPBUFFERARB);
EOT
# add handle to WGL_EXT_pbuffer
cat >> $1/WGL_EXT_pbuffer <<EOT
DECLARE_HANDLE(HPBUFFEREXT);
EOT
# get rid of GL_SUN_multi_draw_arrays
rm -f $1/GL_SUN_multi_draw_arrays
# change variable names in GL_ARB_vertex_shader
perl -e 's/v0/x/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v1/y/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v2/z/g' -pi $1/GL_ARB_vertex_shader
perl -e 's/v3/w/g' -pi $1/GL_ARB_vertex_shader
# remove triplicates in GL_ARB_shader_objects, GL_ARB_fragment_shader,
# and GL_ARB_vertex_shader
grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_fragment_shader > tmp
mv tmp $1/GL_ARB_fragment_shader
grep -v -F -f $1/GL_ARB_shader_objects $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove duplicates in GL_ARB_vertex_program and GL_ARB_vertex_shader
grep -v -F -f $1/GL_ARB_vertex_program $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove triplicates in GL_ARB_fragment_program, GL_ARB_fragment_shader,
# and GL_ARB_vertex_shader
grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_fragment_shader > tmp
mv tmp $1/GL_ARB_fragment_shader
grep -v -F -f $1/GL_ARB_fragment_program $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
# remove duplicates in GL_EXT_direct_state_access
grep -v "glGetBooleanIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glGetIntegerIndexedvEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glDisableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glEnableIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
grep -v "glIsEnabledIndexedEXT" $1/GL_EXT_direct_state_access > tmp
mv tmp $1/GL_EXT_direct_state_access
# remove duplicates in GL_NV_explicit_multisample
grep -v "glGetBooleanIndexedvEXT" $1/GL_NV_explicit_multisample > tmp
mv tmp $1/GL_NV_explicit_multisample
grep -v "glGetIntegerIndexedvEXT" $1/GL_NV_explicit_multisample > tmp
mv tmp $1/GL_NV_explicit_multisample
# fix bugs in GL_ARB_vertex_shader
grep -v "GL_FLOAT" $1/GL_ARB_vertex_shader > tmp
mv tmp $1/GL_ARB_vertex_shader
perl -e 's/handle /GLhandleARB /g' -pi $1/GL_ARB_vertex_shader
# fix bugs in GL_ARB_shader_objects
grep -v "GL_FLOAT " $1/GL_ARB_shader_objects > tmp
mv tmp $1/GL_ARB_shader_objects
grep -v "GL_INT " $1/GL_ARB_shader_objects > tmp
mv tmp $1/GL_ARB_shader_objects
# add typedefs to GL_ARB_shader_objects
cat >> $1/GL_ARB_shader_objects <<EOT
typedef char GLcharARB
typedef unsigned int GLhandleARB
EOT
# add missing functions to GL_ARB_transpose_matrix
cat >> $1/GL_ARB_transpose_matrix <<EOT
void glLoadTransposeMatrixfARB (GLfloat m[16])
void glLoadTransposeMatrixdARB (GLdouble m[16])
void glMultTransposeMatrixfARB (GLfloat m[16])
void glMultTransposeMatrixdARB (GLdouble m[16])
EOT
# add missing tokens to GL_EXT_framebuffer_multisample
cat >> $1/GL_EXT_framebuffer_multisample <<EOT
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
GL_MAX_SAMPLES_EXT 0x8D57
EOT
# Filter out GL_NV_gpu_program_fp64 enums and functions
head -n3 $1/GL_NV_gpu_program_fp64 > tmp
mv tmp $1/GL_NV_gpu_program_fp64
# Filter glGetUniformui64vNV from GL_NV_shader_buffer_load
grep -v "glGetUniformui64vNV" $1/GL_NV_shader_buffer_load > tmp
mv tmp $1/GL_NV_shader_buffer_load
# Filter out profile enumerations from GLX_ARB_create_context
grep -v "_PROFILE_" $1/GLX_ARB_create_context > tmp
mv tmp $1/GLX_ARB_create_context
# Filter only profile related enumerations for GLX_ARB_create_context_profile
head -n3 $1/GLX_ARB_create_context_profile > tmp
grep "_PROFILE_" $1/GLX_ARB_create_context_profile >> tmp
mv tmp $1/GLX_ARB_create_context_profile
# Filter out profile enumerations from WGL_ARB_create_context
grep -v "_PROFILE_" $1/WGL_ARB_create_context > tmp
mv tmp $1/WGL_ARB_create_context
# Filter only profile related enumerations for WGL_ARB_create_context_profile
head -n3 $1/WGL_ARB_create_context_profile > tmp
grep "_PROFILE_" $1/WGL_ARB_create_context_profile >> tmp
mv tmp $1/WGL_ARB_create_context_profile
# add missing function to GLX_NV_copy_image
cat >> $1/GLX_NV_copy_image <<EOT
void glXCopyImageSubDataNV (Display *dpy, GLXContext srcCtx, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLXContext dstCtx, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
EOT
# add missing function to WGL_NV_copy_image
cat >> $1/WGL_NV_copy_image <<EOT
BOOL wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
EOT
# Filter glProgramParameteri from GL_ARB_separate_shader_objects
# grep -v "glProgramParameteri" $1/GL_ARB_separate_shader_objects > tmp
# mv tmp $1/GL_ARB_separate_shader_objects
# Filter out EXT functions from GL_ARB_viewport_array
grep -v "EXT" $1/GL_ARB_viewport_array > tmp
mv tmp $1/GL_ARB_viewport_array
# Additional enumerations for GL_NV_vertex_buffer_unified_memory
# These are mentioned in GL_ARB_draw_indirect.txt
cat >> $1/GL_NV_vertex_buffer_unified_memory <<EOT
GL_DRAW_INDIRECT_UNIFIED_NV 0x8F40
GL_DRAW_INDIRECT_ADDRESS_NV 0x8F41
GL_DRAW_INDIRECT_LENGTH_NV 0x8F42
EOT
# Filter glGetPointerv from GL_ARB_debug_output
# It's part of OpenGL 1.1, after all
grep -v "glGetPointerv" $1/GL_ARB_debug_output > tmp
mv tmp $1/GL_ARB_debug_output
# Filter glGetPointerv from GL_EXT_vertex_array
# It's part of OpenGL 1.1, after all
grep -v "glGetPointerv" $1/GL_EXT_vertex_array > tmp
mv tmp $1/GL_EXT_vertex_array
# add typedef to GL_AMD_debug_output
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_AMD_debug_output <<EOT
typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam)
EOT
# add typedef to GL_ARB_debug_output
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_ARB_debug_output <<EOT
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam)
EOT
# add typedef to GL_KHR_debug
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_KHR_debug <<EOT
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam)
EOT
# Remove GL_ARB_debug_group, GL_ARB_debug_label and GL_ARB_debug_output2, for now
rm $1/GL_ARB_debug_group
rm $1/GL_ARB_debug_label
rm $1/GL_ARB_debug_output2
# add typedefs to GL_ARB_cl_event
# parse_spec.pl can't parse typedefs from New Types section, but ought to
cat >> $1/GL_ARB_cl_event <<EOT
typedef struct _cl_context *cl_context
typedef struct _cl_event *cl_event
EOT
# Filter out EXT functions from GL_ARB_gpu_shader_fp64
grep -v 'EXT ' $1/GL_ARB_gpu_shader_fp64 > tmp
mv tmp $1/GL_ARB_gpu_shader_fp64
# add missing functions to GL_EXT_direct_state_access (GL_ARB_gpu_shader_fp64 related)
cat >> $1/GL_EXT_direct_state_access <<EOT
void glProgramUniform1dEXT (GLuint program, GLint location, GLdouble x)
void glProgramUniform2dEXT (GLuint program, GLint location, GLdouble x, GLdouble y)
void glProgramUniform3dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z)
void glProgramUniform4dEXT (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void glProgramUniform1dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform2dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform3dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniform4dvEXT (GLuint program, GLint location, GLsizei count, const GLdouble *value)
void glProgramUniformMatrix2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix2x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix2x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix3x4dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4x2dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
void glProgramUniformMatrix4x3dvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)
EOT
# Filter out GL_UNSIGNED_INT and GL_FLOAT from GL_AMD_performance_monitor
grep -v 'GL_UNSIGNED_INT ' $1/GL_AMD_performance_monitor > tmp
mv tmp $1/GL_AMD_performance_monitor
grep -v 'GL_FLOAT ' $1/GL_AMD_performance_monitor > tmp
mv tmp $1/GL_AMD_performance_monitor
# Filter out GL_STORAGE_CACHED_APPLE and GL_STORAGE_SHARED_APPLE from GL_APPLE_texture_range
grep -v 'GL_STORAGE_CACHED_APPLE ' $1/GL_APPLE_texture_range > tmp
mv tmp $1/GL_APPLE_texture_range
grep -v 'GL_STORAGE_SHARED_APPLE ' $1/GL_APPLE_texture_range > tmp
mv tmp $1/GL_APPLE_texture_range
# Filter out GL_RED from GL_ARB_texture_rg
grep -v 'GL_RED ' $1/GL_ARB_texture_rg > tmp
mv tmp $1/GL_ARB_texture_rg
# Filter out _EXT enums from GL_ARB_texture_storage
grep -v '_EXT ' $1/GL_ARB_texture_storage > tmp
mv tmp $1/GL_ARB_texture_storage
# Filter out TEXTURE_3D enums from GL_EXT_paletted_texture
grep -v 'TEXTURE_3D' $1/GL_EXT_paletted_texture > tmp
mv tmp $1/GL_EXT_paletted_texture
# Filter out GL_VERSION_1_1 enums from GL_AMD_stencil_operation_extended
grep -v '0x150' $1/GL_AMD_stencil_operation_extended > tmp
mv tmp $1/GL_AMD_stencil_operation_extended
# Filter out from GL_APPLE_ycbcr_422
grep -v 'GL_UNSIGNED_SHORT_8_8_APPLE' $1/GL_APPLE_ycbcr_422 > tmp
mv tmp $1/GL_APPLE_ycbcr_422
grep -v 'GL_UNSIGNED_SHORT_8_8_REV_APPLE' $1/GL_APPLE_ycbcr_422 > tmp
mv tmp $1/GL_APPLE_ycbcr_422
# Filter out GL_FRAGMENT_DEPTH_EXT from GL_EXT_light_texture
grep -v 'GL_FRAGMENT_DEPTH_EXT' $1/GL_EXT_light_texture > tmp
mv tmp $1/GL_EXT_light_texture
# Filter out GL_MULTISAMPLE_BIT_EXT from GL_SGIS_multisample
grep -v 'GL_MULTISAMPLE_BIT_EXT' $1/GL_SGIS_multisample > tmp
mv tmp $1/GL_SGIS_multisample
# Filter out GL_COMPRESSED_RGB_S3TC_DXT1_EXT from GL_EXT_texture_compression_dxt1
grep -v 'GL_COMPRESSED_RGB_S3TC_DXT1_EXT' $1/GL_EXT_texture_compression_dxt1 > tmp
mv tmp $1/GL_EXT_texture_compression_dxt1
# Filter out GL_COMPRESSED_RGBA_S3TC_DXT1_EXT from GL_EXT_texture_compression_dxt1
grep -v 'GL_COMPRESSED_RGBA_S3TC_DXT1_EXT' $1/GL_EXT_texture_compression_dxt1 > tmp
mv tmp $1/GL_EXT_texture_compression_dxt1
# clean up
rm -f $1/*.bak
fi fi

View File

@ -1,33 +0,0 @@
#!/bin/sh
##
## Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
## Copyright (C) 2002-2008, 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
if [ ! -d $1 ] ; then
mkdir $1
fi
cd $1
# wget used to return 0 (success), but more recent versions
# don't so we don't want to bail out in failure mode
# eventhough everything is fine.
set +e
wget \
--mirror \
--no-parent \
--no-host-directories \
--cut-dirs=2 \
--accept=txt,html \
$2
echo 'wget exit code: ' $?
exit 0

View File

@ -1,13 +0,0 @@
GLX_AMD_gpu_association
http://www.opengl.org/registry/specs/AMD/glx_gpu_association.txt
GLX_AMD_gpu_association
GLX_GPU_VENDOR_AMD 0x1F00
GLX_GPU_RENDERER_STRING_AMD 0x1F01
GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
GLX_GPU_RAM_AMD 0x21A3
GLX_GPU_CLOCK_AMD 0x21A4
GLX_GPU_NUM_PIPES_AMD 0x21A5
GLX_GPU_NUM_SIMD_AMD 0x21A6
GLX_GPU_NUM_RB_AMD 0x21A7
GLX_GPU_NUM_SPI_AMD 0x21A8

View File

@ -1,4 +0,0 @@
GL_REGAL_error_string
https://github.com/p3/regal
GL_REGAL_error_string
const GLchar* glErrorStringREGAL (GLenum error)

View File

@ -1,5 +0,0 @@
GL_REGAL_extension_query
https://github.com/p3/regal
GL_REGAL_extension_query
GLboolean glGetExtensionREGAL (const GLchar* ext)
GLboolean glIsSupportedREGAL (const GLchar* ext)

View File

@ -1,12 +0,0 @@
GL_REGAL_log
http://www.opengl.org/registry/specs/REGAL/log.txt
GL_REGAL_log
GL_LOG_ERROR_REGAL 0x9319
GL_LOG_WARNING_REGAL 0x931A
GL_LOG_INFO_REGAL 0x931B
GL_LOG_APP_REGAL 0x931C
GL_LOG_DRIVER_REGAL 0x931D
GL_LOG_INTERNAL_REGAL 0x931E
GL_LOG_DEBUG_REGAL 0x931F
GL_LOG_STATUS_REGAL 0x9320
GL_LOG_HTTP_REGAL 0x9321

View File

@ -1,165 +0,0 @@
GL_VERSION_3_0
http://www.opengl.org/registry/doc/glspec30.20080811.pdf
GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB
GL_CLIP_DISTANCE0 GL_CLIP_PLANE0
GL_CLIP_DISTANCE1 GL_CLIP_PLANE1
GL_CLIP_DISTANCE2 GL_CLIP_PLANE2
GL_CLIP_DISTANCE3 GL_CLIP_PLANE3
GL_CLIP_DISTANCE4 GL_CLIP_PLANE4
GL_CLIP_DISTANCE5 GL_CLIP_PLANE5
GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES
GL_MAJOR_VERSION 0x821B
GL_MINOR_VERSION 0x821C
GL_NUM_EXTENSIONS 0x821D
GL_CONTEXT_FLAGS 0x821E
GL_DEPTH_BUFFER 0x8223
GL_STENCIL_BUFFER 0x8224
GL_COMPRESSED_RED 0x8225
GL_COMPRESSED_RG 0x8226
GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
GL_RGBA32F 0x8814
GL_RGB32F 0x8815
GL_RGBA16F 0x881A
GL_RGB16F 0x881B
GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
GL_CLAMP_VERTEX_COLOR 0x891A
GL_CLAMP_FRAGMENT_COLOR 0x891B
GL_CLAMP_READ_COLOR 0x891C
GL_FIXED_ONLY 0x891D
GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS
GL_TEXTURE_RED_TYPE 0x8C10
GL_TEXTURE_GREEN_TYPE 0x8C11
GL_TEXTURE_BLUE_TYPE 0x8C12
GL_TEXTURE_ALPHA_TYPE 0x8C13
GL_TEXTURE_LUMINANCE_TYPE 0x8C14
GL_TEXTURE_INTENSITY_TYPE 0x8C15
GL_TEXTURE_DEPTH_TYPE 0x8C16
GL_TEXTURE_1D_ARRAY 0x8C18
GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
GL_TEXTURE_2D_ARRAY 0x8C1A
GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
GL_R11F_G11F_B10F 0x8C3A
GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
GL_RGB9_E5 0x8C3D
GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
GL_TEXTURE_SHARED_SIZE 0x8C3F
GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
GL_PRIMITIVES_GENERATED 0x8C87
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
GL_RASTERIZER_DISCARD 0x8C89
GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
GL_INTERLEAVED_ATTRIBS 0x8C8C
GL_SEPARATE_ATTRIBS 0x8C8D
GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
GL_RGBA32UI 0x8D70
GL_RGB32UI 0x8D71
GL_RGBA16UI 0x8D76
GL_RGB16UI 0x8D77
GL_RGBA8UI 0x8D7C
GL_RGB8UI 0x8D7D
GL_RGBA32I 0x8D82
GL_RGB32I 0x8D83
GL_RGBA16I 0x8D88
GL_RGB16I 0x8D89
GL_RGBA8I 0x8D8E
GL_RGB8I 0x8D8F
GL_RED_INTEGER 0x8D94
GL_GREEN_INTEGER 0x8D95
GL_BLUE_INTEGER 0x8D96
GL_ALPHA_INTEGER 0x8D97
GL_RGB_INTEGER 0x8D98
GL_RGBA_INTEGER 0x8D99
GL_BGR_INTEGER 0x8D9A
GL_BGRA_INTEGER 0x8D9B
GL_SAMPLER_1D_ARRAY 0x8DC0
GL_SAMPLER_2D_ARRAY 0x8DC1
GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
GL_SAMPLER_CUBE_SHADOW 0x8DC5
GL_UNSIGNED_INT_VEC2 0x8DC6
GL_UNSIGNED_INT_VEC3 0x8DC7
GL_UNSIGNED_INT_VEC4 0x8DC8
GL_INT_SAMPLER_1D 0x8DC9
GL_INT_SAMPLER_2D 0x8DCA
GL_INT_SAMPLER_3D 0x8DCB
GL_INT_SAMPLER_CUBE 0x8DCC
GL_INT_SAMPLER_1D_ARRAY 0x8DCE
GL_INT_SAMPLER_2D_ARRAY 0x8DCF
GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
GL_QUERY_WAIT 0x8E13
GL_QUERY_NO_WAIT 0x8E14
GL_QUERY_BY_REGION_WAIT 0x8E15
GL_QUERY_BY_REGION_NO_WAIT 0x8E16
void glColorMaski (GLuint, GLboolean, GLboolean, GLboolean, GLboolean)
void glGetBooleani_v (GLenum, GLuint, GLboolean*)
void glEnablei (GLenum, GLuint)
void glDisablei (GLenum, GLuint)
GLboolean glIsEnabledi (GLenum, GLuint)
void glBeginTransformFeedback (GLenum)
void glEndTransformFeedback (void)
void glTransformFeedbackVaryings (GLuint, GLsizei, const GLchar **, GLenum)
void glGetTransformFeedbackVarying (GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)
void glClampColor (GLenum, GLenum)
void glBeginConditionalRender (GLuint, GLenum)
void glEndConditionalRender (void)
void glVertexAttribI1i (GLuint, GLint)
void glVertexAttribI2i (GLuint, GLint, GLint)
void glVertexAttribI3i (GLuint, GLint, GLint, GLint)
void glVertexAttribI4i (GLuint, GLint, GLint, GLint, GLint)
void glVertexAttribI1ui (GLuint, GLuint)
void glVertexAttribI2ui (GLuint, GLuint, GLuint)
void glVertexAttribI3ui (GLuint, GLuint, GLuint, GLuint)
void glVertexAttribI4ui (GLuint, GLuint, GLuint, GLuint, GLuint)
void glVertexAttribI1iv (GLuint, const GLint*)
void glVertexAttribI2iv (GLuint, const GLint*)
void glVertexAttribI3iv (GLuint, const GLint*)
void glVertexAttribI4iv (GLuint, const GLint*)
void glVertexAttribI1uiv (GLuint, const GLuint*)
void glVertexAttribI2uiv (GLuint, const GLuint*)
void glVertexAttribI3uiv (GLuint, const GLuint*)
void glVertexAttribI4uiv (GLuint, const GLuint*)
void glVertexAttribI4bv (GLuint, const GLbyte*)
void glVertexAttribI4sv (GLuint, const GLshort*)
void glVertexAttribI4ubv (GLuint, const GLubyte*)
void glVertexAttribI4usv (GLuint, const GLushort*)
void glVertexAttribIPointer (GLuint, GLint, GLenum, GLsizei, const GLvoid*)
void glGetVertexAttribIiv (GLuint, GLenum, GLint*)
void glGetVertexAttribIuiv (GLuint, GLenum, GLuint*)
void glGetUniformuiv (GLuint, GLint, GLuint*)
void glBindFragDataLocation (GLuint, GLuint, const GLchar*)
GLint glGetFragDataLocation (GLuint, const GLchar*)
void glUniform1ui (GLint, GLuint)
void glUniform2ui (GLint, GLuint, GLuint)
void glUniform3ui (GLint, GLuint, GLuint, GLuint)
void glUniform4ui (GLint, GLuint, GLuint, GLuint, GLuint)
void glUniform1uiv (GLint, GLsizei, const GLuint*)
void glUniform2uiv (GLint, GLsizei, const GLuint*)
void glUniform3uiv (GLint, GLsizei, const GLuint*)
void glUniform4uiv (GLint, GLsizei, const GLuint*)
void glTexParameterIiv (GLenum, GLenum, const GLint*)
void glTexParameterIuiv (GLenum, GLenum, const GLuint*)
void glGetTexParameterIiv (GLenum, GLenum, GLint*)
void glGetTexParameterIuiv (GLenum, GLenum, GLuint*)
void glClearBufferiv (GLenum, GLint, const GLint*)
void glClearBufferuiv (GLenum, GLint, const GLuint*)
void glClearBufferfv (GLenum, GLint, const GLfloat*)
void glClearBufferfi (GLenum, GLint, GLfloat, GLint)
const GLubyte* glGetStringi (GLenum, GLuint)

View File

@ -1,11 +0,0 @@
GL_VERSION_3_3
http://www.opengl.org/registry/doc/glspec32.core.20090803.pdf
GL_TEXTURE_SWIZZLE_R 0x8E42
GL_TEXTURE_SWIZZLE_G 0x8E43
GL_TEXTURE_SWIZZLE_B 0x8E44
GL_TEXTURE_SWIZZLE_A 0x8E45
GL_TEXTURE_SWIZZLE_RGBA 0x8E46
GL_RGB10_A2UI 0x906F
GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
void glVertexAttribDivisor (GLuint index, GLuint divisor)

View File

@ -1,3 +0,0 @@
GL_VERSION_4_1
http://www.opengl.org/registry/doc/glspec41.core.20100725.pdf

View File

@ -0,0 +1,22 @@
GLX_AMD_gpu_association
http://www.opengl.org/registry/specs/AMD/glx_gpu_association.txt
GLX_AMD_gpu_association
GLX_GPU_VENDOR_AMD 0x1F00
GLX_GPU_RENDERER_STRING_AMD 0x1F01
GLX_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
GLX_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
GLX_GPU_RAM_AMD 0x21A3
GLX_GPU_CLOCK_AMD 0x21A4
GLX_GPU_NUM_PIPES_AMD 0x21A5
GLX_GPU_NUM_SIMD_AMD 0x21A6
GLX_GPU_NUM_RB_AMD 0x21A7
GLX_GPU_NUM_SPI_AMD 0x21A8
void glXBlitContextFramebufferAMD (GLXContext dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
GLXContext glXCreateAssociatedContextAMD (unsigned int id, GLXContext share_list)
GLXContext glXCreateAssociatedContextAttribsAMD (unsigned int id, GLXContext share_context, const int* attribList)
Bool glXDeleteAssociatedContextAMD (GLXContext ctx)
unsigned int glXGetContextGPUIDAMD (GLXContext ctx)
GLXContext glXGetCurrentAssociatedContextAMD (void)
unsigned int glXGetGPUIDsAMD (unsigned int maxCount, unsigned int* ids)
int glXGetGPUInfoAMD (unsigned int id, int property, GLenum dataType, unsigned int size, void* data)
Bool glXMakeAssociatedContextCurrentAMD (GLXContext ctx)

View File

@ -7,6 +7,6 @@ GL_APPLE_texture_range
GL_STORAGE_SHARED_APPLE 0x85BF GL_STORAGE_SHARED_APPLE 0x85BF
GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7 GL_TEXTURE_RANGE_LENGTH_APPLE 0x85B7
GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8 GL_TEXTURE_RANGE_POINTER_APPLE 0x85B8
void glTextureRangeAPPLE (GLenum target, GLsizei length, GLvoid *pointer) void glTextureRangeAPPLE (GLenum target, GLsizei length, void *pointer)
void glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, GLvoid **params) void glGetTexParameterPointervAPPLE (GLenum target, GLenum pname, void **params)

View File

@ -78,35 +78,35 @@ GL_ARB_imaging
GL_WRAP_BORDER 0x8152 GL_WRAP_BORDER 0x8152
GL_REPLICATE_BORDER 0x8153 GL_REPLICATE_BORDER 0x8153
GL_CONVOLUTION_BORDER_COLOR 0x8154 GL_CONVOLUTION_BORDER_COLOR 0x8154
void glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) void glColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *table)
void glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data) void glColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const void *data)
void glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params) void glColorTableParameteriv (GLenum target, GLenum pname, const GLint *params)
void glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params) void glColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params)
void glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) void glCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
void glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) void glCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
void glGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table) void glGetColorTable (GLenum target, GLenum format, GLenum type, void *table)
void glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params) void glGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params) void glGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params)
void glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) void glHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
void glResetHistogram (GLenum target) void glResetHistogram (GLenum target)
void glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) void glGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, void *values)
void glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params) void glGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params) void glGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params)
void glMinmax (GLenum target, GLenum internalformat, GLboolean sink) void glMinmax (GLenum target, GLenum internalformat, GLboolean sink)
void glResetMinmax (GLenum target) void glResetMinmax (GLenum target)
void glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params) void glGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params) void glGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params)
void glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) void glConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const void *image)
void glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) void glConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *image)
void glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params) void glConvolutionParameterf (GLenum target, GLenum pname, GLfloat params)
void glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params) void glConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params)
void glConvolutionParameteri (GLenum target, GLenum pname, GLint params) void glConvolutionParameteri (GLenum target, GLenum pname, GLint params)
void glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params) void glConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params)
void glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) void glCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
void glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) void glCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
void glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image) void glGetConvolutionFilter (GLenum target, GLenum format, GLenum type, void *image)
void glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params) void glGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params)
void glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params) void glGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params)
void glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) void glSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *row, const void *column)
void glGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span) void glGetSeparableFilter (GLenum target, GLenum format, GLenum type, void *row, void *column, void *span)
void glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values) void glGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum types, void *values)

View File

@ -12,7 +12,7 @@ GL_ARB_matrix_palette
GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848
GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849
void glCurrentPaletteMatrixARB (GLint index) void glCurrentPaletteMatrixARB (GLint index)
void glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, GLvoid *pointer) void glMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, void *pointer)
void glMatrixIndexubvARB (GLint size, GLubyte *indices) void glMatrixIndexubvARB (GLint size, GLubyte *indices)
void glMatrixIndexusvARB (GLint size, GLushort *indices) void glMatrixIndexusvARB (GLint size, GLushort *indices)
void glMatrixIndexuivARB (GLint size, GLuint *indices) void glMatrixIndexuivARB (GLint size, GLuint *indices)

View File

@ -21,7 +21,7 @@ GL_ARB_robustness
void glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint* values) void glGetnPixelMapuivARB (GLenum map, GLsizei bufSize, GLuint* values)
void glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort* values) void glGetnPixelMapusvARB (GLenum map, GLsizei bufSize, GLushort* values)
void glGetnPolygonStippleARB (GLsizei bufSize, GLubyte* pattern) void glGetnPolygonStippleARB (GLsizei bufSize, GLubyte* pattern)
void glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, GLvoid*column, GLvoid*span) void glGetnSeparableFilterARB (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, void* row, GLsizei columnBufSize, void*column, void*span)
void glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* img) void glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void* img)
void glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble* params) void glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble* params)
void glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat* params) void glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat* params)

View File

@ -12,7 +12,7 @@ GL_ARB_separate_shader_objects
GL_ALL_SHADER_BITS 0xFFFFFFFF GL_ALL_SHADER_BITS 0xFFFFFFFF
void glActiveShaderProgram (GLuint pipeline, GLuint program) void glActiveShaderProgram (GLuint pipeline, GLuint program)
void glBindProgramPipeline (GLuint pipeline) void glBindProgramPipeline (GLuint pipeline)
GLuint glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar ** strings) GLuint glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar * const * strings)
void glDeleteProgramPipelines (GLsizei n, const GLuint* pipelines) void glDeleteProgramPipelines (GLsizei n, const GLuint* pipelines)
void glGenProgramPipelines (GLsizei n, GLuint* pipelines) void glGenProgramPipelines (GLsizei n, GLuint* pipelines)
void glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar *infoLog) void glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar *infoLog)

View File

@ -1,12 +1,6 @@
GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_64bit
http://www.opengl.org/registry/specs/ARB/vertex_attrib_64bit.txt http://www.opengl.org/registry/specs/ARB/vertex_attrib_64bit.txt
GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_64bit
GL_DOUBLE_MAT2 0x8F46
GL_DOUBLE_MAT3 0x8F47
GL_DOUBLE_MAT4 0x8F48
GL_DOUBLE_VEC2 0x8FFC
GL_DOUBLE_VEC3 0x8FFD
GL_DOUBLE_VEC4 0x8FFE
void glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble* params) void glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble* params)
void glVertexAttribL1d (GLuint index, GLdouble x) void glVertexAttribL1d (GLuint index, GLdouble x)
void glVertexAttribL1dv (GLuint index, const GLdouble* v) void glVertexAttribL1dv (GLuint index, const GLdouble* v)

View File

@ -51,5 +51,5 @@ GL_ARB_vertex_blend
void glWeightubvARB (GLint size, GLubyte *weights) void glWeightubvARB (GLint size, GLubyte *weights)
void glWeightusvARB (GLint size, GLushort *weights) void glWeightusvARB (GLint size, GLushort *weights)
void glWeightuivARB (GLint size, GLuint *weights) void glWeightuivARB (GLint size, GLuint *weights)
void glWeightPointerARB (GLint size, GLenum type, GLsizei stride, GLvoid *pointer) void glWeightPointerARB (GLint size, GLenum type, GLsizei stride, void *pointer)
void glVertexBlendARB (GLint count) void glVertexBlendARB (GLint count)

View File

@ -1,5 +1,5 @@
GL_ATI_map_object_buffer GL_ATI_map_object_buffer
http://www.opengl.org/registry/specs/ATI/map_object_buffer.txt http://www.opengl.org/registry/specs/ATI/map_object_buffer.txt
GL_ATI_map_object_buffer GL_ATI_map_object_buffer
GLvoid * glMapObjectBufferATI (GLuint buffer) void * glMapObjectBufferATI (GLuint buffer)
void glUnmapObjectBufferATI (GLuint buffer) void glUnmapObjectBufferATI (GLuint buffer)

View File

@ -2,4 +2,4 @@ GL_EXT_draw_instanced
http://developer.download.nvidia.com/opengl/specs/GL_EXT_draw_instanced.txt http://developer.download.nvidia.com/opengl/specs/GL_EXT_draw_instanced.txt
GL_EXT_draw_instanced GL_EXT_draw_instanced
void glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount) void glDrawArraysInstancedEXT (GLenum mode, GLint start, GLsizei count, GLsizei primcount)
void glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount) void glDrawElementsInstancedEXT (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount)

View File

@ -3,4 +3,4 @@ http://oss.sgi.com/projects/ogl-sample/registry/EXT/draw_range_elements.txt
GL_EXT_draw_range_elements GL_EXT_draw_range_elements
GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8
GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 GL_MAX_ELEMENTS_INDICES_EXT 0x80E9
void glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) void glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)

View File

@ -13,4 +13,4 @@ GL_EXT_fog_coord
void glFogCoordfvEXT (const GLfloat *coord) void glFogCoordfvEXT (const GLfloat *coord)
void glFogCoorddEXT (GLdouble coord) void glFogCoorddEXT (GLdouble coord)
void glFogCoorddvEXT (const GLdouble *coord) void glFogCoorddvEXT (const GLdouble *coord)
void glFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer) void glFogCoordPointerEXT (GLenum type, GLsizei stride, const void *pointer)

View File

@ -58,6 +58,6 @@ GL_EXT_gpu_shader4
void glVertexAttribI4svEXT (GLuint index, const GLshort *v) void glVertexAttribI4svEXT (GLuint index, const GLshort *v)
void glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v) void glVertexAttribI4ubvEXT (GLuint index, const GLubyte *v)
void glVertexAttribI4usvEXT (GLuint index, const GLushort *v) void glVertexAttribI4usvEXT (GLuint index, const GLushort *v)
void glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) void glVertexAttribIPointerEXT (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
void glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params) void glGetVertexAttribIivEXT (GLuint index, GLenum pname, GLint *params)
void glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params) void glGetVertexAttribIuivEXT (GLuint index, GLenum pname, GLuint *params)

View File

@ -24,4 +24,4 @@ GL_EXT_secondary_color
void glSecondaryColor3uivEXT (const GLuint *v) void glSecondaryColor3uivEXT (const GLuint *v)
void glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue) void glSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue)
void glSecondaryColor3usvEXT (const GLushort *v) void glSecondaryColor3usvEXT (const GLushort *v)
void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) void glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const void *pointer)

View File

@ -125,8 +125,8 @@ GL_EXT_vertex_shader
void glInsertComponentEXT (GLuint res, GLuint src, GLuint num) void glInsertComponentEXT (GLuint res, GLuint src, GLuint num)
void glExtractComponentEXT (GLuint res, GLuint src, GLuint num) void glExtractComponentEXT (GLuint res, GLuint src, GLuint num)
GLuint glGenSymbolsEXT (GLenum dataType, GLenum storageType, GLenum range, GLuint components) GLuint glGenSymbolsEXT (GLenum dataType, GLenum storageType, GLenum range, GLuint components)
void glSetInvariantEXT (GLuint id, GLenum type, GLvoid *addr) void glSetInvariantEXT (GLuint id, GLenum type, void *addr)
void glSetLocalConstantEXT (GLuint id, GLenum type, GLvoid *addr) void glSetLocalConstantEXT (GLuint id, GLenum type, void *addr)
void glVariantbvEXT (GLuint id, GLbyte *addr) void glVariantbvEXT (GLuint id, GLbyte *addr)
void glVariantsvEXT (GLuint id, GLshort *addr) void glVariantsvEXT (GLuint id, GLshort *addr)
void glVariantivEXT (GLuint id, GLint *addr) void glVariantivEXT (GLuint id, GLint *addr)
@ -135,7 +135,7 @@ GL_EXT_vertex_shader
void glVariantubvEXT (GLuint id, GLubyte *addr) void glVariantubvEXT (GLuint id, GLubyte *addr)
void glVariantusvEXT (GLuint id, GLushort *addr) void glVariantusvEXT (GLuint id, GLushort *addr)
void glVariantuivEXT (GLuint id, GLuint *addr) void glVariantuivEXT (GLuint id, GLuint *addr)
void glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, GLvoid *addr) void glVariantPointerEXT (GLuint id, GLenum type, GLuint stride, void *addr)
void glEnableVariantClientStateEXT (GLuint id) void glEnableVariantClientStateEXT (GLuint id)
void glDisableVariantClientStateEXT (GLuint id) void glDisableVariantClientStateEXT (GLuint id)
GLuint glBindLightParameterEXT (GLenum light, GLenum value) GLuint glBindLightParameterEXT (GLenum light, GLenum value)
@ -147,7 +147,7 @@ GL_EXT_vertex_shader
void glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data) void glGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data)
void glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data) void glGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data)
void glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data) void glGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data)
void glGetVariantPointervEXT (GLuint id, GLenum value, GLvoid **data) void glGetVariantPointervEXT (GLuint id, GLenum value, void **data)
void glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data) void glGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data)
void glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data) void glGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data)
void glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data) void glGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data)

Some files were not shown because too many files have changed in this diff Show More