mirror of
https://github.com/nigels-com/glew.git
synced 2024-11-29 09:11:56 +00:00
Merge Milan's 1.1.x
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@80 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
f9d4b5e9e4
commit
2b9775d8d3
158
Makefile
158
Makefile
@ -1,6 +1,7 @@
|
|||||||
## The OpenGL Extension Wrangler Library
|
## The OpenGL Extension Wrangler Library
|
||||||
## Copyright (C) 2003, 2002, Milan Ikits
|
## Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
|
||||||
## Copyright (C) 2002, Lev Povalahev
|
## Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
## Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
|
||||||
## All rights reserved.
|
## All rights reserved.
|
||||||
##
|
##
|
||||||
## Redistribution and use in source and binary forms, with or without
|
## Redistribution and use in source and binary forms, with or without
|
||||||
@ -27,81 +28,162 @@
|
|||||||
## THE POSSIBILITY OF SUCH DAMAGE.
|
## THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
GLEW_DEST ?= /usr
|
GLEW_DEST ?= /usr
|
||||||
GLEW_VERSION = 1.0.7
|
|
||||||
|
GLEW_MAJOR = 1
|
||||||
|
GLEW_MINOR = 1
|
||||||
|
GLEW_MICRO = 0
|
||||||
|
GLEW_VERSION = $(GLEW_MAJOR).$(GLEW_MINOR).$(GLEW_MICRO)
|
||||||
|
|
||||||
|
TARDIR = ../glew-$(GLEW_VERSION)
|
||||||
|
TARBALL = ../glew_$(GLEW_VERSION).tar.gz
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
SYSTEM = $(strip $(shell uname -s))
|
SYSTEM = $(strip $(shell uname -s))
|
||||||
|
|
||||||
ifeq ($(patsubst CYGWIN%,CYGWIN,$(SYSTEM)), CYGWIN)
|
ifeq ($(patsubst CYGWIN%,CYGWIN,$(SYSTEM)), CYGWIN)
|
||||||
CC = \gcc -mno-cygwin
|
CC = gcc
|
||||||
LD = \gcc -mno-cygwin
|
EXTRA_CCFLAGS = -mno-cygwin
|
||||||
|
EXTRA_LDFALGS =
|
||||||
|
EXTRA_CPPFLAGS = -D'GLEW_STATIC'
|
||||||
NAME = glew32
|
NAME = glew32
|
||||||
DEFINE = -D'GLEW_STATIC'
|
|
||||||
BIN.LIBS = -Llib -lglut -l$(NAME) -lglu32 -lopengl32
|
|
||||||
P.BIN = .exe
|
P.BIN = .exe
|
||||||
|
|
||||||
|
GL_LDFLAGS = -lopengl32
|
||||||
|
GLU_LDFLAGS = -lglu32
|
||||||
|
GLUT_LDFLAGS = -lglut $(GLU_LDFLAGS) $(GL_LDFLAGS)
|
||||||
|
|
||||||
else
|
else
|
||||||
ifeq ($(patsubst Linux%,Linux,$(SYSTEM)), Linux)
|
ifeq ($(patsubst Linux%,Linux,$(SYSTEM)), Linux)
|
||||||
CC = \gcc
|
CC = cc
|
||||||
LD = \ld
|
EXTRA_CCFLAGS =
|
||||||
|
EXTRA_LDFALGS = -L/usr/X11R6/lib
|
||||||
|
EXTRA_CPPFLAGS =
|
||||||
NAME = GLEW
|
NAME = GLEW
|
||||||
BIN.LIBS = -Llib -L/usr/X11R6/lib -lglut -l$(NAME) -lGLU -lGL -lXmu -lX11
|
|
||||||
P.BIN =
|
P.BIN =
|
||||||
|
|
||||||
|
# Support broken systems which don't include proper inter-library
|
||||||
|
# dependency information (several versions of RedHat and SuSE among
|
||||||
|
# others). Stuff needed by both GLUT and GL is included only in GL's
|
||||||
|
# LDFLAGS. Same thnig for GLU and GL. Include the stuff needed only by
|
||||||
|
# GLUT *before* the GL flags. This probably breaks down on IRIX since
|
||||||
|
# their linker works "the other way arround", but since that POS doesn't
|
||||||
|
# support glXGetProcAddress, GLEW is rather uninteresting on that
|
||||||
|
# platform. (mem)
|
||||||
|
|
||||||
|
GL_LDFLAGS = -lGL -lXext -lX11 -lm
|
||||||
|
GLU_LDFLAGS = -lGLU
|
||||||
|
GLUT_LDFLAGS = -lglut -lXmu -lXi $(GLU_LDFLAGS) $(GL_LDFLAGS)
|
||||||
|
|
||||||
|
else
|
||||||
|
ifeq ($(patsubst IRIX%,IRIX,$(SYSTEM)), IRIX)
|
||||||
|
CC = cc
|
||||||
|
EXTRA_CCFLAGS =
|
||||||
|
EXTRA_LDFALGS =
|
||||||
|
EXTRA_CPPFLAGS =
|
||||||
|
NAME = GLEW
|
||||||
|
P.BIN =
|
||||||
|
WARN = -fullwarn
|
||||||
|
|
||||||
|
GL_LDFLAGS = -lGL -lXext -lX11 -lm
|
||||||
|
GLU_LDFLAGS = -lGLU
|
||||||
|
GLUT_LDFLAGS = -lglut -lXmu -lXi $(GLU_LDFLAGS) $(GL_LDFLAGS)
|
||||||
else
|
else
|
||||||
$(error "Platform '$(SYSTEM)' not supported")
|
$(error "Platform '$(SYSTEM)' not supported")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
AR = \ar
|
AR = ar
|
||||||
INSTALL = \install
|
LD = ld
|
||||||
RM = \rm -f
|
INSTALL = install
|
||||||
LN = \ln -fs
|
RM = rm -f
|
||||||
|
LN = ln -sf
|
||||||
ifeq ($(MAKECMDGOALS), debug)
|
ifeq ($(MAKECMDGOALS), debug)
|
||||||
OPT = -g
|
OPT = -g
|
||||||
|
STRIP =
|
||||||
else
|
else
|
||||||
OPT = -O3 -fomit-frame-pointer
|
OPT = -O2 # -fomit-frame-pointer
|
||||||
|
STRIP = -s
|
||||||
endif
|
endif
|
||||||
|
WARN ?= -Wall -W
|
||||||
INCLUDE = -Iinclude
|
INCLUDE = -Iinclude
|
||||||
CFLAGS = $(OPT) $(INCLUDE) $(DEFINE)
|
CFLAGS = $(OPT) $(WARN) $(INCLUDE) $(EXTRA_CPPFLAGS) $(EXTRA_CCFLAGS)
|
||||||
|
|
||||||
LIB.A = lib$(NAME).a
|
LIB = lib$(NAME)
|
||||||
LIB.SO = lib$(NAME).so.$(GLEW_VERSION)
|
LIB.SONAME = $(LIB).so.$(GLEW_MAJOR)
|
||||||
LIB.SO.LNK = lib$(NAME).so
|
LIB.DEVLNK = $(LIB).so
|
||||||
|
LIB.SHARED = $(LIB).so.$(GLEW_VERSION)
|
||||||
|
LIB.STATIC = $(LIB).a
|
||||||
LIB.SRCS = src/glew.c
|
LIB.SRCS = src/glew.c
|
||||||
LIB.OBJS = $(LIB.SRCS:.c=.o)
|
LIB.OBJS = $(LIB.SRCS:.c=.o)
|
||||||
|
LIB.LDFLAGS = $(EXTRA_LDFALGS)
|
||||||
|
LIB.LIBS = $(GL_LDFLAGS)
|
||||||
|
|
||||||
BIN = glewinfo$(P.BIN)
|
BIN = glewinfo$(P.BIN)
|
||||||
BIN.SRCS = src/glewinfo.c
|
BIN.SRCS = src/glewinfo.c
|
||||||
BIN.OBJS = $(BIN.SRCS:.c=.o)
|
BIN.OBJS = $(BIN.SRCS:.c=.o)
|
||||||
|
BIN.LIBS = -Llib $(EXTRA_LDFALGS) $(GLUT_LDFLAGS) -l$(NAME)
|
||||||
|
|
||||||
all: bin/$(BIN) lib/$(LIB.SO)
|
all: lib/$(LIB.SHARED) lib/$(LIB.STATIC) bin/$(BIN)
|
||||||
|
|
||||||
lib/$(LIB.A): $(LIB.OBJS)
|
lib/$(LIB.STATIC): $(LIB.OBJS)
|
||||||
$(AR) cr $@ $^
|
$(AR) cr $@ $^
|
||||||
|
|
||||||
lib/$(LIB.SO): $(LIB.OBJS)
|
lib/$(LIB.SHARED): $(LIB.OBJS)
|
||||||
$(LD) -shared -o $@ $^
|
$(LD) -shared -o $@ $^ -soname $(LIB.SONAME) $(LIB.LDFLAGS) $(LIB.LIBS)
|
||||||
$(LN) $(LIB.SO) lib/$(LIB.SO.LNK)
|
$(LN) $(LIB.SHARED) lib/$(LIB.SONAME)
|
||||||
|
$(LN) $(LIB.SHARED) lib/$(LIB.DEVLNK)
|
||||||
|
|
||||||
bin/$(BIN): $(BIN.SRCS) lib/$(LIB.A)
|
bin/$(BIN): $(BIN.SRCS)
|
||||||
$(CC) $(CFLAGS) -o $@ $< $(BIN.LIBS)
|
$(CC) $(CFLAGS) -o $@ $^ $(BIN.LIBS)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -c $(CFLAGS) -o $@ $<
|
$(CC) -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(INSTALL) -d -m 755 $(GLEW_DEST)/include/GL
|
# directories
|
||||||
$(INSTALL) -m 644 include/GL/glew.h include/GL/glxew.h $(GLEW_DEST)/include/GL
|
$(INSTALL) -d -m 0755 $(GLEW_DEST)/bin
|
||||||
$(INSTALL) -d -m 755 $(GLEW_DEST)/lib
|
$(INSTALL) -d -m 0755 $(GLEW_DEST)/include/GL
|
||||||
$(INSTALL) -s -m 755 lib/$(LIB.A) $(GLEW_DEST)/lib
|
$(INSTALL) -d -m 0755 $(GLEW_DEST)/lib
|
||||||
$(INSTALL) -s -m 755 lib/$(LIB.SO) $(GLEW_DEST)/lib
|
# runtime
|
||||||
$(LN) $(GLEW_DEST)/lib/$(LIB.SO) $(GLEW_DEST)/lib/$(LIB.SO.LNK)
|
$(INSTALL) $(STRIP) -m 0644 lib/$(LIB.SHARED) $(GLEW_DEST)/lib/
|
||||||
$(INSTALL) -d -m 755 $(GLEW_DEST)/bin
|
$(LN) $(LIB.SHARED) $(GLEW_DEST)/lib/$(LIB.SONAME)
|
||||||
$(INSTALL) -s -m 755 bin/$(BIN) $(GLEW_DEST)/bin
|
# development files
|
||||||
|
$(INSTALL) -m 0644 include/GL/{wglew,glew,glxew}.h $(GLEW_DEST)/include/GL
|
||||||
|
$(INSTALL) $(STRIP) -m 0644 lib/$(LIB.STATIC) $(GLEW_DEST)/lib/
|
||||||
|
$(LN) $(LIB.SHARED) $(GLEW_DEST)/lib/$(LIB.DEVLNK)
|
||||||
|
# utilities
|
||||||
|
$(INSTALL) -s -m 0755 bin/$(BIN) $(GLEW_DEST)/bin/
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(GLEW_DEST)/include/GL/glew.h $(GLEW_DEST)/include/GL/glxew.h
|
$(RM) $(GLEW_DEST)/include/GL/{wglew,glew,glxew}.h
|
||||||
$(RM) $(GLEW_DEST)/lib/$(LIB.SO.LNK) $(GLEW_DEST)/lib/$(LIB.SO)
|
$(RM) $(GLEW_DEST)/lib/$(LIB.DEVLNK)
|
||||||
|
$(RM) $(GLEW_DEST)/lib/$(LIB.SONAME)
|
||||||
|
$(RM) $(GLEW_DEST)/lib/$(LIB.SHARED)
|
||||||
|
$(RM) $(GLEW_DEST)/lib/$(LIB.STATIC)
|
||||||
$(RM) $(GLEW_DEST)/bin/$(BIN)
|
$(RM) $(GLEW_DEST)/bin/$(BIN)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(LIB.OBJS) lib/$(LIB.A) lib/$(LIB.SO) lib/$(LIB.SO.LNK) \
|
$(RM) $(LIB.OBJS)
|
||||||
$(BIN.OBJS) bin/$(BIN)
|
$(RM) lib/$(LIB.STATIC) lib/$(LIB.SHARED) lib/$(LIB.DEVLNK) lib/$(LIB.SONAME) $(LIB.STATIC)
|
||||||
|
$(RM) $(BIN.OBJS) bin/$(BIN)
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
find -name \*~ | xargs -r rm
|
||||||
|
find -name .\*.sw\? | xargs -r rm
|
||||||
|
|
||||||
|
tardist:
|
||||||
|
$(RM) -r $(TARDIR)
|
||||||
|
mkdir $(TARDIR)
|
||||||
|
cp -a . $(TARDIR)
|
||||||
|
$(MAKE) -C $(TARDIR) distclean
|
||||||
|
$(MAKE) -C $(TARDIR)
|
||||||
|
$(MAKE) -C $(TARDIR) distclean
|
||||||
|
$(RM) -r $(TARDIR)/doc/registry
|
||||||
|
env GZIP=-9 tar -C `dirname $(TARDIR)` -cvzf $(TARBALL) `basename $(TARDIR)`
|
||||||
|
|
||||||
|
src/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h include/GL/glxew.h
|
||||||
|
$(CC) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
134
auto/Makefile
Normal file
134
auto/Makefile
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
## The OpenGL Extension Wrangler Library
|
||||||
|
## Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
|
||||||
|
## Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
## Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
|
||||||
|
## All rights reserved.
|
||||||
|
##
|
||||||
|
## Redistribution and use in source and binary forms, with or without
|
||||||
|
## modification, are permitted provided that the following conditions are met:
|
||||||
|
##
|
||||||
|
## * Redistributions of source code must retain the above copyright notice,
|
||||||
|
## this list of conditions and the following disclaimer.
|
||||||
|
## * Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
## this list of conditions and the following disclaimer in the documentation
|
||||||
|
## and/or other materials provided with the distribution.
|
||||||
|
## * The name of the author may be used to endorse or promote products
|
||||||
|
## derived from this software without specific prior written permission.
|
||||||
|
##
|
||||||
|
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
## THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
SHELL := bash
|
||||||
|
REGISTRY := registry
|
||||||
|
BIN := bin
|
||||||
|
SRC := src
|
||||||
|
CORE := core
|
||||||
|
EXT := extensions
|
||||||
|
BLACKLIST := blacklist
|
||||||
|
|
||||||
|
PARSE_SPEC := parse_spec.pl
|
||||||
|
|
||||||
|
TOP := ..
|
||||||
|
I.DEST := $(TOP)/include/GL
|
||||||
|
S.DEST := $(TOP)/src
|
||||||
|
|
||||||
|
TARGETS = $(I.DEST)/glew.h $(I.DEST)/wglew.h $(I.DEST)/glxew.h $(S.DEST)/glew.c $(S.DEST)/glewinfo.c
|
||||||
|
|
||||||
|
all: $(TARGETS)
|
||||||
|
|
||||||
|
ext: $(EXT)/.dummy
|
||||||
|
|
||||||
|
$(REGISTRY)/.dummy: $(BIN)/update_registry.sh
|
||||||
|
$(BIN)/update_registry.sh $(REGISTRY)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(EXT)/.dummy: $(REGISTRY)/.dummy
|
||||||
|
test -d $(EXT) || mkdir $(EXT)
|
||||||
|
$(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST)
|
||||||
|
ls -1 $(CORE)/* | grep -v VERSION | xargs cp --target-directory=$(EXT)
|
||||||
|
touch $@
|
||||||
|
|
||||||
|
$(I.DEST)/glew.h: $(EXT)/.dummy
|
||||||
|
cp -f $(SRC)/glew_pre.h $@
|
||||||
|
$(BIN)/make_header.pl GLAPIENTRY $(CORE)/GL_VERSION* >> $@
|
||||||
|
mv $@ tmp; grep -v 'PFNGLBLENDCOLORPROC' tmp | \
|
||||||
|
grep -v 'PFNGLBLENDEQUATIONPROC' | grep -v 'glBlendColor' | \
|
||||||
|
grep -v 'glBlendEquation' > $@; rm tmp;
|
||||||
|
$(BIN)/make_header.pl GLAPIENTRY $(EXT)/GL_* >> $@
|
||||||
|
cat $(SRC)/glew_post.h >> $@
|
||||||
|
|
||||||
|
$(I.DEST)/wglew.h: $(EXT)/.dummy
|
||||||
|
cp -f $(SRC)/wglew_pre.h $@
|
||||||
|
$(BIN)/make_header.pl WINAPI $(EXT)/WGL_* >> $@
|
||||||
|
cat $(SRC)/wglew_post.h >> $@
|
||||||
|
|
||||||
|
$(I.DEST)/glxew.h: $(EXT)/.dummy
|
||||||
|
cp -f $(SRC)/glxew_pre.h $@
|
||||||
|
$(BIN)/make_header.pl '' $(CORE)/GLX_VERSION* >> $@
|
||||||
|
$(BIN)/make_header.pl '' $(EXT)/GLX_* >> $@
|
||||||
|
cat $(SRC)/glxew_post.h >> $@
|
||||||
|
$(BIN)/fix_OML_sync_control.sh $@
|
||||||
|
|
||||||
|
$(S.DEST)/glew.c: $(EXT)/.dummy
|
||||||
|
cp -f $(SRC)/glew_pre.c $@
|
||||||
|
$(BIN)/make_init.pl $(CORE)/GL_VERSION* >> $@
|
||||||
|
mv $@ tmp; grep -v 'PFNGLBLENDCOLORPROC' tmp | \
|
||||||
|
grep -v 'PFNGLBLENDEQUATIONPROC' | grep -v 'glBlendColor' | \
|
||||||
|
grep -v 'glBlendEquation' > $@; rm tmp;
|
||||||
|
$(BIN)/make_init.pl $(EXT)/GL_* >> $@
|
||||||
|
echo -e "#ifdef _WIN32\n" >> $@
|
||||||
|
$(BIN)/make_init.pl $(EXT)/WGL_* >> $@
|
||||||
|
echo -e "#else /* _UNIX */\n\n" >> $@
|
||||||
|
cat $(SRC)/glew_init_glx.c >> $@
|
||||||
|
$(BIN)/make_init.pl $(CORE)/GLX_VERSION* >> $@
|
||||||
|
$(BIN)/make_init.pl $(EXT)/GLX_* >> $@
|
||||||
|
echo -e "#endif /* _WIN32 */\n" >> $@
|
||||||
|
|
||||||
|
cat $(SRC)/glew_gl.c >> $@
|
||||||
|
$(BIN)/make_list.pl $(CORE)/GL_VERSION* | grep -v '\"GL_VERSION' >> $@
|
||||||
|
$(BIN)/make_list.pl $(EXT)/GL_* >> $@
|
||||||
|
cat $(SRC)/glew_wgl.c >> $@
|
||||||
|
$(BIN)/make_list.pl $(EXT)/WGL_* >> $@
|
||||||
|
cat $(SRC)/glew_glx.c >> $@
|
||||||
|
$(BIN)/make_list.pl $(CORE)/GLX_VERSION_1_3 | grep -v '\"GLX_VERSION' >> $@
|
||||||
|
$(BIN)/make_list.pl $(EXT)/GLX_* >> $@
|
||||||
|
cat $(SRC)/glew_post.c >> $@
|
||||||
|
$(BIN)/fix_OML_sync_control.sh $@
|
||||||
|
|
||||||
|
$(S.DEST)/glewinfo.c: $(EXT)/.dummy
|
||||||
|
cp -f $(SRC)/glewinfo_pre.c $@
|
||||||
|
$(BIN)/make_info.pl $(CORE)/GL_VERSION* >> $@
|
||||||
|
$(BIN)/make_info.pl $(EXT)/GL_* >> $@
|
||||||
|
echo -e "#ifdef _WIN32\n" >> $@
|
||||||
|
$(BIN)/make_info.pl $(EXT)/WGL_* >> $@
|
||||||
|
echo -e "#else /* _UNIX */\n" >> $@
|
||||||
|
$(BIN)/make_info.pl $(CORE)/GLX_VERSION* >> $@
|
||||||
|
$(BIN)/make_info.pl $(EXT)/GLX_* >> $@
|
||||||
|
echo -e "#endif /* _WIN32 */\n" >> $@
|
||||||
|
|
||||||
|
cat $(SRC)/glewinfo_gl.c >> $@
|
||||||
|
$(BIN)/make_info_list.pl $(CORE)/GL_VERSION* >> $@
|
||||||
|
$(BIN)/make_info_list.pl $(EXT)/GL_* >> $@
|
||||||
|
cat $(SRC)/glewinfo_wgl.c >> $@
|
||||||
|
$(BIN)/make_info_list.pl $(EXT)/WGL_* >> $@
|
||||||
|
cat $(SRC)/glewinfo_glx.c >> $@
|
||||||
|
$(BIN)/make_info_list.pl $(CORE)/GLX_VERSION* >> $@
|
||||||
|
$(BIN)/make_info_list.pl $(EXT)/GLX_* >> $@
|
||||||
|
cat $(SRC)/glewinfo_post.c >> $@
|
||||||
|
$(BIN)/fix_OML_sync_control.sh $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(TARGETS)
|
||||||
|
rm -rf $(EXT)
|
||||||
|
|
||||||
|
clobber: clean
|
||||||
|
rm -rf $(REGISTRY)
|
2
auto/bin/fix_OML_sync_control.sh
Executable file
2
auto/bin/fix_OML_sync_control.sh
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
sed -i -e 's/#ifndef GLX_OML_sync_control/#if !defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include <inttypes.h>/' $1
|
||||||
|
sed -i -e 's/#ifdef GLX_OML_sync_control/#if defined(GLX_OML_sync_control) \&\& defined(__STDC_VERSION__) \&\& (__STDC_VERSION__ >= 199901L)\n#include <inttypes.h>/' $1
|
153
auto/bin/make.pl
Executable file
153
auto/bin/make.pl
Executable file
@ -0,0 +1,153 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.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.
|
||||||
|
|
||||||
|
my %regex = (
|
||||||
|
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
|
||||||
|
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
|
||||||
|
token => qr/^([A-Z][A-Z0-9_]*)\s+((?:0x)?[0-9A-F]+)$/,
|
||||||
|
type => qr/^typedef\s+(.+)\s+([\*A-Za-z0-9_]+)$/,
|
||||||
|
exact => qr/.*;$/,
|
||||||
|
);
|
||||||
|
|
||||||
|
# prefix function name with glew
|
||||||
|
sub prefixname($)
|
||||||
|
{
|
||||||
|
my $name = $_[0];
|
||||||
|
$name =~ s/^(.*)gl/$1glew/;
|
||||||
|
return $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
sub make_exact($)
|
||||||
|
{
|
||||||
|
return "$_[0]"
|
||||||
|
}
|
||||||
|
|
||||||
|
sub make_separator($)
|
||||||
|
{
|
||||||
|
my $extname = $_[0];
|
||||||
|
my $l = length $extname;
|
||||||
|
my $s = (71 - $l)/2;
|
||||||
|
print "/* ";
|
||||||
|
my $j = 3;
|
||||||
|
for (my $i = 0; $i < $s; $i++)
|
||||||
|
{
|
||||||
|
print "-";
|
||||||
|
$j++;
|
||||||
|
}
|
||||||
|
print " $_[0] ";
|
||||||
|
$j += $l + 2;
|
||||||
|
while ($j < 76)
|
||||||
|
{
|
||||||
|
print "-";
|
||||||
|
$j++;
|
||||||
|
}
|
||||||
|
print " */\n\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
sub parse_ext($)
|
||||||
|
{
|
||||||
|
my $filename = shift;
|
||||||
|
my %functions = ();
|
||||||
|
my %tokens = ();
|
||||||
|
my %types = ();
|
||||||
|
my @exacts = ();
|
||||||
|
my $extname = "";
|
||||||
|
|
||||||
|
open EXT, "<$filename" or return;
|
||||||
|
|
||||||
|
while(<EXT>)
|
||||||
|
{
|
||||||
|
chomp;
|
||||||
|
if (/$regex{extname}/)
|
||||||
|
{
|
||||||
|
$extname = $_;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
elsif (s/^\s+//)
|
||||||
|
{
|
||||||
|
if (/$regex{exact}/)
|
||||||
|
{
|
||||||
|
push @exacts, $_;
|
||||||
|
}
|
||||||
|
elsif (/$regex{type}/)
|
||||||
|
{
|
||||||
|
my ($value, $name) = ($1, $2);
|
||||||
|
$types{$name} = $value;
|
||||||
|
}
|
||||||
|
elsif (/$regex{token}/)
|
||||||
|
{
|
||||||
|
my ($name, $value) = ($1, $2);
|
||||||
|
$tokens{$name} = $value;
|
||||||
|
}
|
||||||
|
elsif (/$regex{function}/)
|
||||||
|
{
|
||||||
|
my ($return, $name, $parms) = ($1, $2, $3);
|
||||||
|
$functions{$name} = {
|
||||||
|
rtype => $return,
|
||||||
|
parms => $parms,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close EXT;
|
||||||
|
|
||||||
|
return ($extname, \%types, \%tokens, \%functions, \@exacts);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub output_tokens($$)
|
||||||
|
{
|
||||||
|
my ($tbl, $fnc) = @_;
|
||||||
|
if (keys %{$tbl})
|
||||||
|
{
|
||||||
|
local $, = "\n";
|
||||||
|
print "\n";
|
||||||
|
print map { &{$fnc}($_, $tbl->{$_}) } sort { hex ${$tbl}{$a} <=> hex ${$tbl}{$b} } keys %{$tbl};
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub output_types($$)
|
||||||
|
{
|
||||||
|
my ($tbl, $fnc) = @_;
|
||||||
|
if (keys %{$tbl})
|
||||||
|
{
|
||||||
|
local $, = "\n";
|
||||||
|
print "\n";
|
||||||
|
print map { &{$fnc}($_, $tbl->{$_}) } sort { ${$tbl}{$a} cmp ${$tbl}{$b} } keys %{$tbl};
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub output_decls($$)
|
||||||
|
{
|
||||||
|
my ($tbl, $fnc) = @_;
|
||||||
|
if (keys %{$tbl})
|
||||||
|
{
|
||||||
|
local $, = "\n";
|
||||||
|
print "\n";
|
||||||
|
print map { &{$fnc}($_, $tbl->{$_}) } sort keys %{$tbl};
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub output_exacts($$)
|
||||||
|
{
|
||||||
|
my ($tbl, $fnc) = @_;
|
||||||
|
if (scalar @{$tbl})
|
||||||
|
{
|
||||||
|
local $, = "\n";
|
||||||
|
print "\n";
|
||||||
|
print map { &{$fnc}($_) } sort @{$tbl};
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
80
auto/bin/make_header.pl
Executable file
80
auto/bin/make_header.pl
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
#
|
||||||
|
# This program is distributed under the terms and conditions of the GNU
|
||||||
|
# General Public License Version 2 as published by the Free Software
|
||||||
|
# Foundation or, at your option, any later version.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
do 'bin/make.pl';
|
||||||
|
|
||||||
|
# token
|
||||||
|
sub make_define($$)
|
||||||
|
{
|
||||||
|
return "#define $_[0] $_[1]"
|
||||||
|
}
|
||||||
|
|
||||||
|
# type declaration
|
||||||
|
sub make_type($$)
|
||||||
|
{
|
||||||
|
return "typedef $_[1] $_[0];"
|
||||||
|
}
|
||||||
|
|
||||||
|
# function pointer type declaration
|
||||||
|
sub make_pfn_type($%)
|
||||||
|
{
|
||||||
|
our $api;
|
||||||
|
return join('', "typedef ", $_[1]->{rtype},
|
||||||
|
" ($api * PFN" . (uc $_[0]) . "PROC) ",
|
||||||
|
"(" . $_[1]->{parms} . ")") . ";";
|
||||||
|
}
|
||||||
|
|
||||||
|
# function name alias
|
||||||
|
sub make_pfn_alias($%)
|
||||||
|
{
|
||||||
|
return join(" ", "#define", $_[0], prefixname($_[0]))
|
||||||
|
}
|
||||||
|
|
||||||
|
# function pointer declaration
|
||||||
|
sub make_pfn_decl($%)
|
||||||
|
{
|
||||||
|
return "GLEWAPI PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . ";";
|
||||||
|
}
|
||||||
|
|
||||||
|
my @extlist = ();
|
||||||
|
my %extensions = ();
|
||||||
|
|
||||||
|
our $api = shift;
|
||||||
|
|
||||||
|
if (@ARGV)
|
||||||
|
{
|
||||||
|
@extlist = @ARGV;
|
||||||
|
} else {
|
||||||
|
local $/;
|
||||||
|
@extlist = split "\n", (<>);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $ext (sort @extlist)
|
||||||
|
{
|
||||||
|
my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext);
|
||||||
|
|
||||||
|
make_separator($extname);
|
||||||
|
print "#ifndef $extname\n#define $extname 1\n";
|
||||||
|
output_tokens($tokens, \&make_define);
|
||||||
|
output_types($types, \&make_type);
|
||||||
|
output_exacts($exacts, \&make_exact);
|
||||||
|
output_decls($functions, \&make_pfn_type);
|
||||||
|
output_decls($functions, \&make_pfn_decl);
|
||||||
|
output_decls($functions, \&make_pfn_alias);
|
||||||
|
|
||||||
|
my $extvar = $extname;
|
||||||
|
my $extvardef = $extname;
|
||||||
|
$extvar =~ s/GL(X*)_/GL$1EW_/;
|
||||||
|
$extvardef=~ s/(W*)GL(X*)_/\l$1gl\l$2ew_/;
|
||||||
|
print "\nGLEWAPI GLboolean $extvar;\n";
|
||||||
|
print "#define $extvardef $extvar\n\n";
|
||||||
|
print "#endif /* $extname */\n\n";
|
||||||
|
}
|
49
auto/bin/make_info.pl
Executable file
49
auto/bin/make_info.pl
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
#
|
||||||
|
# This program is distributed under the terms and conditions of the GNU
|
||||||
|
# General Public License Version 2 as published by the Free Software
|
||||||
|
# Foundation or, at your option, any later version.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
do 'bin/make.pl';
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# function pointer definition
|
||||||
|
sub make_pfn_info($%)
|
||||||
|
{
|
||||||
|
my $name = prefixname($_[0]);
|
||||||
|
return " glewInfoFunc(\"$_[0]\", $name == NULL);";
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
my @extlist = ();
|
||||||
|
my %extensions = ();
|
||||||
|
|
||||||
|
if (@ARGV)
|
||||||
|
{
|
||||||
|
@extlist = @ARGV;
|
||||||
|
} else {
|
||||||
|
local $/;
|
||||||
|
@extlist = split "\n", (<>);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $ext (sort @extlist)
|
||||||
|
{
|
||||||
|
my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext);
|
||||||
|
my $extvar = $extname;
|
||||||
|
my $extvardef = $extname;
|
||||||
|
$extvar =~ s/GL(X*)_/GL$1EW_/;
|
||||||
|
|
||||||
|
make_separator($extname);
|
||||||
|
print "#ifdef $extname\n\n";
|
||||||
|
print "static void _glewInfo_$extname (void)\n{\n glewPrintExt(\"$extname\", $extvar);\n";
|
||||||
|
output_decls($functions, \&make_pfn_info);
|
||||||
|
print "}\n\n";
|
||||||
|
print "#endif /* $extname */\n\n";
|
||||||
|
}
|
49
auto/bin/make_info_list.pl
Executable file
49
auto/bin/make_info_list.pl
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
#
|
||||||
|
# This program is distributed under the terms and conditions of the GNU
|
||||||
|
# General Public License Version 2 as published by the Free Software
|
||||||
|
# Foundation or, at your option, any later version.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
do 'bin/make.pl';
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# function pointer definition
|
||||||
|
sub make_pfn_def($%)
|
||||||
|
{
|
||||||
|
return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
|
||||||
|
}
|
||||||
|
|
||||||
|
# function pointer definition
|
||||||
|
sub make_init_call($%)
|
||||||
|
{
|
||||||
|
my $name = prefixname($_[0]);
|
||||||
|
return " r = r || (" . $name . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress(\"" . $name . "\")) == NULL;";
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
my @extlist = ();
|
||||||
|
my %extensions = ();
|
||||||
|
|
||||||
|
if (@ARGV)
|
||||||
|
{
|
||||||
|
@extlist = @ARGV;
|
||||||
|
} else {
|
||||||
|
local $/;
|
||||||
|
@extlist = split "\n", (<>);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $ext (sort @extlist)
|
||||||
|
{
|
||||||
|
my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext);
|
||||||
|
|
||||||
|
print "#ifdef $extname\n";
|
||||||
|
print " _glewInfo_$extname();\n";
|
||||||
|
print "#endif /* $extname */\n";
|
||||||
|
}
|
64
auto/bin/make_init.pl
Executable file
64
auto/bin/make_init.pl
Executable file
@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
#
|
||||||
|
# This program is distributed under the terms and conditions of the GNU
|
||||||
|
# General Public License Version 2 as published by the Free Software
|
||||||
|
# Foundation or, at your option, any later version.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
do 'bin/make.pl';
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# function pointer definition
|
||||||
|
sub make_pfn_def($%)
|
||||||
|
{
|
||||||
|
return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
|
||||||
|
}
|
||||||
|
|
||||||
|
# function pointer definition
|
||||||
|
sub make_pfn_def_init($%)
|
||||||
|
{
|
||||||
|
my $name = prefixname($_[0]);
|
||||||
|
return " r = r || (" . $name . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress(\"" . $_[0] . "\")) == NULL;";
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
my @extlist = ();
|
||||||
|
my %extensions = ();
|
||||||
|
|
||||||
|
if (@ARGV)
|
||||||
|
{
|
||||||
|
@extlist = @ARGV;
|
||||||
|
} else {
|
||||||
|
local $/;
|
||||||
|
@extlist = split "\n", (<>);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $ext (sort @extlist)
|
||||||
|
{
|
||||||
|
my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext);
|
||||||
|
|
||||||
|
make_separator($extname);
|
||||||
|
print "#ifdef $extname\n";
|
||||||
|
if (keys %$functions)
|
||||||
|
{
|
||||||
|
output_decls($functions, \&make_pfn_def);
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
my $extvar = $extname;
|
||||||
|
my $extvardef = $extname;
|
||||||
|
$extvar =~ s/GL(X*)_/GL$1EW_/;
|
||||||
|
if (keys %$functions)
|
||||||
|
{
|
||||||
|
print "static GLboolean _glewInit_$extname (void)\n{\n GLboolean r = GL_FALSE;\n";
|
||||||
|
output_decls($functions, \&make_pfn_def_init);
|
||||||
|
print "\n return r;\n}\n";
|
||||||
|
}
|
||||||
|
print "\nGLboolean $extvar = GL_FALSE;\n\n";
|
||||||
|
print "#endif /* $extname */\n\n";
|
||||||
|
}
|
56
auto/bin/make_list.pl
Executable file
56
auto/bin/make_list.pl
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
#
|
||||||
|
# This program is distributed under the terms and conditions of the GNU
|
||||||
|
# General Public License Version 2 as published by the Free Software
|
||||||
|
# Foundation or, at your option, any later version.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
do 'bin/make.pl';
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# function pointer definition
|
||||||
|
sub make_pfn_def($%)
|
||||||
|
{
|
||||||
|
return "PFN" . (uc $_[0]) . "PROC " . prefixname($_[0]) . " = NULL;";
|
||||||
|
}
|
||||||
|
|
||||||
|
# function pointer definition
|
||||||
|
sub make_init_call($%)
|
||||||
|
{
|
||||||
|
my $name = prefixname($_[0]);
|
||||||
|
return " r = r || (" . $name . " = (PFN" . (uc $_[0]) . "PROC)glewGetProcAddress(\"" . $name . "\")) == NULL;";
|
||||||
|
}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
my @extlist = ();
|
||||||
|
my %extensions = ();
|
||||||
|
|
||||||
|
if (@ARGV)
|
||||||
|
{
|
||||||
|
@extlist = @ARGV;
|
||||||
|
} else {
|
||||||
|
local $/;
|
||||||
|
@extlist = split "\n", (<>);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $ext (sort @extlist)
|
||||||
|
{
|
||||||
|
my ($extname, $types, $tokens, $functions, $exacts) = parse_ext($ext);
|
||||||
|
|
||||||
|
my $extvar = $extname;
|
||||||
|
$extvar =~ s/GL(X*)_/GL$1EW_/;
|
||||||
|
|
||||||
|
print "#ifdef $extname\n";
|
||||||
|
print " $extvar = glewGetExtension(\"$extname\");\n";
|
||||||
|
if (keys %$functions)
|
||||||
|
{
|
||||||
|
print " if (glewExperimental || $extvar) $extvar = !_glewInit_$extname();\n";
|
||||||
|
}
|
||||||
|
print "#endif /* $extname */\n";
|
||||||
|
}
|
298
auto/bin/parse_spec.pl
Executable file
298
auto/bin/parse_spec.pl
Executable file
@ -0,0 +1,298 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003 Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
#
|
||||||
|
# This program is distributed under the terms and conditions of the GNU
|
||||||
|
# General Public License Version 2 as published by the Free Software
|
||||||
|
# Foundation or, at your option, any later version.
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
sub compile_regex
|
||||||
|
{
|
||||||
|
my $regex = join('', @_);
|
||||||
|
return qr/$regex/
|
||||||
|
}
|
||||||
|
|
||||||
|
my @sections = (
|
||||||
|
"Name",
|
||||||
|
"Name Strings?",
|
||||||
|
"New Procedures and Functions",
|
||||||
|
"New Tokens",
|
||||||
|
);
|
||||||
|
|
||||||
|
my %typemap = (
|
||||||
|
bitfield => "GLbitfield",
|
||||||
|
boolean => "GLboolean",
|
||||||
|
# fsck up in EXT_vertex_array
|
||||||
|
Boolean => "GLboolean",
|
||||||
|
byte => "GLbyte",
|
||||||
|
clampd => "GLclampd",
|
||||||
|
clampf => "GLclampf",
|
||||||
|
double => "GLdouble",
|
||||||
|
enum => "GLenum",
|
||||||
|
# Intel fsck up
|
||||||
|
Glenum => "GLenum",
|
||||||
|
float => "GLfloat",
|
||||||
|
half => "GLuint",
|
||||||
|
int => "GLint",
|
||||||
|
short => "GLshort",
|
||||||
|
sizei => "GLsizei",
|
||||||
|
ubyte => "GLubyte",
|
||||||
|
uint => "GLuint",
|
||||||
|
ushort => "GLushort",
|
||||||
|
DMbuffer => "void *",
|
||||||
|
|
||||||
|
# ARB VBO introduces this, no idea how to handle it properly. The spec
|
||||||
|
# file babbles about how great this will be on 64 bit systems, but doesn't
|
||||||
|
# actually say how to define this nor how to detect that this has been
|
||||||
|
# defined (i.e., is this tied to the VBO spec or not?). For now I'll just
|
||||||
|
# use GLEWtype and have it defined in a preamble. (mem, 2003-03-23)
|
||||||
|
|
||||||
|
sizeiptrARB => "GLsizeiptrARB",
|
||||||
|
intptrARB => "GLintptrARB",
|
||||||
|
|
||||||
|
# GLX 1.3 defines new types which might not be available at compile time
|
||||||
|
|
||||||
|
#GLXFBConfig => "void*",
|
||||||
|
#GLXFBConfigID => "XID",
|
||||||
|
#GLXContextID => "XID",
|
||||||
|
#GLXWindow => "XID",
|
||||||
|
#GLXPbuffer => "XID",
|
||||||
|
|
||||||
|
# Weird stuff to some SGIX extension
|
||||||
|
|
||||||
|
#GLXFBConfigSGIX => "void*",
|
||||||
|
#GLXFBConfigIDSGIX => "XID",
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
my %voidtypemap = (
|
||||||
|
void => "GLvoid ",
|
||||||
|
);
|
||||||
|
|
||||||
|
my %taboo_tokens = (
|
||||||
|
GL_ZERO => 1,
|
||||||
|
);
|
||||||
|
|
||||||
|
# list of function definitions to be ignored, unless they are being defined in
|
||||||
|
# the given spec. This is an ugly hack arround the fact that people writing
|
||||||
|
# spec files seem to shut down all brain activity while they are at this task.
|
||||||
|
#
|
||||||
|
# This will be moved to its own file eventually.
|
||||||
|
#
|
||||||
|
# (mem, 2003-03-19)
|
||||||
|
|
||||||
|
my %fnc_ignore_list = (
|
||||||
|
"BindProgramARB" => "ARB_vertex_program",
|
||||||
|
"ColorSubTableEXT" => "EXT_color_subtable",
|
||||||
|
"DeleteProgramsARB" => "ARB_vertex_program",
|
||||||
|
"GenProgramsARB" => "ARB_vertex_program",
|
||||||
|
"GetProgramEnvParameterdvARB" => "ARB_vertex_program",
|
||||||
|
"GetProgramEnvParameterfvARB" => "ARB_vertex_program",
|
||||||
|
"GetProgramLocalParameterdvARB" => "ARB_vertex_program",
|
||||||
|
"GetProgramLocalParameterfvARB" => "ARB_vertex_program",
|
||||||
|
"GetProgramStringARB" => "ARB_vertex_program",
|
||||||
|
"GetProgramivARB" => "ARB_vertex_program",
|
||||||
|
"IsProgramARB" => "ARB_vertex_program",
|
||||||
|
"ProgramEnvParameter4dARB" => "ARB_vertex_program",
|
||||||
|
"ProgramEnvParameter4dvARB" => "ARB_vertex_program",
|
||||||
|
"ProgramEnvParameter4fARB" => "ARB_vertex_program",
|
||||||
|
"ProgramEnvParameter4fvARB" => "ARB_vertex_program",
|
||||||
|
"ProgramLocalParameter4dARB" => "ARB_vertex_program",
|
||||||
|
"ProgramLocalParameter4dvARB" => "ARB_vertex_program",
|
||||||
|
"ProgramLocalParameter4fARB" => "ARB_vertex_program",
|
||||||
|
"ProgramLocalParameter4fvARB" => "ARB_vertex_program",
|
||||||
|
"ProgramStringARB" => "ARB_vertex_program",
|
||||||
|
);
|
||||||
|
|
||||||
|
my %regex = (
|
||||||
|
eofnc => qr/(?:\);?$|^$)/, # ); $|^$
|
||||||
|
extname => qr/^[A-Z][A-Za-z0-9_]+$/,
|
||||||
|
function => qr/^(.+) ([a-z][a-z0-9_]*) \((.+)\)$/i,
|
||||||
|
prefix => qr/^(?:[aw]?gl|glX)/, # (agl,wgl,glX) + cluster wo/ capturing
|
||||||
|
tprefix => qr/^(?:[AW]?GL|GLX)_/, # (AGL,WGL,GLX) + cluster wo/ capturing
|
||||||
|
section => compile_regex('^(', join('|', @sections), ')$'), # sections in spec
|
||||||
|
token => qr/^([A-Z][A-Z0-9_]*):?\s+((?:0x)?[0-9A-F]+)(.*)$/, # define tokens
|
||||||
|
types => compile_regex('\b(', join('|', keys %typemap), ')\b'), # var types
|
||||||
|
voidtype => compile_regex('\b(', keys %voidtypemap, ')\b '), # void type
|
||||||
|
);
|
||||||
|
|
||||||
|
# reshapes the the function declaration from multiline to single line form
|
||||||
|
sub normalize_prototype
|
||||||
|
{
|
||||||
|
my $fnc = join(" ", @_);
|
||||||
|
$fnc =~ s/\s+/ /g;
|
||||||
|
$fnc =~ s/\s*\(\s*/ \(/;
|
||||||
|
$fnc =~ s/\s*\)\s*/\)/;
|
||||||
|
$fnc =~ s/\*wgl/\* wgl/;
|
||||||
|
$fnc =~ s/\*glX/\* glX/;
|
||||||
|
$fnc =~ s/\.\.\./void/;
|
||||||
|
$fnc =~ s/;$//;
|
||||||
|
return $fnc;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ugly hack to work arround the fact that functions are declared in more
|
||||||
|
# than one spec file.
|
||||||
|
sub ignore_function($$)
|
||||||
|
{
|
||||||
|
return exists($fnc_ignore_list{$_[0]}) && $fnc_ignore_list{$_[0]} ne $_[1]
|
||||||
|
}
|
||||||
|
|
||||||
|
sub parse_spec($)
|
||||||
|
{
|
||||||
|
my $filename = shift;
|
||||||
|
my $extname = "";
|
||||||
|
my $vendortag = "";
|
||||||
|
my @extnames = ();
|
||||||
|
my %functions = ();
|
||||||
|
my %tokens = ();
|
||||||
|
|
||||||
|
my $section = "";
|
||||||
|
my @fnc = ();
|
||||||
|
|
||||||
|
my %proc = (
|
||||||
|
"Name" => sub {
|
||||||
|
if (/^([a-z0-9]+)_([a-z0-9_]+)/i)
|
||||||
|
{
|
||||||
|
$extname = "$1_$2";
|
||||||
|
$vendortag = $1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"Name Strings" => sub {
|
||||||
|
# Add extension name to extension list
|
||||||
|
# Does this look even plausible?
|
||||||
|
push @extnames, $_ if (/$regex{extname}/)
|
||||||
|
},
|
||||||
|
|
||||||
|
"New Procedures and Functions" => sub {
|
||||||
|
# if line matches end of function
|
||||||
|
if (/$regex{eofnc}/)
|
||||||
|
{
|
||||||
|
# add line to function list
|
||||||
|
push @fnc, $_;
|
||||||
|
|
||||||
|
#my $f = normalize_prototype(@fnc);
|
||||||
|
#print STDERR "$f\n";
|
||||||
|
|
||||||
|
# if normalized version of function looks like a function
|
||||||
|
if (normalize_prototype(@fnc) =~ /$regex{function}/)
|
||||||
|
{
|
||||||
|
# get return type, name, and arguments, add them to functions hash
|
||||||
|
my ($return, $name, $parms) = ($1, $2, $3);
|
||||||
|
# print STDERR "$1 | $2 | $3\n";
|
||||||
|
if (!ignore_function($name, $extname))
|
||||||
|
{
|
||||||
|
$name =~ s/^/gl/ unless $name =~ /$regex{prefix}/;
|
||||||
|
if ($name =~ /^gl/ && $name !~ /^glX/)
|
||||||
|
{
|
||||||
|
$return =~ s/$regex{types}/$typemap{$1}/og;
|
||||||
|
$parms =~ s/$regex{types}/$typemap{$1}/og;
|
||||||
|
$parms =~ s/$regex{voidtype}/$voidtypemap{$1}/og;
|
||||||
|
}
|
||||||
|
$functions{$name} = {
|
||||||
|
rtype => $return,
|
||||||
|
parms => $parms,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# reset function list
|
||||||
|
@fnc = ();
|
||||||
|
} elsif ($_ ne "" and $_ ne "None") {
|
||||||
|
# if not eof, add line to function list
|
||||||
|
push @fnc, $_
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"New Tokens" => sub {
|
||||||
|
if (/$regex{token}/)
|
||||||
|
{
|
||||||
|
my ($name, $value) = ($1, $2);
|
||||||
|
#print STDERR "TOKEN: $1 | $2\n";
|
||||||
|
# Prepend name with GL_, unless it is already prepended
|
||||||
|
$name =~ s/^/GL_/ unless $name =~ /$regex{tprefix}/;
|
||||||
|
# Add (name, value) pair to tokens hash, unless it's in taboo_tokens
|
||||||
|
$tokens{$name} = $value unless exists $taboo_tokens{$name};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
# Some people can't read
|
||||||
|
$proc{"Name String"} = $proc{"Name Strings"};
|
||||||
|
|
||||||
|
# Open spec file
|
||||||
|
open SPEC, "<$filename" or return;
|
||||||
|
|
||||||
|
# For each line of SPEC
|
||||||
|
while(<SPEC>)
|
||||||
|
{
|
||||||
|
# Delete trailing newline character
|
||||||
|
chomp;
|
||||||
|
# Remove trailing white spaces
|
||||||
|
s/\s+$//;
|
||||||
|
# If starts with a capital letter, it must be a new section
|
||||||
|
if (/^[A-Z]/)
|
||||||
|
{
|
||||||
|
# Match section name with one of the predefined names
|
||||||
|
$section = /$regex{section}/ ? $1 : "default";
|
||||||
|
} else {
|
||||||
|
# If it's an internal line to a section, call the
|
||||||
|
# appropriate section processing function if it exists
|
||||||
|
# Remove whitespaces from the beginning of the line
|
||||||
|
s/^\s+//;
|
||||||
|
# Call appropriate processing function
|
||||||
|
&{$proc{$section}} if exists $proc{$section};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
close SPEC;
|
||||||
|
|
||||||
|
return ($extname, \@extnames, \%tokens, \%functions);
|
||||||
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
my @speclist = ();
|
||||||
|
my %extensions = ();
|
||||||
|
|
||||||
|
my $ext_dir = shift;
|
||||||
|
|
||||||
|
# Take command line arguments or read list from file
|
||||||
|
if (@ARGV)
|
||||||
|
{
|
||||||
|
@speclist = @ARGV;
|
||||||
|
} else {
|
||||||
|
local $/; #???
|
||||||
|
@speclist = split "\n", (<>);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $spec (sort @speclist)
|
||||||
|
{
|
||||||
|
my ($extname, $extnames, $tokens, $functions) = parse_spec($spec);
|
||||||
|
|
||||||
|
foreach my $ext (@{$extnames})
|
||||||
|
{
|
||||||
|
my $info = "$ext_dir/" . $ext;
|
||||||
|
open EXT, ">$info";
|
||||||
|
print EXT $ext . "\n";
|
||||||
|
my $prefix = $ext;
|
||||||
|
$prefix =~ s/^(.+?)(_.+)$/$1/;
|
||||||
|
foreach my $token (sort { hex ${$tokens}{$a} <=> hex ${$tokens}{$b} } keys %{$tokens})
|
||||||
|
{
|
||||||
|
if ($token =~ /^$prefix.*/i)
|
||||||
|
{
|
||||||
|
print EXT "\t" . $token . " " . ${%{$tokens}}{$token} . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach my $function (sort keys %{$functions})
|
||||||
|
{
|
||||||
|
if ($function =~ /^$prefix.*/i)
|
||||||
|
{
|
||||||
|
print EXT "\t" . ${$functions}{$function}{rtype} . " " . $function . " (" . ${$functions}{$function}{parms} . ")" . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close EXT;
|
||||||
|
}
|
||||||
|
}
|
51
auto/bin/update_ext.sh
Executable file
51
auto/bin/update_ext.sh
Executable file
@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -d $1 ] ; then
|
||||||
|
mkdir $1
|
||||||
|
find $2 -name doc -type d -prune -o -name \*.txt -print | \
|
||||||
|
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 $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 $1/GLX_EXT_visual_info $1/GLX_EXT_visual_rating > tmp; \
|
||||||
|
mv tmp $1/GLX_EXT_visual_rating
|
||||||
|
# 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
|
||||||
|
sed -i -e's/OCCLUSION_TEST_HP.*/OCCLUSION_TEST_HP 0x8165/' \
|
||||||
|
$1/GL_HP_occlusion_test
|
||||||
|
sed -i -e's/OCCLUSION_TEST_RESULT_HP.*/OCCLUSION_TEST_RESULT_HP 0x8166/' \
|
||||||
|
$1/GL_HP_occlusion_test
|
||||||
|
# fix WGL_ATI_pixel_format_float
|
||||||
|
echo -e "\tGL_RGBA_FLOAT_MODE_ATI 0x8820" >> $1/WGL_ATI_pixel_format_float
|
||||||
|
echo -e "\tGL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835" >> $1/WGL_ATI_pixel_format_float
|
||||||
|
# add typedefs to GL_ARB_vertex_buffer_object
|
||||||
|
echo -e "\ttypedef int GLsizeiptrARB" >> $1/GL_ARB_vertex_buffer_object
|
||||||
|
echo -e "\ttypedef int GLintptrARB" >> $1/GL_ARB_vertex_buffer_object
|
||||||
|
# add typedefs to GLX_EXT_import_context
|
||||||
|
echo -e "\ttypedef XID GLXContextID" >> $1/GLX_EXT_import_context
|
||||||
|
# add tokens to GLX_OML_swap_method
|
||||||
|
echo -e "\tGLX_SWAP_EXCHANGE_OML 0x8061" >> $1/GLX_OML_swap_method
|
||||||
|
echo -e "\tGLX_SWAP_COPY_OML 0x8062" >> $1/GLX_OML_swap_method
|
||||||
|
echo -e "\tGLX_SWAP_UNDEFINED_OML 0x8063" >> $1/GLX_OML_swap_method
|
||||||
|
# add typedefs to GLX_SGIX_fbconfig
|
||||||
|
echo -e "\ttypedef XID GLXFBConfigIDSGIX" >> $1/GLX_SGIX_fbconfig
|
||||||
|
echo -e "\ttypedef struct __GLXFBConfigRec *GLXFBConfigSGIX" >> $1/GLX_SGIX_fbconfig
|
||||||
|
# add typedefs to GLX_SGIX_pbuffer
|
||||||
|
echo -e "\ttypedef XID GLXPbufferSGIX" >> $1/GLX_SGIX_pbuffer
|
||||||
|
echo -e "\ttypedef 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" >> $1/GLX_SGIX_pbuffer
|
||||||
|
# add typedef to GL_NV_half_float
|
||||||
|
echo -e "\ttypedef unsigned short GLhalf" >> $1/GL_NV_half_float
|
||||||
|
# add handle to WGL_ARB_pbuffer
|
||||||
|
echo -e "\tDECLARE_HANDLE(HPBUFFERARB);" >> $1/WGL_ARB_pbuffer
|
||||||
|
# add handle to WGL_EXT_pbuffer
|
||||||
|
echo -e "\tDECLARE_HANDLE(HPBUFFEREXT);" >> $1/WGL_EXT_pbuffer
|
||||||
|
# get rid of GL_SUN_multi_draw_arrays
|
||||||
|
rm -f $1/GL_SUN_multi_draw_arrays
|
||||||
|
fi
|
18
auto/bin/update_registry.sh
Executable file
18
auto/bin/update_registry.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ ! -d $1 ] ; then
|
||||||
|
mkdir $1
|
||||||
|
cd $1
|
||||||
|
fi
|
||||||
|
|
||||||
|
wget \
|
||||||
|
--mirror \
|
||||||
|
--no-parent \
|
||||||
|
--no-host-directories \
|
||||||
|
--cut-dirs=3 \
|
||||||
|
--accept=txt,html \
|
||||||
|
http://oss.sgi.com/projects/ogl-sample/registry/
|
||||||
|
|
||||||
|
sed -i -e '7s/\<ATI_/GL_ATI_/' ATI/texture_env_combine3.txt
|
7
auto/blacklist
Normal file
7
auto/blacklist
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
EXT/static_vertex_array.txt
|
||||||
|
EXT/vertex_array_set.alt.txt
|
||||||
|
EXT/vertex_array_set.txt
|
||||||
|
SGIS/texture_color_mask.txt
|
||||||
|
SGIX/dmbuffer.txt
|
||||||
|
SGIX/instruments.txt
|
||||||
|
SGIX/video_source.txt
|
90
auto/src/glew_gl.c
Normal file
90
auto/src/glew_gl.c
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLEW, just like OpenGL or GLU, does not rely on the standard C library.
|
||||||
|
* These functions implement the functionality required in this file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static int _glewStrLen (const char *s)
|
||||||
|
{
|
||||||
|
int i=0;
|
||||||
|
while (s+i != NULL && s[i] != '\0') i++;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int _glewStrCLen (const char *s, char c)
|
||||||
|
{
|
||||||
|
int i=0;
|
||||||
|
while (s+i != NULL && s[i] != '\0' && s[i] != c) i++;
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int _glewStrSame (const char *a, const char *b, int n)
|
||||||
|
{
|
||||||
|
int i=0;
|
||||||
|
while (i < n && a+i != NULL && b+i != NULL && a[i] == b[i]) i++;
|
||||||
|
return i == n;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Search for name in the extensions string. Use of strstr()
|
||||||
|
* is not sufficient because extension names can be prefixes of
|
||||||
|
* other extension names. Could use strtok() but the constant
|
||||||
|
* string returned by glGetString might be in read-only memory.
|
||||||
|
*/
|
||||||
|
GLboolean glewGetExtension (const char *name)
|
||||||
|
{
|
||||||
|
char *p, *end;
|
||||||
|
int len = _glewStrLen(name);
|
||||||
|
p = (char*)glGetString(GL_EXTENSIONS);
|
||||||
|
if (0 == p) return GL_FALSE;
|
||||||
|
end = p + _glewStrLen(p);
|
||||||
|
while (p < end)
|
||||||
|
{
|
||||||
|
int n = _glewStrCLen(p, ' ');
|
||||||
|
if (len == n && _glewStrSame(name, p, n)) return GL_TRUE;
|
||||||
|
p += n+1;
|
||||||
|
}
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
static GLuint _glewInit ()
|
||||||
|
{
|
||||||
|
char* s;
|
||||||
|
int i;
|
||||||
|
/* query opengl version */
|
||||||
|
s = (char*)glGetString(GL_VERSION);
|
||||||
|
if (!s) return GLEW_ERROR_NO_GL_VERSION;
|
||||||
|
i=_glewStrCLen(s, '.')+1;
|
||||||
|
if (s+i == NULL || s[i] < '1')
|
||||||
|
{
|
||||||
|
return GLEW_ERROR_GL_VERSION_10_ONLY;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (s[2] == '4')
|
||||||
|
{
|
||||||
|
GLEW_VERSION_1_1 = GL_TRUE;
|
||||||
|
GLEW_VERSION_1_2 = GL_TRUE;
|
||||||
|
GLEW_VERSION_1_3 = GL_TRUE;
|
||||||
|
GLEW_VERSION_1_4 = GL_TRUE;
|
||||||
|
}
|
||||||
|
if (s[2] == '3')
|
||||||
|
{
|
||||||
|
GLEW_VERSION_1_1 = GL_TRUE;
|
||||||
|
GLEW_VERSION_1_2 = GL_TRUE;
|
||||||
|
GLEW_VERSION_1_3 = GL_TRUE;
|
||||||
|
}
|
||||||
|
if (s[2] == '2')
|
||||||
|
{
|
||||||
|
GLEW_VERSION_1_1 = GL_TRUE;
|
||||||
|
GLEW_VERSION_1_2 = GL_TRUE;
|
||||||
|
}
|
||||||
|
if (s[2] < '2')
|
||||||
|
{
|
||||||
|
GLEW_VERSION_1_1 = GL_TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* initialize extensions */
|
69
auto/src/glew_glx.c
Normal file
69
auto/src/glew_glx.c
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
return GLEW_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else /* _UNIX */
|
||||||
|
|
||||||
|
GLboolean glxewGetExtension (const char *name)
|
||||||
|
{
|
||||||
|
char *p, *end;
|
||||||
|
int len = _glewStrLen(name);
|
||||||
|
#if 1
|
||||||
|
if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) return GL_FALSE;
|
||||||
|
p = (char*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScreen(glXGetCurrentDisplay()));
|
||||||
|
#else
|
||||||
|
/* Temporary fix to avoid using glXGetCurrentDisplay,
|
||||||
|
which crashes GLEW on some configurations. */
|
||||||
|
{
|
||||||
|
Display *dpy;
|
||||||
|
if (glXQueryExtensionsString == NULL) return GL_FALSE;
|
||||||
|
dpy = XOpenDisplay(NULL);
|
||||||
|
if (dpy == NULL) return GL_FALSE;
|
||||||
|
p = (char*)glXQueryExtensionsString(dpy, DefaultScreen(dpy));
|
||||||
|
XCloseDisplay(dpy);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (0 == p) return GL_FALSE;
|
||||||
|
end = p + _glewStrLen(p);
|
||||||
|
while (p < end)
|
||||||
|
{
|
||||||
|
int n = _glewStrCLen(p, ' ');
|
||||||
|
if (len == n && _glewStrSame(name, p, n)) return GL_TRUE;
|
||||||
|
p += n+1;
|
||||||
|
}
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GLuint _glxewInit ()
|
||||||
|
{
|
||||||
|
int major, minor;
|
||||||
|
/* initialize core GLX 1.2 */
|
||||||
|
if (_glewInit_GLX_VERSION_1_2()) return GLEW_ERROR_GLX_VERSION_11_ONLY;
|
||||||
|
/* query GLX version */
|
||||||
|
#if 1
|
||||||
|
glXQueryVersion(glXGetCurrentDisplay(), &major, &minor);
|
||||||
|
#else
|
||||||
|
/* Temporary fix to avoid using glXGetCurrentDisplay,
|
||||||
|
which crashes GLEW on some configurations. */
|
||||||
|
{
|
||||||
|
Display* dpy = XOpenDisplay(NULL);
|
||||||
|
if (dpy == NULL) return GLEW_ERROR_GLX_VERSION_11_ONLY;
|
||||||
|
glXQueryVersion(dpy, &major, &minor);
|
||||||
|
XCloseDisplay(dpy);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
switch (minor)
|
||||||
|
{
|
||||||
|
case 4:
|
||||||
|
GLXEW_VERSION_1_4 = GL_TRUE;
|
||||||
|
case 3:
|
||||||
|
GLXEW_VERSION_1_3 = GL_TRUE;
|
||||||
|
case 2:
|
||||||
|
GLXEW_VERSION_1_2 = GL_TRUE;
|
||||||
|
GLXEW_VERSION_1_1 = GL_TRUE;
|
||||||
|
GLXEW_VERSION_1_0 = GL_TRUE;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return GLEW_ERROR_GLX_VERSION_11_ONLY;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* initialize extensions */
|
16
auto/src/glew_init_glx.c
Normal file
16
auto/src/glew_init_glx.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/* ---------------------------- GLX_VERSION_1_0 ---------------------------- */
|
||||||
|
|
||||||
|
#ifdef GLX_VERSION_1_0
|
||||||
|
|
||||||
|
GLboolean GLXEW_VERSION_1_0 = GL_FALSE;
|
||||||
|
|
||||||
|
#endif /* GLX_VERSION_1_0 */
|
||||||
|
|
||||||
|
/* ---------------------------- GLX_VERSION_1_1 ---------------------------- */
|
||||||
|
|
||||||
|
#ifdef GLX_VERSION_1_1
|
||||||
|
|
||||||
|
GLboolean GLXEW_VERSION_1_1 = GL_FALSE;
|
||||||
|
|
||||||
|
#endif /* GLX_VERSION_1_1 */
|
||||||
|
|
36
auto/src/glew_post.c
Normal file
36
auto/src/glew_post.c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
return GLEW_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
const char* glewGetErrorString (GLuint error)
|
||||||
|
{
|
||||||
|
static const char* _glewErrorString[] =
|
||||||
|
{
|
||||||
|
"no error",
|
||||||
|
"missing GL version",
|
||||||
|
"missing {ARB,EXT}_extensions_string",
|
||||||
|
"GL 1.1 and up are not supported",
|
||||||
|
"GLX 1.2 and up are not supported",
|
||||||
|
"unknown error"
|
||||||
|
};
|
||||||
|
if (error > 5) error = 5;
|
||||||
|
return _glewErrorString[error];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
GLboolean glewExperimental = GL_FALSE;
|
||||||
|
|
||||||
|
GLuint glewInit ()
|
||||||
|
{
|
||||||
|
GLuint r;
|
||||||
|
if ( (r = _glewInit()) ) return r;
|
||||||
|
#ifdef _WIN32
|
||||||
|
return _wglewInit();
|
||||||
|
#else /* _UNIX */
|
||||||
|
return _glxewInit();
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
}
|
39
auto/src/glew_post.h
Normal file
39
auto/src/glew_post.h
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* error codes */
|
||||||
|
#define GLEW_OK 0
|
||||||
|
#define GLEW_ERROR_NO_GL_VERSION 1 /* missing GL version */
|
||||||
|
#define GLEW_ERROR_NO_EXTENSIONS_STRING 2 /* missing {ARB,EXT}_extensions_string */
|
||||||
|
#define GLEW_ERROR_GL_VERSION_10_ONLY 3 /* GL 1.1 and up are not supported */
|
||||||
|
#define GLEW_ERROR_GLX_VERSION_11_ONLY 4 /* GLX 1.2 and up are not supported */
|
||||||
|
|
||||||
|
/* API */
|
||||||
|
GLEWAPI GLboolean glewExperimental;
|
||||||
|
GLEWAPI GLuint glewInit ();
|
||||||
|
GLEWAPI GLboolean glewGetExtension (const char* name);
|
||||||
|
GLEWAPI const char* glewGetErrorString (GLuint error);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GLEW_APIENTRY_DEFINED
|
||||||
|
#undef GLEW_APIENTRY_DEFINED
|
||||||
|
#undef APIENTRY
|
||||||
|
#undef GLAPIENTRY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GLEW_CALLBACK_DEFINED
|
||||||
|
#undef GLEW_CALLBACK_DEFINED
|
||||||
|
#undef CALLBACK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef GLEW_WINGDIAPI_DEFINED
|
||||||
|
#undef GLEW_WINGDIAPI_DEFINED
|
||||||
|
#undef WINGDIAPI
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef GLAPI
|
||||||
|
/* #undef GLEWAPI */
|
||||||
|
|
||||||
|
#endif /* __glew_h__ */
|
49
auto/src/glew_pre.c
Normal file
49
auto/src/glew_pre.c
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
** The OpenGL Extension Wrangler Library
|
||||||
|
** Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
|
||||||
|
** Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
** Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions are met:
|
||||||
|
**
|
||||||
|
** * Redistributions of source code must retain the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer.
|
||||||
|
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer in the documentation
|
||||||
|
** and/or other materials provided with the distribution.
|
||||||
|
** * The name of the author may be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
** THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <GL/wglew.h>
|
||||||
|
#include <GL/glxew.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define glewGetProcAddress(name) wglGetProcAddress(name)
|
||||||
|
#else
|
||||||
|
#define glewGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ----------------------------- GL_VERSION_1_1 ---------------------------- */
|
||||||
|
|
||||||
|
#ifdef GL_VERSION_1_1
|
||||||
|
|
||||||
|
GLboolean GLEW_VERSION_1_1 = GL_FALSE;
|
||||||
|
|
||||||
|
#endif /* GL_VERSION_1_1 */
|
||||||
|
|
1073
auto/src/glew_pre.h
Normal file
1073
auto/src/glew_pre.h
Normal file
File diff suppressed because it is too large
Load Diff
39
auto/src/glew_wgl.c
Normal file
39
auto/src/glew_wgl.c
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
return GLEW_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
GLboolean wglewGetExtension (const char *name)
|
||||||
|
{
|
||||||
|
char *p, *end;
|
||||||
|
int len = _glewStrLen(name);
|
||||||
|
if (wglGetExtensionsStringARB == NULL)
|
||||||
|
if (wglGetExtensionsStringEXT == NULL)
|
||||||
|
return GL_FALSE;
|
||||||
|
else
|
||||||
|
p = (char*)wglGetExtensionsStringEXT();
|
||||||
|
else
|
||||||
|
p = (char*)wglGetExtensionsStringARB(wglGetCurrentDC());
|
||||||
|
if (0 == p) return GL_FALSE;
|
||||||
|
end = p + _glewStrLen(p);
|
||||||
|
while (p < end)
|
||||||
|
{
|
||||||
|
int n = _glewStrCLen(p, ' ');
|
||||||
|
if (len == n && _glewStrSame(name, p, n)) return GL_TRUE;
|
||||||
|
p += n+1;
|
||||||
|
}
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GLuint _wglewInit ()
|
||||||
|
{
|
||||||
|
/* find wgl extension string query functions */
|
||||||
|
_glewInit_WGL_ARB_extensions_string();
|
||||||
|
WGLEW_ARB_extensions_string = wglGetExtensionsStringARB != NULL;
|
||||||
|
_glewInit_WGL_EXT_extensions_string();
|
||||||
|
WGLEW_EXT_extensions_string = wglGetExtensionsStringEXT != NULL;
|
||||||
|
if (WGLEW_ARB_extensions_string == GL_FALSE &&
|
||||||
|
WGLEW_EXT_extensions_string == GL_FALSE) return GLEW_ERROR_NO_EXTENSIONS_STRING;
|
||||||
|
/* initialize extensions */
|
7
auto/src/glewinfo_gl.c
Normal file
7
auto/src/glewinfo_gl.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
static void glewInfo (void)
|
||||||
|
{
|
||||||
|
#ifdef GL_VERSION_1_1
|
||||||
|
_glewInfo_GL_VERSION_1_1();
|
||||||
|
#endif /* GL_VERSION_1_1 */
|
6
auto/src/glewinfo_glx.c
Normal file
6
auto/src/glewinfo_glx.c
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
}
|
||||||
|
|
||||||
|
#else /* _UNIX */
|
||||||
|
|
||||||
|
static void glxewInfo ()
|
||||||
|
{
|
35
auto/src/glewinfo_post.c
Normal file
35
auto/src/glewinfo_post.c
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
}
|
||||||
|
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
int main (int argc, char** argv)
|
||||||
|
{
|
||||||
|
GLuint err;
|
||||||
|
glutInit(&argc, argv);
|
||||||
|
glutCreateWindow("GLEW Extension Info");
|
||||||
|
glewExperimental = GL_TRUE;
|
||||||
|
err = glewInit();
|
||||||
|
if (GLEW_OK != err)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Error [main]: glewInit failed: %s\n", glewGetErrorString(err));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
f = fopen("glewinfo.txt", "w");
|
||||||
|
if (f == NULL) f = stdout;
|
||||||
|
fprintf(f, "---------------------------\n");
|
||||||
|
fprintf(f, " GLEW Extension Info\n");
|
||||||
|
fprintf(f, "---------------------------\n\n");
|
||||||
|
fprintf(f, "Running on a %s from %s\n",
|
||||||
|
glGetString(GL_RENDERER), glGetString(GL_VENDOR));
|
||||||
|
fprintf(f, "OpenGL version %s is supported\n", glGetString(GL_VERSION));
|
||||||
|
glewInfo();
|
||||||
|
#ifdef _WIN32
|
||||||
|
wglewInfo();
|
||||||
|
#else
|
||||||
|
glxewInfo();
|
||||||
|
#endif
|
||||||
|
if (f != stdout) fclose(f);
|
||||||
|
return 0;
|
||||||
|
}
|
71
auto/src/glewinfo_pre.c
Normal file
71
auto/src/glewinfo_pre.c
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/*
|
||||||
|
** The OpenGL Extension Wrangler Library
|
||||||
|
** Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
|
||||||
|
** Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
** Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions are met:
|
||||||
|
**
|
||||||
|
** * Redistributions of source code must retain the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer.
|
||||||
|
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer in the documentation
|
||||||
|
** and/or other materials provided with the distribution.
|
||||||
|
** * The name of the author may be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
** THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
#include <GL/wglew.h>
|
||||||
|
#include <GL/glxew.h>
|
||||||
|
|
||||||
|
static FILE* f;
|
||||||
|
|
||||||
|
static void glewPrintExt (const char* name, int defined)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
fprintf(f, "\n%s:", name);
|
||||||
|
for (i=0; i<62-strlen(name); i++) fprintf(f, " ");
|
||||||
|
fprintf(f, "%s\n", defined ? "OK" : "MISSING");
|
||||||
|
for (i=0; i<strlen(name)+1; i++) fprintf(f, "-");
|
||||||
|
fprintf(f, "\n");
|
||||||
|
fflush(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void glewInfoFunc (const char* name, int undefined)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
fprintf(f, " %s:", name);
|
||||||
|
for (i=0; i<60-strlen(name); i++) fprintf(f, " ");
|
||||||
|
fprintf(f, "%s\n", undefined ? "MISSING" : "OK");
|
||||||
|
fflush(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------- GL_VERSION_1_1 ---------------------------- */
|
||||||
|
|
||||||
|
#ifdef GL_VERSION_1_1
|
||||||
|
|
||||||
|
static void _glewInfo_GL_VERSION_1_1 (void)
|
||||||
|
{
|
||||||
|
glewPrintExt("GL_VERSION_1_1", GLEW_VERSION_1_1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* GL_VERSION_1_1 */
|
||||||
|
|
8
auto/src/glewinfo_wgl.c
Normal file
8
auto/src/glewinfo_wgl.c
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
}
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
static void wglewInfo ()
|
||||||
|
{
|
11
auto/src/glxew_post.h
Normal file
11
auto/src/glxew_post.h
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
/* ------------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
extern GLboolean glxewGetExtension (const char* name);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
#endif /* __glxew_h__ */
|
146
auto/src/glxew_pre.h
Normal file
146
auto/src/glxew_pre.h
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
/*
|
||||||
|
** The OpenGL Extension Wrangler Library
|
||||||
|
** Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
|
||||||
|
** Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
** Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions are met:
|
||||||
|
**
|
||||||
|
** * Redistributions of source code must retain the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer.
|
||||||
|
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer in the documentation
|
||||||
|
** and/or other materials provided with the distribution.
|
||||||
|
** * The name of the author may be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
** THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** The contents of this file are subject to the GLX Public License Version 1.0
|
||||||
|
** (the "License"). You may not use this file except in compliance with the
|
||||||
|
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
||||||
|
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
||||||
|
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
||||||
|
**
|
||||||
|
** Software distributed under the License is distributed on an "AS IS"
|
||||||
|
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
||||||
|
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
||||||
|
** language governing rights and limitations under the License.
|
||||||
|
**
|
||||||
|
** The Original Software is GLX version 1.2 source code, released February,
|
||||||
|
** 1999. The developer of the Original Software is Silicon Graphics, Inc.
|
||||||
|
** Those portions of the Subject Software created by Silicon Graphics, Inc.
|
||||||
|
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __glxew_h__
|
||||||
|
#define __glxew_h__
|
||||||
|
#define __GLXEW_H__
|
||||||
|
|
||||||
|
#ifdef __glxext_h_
|
||||||
|
#error glxext.h included before glxew.h
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __glxext_h_
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xmd.h>
|
||||||
|
#include <GL/glew.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* ---------------------------- GLX_VERSION_1_0 --------------------------- */
|
||||||
|
|
||||||
|
#ifndef GLX_VERSION_1_0
|
||||||
|
#define GLX_VERSION_1_0 1
|
||||||
|
|
||||||
|
#define GLX_USE_GL 1
|
||||||
|
#define GLX_BUFFER_SIZE 2
|
||||||
|
#define GLX_LEVEL 3
|
||||||
|
#define GLX_RGBA 4
|
||||||
|
#define GLX_DOUBLEBUFFER 5
|
||||||
|
#define GLX_STEREO 6
|
||||||
|
#define GLX_AUX_BUFFERS 7
|
||||||
|
#define GLX_RED_SIZE 8
|
||||||
|
#define GLX_GREEN_SIZE 9
|
||||||
|
#define GLX_BLUE_SIZE 10
|
||||||
|
#define GLX_ALPHA_SIZE 11
|
||||||
|
#define GLX_DEPTH_SIZE 12
|
||||||
|
#define GLX_STENCIL_SIZE 13
|
||||||
|
#define GLX_ACCUM_RED_SIZE 14
|
||||||
|
#define GLX_ACCUM_GREEN_SIZE 15
|
||||||
|
#define GLX_ACCUM_BLUE_SIZE 16
|
||||||
|
#define GLX_ACCUM_ALPHA_SIZE 17
|
||||||
|
#define GLX_BAD_SCREEN 1
|
||||||
|
#define GLX_BAD_ATTRIBUTE 2
|
||||||
|
#define GLX_NO_EXTENSION 3
|
||||||
|
#define GLX_BAD_VISUAL 4
|
||||||
|
#define GLX_BAD_CONTEXT 5
|
||||||
|
#define GLX_BAD_VALUE 6
|
||||||
|
#define GLX_BAD_ENUM 7
|
||||||
|
|
||||||
|
typedef XID GLXDrawable;
|
||||||
|
typedef XID GLXPixmap;
|
||||||
|
typedef struct __GLXcontextRec *GLXContext;
|
||||||
|
|
||||||
|
extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
|
||||||
|
extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
|
||||||
|
extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
|
||||||
|
extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
|
||||||
|
extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
|
||||||
|
extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
|
||||||
|
extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
|
||||||
|
extern void glXDestroyContext (Display *dpy, GLXContext ctx);
|
||||||
|
extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
|
||||||
|
extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
|
||||||
|
extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
||||||
|
extern GLXContext glXGetCurrentContext (void);
|
||||||
|
extern GLXDrawable glXGetCurrentDrawable (void);
|
||||||
|
extern void glXWaitGL (void);
|
||||||
|
extern void glXWaitX (void);
|
||||||
|
extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
|
||||||
|
extern void glXUseXFont (Font font, int first, int count, int listBase);
|
||||||
|
|
||||||
|
GLEWAPI GLboolean GLXEW_VERSION_1_0;
|
||||||
|
#define glxew_VERSION_1_0 GLXEW_VERSION_1_0
|
||||||
|
|
||||||
|
#endif /* GLX_VERSION_1_0 */
|
||||||
|
|
||||||
|
/* ---------------------------- GLX_VERSION_1_1 --------------------------- */
|
||||||
|
|
||||||
|
#ifndef GLX_VERSION_1_1
|
||||||
|
#define GLX_VERSION_1_1
|
||||||
|
|
||||||
|
#define GLX_VENDOR 0x1
|
||||||
|
#define GLX_VERSION 0x2
|
||||||
|
#define GLX_EXTENSIONS 0x3
|
||||||
|
|
||||||
|
extern const char* glXQueryExtensionsString (Display *dpy, int screen);
|
||||||
|
extern const char* glXGetClientString (Display *dpy, int name);
|
||||||
|
extern const char* glXQueryServerString (Display *dpy, int screen, int name);
|
||||||
|
|
||||||
|
GLEWAPI GLboolean GLXEW_VERSION_1_1;
|
||||||
|
#define glxew_VERSION_1_1 GLXEW_VERSION_1_1
|
||||||
|
|
||||||
|
#endif /* GLX_VERSION_1_1 */
|
||||||
|
|
13
auto/src/wglew_post.h
Normal file
13
auto/src/wglew_post.h
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
GLEWAPI GLboolean wglewGetExtension (const char* name);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#undef GLEWAPI
|
||||||
|
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
#endif /* __wglew_h__ */
|
95
auto/src/wglew_pre.h
Normal file
95
auto/src/wglew_pre.h
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
** The OpenGL Extension Wrangler Library
|
||||||
|
** Copyright (C) 2003, 2002, Milan Ikits <milan.ikits@ieee.org>
|
||||||
|
** Copyright (C) 2003, 2002, Marcelo E. Magallon <mmagallo@debian.org>
|
||||||
|
** Copyright (C) 2002, Lev Povalahev <levp@gmx.net>
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions are met:
|
||||||
|
**
|
||||||
|
** * Redistributions of source code must retain the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer.
|
||||||
|
** * Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
** this list of conditions and the following disclaimer in the documentation
|
||||||
|
** and/or other materials provided with the distribution.
|
||||||
|
** * The name of the author may be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||||
|
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||||
|
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||||
|
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||||
|
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||||
|
** THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
** License Applicability. Except to the extent portions of this file are
|
||||||
|
** made subject to an alternative license as permitted in the SGI Free
|
||||||
|
** Software License B, Version 1.1 (the "License"), the contents of this
|
||||||
|
** file are subject only to the provisions of the License. You may not use
|
||||||
|
** this file except in compliance with the License. You may obtain a copy
|
||||||
|
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||||
|
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||||
|
**
|
||||||
|
** http://oss.sgi.com/projects/FreeB
|
||||||
|
**
|
||||||
|
** Note that, as provided in the License, the Software is distributed on an
|
||||||
|
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||||
|
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||||
|
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||||
|
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||||
|
**
|
||||||
|
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
||||||
|
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
||||||
|
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
||||||
|
** Copyright in any portions created by third parties is as indicated
|
||||||
|
** elsewhere herein. All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Additional Notice Provisions: This software was created using the
|
||||||
|
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
||||||
|
** not been independently verified as being compliant with the OpenGL(R)
|
||||||
|
** version 1.2.1 Specification.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __wglew_h__
|
||||||
|
#define __wglew_h__
|
||||||
|
#define __WGLEW_H__
|
||||||
|
|
||||||
|
#ifdef __wglext_h_
|
||||||
|
#error wglext.h included before wglew.h
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __wglext_h_
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
#if !defined(APIENTRY) && !defined(__CYGWIN__)
|
||||||
|
#define WIN32_LEAN_AND_MEAN 1
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLEW_STATIC needs to be set when using the static version.
|
||||||
|
* GLEW_BUILD is set when building the DLL version.
|
||||||
|
*/
|
||||||
|
#ifdef GLEW_STATIC
|
||||||
|
# define GLEWAPI extern
|
||||||
|
#else
|
||||||
|
# ifdef GLEW_BUILD
|
||||||
|
# define GLEWAPI extern __declspec(dllexport)
|
||||||
|
# else
|
||||||
|
# define GLEWAPI extern __declspec(dllimport)
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
MSDEV := \msdev
|
MSDEV := msdev
|
||||||
RM := \rm -rf
|
RM := rm -rf
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$(MSDEV) glew.dsw /make \
|
$(MSDEV) glew.dsw /make \
|
||||||
|
@ -82,7 +82,6 @@ name="EXT"><font size="+1"><b>EXT</b></font></a>
|
|||||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/blend_subtract.txt">EXT_blend_subtract</a><br>
|
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/blend_subtract.txt">EXT_blend_subtract</a><br>
|
||||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/clip_volume_hint.txt">EXT_clip_volume_hint</a><br>
|
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/clip_volume_hint.txt">EXT_clip_volume_hint</a><br>
|
||||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/compiled_vertex_array.txt">EXT_compiled_vertex_array</a><br>
|
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/compiled_vertex_array.txt">EXT_compiled_vertex_array</a><br>
|
||||||
<a href="http://www.nvidia.com/dev_content/nvopenglspecs/GL_EXT_depth_bounds_test.txt">EXT_depth_bounds_test</a><br>
|
|
||||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/draw_range_elements.txt">EXT_draw_range_elements</a><br>
|
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/draw_range_elements.txt">EXT_draw_range_elements</a><br>
|
||||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/cull_vertex.txt">EXT_cull_vertex</a><br>
|
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/cull_vertex.txt">EXT_cull_vertex</a><br>
|
||||||
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/fog_coord.txt">EXT_fog_coord</a><br>
|
<a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/fog_coord.txt">EXT_fog_coord</a><br>
|
||||||
|
4778
include/GL/glew.h
4778
include/GL/glew.h
File diff suppressed because it is too large
Load Diff
@ -1,808 +0,0 @@
|
|||||||
/*
|
|
||||||
** The contents of this file are subject to the GLX Public License Version 1.0
|
|
||||||
** (the "License"). You may not use this file except in compliance with the
|
|
||||||
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
|
|
||||||
** attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043
|
|
||||||
** or at http://www.sgi.com/software/opensource/glx/license.html.
|
|
||||||
**
|
|
||||||
** Software distributed under the License is distributed on an "AS IS"
|
|
||||||
** basis. ALL WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY
|
|
||||||
** IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
|
|
||||||
** PURPOSE OR OF NON- INFRINGEMENT. See the License for the specific
|
|
||||||
** language governing rights and limitations under the License.
|
|
||||||
**
|
|
||||||
** The Original Software is GLX version 1.2 source code, released February,
|
|
||||||
** 1999. The developer of the Original Software is Silicon Graphics, Inc.
|
|
||||||
** Those portions of the Subject Software created by Silicon Graphics, Inc.
|
|
||||||
** are Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** The OpenGL Extension Wrangler Library
|
|
||||||
** Copyright (C) 2003, 2002, Milan Ikits
|
|
||||||
** Copyright (C) 2002, Lev Povalahev
|
|
||||||
** All rights reserved.
|
|
||||||
**
|
|
||||||
** Redistribution and use in source and binary forms, with or without
|
|
||||||
** modification, are permitted provided that the following conditions are met:
|
|
||||||
**
|
|
||||||
** * Redistributions of source code must retain the above copyright notice,
|
|
||||||
** this list of conditions and the following disclaimer.
|
|
||||||
** * Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
** this list of conditions and the following disclaimer in the documentation
|
|
||||||
** and/or other materials provided with the distribution.
|
|
||||||
** * The name of the author may be used to endorse or promote products
|
|
||||||
** derived from this software without specific prior written permission.
|
|
||||||
**
|
|
||||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
||||||
** THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __glxew_h__
|
|
||||||
#define __glxew_h__
|
|
||||||
|
|
||||||
#ifdef __glxext_h_
|
|
||||||
#error glxext.h included before glxew.h
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __glxext_h_
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
|
||||||
#include <X11/Xmd.h>
|
|
||||||
#include <GL/glew.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* core GLX */
|
|
||||||
#define GLX_VERSION_1_0 1
|
|
||||||
#define GLX_VERSION_1_1 1
|
|
||||||
#define GLX_VERSION_1_2 1
|
|
||||||
#define GLX_VERSION_1_3 1
|
|
||||||
#define GLX_VERSION_1_4 1
|
|
||||||
/* ARB extensions */
|
|
||||||
#define GLX_ARB_get_proc_address 1
|
|
||||||
#define GLX_ARB_multisample 1
|
|
||||||
/* multi-vendor extensions */
|
|
||||||
#define GLX_EXT_import_context 1
|
|
||||||
#define GLX_EXT_visual_info 1
|
|
||||||
#define GLX_EXT_visual_rating 1
|
|
||||||
/* MESA extensions */
|
|
||||||
#define GLX_MESA_copy_sub_buffer 1
|
|
||||||
#define GLX_MESA_pixmap_colormap 1
|
|
||||||
#define GLX_MESA_release_buffers 1
|
|
||||||
#define GLX_MESA_set_3dfx_mode 1
|
|
||||||
/* NVIDIA extensions */
|
|
||||||
#define GLX_NV_vertex_array_range 1
|
|
||||||
/* OML extensions */
|
|
||||||
#define GLX_OML_swap_method 1
|
|
||||||
#define GLX_OML_sync_control 1
|
|
||||||
/* SGI extensions */
|
|
||||||
#define GLX_SGI_cushion 1
|
|
||||||
#define GLX_SGI_make_current_read 1
|
|
||||||
#define GLX_SGI_swap_control 1
|
|
||||||
#define GLX_SGI_video_sync 1
|
|
||||||
#define GLX_SGIS_blended_overlay 1
|
|
||||||
#define GLX_SGIS_multisample 1
|
|
||||||
#define GLX_SGIS_shared_multisample 1
|
|
||||||
/* #define GLX_SGIX_dm_buffer 1 */
|
|
||||||
#define GLX_SGIX_fbconfig 1
|
|
||||||
#define GLX_SGIX_pbuffer 1
|
|
||||||
#define GLX_SGIX_swap_group 1
|
|
||||||
#define GLX_SGIX_swap_barrier 1
|
|
||||||
/* #define GLX_SGIX_video_source 1*/
|
|
||||||
/* #define GLX_SGIX_video_resize 1*/
|
|
||||||
#define GLX_SGIX_visual_select_group 1
|
|
||||||
/* SUN extensions */
|
|
||||||
#define GLX_SUN_get_transparent_index 1
|
|
||||||
|
|
||||||
/* -------------------------------- GLX 1.0 ------------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_VERSION_1_0
|
|
||||||
|
|
||||||
#define GLX_USE_GL 1
|
|
||||||
#define GLX_BUFFER_SIZE 2
|
|
||||||
#define GLX_LEVEL 3
|
|
||||||
#define GLX_RGBA 4
|
|
||||||
#define GLX_DOUBLEBUFFER 5
|
|
||||||
#define GLX_STEREO 6
|
|
||||||
#define GLX_AUX_BUFFERS 7
|
|
||||||
#define GLX_RED_SIZE 8
|
|
||||||
#define GLX_GREEN_SIZE 9
|
|
||||||
#define GLX_BLUE_SIZE 10
|
|
||||||
#define GLX_ALPHA_SIZE 11
|
|
||||||
#define GLX_DEPTH_SIZE 12
|
|
||||||
#define GLX_STENCIL_SIZE 13
|
|
||||||
#define GLX_ACCUM_RED_SIZE 14
|
|
||||||
#define GLX_ACCUM_GREEN_SIZE 15
|
|
||||||
#define GLX_ACCUM_BLUE_SIZE 16
|
|
||||||
#define GLX_ACCUM_ALPHA_SIZE 17
|
|
||||||
#define GLX_BAD_SCREEN 1
|
|
||||||
#define GLX_BAD_ATTRIBUTE 2
|
|
||||||
#define GLX_NO_EXTENSION 3
|
|
||||||
#define GLX_BAD_VISUAL 4
|
|
||||||
#define GLX_BAD_CONTEXT 5
|
|
||||||
#define GLX_BAD_VALUE 6
|
|
||||||
#define GLX_BAD_ENUM 7
|
|
||||||
|
|
||||||
typedef XID GLXDrawable;
|
|
||||||
typedef XID GLXPixmap;
|
|
||||||
typedef struct __GLXcontextRec *GLXContext;
|
|
||||||
|
|
||||||
#ifdef GLEW_PROTOTYPES
|
|
||||||
typedef Bool ( * PFNGLXQUERYEXTENSIONPROC) (Display *dpy, int *errorBase, int *eventBase);
|
|
||||||
typedef Bool ( * PFNGLXQUERYVERSIONPROC) (Display *dpy, int *major, int *minor);
|
|
||||||
typedef int ( * PFNGLXGETCONFIGPROC) (Display *dpy, XVisualInfo *vis, int attrib, int *value);
|
|
||||||
typedef XVisualInfo* ( * PFNGLXCHOOSEVISUALPROC) (Display *dpy, int screen, int *attribList);
|
|
||||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPPROC) (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
|
|
||||||
typedef void ( * PFNGLXDESTROYGLXPIXMAPPROC) (Display *dpy, GLXPixmap pix);
|
|
||||||
typedef GLXContext ( * PFNGLXCREATECONTEXTPROC) (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
|
|
||||||
typedef void ( * PFNGLXDESTROYCONTEXTPROC) (Display *dpy, GLXContext ctx);
|
|
||||||
typedef Bool ( * PFNGLXISDIRECTPROC) (Display *dpy, GLXContext ctx);
|
|
||||||
typedef void ( * PFNGLXCOPYCONTEXTPROC) (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
|
|
||||||
typedef Bool ( * PFNGLXMAKECURRENTPROC) (Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
|
||||||
typedef GLXContext ( * PFNGLXGETCURRENTCONTEXTPROC) (void);
|
|
||||||
typedef GLXDrawable ( * PFNGLXGETCURRENTDRAWABLEPROC) (void);
|
|
||||||
typedef void ( * PFNGLXWAITGLPROC) (void);
|
|
||||||
typedef void ( * PFNGLXWAITXPROC) (void);
|
|
||||||
typedef void ( * PFNGLXSWAPBUFFERSPROC) (Display *dpy, GLXDrawable drawable);
|
|
||||||
typedef void ( * PFNGLXUSEXFONTPROC) (Font font, int first, int count, int listBase);
|
|
||||||
|
|
||||||
extern PFNGLXQUERYEXTENSIONPROC glXQueryExtension;
|
|
||||||
extern PFNGLXQUERYVERSIONPROC glXQueryVersion;
|
|
||||||
extern PFNGLXGETCONFIGPROC glXGetConfig;
|
|
||||||
extern PFNGLXCHOOSEVISUALPROC glXChooseVisual;
|
|
||||||
extern PFNGLXCREATEGLXPIXMAPPROC glXCreateGLXPixmap;
|
|
||||||
extern PFNGLXDESTROYGLXPIXMAPPROC glXDestroyGLXPixmap;
|
|
||||||
extern PFNGLXCREATECONTEXTPROC glXCreateContext;
|
|
||||||
extern PFNGLXDESTROYCONTEXTPROC glXDestroyContext;
|
|
||||||
extern PFNGLXISDIRECTPROC glXIsDirect;
|
|
||||||
extern PFNGLXCOPYCONTEXTPROC glXCopyContext;
|
|
||||||
extern PFNGLXMAKECURRENTPROC glXMakeCurrent;
|
|
||||||
extern PFNGLXGETCURRENTCONTEXTPROC glXGetCurrentContext;
|
|
||||||
extern PFNGLXGETCURRENTDRAWABLEPROC glXGetCurrentDrawable;
|
|
||||||
extern PFNGLXWAITGLPROC glXWaitGL;
|
|
||||||
extern PFNGLXWAITXPROC glXWaitX;
|
|
||||||
extern PFNGLXSWAPBUFFERSPROC glXSwapBuffers;
|
|
||||||
extern PFNGLXUSEXFONTPROC glXUseXFont;
|
|
||||||
#else
|
|
||||||
extern Bool glXQueryExtension (Display *dpy, int *errorBase, int *eventBase);
|
|
||||||
extern Bool glXQueryVersion (Display *dpy, int *major, int *minor);
|
|
||||||
extern int glXGetConfig (Display *dpy, XVisualInfo *vis, int attrib, int *value);
|
|
||||||
extern XVisualInfo* glXChooseVisual (Display *dpy, int screen, int *attribList);
|
|
||||||
extern GLXPixmap glXCreateGLXPixmap (Display *dpy, XVisualInfo *vis, Pixmap pixmap);
|
|
||||||
extern void glXDestroyGLXPixmap (Display *dpy, GLXPixmap pix);
|
|
||||||
extern GLXContext glXCreateContext (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct);
|
|
||||||
extern void glXDestroyContext (Display *dpy, GLXContext ctx);
|
|
||||||
extern Bool glXIsDirect (Display *dpy, GLXContext ctx);
|
|
||||||
extern void glXCopyContext (Display *dpy, GLXContext src, GLXContext dst, GLuint mask);
|
|
||||||
extern Bool glXMakeCurrent (Display *dpy, GLXDrawable drawable, GLXContext ctx);
|
|
||||||
extern GLXContext glXGetCurrentContext (void);
|
|
||||||
extern GLXDrawable glXGetCurrentDrawable (void);
|
|
||||||
extern void glXWaitGL (void);
|
|
||||||
extern void glXWaitX (void);
|
|
||||||
extern void glXSwapBuffers (Display *dpy, GLXDrawable drawable);
|
|
||||||
extern void glXUseXFont (Font font, int first, int count, int listBase);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* GLX_VERSION_1_0 */
|
|
||||||
|
|
||||||
/* -------------------------------- GLX 1.1 ------------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_VERSION_1_1
|
|
||||||
|
|
||||||
#define GLX_VENDOR 0x1
|
|
||||||
#define GLX_VERSION 0x2
|
|
||||||
#define GLX_EXTENSIONS 0x3
|
|
||||||
|
|
||||||
#ifdef GLEW_PROTOTYPES
|
|
||||||
typedef const char* ( * PFNGLXQUERYEXTENSIONSSTRINGPROC) (Display *dpy, int screen);
|
|
||||||
typedef const char* ( * PFNGLXGETCLIENTSTRINGPROC) (Display *dpy, int name);
|
|
||||||
typedef const char* ( * PFNGLXQUERYSERVERSTRINGPROC) (Display *dpy, int screen, int name);
|
|
||||||
|
|
||||||
extern PFNGLXQUERYEXTENSIONSSTRINGPROC glXQueryExtensionsString;
|
|
||||||
extern PFNGLXGETCLIENTSTRINGPROC glXGetClientString;
|
|
||||||
extern PFNGLXQUERYSERVERSTRINGPROC glXQueryServerString;
|
|
||||||
#else
|
|
||||||
extern const char* glXQueryExtensionsString (Display *dpy, int screen);
|
|
||||||
extern const char* glXGetClientString (Display *dpy, int name);
|
|
||||||
extern const char* glXQueryServerString (Display *dpy, int screen, int name);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* GLX_VERSION_1_1 */
|
|
||||||
|
|
||||||
/* -------------------------------- GLX 1.2 ------------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_VERSION_1_2
|
|
||||||
|
|
||||||
typedef Display* ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
|
|
||||||
|
|
||||||
extern PFNGLXGETCURRENTDISPLAYPROC glXGetCurrentDisplay;
|
|
||||||
|
|
||||||
#endif /* GLX_VERSION_1_2 */
|
|
||||||
|
|
||||||
/* -------------------------------- GLX 1.3 ------------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_VERSION_1_3
|
|
||||||
|
|
||||||
#define GLX_WINDOW_BIT 0x00000001
|
|
||||||
#define GLX_PIXMAP_BIT 0x00000002
|
|
||||||
#define GLX_PBUFFER_BIT 0x00000004
|
|
||||||
#define GLX_RGBA_BIT 0x00000001
|
|
||||||
#define GLX_COLOR_INDEX_BIT 0x00000002
|
|
||||||
#define GLX_PBUFFER_CLOBBER_MASK 0x08000000
|
|
||||||
#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001
|
|
||||||
#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002
|
|
||||||
#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004
|
|
||||||
#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008
|
|
||||||
#define GLX_AUX_BUFFERS_BIT 0x00000010
|
|
||||||
#define GLX_DEPTH_BUFFER_BIT 0x00000020
|
|
||||||
#define GLX_STENCIL_BUFFER_BIT 0x00000040
|
|
||||||
#define GLX_ACCUM_BUFFER_BIT 0x00000080
|
|
||||||
#define GLX_CONFIG_CAVEAT 0x20
|
|
||||||
#define GLX_X_VISUAL_TYPE 0x22
|
|
||||||
#define GLX_TRANSPARENT_TYPE 0x23
|
|
||||||
#define GLX_TRANSPARENT_INDEX_VALUE 0x24
|
|
||||||
#define GLX_TRANSPARENT_RED_VALUE 0x25
|
|
||||||
#define GLX_TRANSPARENT_GREEN_VALUE 0x26
|
|
||||||
#define GLX_TRANSPARENT_BLUE_VALUE 0x27
|
|
||||||
#define GLX_TRANSPARENT_ALPHA_VALUE 0x28
|
|
||||||
#define GLX_DONT_CARE 0xFFFFFFFF
|
|
||||||
#define GLX_NONE 0x8000
|
|
||||||
#define GLX_SLOW_CONFIG 0x8001
|
|
||||||
#define GLX_TRUE_COLOR 0x8002
|
|
||||||
#define GLX_DIRECT_COLOR 0x8003
|
|
||||||
#define GLX_PSEUDO_COLOR 0x8004
|
|
||||||
#define GLX_STATIC_COLOR 0x8005
|
|
||||||
#define GLX_GRAY_SCALE 0x8006
|
|
||||||
#define GLX_STATIC_GRAY 0x8007
|
|
||||||
#define GLX_TRANSPARENT_RGB 0x8008
|
|
||||||
#define GLX_TRANSPARENT_INDEX 0x8009
|
|
||||||
#define GLX_VISUAL_ID 0x800B
|
|
||||||
#define GLX_SCREEN 0x800C
|
|
||||||
#define GLX_NON_CONFORMANT_CONFIG 0x800D
|
|
||||||
#define GLX_DRAWABLE_TYPE 0x8010
|
|
||||||
#define GLX_RENDER_TYPE 0x8011
|
|
||||||
#define GLX_X_RENDERABLE 0x8012
|
|
||||||
#define GLX_FBCONFIG_ID 0x8013
|
|
||||||
#define GLX_RGBA_TYPE 0x8014
|
|
||||||
#define GLX_COLOR_INDEX_TYPE 0x8015
|
|
||||||
#define GLX_MAX_PBUFFER_WIDTH 0x8016
|
|
||||||
#define GLX_MAX_PBUFFER_HEIGHT 0x8017
|
|
||||||
#define GLX_MAX_PBUFFER_PIXELS 0x8018
|
|
||||||
#define GLX_PRESERVED_CONTENTS 0x801B
|
|
||||||
#define GLX_LARGEST_PBUFFER 0x801C
|
|
||||||
#define GLX_WIDTH 0x801D
|
|
||||||
#define GLX_HEIGHT 0x801E
|
|
||||||
#define GLX_EVENT_MASK 0x801F
|
|
||||||
#define GLX_DAMAGED 0x8020
|
|
||||||
#define GLX_SAVED 0x8021
|
|
||||||
#define GLX_WINDOW 0x8022
|
|
||||||
#define GLX_PBUFFER 0x8023
|
|
||||||
#define GLX_PBUFFER_HEIGHT 0x8040
|
|
||||||
#define GLX_PBUFFER_WIDTH 0x8041
|
|
||||||
|
|
||||||
typedef XID GLXWindow;
|
|
||||||
typedef XID GLXPbuffer;
|
|
||||||
typedef XID GLXFBConfigID;
|
|
||||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
|
|
||||||
typedef struct {
|
|
||||||
int event_type;
|
|
||||||
int draw_type;
|
|
||||||
unsigned long serial;
|
|
||||||
Bool send_event;
|
|
||||||
Display *display;
|
|
||||||
GLXDrawable drawable;
|
|
||||||
unsigned int buffer_mask;
|
|
||||||
unsigned int aux_buffer;
|
|
||||||
int x, y;
|
|
||||||
int width, height;
|
|
||||||
int count;
|
|
||||||
} GLXPbufferClobberEvent;
|
|
||||||
typedef union __GLXEvent {
|
|
||||||
GLXPbufferClobberEvent glxpbufferclobber;
|
|
||||||
long pad[24];
|
|
||||||
} GLXEvent;
|
|
||||||
|
|
||||||
typedef GLXFBConfig* ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
|
||||||
typedef GLXFBConfig* ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
|
||||||
typedef XVisualInfo* ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
|
||||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
|
||||||
typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
|
||||||
typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
|
||||||
typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
|
||||||
typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
|
||||||
typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
|
||||||
typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
|
||||||
typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
|
||||||
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
|
||||||
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
|
||||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
|
||||||
typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
|
||||||
typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
|
||||||
typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
|
||||||
|
|
||||||
extern PFNGLXCHOOSEFBCONFIGPROC glXChooseFBConfig;
|
|
||||||
extern PFNGLXGETFBCONFIGSPROC glXGetFBConfigs;
|
|
||||||
extern PFNGLXGETVISUALFROMFBCONFIGPROC glXGetVisualFromFBConfig;
|
|
||||||
extern PFNGLXGETFBCONFIGATTRIBPROC glXGetFBConfigAttrib;
|
|
||||||
extern PFNGLXCREATEWINDOWPROC glXCreateWindow;
|
|
||||||
extern PFNGLXDESTROYWINDOWPROC glXDestroyWindow;
|
|
||||||
extern PFNGLXCREATEPIXMAPPROC glXCreatePixmap;
|
|
||||||
extern PFNGLXDESTROYPIXMAPPROC glXDestroyPixmap;
|
|
||||||
extern PFNGLXCREATEPBUFFERPROC glXCreatePbuffer;
|
|
||||||
extern PFNGLXDESTROYPBUFFERPROC glXDestroyPbuffer;
|
|
||||||
extern PFNGLXQUERYDRAWABLEPROC glXQueryDrawable;
|
|
||||||
extern PFNGLXCREATENEWCONTEXTPROC glXCreateNewContext;
|
|
||||||
extern PFNGLXMAKECONTEXTCURRENTPROC glXMakeContextCurrent;
|
|
||||||
extern PFNGLXGETCURRENTREADDRAWABLEPROC glXGetCurrentReadDrawable;
|
|
||||||
extern PFNGLXQUERYCONTEXTPROC glXQueryContext;
|
|
||||||
extern PFNGLXSELECTEVENTPROC glXSelectEvent;
|
|
||||||
extern PFNGLXGETSELECTEDEVENTPROC glXGetSelectedEvent;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
extern GLXFBConfig* glXChooseFBConfig (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
|
||||||
extern GLXFBConfig* glXGetFBConfigs (Display *dpy, int screen, int *nelements);
|
|
||||||
extern XVisualInfo* glXGetVisualFromFBConfig (Display *dpy, GLXFBConfig config);
|
|
||||||
extern int glXGetFBConfigAttrib (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
|
||||||
extern GLXWindow glXCreateWindow (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
|
||||||
extern void glXDestroyWindow (Display *dpy, GLXWindow win);
|
|
||||||
extern GLXPixmap glXCreatePixmap (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
|
||||||
extern void glXDestroyPixmap (Display *dpy, GLXPixmap pixmap);
|
|
||||||
extern GLXPbuffer glXCreatePbuffer (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
|
||||||
extern void glXDestroyPbuffer (Display *dpy, GLXPbuffer pbuf);
|
|
||||||
extern void glXQueryDrawable (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
|
||||||
extern GLXContext glXCreateNewContext (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
|
||||||
extern Bool glXMakeContextCurrent (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
|
||||||
extern GLXDrawable glXGetCurrentReadDrawable (void);
|
|
||||||
extern int glXQueryContext (Display *dpy, GLXContext ctx, int attribute, int *value);
|
|
||||||
extern void glXSelectEvent (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
|
||||||
extern void glXGetSelectedEvent (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* GLX_VERSION_1_3 */
|
|
||||||
|
|
||||||
/* -------------------------------- GLX 1.4 ------------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_VERSION_1_4
|
|
||||||
|
|
||||||
#define GLX_SAMPLE_BUFFERS 100000
|
|
||||||
#define GLX_SAMPLES 100001
|
|
||||||
|
|
||||||
extern void ( * glXGetProcAddress(const GLubyte *procName))(void);
|
|
||||||
|
|
||||||
#endif /* GLX_VERSION_1_4 */
|
|
||||||
|
|
||||||
/* ------------------------- ARB_get_proc_address ------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_ARB_get_proc_address
|
|
||||||
|
|
||||||
extern void ( * glXGetProcAddressARB(const GLubyte *procName))(void);
|
|
||||||
|
|
||||||
#endif /* GLX_ARB_get_proc_address */
|
|
||||||
|
|
||||||
/* ---------------------------- ARB_multisample --------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_ARB_multisample
|
|
||||||
|
|
||||||
#define GLX_SAMPLE_BUFFERS_ARB 100000
|
|
||||||
#define GLX_SAMPLES_ARB 100001
|
|
||||||
|
|
||||||
#endif /* GLX_ARB_multisample */
|
|
||||||
|
|
||||||
/* ---------------------------- EXT_visual_info --------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_EXT_visual_info
|
|
||||||
|
|
||||||
#define GLX_X_VISUAL_TYPE_EXT 0x22
|
|
||||||
#define GLX_TRANSPARENT_TYPE_EXT 0x23
|
|
||||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24
|
|
||||||
#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25
|
|
||||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26
|
|
||||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27
|
|
||||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28
|
|
||||||
#define GLX_NONE_EXT 0x8000
|
|
||||||
#define GLX_TRUE_COLOR_EXT 0x8002
|
|
||||||
#define GLX_DIRECT_COLOR_EXT 0x8003
|
|
||||||
#define GLX_PSEUDO_COLOR_EXT 0x8004
|
|
||||||
#define GLX_STATIC_COLOR_EXT 0x8005
|
|
||||||
#define GLX_GRAY_SCALE_EXT 0x8006
|
|
||||||
#define GLX_STATIC_GRAY_EXT 0x8007
|
|
||||||
#define GLX_TRANSPARENT_RGB_EXT 0x8008
|
|
||||||
#define GLX_TRANSPARENT_INDEX_EXT 0x8009
|
|
||||||
|
|
||||||
#endif /* GLX_EXT_visual_info */
|
|
||||||
|
|
||||||
/* --------------------------- EXT_visual_rating -------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_EXT_visual_rating
|
|
||||||
|
|
||||||
#define GLX_VISUAL_CAVEAT_EXT 0x20
|
|
||||||
#define GLX_SLOW_VISUAL_EXT 0x8001
|
|
||||||
#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D
|
|
||||||
|
|
||||||
#endif /* GLX_EXT_visual_rating */
|
|
||||||
|
|
||||||
/* --------------------------- EXT_import_context -------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_EXT_import_context
|
|
||||||
|
|
||||||
#define GLX_SHARE_CONTEXT_EXT 0x800A
|
|
||||||
#define GLX_VISUAL_ID_EXT 0x800B
|
|
||||||
#define GLX_SCREEN_EXT 0x800C
|
|
||||||
|
|
||||||
typedef XID GLXContextID;
|
|
||||||
|
|
||||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
|
|
||||||
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
|
|
||||||
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
|
|
||||||
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
|
|
||||||
typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
|
|
||||||
|
|
||||||
extern PFNGLXGETCURRENTDISPLAYEXTPROC glXGetCurrentDisplayEXT;
|
|
||||||
extern PFNGLXQUERYCONTEXTINFOEXTPROC glXQueryContextInfoEXT;
|
|
||||||
extern PFNGLXGETCONTEXTIDEXTPROC glXGetContextIDEXT;
|
|
||||||
extern PFNGLXIMPORTCONTEXTEXTPROC glXImportContextEXT;
|
|
||||||
extern PFNGLXFREECONTEXTEXTPROC glXFreeContextEXT;
|
|
||||||
|
|
||||||
#endif /* GLX_EXT_import_context */
|
|
||||||
|
|
||||||
/* --------------------------- MESA_copy_sub_buffer ----------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_MESA_copy_sub_buffer
|
|
||||||
|
|
||||||
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
|
|
||||||
|
|
||||||
extern PFNGLXCOPYSUBBUFFERMESAPROC glXCopySubBufferMESA;
|
|
||||||
|
|
||||||
#endif /* GLX_MESA_copy_sub_buffer */
|
|
||||||
|
|
||||||
/* -------------------------- MESA_pixmap_colormap ------------------------ */
|
|
||||||
|
|
||||||
#ifdef GLX_MESA_pixmap_colormap
|
|
||||||
|
|
||||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
|
|
||||||
|
|
||||||
extern PFNGLXCREATEGLXPIXMAPMESAPROC glXCreateGLXPixmapMESA;
|
|
||||||
|
|
||||||
#endif /* GLX_MESA_pixmap_colormap */
|
|
||||||
|
|
||||||
/* -------------------------- MESA_release_buffers ------------------------ */
|
|
||||||
|
|
||||||
#ifdef GLX_MESA_release_buffers
|
|
||||||
|
|
||||||
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
|
|
||||||
|
|
||||||
extern PFNGLXRELEASEBUFFERSMESAPROC glXReleaseBuffersMESA;
|
|
||||||
|
|
||||||
#endif /* GLX_MESA_release_buffers */
|
|
||||||
|
|
||||||
/* --------------------------- MESA_set_3dfx_mode ------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_MESA_set_3dfx_mode
|
|
||||||
|
|
||||||
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
|
|
||||||
|
|
||||||
extern PFNGLXSET3DFXMODEMESAPROC glXSet3DfxModeMESA;
|
|
||||||
|
|
||||||
#endif /* GLX_MESA_set_3dfx_mode */
|
|
||||||
|
|
||||||
/* ---------------------------- OML_swap_method --------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_OML_swap_method
|
|
||||||
|
|
||||||
#define GLX_SWAP_METHOD_OML 0x8060
|
|
||||||
#define GLX_SWAP_EXCHANGE_OML 0x8061
|
|
||||||
#define GLX_SWAP_COPY_OML 0x8062
|
|
||||||
#define GLX_SWAP_UNDEFINED_OML 0x8063
|
|
||||||
|
|
||||||
#endif /* GLX_OML_swap_method */
|
|
||||||
|
|
||||||
/* ---------------------------- OML_sync_control -------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_OML_sync_control
|
|
||||||
|
|
||||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
|
|
||||||
#include <inttypes.h>
|
|
||||||
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
|
|
||||||
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
|
|
||||||
typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
|
|
||||||
typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
|
|
||||||
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
|
|
||||||
|
|
||||||
extern PFNGLXGETSYNCVALUESOMLPROC glXGetSyncValuesOML;
|
|
||||||
extern PFNGLXGETMSCRATEOMLPROC glXGetMscRateOML;
|
|
||||||
extern PFNGLXSWAPBUFFERSMSCOMLPROC glXSwapBuffersMscOML;
|
|
||||||
extern PFNGLXWAITFORMSCOMLPROC glXWaitForMscOML;
|
|
||||||
extern PFNGLXWAITFORSBCOMLPROC glXWaitForSbcOML;
|
|
||||||
#endif /* __STDC_VERSION__ */
|
|
||||||
|
|
||||||
#endif /* GLX_OML_sync_control */
|
|
||||||
|
|
||||||
/* ------------------------- NV_vertex_array_range ------------------------ */
|
|
||||||
|
|
||||||
#ifdef GLX_NV_vertex_array_range
|
|
||||||
|
|
||||||
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
|
|
||||||
typedef void ( * PFNGLXFREEMEMORYNVPROC) (void *pointer);
|
|
||||||
|
|
||||||
extern PFNGLXALLOCATEMEMORYNVPROC glXAllocateMemoryNV;
|
|
||||||
extern PFNGLXFREEMEMORYNVPROC glXFreeMemoryNV;
|
|
||||||
|
|
||||||
#endif /* GLX_NV_vertex_array_range */
|
|
||||||
|
|
||||||
/* ------------------------------- SGI_cushion ---------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGI_cushion
|
|
||||||
|
|
||||||
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
|
|
||||||
|
|
||||||
extern PFNGLXCUSHIONSGIPROC glXCushionSGI;
|
|
||||||
|
|
||||||
#endif /* GLX_SGI_cushion */
|
|
||||||
|
|
||||||
/* -------------------------- SGI_make_current_read ----------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGI_make_current_read
|
|
||||||
|
|
||||||
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
|
||||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
|
|
||||||
|
|
||||||
extern PFNGLXMAKECURRENTREADSGIPROC glXMakeCurrentReadSGI;
|
|
||||||
extern PFNGLXGETCURRENTREADDRAWABLESGIPROC glXGetCurrentReadDrawableSGI;
|
|
||||||
|
|
||||||
#endif /* GLX_SGI_make_current_read */
|
|
||||||
|
|
||||||
/* ---------------------------- SGI_swap_control -------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGI_swap_control
|
|
||||||
|
|
||||||
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
|
||||||
|
|
||||||
extern PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI;
|
|
||||||
|
|
||||||
#endif /* GLX_SGI_swap_control */
|
|
||||||
|
|
||||||
/* ----------------------------- SGI_video_sync --------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGI_video_sync
|
|
||||||
|
|
||||||
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
|
|
||||||
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
|
|
||||||
typedef int ( * PFNGLXGETREFRESHRATESGIPROC) (unsigned int *rate);
|
|
||||||
|
|
||||||
extern PFNGLXGETVIDEOSYNCSGIPROC glXGetVideoSyncSGI;
|
|
||||||
extern PFNGLXWAITVIDEOSYNCSGIPROC glXWaitVideoSyncSGI;
|
|
||||||
extern PFNGLXGETREFRESHRATESGIPROC glXGetRefreshRateSGI;
|
|
||||||
|
|
||||||
#endif /* GLX_SGI_video_sync */
|
|
||||||
|
|
||||||
/* -------------------------- SGIS_blended_overlay ------------------------ */
|
|
||||||
|
|
||||||
#ifdef GLX_SGIS_blended_overlay
|
|
||||||
|
|
||||||
#define GLX_BLENDED_RGBA_SGIS 0x8025
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ---------------------------- SGIS_multisample -------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGIS_multisample
|
|
||||||
|
|
||||||
#define GLX_SAMPLE_BUFFERS_SGIS 100000
|
|
||||||
#define GLX_SAMPLES_SGIS 100001
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ------------------------ SGIS_shared_multisample ----------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGIS_shared_multisample
|
|
||||||
|
|
||||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
|
|
||||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ------------------------------ SGIX_fbconfig --------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGIX_fbconfig
|
|
||||||
|
|
||||||
#define GLX_WINDOW_BIT_SGIX 0x00000001
|
|
||||||
#define GLX_PIXMAP_BIT_SGIX 0x00000002
|
|
||||||
#define GLX_RGBA_BIT_SGIX 0x00000001
|
|
||||||
#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002
|
|
||||||
#define GLX_DRAWABLE_TYPE_SGIX 0x8010
|
|
||||||
#define GLX_RENDER_TYPE_SGIX 0x8011
|
|
||||||
#define GLX_X_RENDERABLE_SGIX 0x8012
|
|
||||||
#define GLX_FBCONFIG_ID_SGIX 0x8013
|
|
||||||
#define GLX_RGBA_TYPE_SGIX 0x8014
|
|
||||||
#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015
|
|
||||||
|
|
||||||
typedef XID GLXFBConfigIDSGIX;
|
|
||||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
|
|
||||||
|
|
||||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
|
|
||||||
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
|
|
||||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
|
|
||||||
typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
|
|
||||||
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
|
|
||||||
typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
|
|
||||||
|
|
||||||
extern PFNGLXGETFBCONFIGATTRIBSGIXPROC glXGetFBConfigAttribSGIX;
|
|
||||||
extern PFNGLXCHOOSEFBCONFIGSGIXPROC glXChooseFBConfigSGIX;
|
|
||||||
extern PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC glXCreateGLXPixmapWithConfigSGIX;
|
|
||||||
extern PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC glXCreateContextWithConfigSGIX;
|
|
||||||
extern PFNGLXGETVISUALFROMFBCONFIGSGIXPROC glXGetVisualFromFBConfigSGIX;
|
|
||||||
extern PFNGLXGETFBCONFIGFROMVISUALSGIXPROC glXGetFBConfigFromVisualSGIX;
|
|
||||||
|
|
||||||
#endif /* GLX_SGIX_fbconfig */
|
|
||||||
|
|
||||||
/* ------------------------------- SGIX_pbuffer --------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGIX_pbuffer
|
|
||||||
|
|
||||||
#define GLX_PBUFFER_BIT_SGIX 0x00000004
|
|
||||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000
|
|
||||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001
|
|
||||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002
|
|
||||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004
|
|
||||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008
|
|
||||||
#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010
|
|
||||||
#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020
|
|
||||||
#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040
|
|
||||||
#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080
|
|
||||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100
|
|
||||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016
|
|
||||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017
|
|
||||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018
|
|
||||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019
|
|
||||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A
|
|
||||||
#define GLX_PRESERVED_CONTENTS_SGIX 0x801B
|
|
||||||
#define GLX_LARGEST_PBUFFER_SGIX 0x801C
|
|
||||||
#define GLX_WIDTH_SGIX 0x801D
|
|
||||||
#define GLX_HEIGHT_SGIX 0x801E
|
|
||||||
#define GLX_EVENT_MASK_SGIX 0x801F
|
|
||||||
#define GLX_DAMAGED_SGIX 0x8020
|
|
||||||
#define GLX_SAVED_SGIX 0x8021
|
|
||||||
#define GLX_WINDOW_SGIX 0x8022
|
|
||||||
#define GLX_PBUFFER_SGIX 0x8023
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
|
||||||
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
|
|
||||||
typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
|
|
||||||
typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
|
|
||||||
typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
|
|
||||||
|
|
||||||
extern PFNGLXCREATEGLXPBUFFERSGIXPROC glXCreateGLXPbufferSGIX;
|
|
||||||
extern PFNGLXDESTROYGLXPBUFFERSGIXPROC glXDestroyGLXPbufferSGIX;
|
|
||||||
extern PFNGLXQUERYGLXPBUFFERSGIXPROC glXQueryGLXPbufferSGIX;
|
|
||||||
extern PFNGLXSELECTEVENTSGIXPROC glXSelectEventSGIX;
|
|
||||||
extern PFNGLXGETSELECTEDEVENTSGIXPROC glXGetSelectedEventSGIX;
|
|
||||||
|
|
||||||
#endif /* GLX_SGIX_pbuffer */
|
|
||||||
|
|
||||||
/* ---------------------------- SGIX_swap_barrier ------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGIX_swap_barrier
|
|
||||||
|
|
||||||
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
|
|
||||||
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
|
|
||||||
|
|
||||||
extern PFNGLXBINDSWAPBARRIERSGIXPROC glXBindSwapBarrierSGIX;
|
|
||||||
extern PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC glXQueryMaxSwapBarriersSGIX;
|
|
||||||
|
|
||||||
#endif /* GLX_SGIX_swap_barrier */
|
|
||||||
|
|
||||||
/* ----------------------------- SGIX_swap_group -------------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SGIX_swap_group
|
|
||||||
|
|
||||||
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
|
|
||||||
|
|
||||||
extern PFNGLXJOINSWAPGROUPSGIXPROC glXJoinSwapGroupSGIX;
|
|
||||||
|
|
||||||
#endif /* GLX_SGIX_swap_group */
|
|
||||||
|
|
||||||
/* ------------------------- SGIX_visual_select_group --------------------- */
|
|
||||||
|
|
||||||
#ifndef GLX_SGIX_visual_select_group
|
|
||||||
|
|
||||||
#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ------------------------ SUN_get_transparent_index --------------------- */
|
|
||||||
|
|
||||||
#ifdef GLX_SUN_get_transparent_index
|
|
||||||
|
|
||||||
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
|
|
||||||
|
|
||||||
extern PFNGLXGETTRANSPARENTINDEXSUNPROC glXGetTransparentIndexSUN;
|
|
||||||
|
|
||||||
#endif /* GLX_SUN_get_transparent_index */
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------ */
|
|
||||||
|
|
||||||
struct GLXEW
|
|
||||||
{
|
|
||||||
unsigned int GLX_10 : 1;
|
|
||||||
unsigned int GLX_11 : 1;
|
|
||||||
unsigned int GLX_12 : 1;
|
|
||||||
unsigned int GLX_13 : 1;
|
|
||||||
unsigned int GLX_14 : 1;
|
|
||||||
|
|
||||||
unsigned int ARB_get_proc_address : 1;
|
|
||||||
unsigned int ARB_multisample : 1;
|
|
||||||
|
|
||||||
unsigned int EXT_import_context : 1;
|
|
||||||
unsigned int EXT_visual_info : 1;
|
|
||||||
unsigned int EXT_visual_rating : 1;
|
|
||||||
|
|
||||||
unsigned int MESA_copy_sub_buffer : 1;
|
|
||||||
unsigned int MESA_pixmap_colormap : 1;
|
|
||||||
unsigned int MESA_release_buffers : 1;
|
|
||||||
unsigned int MESA_set_3dfx_mode : 1;
|
|
||||||
|
|
||||||
unsigned int NV_vertex_array_range : 1;
|
|
||||||
|
|
||||||
unsigned int OML_swap_method : 1;
|
|
||||||
unsigned int OML_sync_control : 1;
|
|
||||||
|
|
||||||
unsigned int SGI_cushion : 1;
|
|
||||||
unsigned int SGI_make_current_read : 1;
|
|
||||||
unsigned int SGI_swap_control : 1;
|
|
||||||
unsigned int SGI_video_sync : 1;
|
|
||||||
unsigned int SGIS_blended_overlay : 1;
|
|
||||||
unsigned int SGIS_multisample : 1;
|
|
||||||
unsigned int SGIS_shared_multisample : 1;
|
|
||||||
|
|
||||||
/* unsigned int SGIX_dm_buffer : 1; */
|
|
||||||
unsigned int SGIX_fbconfig : 1;
|
|
||||||
unsigned int SGIX_pbuffer : 1;
|
|
||||||
unsigned int SGIX_swap_group : 1;
|
|
||||||
unsigned int SGIX_swap_barrier : 1;
|
|
||||||
/* unsigned int SGIX_video_source : 1; */
|
|
||||||
/* unsigned int SGIX_video_resize : 1; */
|
|
||||||
unsigned int SGIX_visual_select_group : 1;
|
|
||||||
|
|
||||||
unsigned int SUN_get_transparent_index : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct GLXEW glxew;
|
|
||||||
extern GLboolean glxewGetExtension (const char* name);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#endif /* __glxew_h__ */
|
|
@ -1,741 +0,0 @@
|
|||||||
/*
|
|
||||||
** License Applicability. Except to the extent portions of this file are
|
|
||||||
** made subject to an alternative license as permitted in the SGI Free
|
|
||||||
** Software License B, Version 1.1 (the "License"), the contents of this
|
|
||||||
** file are subject only to the provisions of the License. You may not use
|
|
||||||
** this file except in compliance with the License. You may obtain a copy
|
|
||||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
|
||||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
|
||||||
**
|
|
||||||
** http://oss.sgi.com/projects/FreeB
|
|
||||||
**
|
|
||||||
** Note that, as provided in the License, the Software is distributed on an
|
|
||||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
|
||||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
|
||||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
|
||||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
||||||
**
|
|
||||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
|
|
||||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
|
|
||||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
|
|
||||||
** Copyright in any portions created by third parties is as indicated
|
|
||||||
** elsewhere herein. All Rights Reserved.
|
|
||||||
**
|
|
||||||
** Additional Notice Provisions: This software was created using the
|
|
||||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
|
|
||||||
** not been independently verified as being compliant with the OpenGL(R)
|
|
||||||
** version 1.2.1 Specification.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
** The OpenGL Extension Wrangler Library
|
|
||||||
** Copyright (C) 2003, 2002, Milan Ikits
|
|
||||||
** Copyright (C) 2002, Lev Povalahev
|
|
||||||
** All rights reserved.
|
|
||||||
**
|
|
||||||
** Redistribution and use in source and binary forms, with or without
|
|
||||||
** modification, are permitted provided that the following conditions are met:
|
|
||||||
**
|
|
||||||
** * Redistributions of source code must retain the above copyright notice,
|
|
||||||
** this list of conditions and the following disclaimer.
|
|
||||||
** * Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
** this list of conditions and the following disclaimer in the documentation
|
|
||||||
** and/or other materials provided with the distribution.
|
|
||||||
** * The name of the author may be used to endorse or promote products
|
|
||||||
** derived from this software without specific prior written permission.
|
|
||||||
**
|
|
||||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
||||||
** THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __wglew_h__
|
|
||||||
#define __wglew_h__
|
|
||||||
|
|
||||||
#ifdef __wglext_h_
|
|
||||||
#error wglext.h included before wglew.h
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __wglext_h_
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
|
|
||||||
#if !defined(APIENTRY) && !defined(__CYGWIN__)
|
|
||||||
#define WIN32_LEAN_AND_MEAN 1
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* GLEW_STATIC needs to be set when using the static version.
|
|
||||||
* GLEW_BUILD is set when building the DLL version.
|
|
||||||
*/
|
|
||||||
#ifdef GLEW_STATIC
|
|
||||||
# define GLEW_EXPORT
|
|
||||||
#else
|
|
||||||
# ifdef GLEW_BUILD
|
|
||||||
# define GLEW_EXPORT __declspec(dllexport)
|
|
||||||
# else
|
|
||||||
# define GLEW_EXPORT __declspec(dllimport)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* ARB extensions */
|
|
||||||
#define WGL_ARB_buffer_region 1
|
|
||||||
#define WGL_ARB_extensions_string 1
|
|
||||||
#define WGL_ARB_make_current_read 1
|
|
||||||
#define WGL_ARB_multisample 1
|
|
||||||
#define WGL_ARB_pbuffer 1
|
|
||||||
#define WGL_ARB_pixel_format 1
|
|
||||||
#define WGL_ARB_render_texture 1
|
|
||||||
/* multi-vendor extensions */
|
|
||||||
#define WGL_EXT_depth_float 1
|
|
||||||
#define WGL_EXT_display_color_table 1
|
|
||||||
#define WGL_EXT_extensions_string 1
|
|
||||||
#define WGL_EXT_make_current_read 1
|
|
||||||
#define WGL_EXT_multisample 1
|
|
||||||
#define WGL_EXT_swap_control 1
|
|
||||||
#define WGL_EXT_pixel_format 1
|
|
||||||
#define WGL_EXT_pbuffer 1
|
|
||||||
/* vendor-specific extensions */
|
|
||||||
#define WGL_I3D_digital_video_control 1
|
|
||||||
#define WGL_I3D_gamma 1
|
|
||||||
#define WGL_I3D_genlock 1
|
|
||||||
#define WGL_I3D_image_buffer 1
|
|
||||||
#define WGL_I3D_swap_frame_lock 1
|
|
||||||
#define WGL_I3D_swap_frame_usage 1
|
|
||||||
#define WGL_OML_sync_control 1
|
|
||||||
/* ATI extensions */
|
|
||||||
#define WGL_ATI_pixel_format_float 1
|
|
||||||
/* NVIDIA extensions */
|
|
||||||
#define WGL_NV_float_buffer 1
|
|
||||||
#define WGL_NV_render_depth_texture 1
|
|
||||||
#define WGL_NV_render_texture_rectangle 1
|
|
||||||
#define WGL_NV_vertex_array_range 1
|
|
||||||
|
|
||||||
/* ---------------------------- ARB_buffer_region ------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ARB_buffer_region
|
|
||||||
|
|
||||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
|
||||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
|
||||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
|
||||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
|
||||||
|
|
||||||
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
|
||||||
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLCREATEBUFFERREGIONARBPROC wglCreateBufferRegionARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLDELETEBUFFERREGIONARBPROC wglDeleteBufferRegionARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLSAVEBUFFERREGIONARBPROC wglSaveBufferRegionARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLRESTOREBUFFERREGIONARBPROC wglRestoreBufferRegionARB;
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_buffer_region */
|
|
||||||
|
|
||||||
/* -------------------------- ARB_extensions_string ----------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ARB_extensions_string
|
|
||||||
|
|
||||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_extensions_string */
|
|
||||||
|
|
||||||
/* -------------------------- ARB_make_current_read ----------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ARB_make_current_read
|
|
||||||
|
|
||||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
|
||||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLMAKECONTEXTCURRENTARBPROC wglMakeContextCurrentARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETCURRENTREADDCARBPROC wglGetCurrentReadDCARB;
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_make_current_read */
|
|
||||||
|
|
||||||
/* ----------------------------- ARB_multisample -------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ARB_multisample
|
|
||||||
|
|
||||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
|
||||||
#define WGL_SAMPLES_ARB 0x2042
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_multisample */
|
|
||||||
|
|
||||||
/* ------------------------------- ARB_pbuffer ---------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ARB_pbuffer
|
|
||||||
|
|
||||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
|
||||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
|
||||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
|
||||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
|
||||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
|
||||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
|
||||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
|
||||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
|
||||||
|
|
||||||
DECLARE_HANDLE(HPBUFFERARB);
|
|
||||||
|
|
||||||
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
|
||||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLCREATEPBUFFERARBPROC wglCreatePbufferARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLRELEASEPBUFFERDCARBPROC wglReleasePbufferDCARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLDESTROYPBUFFERARBPROC wglDestroyPbufferARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB;
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_pbuffer */
|
|
||||||
|
|
||||||
/* ---------------------------- ARB_pixel_format -------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ARB_pixel_format
|
|
||||||
|
|
||||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
|
||||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
|
||||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
|
||||||
#define WGL_ACCELERATION_ARB 0x2003
|
|
||||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
|
||||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
|
||||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
|
||||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
|
||||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
|
||||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
|
||||||
#define WGL_TRANSPARENT_ARB 0x200A
|
|
||||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
|
||||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
|
||||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
|
||||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
|
||||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
|
||||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
|
||||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
|
||||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
|
||||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
|
||||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
|
||||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
|
||||||
#define WGL_STEREO_ARB 0x2012
|
|
||||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
|
||||||
#define WGL_COLOR_BITS_ARB 0x2014
|
|
||||||
#define WGL_RED_BITS_ARB 0x2015
|
|
||||||
#define WGL_RED_SHIFT_ARB 0x2016
|
|
||||||
#define WGL_GREEN_BITS_ARB 0x2017
|
|
||||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
|
||||||
#define WGL_BLUE_BITS_ARB 0x2019
|
|
||||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
|
||||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
|
||||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
|
||||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
|
||||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
|
||||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
|
||||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
|
||||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
|
||||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
|
||||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
|
||||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
|
||||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
|
||||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
|
||||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
|
||||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
|
||||||
#define WGL_SWAP_COPY_ARB 0x2029
|
|
||||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
|
||||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
|
||||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVARBPROC wglGetPixelFormatAttribfvARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB;
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_pixel_format */
|
|
||||||
|
|
||||||
/* --------------------------- ARB_render_texture ------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ARB_render_texture
|
|
||||||
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
|
||||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
|
||||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
|
||||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
|
||||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
|
||||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
|
||||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
|
||||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
|
||||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
|
||||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
|
||||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
|
||||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
|
||||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
|
||||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
|
||||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
|
||||||
#define WGL_BACK_LEFT_ARB 0x2085
|
|
||||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
|
||||||
#define WGL_AUX0_ARB 0x2087
|
|
||||||
#define WGL_AUX1_ARB 0x2088
|
|
||||||
#define WGL_AUX2_ARB 0x2089
|
|
||||||
#define WGL_AUX3_ARB 0x208A
|
|
||||||
#define WGL_AUX4_ARB 0x208B
|
|
||||||
#define WGL_AUX5_ARB 0x208C
|
|
||||||
#define WGL_AUX6_ARB 0x208D
|
|
||||||
#define WGL_AUX7_ARB 0x208E
|
|
||||||
#define WGL_AUX8_ARB 0x208F
|
|
||||||
#define WGL_AUX9_ARB 0x2090
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLBINDTEXIMAGEARBPROC wglBindTexImageARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLRELEASETEXIMAGEARBPROC wglReleaseTexImageARB;
|
|
||||||
extern GLEW_EXPORT PFNWGLSETPBUFFERATTRIBARBPROC wglSetPbufferAttribARB;
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_render_texture */
|
|
||||||
|
|
||||||
/* ----------------------------- EXT_depth_float -------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_depth_float
|
|
||||||
|
|
||||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_depth_float */
|
|
||||||
|
|
||||||
/* ------------------------- EXT_display_color_table ---------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_display_color_table
|
|
||||||
|
|
||||||
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
|
||||||
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
|
||||||
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
|
||||||
typedef void (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC wglCreateDisplayColorTableEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLLOADDISPLAYCOLORTABLEEXTPROC wglLoadDisplayColorTableEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLBINDDISPLAYCOLORTABLEEXTPROC wglBindDisplayColorTableEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC wglDestroyDisplayColorTableEXT;
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_display_color_table */
|
|
||||||
|
|
||||||
/* -------------------------- EXT_extensions_string ----------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_extensions_string
|
|
||||||
|
|
||||||
typedef const char* (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) ();
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETEXTENSIONSSTRINGEXTPROC wglGetExtensionsStringEXT;
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_extensions_string */
|
|
||||||
|
|
||||||
/* -------------------------- EXT_make_current_read ----------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_make_current_read
|
|
||||||
|
|
||||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLMAKECONTEXTCURRENTEXTPROC wglMakeContextCurrentEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETCURRENTREADDCEXTPROC wglGetCurrentReadDCEXT;
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_make_current_read */
|
|
||||||
|
|
||||||
/* ----------------------------- EXT_multisample -------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_multisample
|
|
||||||
|
|
||||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
|
||||||
#define WGL_SAMPLES_EXT 0x2042
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_multisample */
|
|
||||||
|
|
||||||
/* ----------------------------- EXT_pixel_format ------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_pixel_format
|
|
||||||
|
|
||||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
|
||||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
|
||||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
|
||||||
#define WGL_ACCELERATION_EXT 0x2003
|
|
||||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
|
||||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
|
||||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
|
||||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
|
||||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
|
||||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
|
||||||
#define WGL_TRANSPARENT_EXT 0x200A
|
|
||||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
|
||||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
|
||||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
|
||||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
|
||||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
|
||||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
|
||||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
|
||||||
#define WGL_STEREO_EXT 0x2012
|
|
||||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
|
||||||
#define WGL_COLOR_BITS_EXT 0x2014
|
|
||||||
#define WGL_RED_BITS_EXT 0x2015
|
|
||||||
#define WGL_RED_SHIFT_EXT 0x2016
|
|
||||||
#define WGL_GREEN_BITS_EXT 0x2017
|
|
||||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
|
||||||
#define WGL_BLUE_BITS_EXT 0x2019
|
|
||||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
|
||||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
|
||||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
|
||||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
|
||||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
|
||||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
|
||||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
|
||||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
|
||||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
|
||||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
|
||||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
|
||||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
|
||||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
|
||||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
|
||||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
|
||||||
#define WGL_SWAP_COPY_EXT 0x2029
|
|
||||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
|
||||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
|
||||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBIVEXTPROC wglGetPixelFormatAttribivEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETPIXELFORMATATTRIBFVEXTPROC wglGetPixelFormatAttribfvEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLCHOOSEPIXELFORMATEXTPROC wglChoosePixelFormatEXT;
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_pixel_format */
|
|
||||||
|
|
||||||
/* ------------------------------- EXT_pbuffer ---------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_pbuffer
|
|
||||||
|
|
||||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
|
||||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
|
||||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
|
||||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
|
||||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
|
||||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
|
||||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
|
||||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
|
||||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
|
||||||
|
|
||||||
DECLARE_HANDLE(HPBUFFEREXT);
|
|
||||||
|
|
||||||
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
|
||||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
|
||||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLCREATEPBUFFEREXTPROC wglCreatePbufferEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETPBUFFERDCEXTPROC wglGetPbufferDCEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLRELEASEPBUFFERDCEXTPROC wglReleasePbufferDCEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLDESTROYPBUFFEREXTPROC wglDestroyPbufferEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLQUERYPBUFFEREXTPROC wglQueryPbufferEXT;
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_pbuffer */
|
|
||||||
|
|
||||||
/* ---------------------------- EXT_swap_control -------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_EXT_swap_control
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
|
||||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETSWAPINTERVALEXTPROC wglGetSwapIntervalEXT;
|
|
||||||
|
|
||||||
#endif /* WGL_EXT_swap_control */
|
|
||||||
|
|
||||||
/* ------------------------ I3D_digital_video_control --------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_I3D_digital_video_control
|
|
||||||
|
|
||||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
|
||||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
|
||||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
|
||||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC wglGetDigitalVideoParametersI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC wglSetDigitalVideoParametersI3D;
|
|
||||||
|
|
||||||
#endif /* WGL_I3D_digital_video_control */
|
|
||||||
|
|
||||||
/* -------------------------------- I3D_gamma ----------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_I3D_gamma
|
|
||||||
|
|
||||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
|
||||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETGAMMATABLEPARAMETERSI3DPROC wglGetGammaTableParametersI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLSETGAMMATABLEPARAMETERSI3DPROC wglSetGammaTableParametersI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETGAMMATABLEI3DPROC wglGetGammaTableI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLSETGAMMATABLEI3DPROC wglSetGammaTableI3D;
|
|
||||||
|
|
||||||
#endif /* WGL_I3D_gamma */
|
|
||||||
|
|
||||||
/* ------------------------------- I3D_genlock ---------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_I3D_genlock
|
|
||||||
|
|
||||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
|
||||||
#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
|
|
||||||
#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
|
|
||||||
#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
|
|
||||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
|
||||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
|
||||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
|
||||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
|
||||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLENABLEGENLOCKI3DPROC wglEnableGenlockI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLDISABLEGENLOCKI3DPROC wglDisableGenlockI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLISENABLEDGENLOCKI3DPROC wglIsEnabledGenlockI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGENLOCKSOURCEI3DPROC wglGenlockSourceI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETGENLOCKSOURCEI3DPROC wglGetGenlockSourceI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGENLOCKSOURCEEDGEI3DPROC wglGenlockSourceEdgeI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETGENLOCKSOURCEEDGEI3DPROC wglGetGenlockSourceEdgeI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGENLOCKSAMPLERATEI3DPROC wglGenlockSampleRateI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETGENLOCKSAMPLERATEI3DPROC wglGetGenlockSampleRateI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGENLOCKSOURCEDELAYI3DPROC wglGenlockSourceDelayI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETGENLOCKSOURCEDELAYI3DPROC wglGetGenlockSourceDelayI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC wglQueryGenlockMaxSourceDelayI3D;
|
|
||||||
|
|
||||||
#endif /* WGL_I3D_genlock */
|
|
||||||
|
|
||||||
/* ---------------------------- I3D_image_buffer -------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_I3D_image_buffer
|
|
||||||
|
|
||||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
|
||||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
|
||||||
|
|
||||||
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLCREATEIMAGEBUFFERI3DPROC wglCreateImageBufferI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLDESTROYIMAGEBUFFERI3DPROC wglDestroyImageBufferI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC wglAssociateImageBufferEventsI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC wglReleaseImageBufferEventsI3D;
|
|
||||||
|
|
||||||
#endif /* WGL_I3D_image_buffer */
|
|
||||||
|
|
||||||
/* --------------------------- I3D_swap_frame_lock ------------------------ */
|
|
||||||
|
|
||||||
#ifdef WGL_I3D_swap_frame_lock
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLENABLEFRAMELOCKI3DPROC wglEnableFrameLockI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLDISABLEFRAMELOCKI3DPROC wglDisableFrameLockI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLISENABLEDFRAMELOCKI3DPROC wglIsEnabledFrameLockI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLQUERYFRAMELOCKMASTERI3DPROC wglQueryFrameLockMasterI3D;
|
|
||||||
|
|
||||||
#endif /* WGL_I3D_swap_frame_lock */
|
|
||||||
|
|
||||||
/* -------------------------- I3D_swap_frame_usage ------------------------ */
|
|
||||||
|
|
||||||
#ifdef WGL_I3D_swap_frame_usage
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETFRAMEUSAGEI3DPROC wglGetFrameUsageI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLBEGINFRAMETRACKINGI3DPROC wglBeginFrameTrackingI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLENDFRAMETRACKINGI3DPROC wglEndFrameTrackingI3D;
|
|
||||||
extern GLEW_EXPORT PFNWGLQUERYFRAMETRACKINGI3DPROC wglQueryFrameTrackingI3D;
|
|
||||||
|
|
||||||
#endif /* WGL_I3D_swap_frame_usage */
|
|
||||||
|
|
||||||
/* ---------------------------- OML_sync_control -------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_OML_sync_control
|
|
||||||
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
|
||||||
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
|
||||||
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLGETSYNCVALUESOMLPROC wglGetSyncValuesOML;
|
|
||||||
extern GLEW_EXPORT PFNWGLGETMSCRATEOMLPROC wglGetMscRateOML;
|
|
||||||
extern GLEW_EXPORT PFNWGLSWAPBUFFERSMSCOMLPROC wglSwapBuffersMscOML;
|
|
||||||
extern GLEW_EXPORT PFNWGLSWAPLAYERBUFFERSMSCOMLPROC wglSwapLayerBuffersMscOML;
|
|
||||||
extern GLEW_EXPORT PFNWGLWAITFORMSCOMLPROC wglWaitForMscOML;
|
|
||||||
extern GLEW_EXPORT PFNWGLWAITFORSBCOMLPROC wglWaitForSbcOML;
|
|
||||||
|
|
||||||
#endif /* WGL_OML_sync_control */
|
|
||||||
|
|
||||||
/* ------------------------- ATI_pixel_format_float ----------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_ATI_pixel_format_float
|
|
||||||
|
|
||||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
|
||||||
#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
|
|
||||||
#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
|
|
||||||
|
|
||||||
#endif /* WGL_ATI_pixel_format_float */
|
|
||||||
|
|
||||||
/* ---------------------------- NV_float_buffer --------------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_NV_float_buffer
|
|
||||||
|
|
||||||
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
|
||||||
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
|
||||||
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
|
||||||
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
|
||||||
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
|
||||||
|
|
||||||
#endif /* WGL_NV_float_buffer */
|
|
||||||
|
|
||||||
/* ------------------------- NV_render_depth_texture ---------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_NV_render_depth_texture
|
|
||||||
|
|
||||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
|
||||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
|
||||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
|
||||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
|
||||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
|
||||||
|
|
||||||
#endif /* WGL_NV_render_depth_texture */
|
|
||||||
|
|
||||||
/* ----------------------- NV_render_texture_rectangle -------------------- */
|
|
||||||
|
|
||||||
#ifdef WGL_NV_render_texture_rectangle
|
|
||||||
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
|
||||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
|
||||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
|
||||||
|
|
||||||
#endif /* WGL_NV_render_texture_rectangle */
|
|
||||||
|
|
||||||
/* ------------------------- NV_vertex_array_range ------------------------ */
|
|
||||||
|
|
||||||
#ifdef WGL_NV_vertex_array_range
|
|
||||||
|
|
||||||
typedef void * (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority);
|
|
||||||
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
|
||||||
|
|
||||||
extern GLEW_EXPORT PFNWGLALLOCATEMEMORYNVPROC wglAllocateMemoryNV;
|
|
||||||
extern GLEW_EXPORT PFNWGLFREEMEMORYNVPROC wglFreeMemoryNV;
|
|
||||||
|
|
||||||
#endif /* WGL_NV_vertex_array_range */
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------ */
|
|
||||||
|
|
||||||
struct WGLEW
|
|
||||||
{
|
|
||||||
unsigned int ARB_buffer_region : 1;
|
|
||||||
unsigned int ARB_extensions_string : 1;
|
|
||||||
unsigned int ARB_make_current_read : 1;
|
|
||||||
unsigned int ARB_multisample : 1;
|
|
||||||
unsigned int ARB_pbuffer : 1;
|
|
||||||
unsigned int ARB_pixel_format : 1;
|
|
||||||
unsigned int ARB_render_texture : 1;
|
|
||||||
|
|
||||||
unsigned int EXT_depth_float : 1;
|
|
||||||
unsigned int EXT_display_color_table : 1;
|
|
||||||
unsigned int EXT_extensions_string : 1;
|
|
||||||
unsigned int EXT_make_current_read : 1;
|
|
||||||
unsigned int EXT_multisample : 1;
|
|
||||||
unsigned int EXT_pixel_format : 1;
|
|
||||||
unsigned int EXT_pbuffer : 1;
|
|
||||||
unsigned int EXT_swap_control : 1;
|
|
||||||
|
|
||||||
unsigned int I3D_digital_video_control : 1;
|
|
||||||
unsigned int I3D_gamma : 1;
|
|
||||||
unsigned int I3D_genlock : 1;
|
|
||||||
unsigned int I3D_image_buffer : 1;
|
|
||||||
unsigned int I3D_swap_frame_lock : 1;
|
|
||||||
unsigned int I3D_swap_frame_usage : 1;
|
|
||||||
unsigned int OML_sync_control : 1;
|
|
||||||
|
|
||||||
unsigned int ATI_pixel_format_float : 1;
|
|
||||||
|
|
||||||
unsigned int NV_float_buffer : 1;
|
|
||||||
unsigned int NV_render_depth_texture : 1;
|
|
||||||
unsigned int NV_render_texture_rectangle : 1;
|
|
||||||
unsigned int NV_vertex_array_range : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern GLEW_EXPORT struct WGLEW wglew;
|
|
||||||
extern GLEW_EXPORT GLboolean wglewGetExtension (const char* name);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#undef GLEW_EXPORT
|
|
||||||
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#endif /* __wglew_h__ */
|
|
3479
src/glew.c
3479
src/glew.c
File diff suppressed because it is too large
Load Diff
2262
src/glewinfo.c
2262
src/glewinfo.c
File diff suppressed because it is too large
Load Diff
@ -84,13 +84,13 @@ VisualInfoARB (HDC hDC, int verbose)
|
|||||||
attrib[22] = WGL_NUMBER_UNDERLAYS_ARB;
|
attrib[22] = WGL_NUMBER_UNDERLAYS_ARB;
|
||||||
attrib[23] = WGL_SWAP_LAYER_BUFFERS_ARB;
|
attrib[23] = WGL_SWAP_LAYER_BUFFERS_ARB;
|
||||||
n_attrib = 24;
|
n_attrib = 24;
|
||||||
if (wglew.ARB_pbuffer)
|
if (wglew_ARB_pbuffer)
|
||||||
{
|
{
|
||||||
attrib[n_attrib] = WGL_DRAW_TO_PBUFFER_ARB;
|
attrib[n_attrib] = WGL_DRAW_TO_PBUFFER_ARB;
|
||||||
n_pbuffer = n_attrib;
|
n_pbuffer = n_attrib;
|
||||||
n_attrib++;
|
n_attrib++;
|
||||||
}
|
}
|
||||||
if (wglew.NV_float_buffer)
|
if (wglew_NV_float_buffer)
|
||||||
{
|
{
|
||||||
attrib[n_attrib] = WGL_FLOAT_COMPONENTS_NV;
|
attrib[n_attrib] = WGL_FLOAT_COMPONENTS_NV;
|
||||||
n_float = n_attrib;
|
n_float = n_attrib;
|
||||||
@ -114,7 +114,7 @@ VisualInfoARB (HDC hDC, int verbose)
|
|||||||
/* by default show only fully accelerated window or pbuffer capable visuals */
|
/* by default show only fully accelerated window or pbuffer capable visuals */
|
||||||
if (!showall
|
if (!showall
|
||||||
&& ((value[2] && !value[1])
|
&& ((value[2] && !value[1])
|
||||||
|| (!wglew.ARB_pbuffer || !value[n_pbuffer])
|
|| (!wglew_ARB_pbuffer || !value[n_pbuffer])
|
||||||
|| (value[3] != WGL_FULL_ACCELERATION_ARB))) continue;
|
|| (value[3] != WGL_FULL_ACCELERATION_ARB))) continue;
|
||||||
/* print out the information for this visual */
|
/* print out the information for this visual */
|
||||||
/* visual id */
|
/* visual id */
|
||||||
@ -122,21 +122,21 @@ VisualInfoARB (HDC hDC, int verbose)
|
|||||||
/* visual type */
|
/* visual type */
|
||||||
if (value[1])
|
if (value[1])
|
||||||
{
|
{
|
||||||
if (wglew.ARB_pbuffer && value[n_pbuffer]) fprintf(file, "wp ");
|
if (wglew_ARB_pbuffer && value[n_pbuffer]) fprintf(file, "wp ");
|
||||||
else fprintf(file, "wn ");
|
else fprintf(file, "wn ");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (value[2]) fprintf(file, "bm ");
|
if (value[2]) fprintf(file, "bm ");
|
||||||
else if (wglew.ARB_pbuffer && value[n_pbuffer]) fprintf(file, "pb ");
|
else if (wglew_ARB_pbuffer && value[n_pbuffer]) fprintf(file, "pb ");
|
||||||
}
|
}
|
||||||
/* acceleration */
|
/* acceleration */
|
||||||
fprintf(file, "%s", value[3] == WGL_FULL_ACCELERATION_ARB ? "fu" :
|
fprintf(file, "%s", value[3] == WGL_FULL_ACCELERATION_ARB ? "fu" :
|
||||||
value[3] == WGL_GENERIC_ACCELERATION_ARB ? "ge" :
|
value[3] == WGL_GENERIC_ACCELERATION_ARB ? "ge" :
|
||||||
value[3] == WGL_NO_ACCELERATION_ARB ? "no" : ". ");
|
value[3] == WGL_NO_ACCELERATION_ARB ? "no" : ". ");
|
||||||
/* format */
|
/* format */
|
||||||
if (wglew.NV_float_buffer && value[n_float]) fprintf(file, " f ");
|
if (wglew_NV_float_buffer && value[n_float]) fprintf(file, " f ");
|
||||||
else if (wglew.ATI_pixel_format_float && value[7] == WGL_TYPE_RGBA_FLOAT_ATI) fprintf(file, " f ");
|
else if (wglew_ATI_pixel_format_float && value[7] == WGL_TYPE_RGBA_FLOAT_ATI) fprintf(file, " f ");
|
||||||
else if (value[7] == WGL_TYPE_RGBA_ARB) fprintf(file, " i ");
|
else if (value[7] == WGL_TYPE_RGBA_ARB) fprintf(file, " i ");
|
||||||
else if (value[7] == WGL_TYPE_COLORINDEX_ARB) fprintf(file, " c ");
|
else if (value[7] == WGL_TYPE_COLORINDEX_ARB) fprintf(file, " c ");
|
||||||
/* double buffer */
|
/* double buffer */
|
||||||
@ -556,14 +556,14 @@ main (int argc, char** argv)
|
|||||||
fprintf(file, "GLU extensions (GLU_): \n");
|
fprintf(file, "GLU extensions (GLU_): \n");
|
||||||
PrintExtensions((char*)gluGetString(GLU_EXTENSIONS));
|
PrintExtensions((char*)gluGetString(GLU_EXTENSIONS));
|
||||||
/* WGL extensions */
|
/* WGL extensions */
|
||||||
if (wglew.ARB_extensions_string || wglew.EXT_extensions_string)
|
if (wglew_ARB_extensions_string || wglew_EXT_extensions_string)
|
||||||
{
|
{
|
||||||
fprintf(file, "WGL extensions (WGL_): \n");
|
fprintf(file, "WGL extensions (WGL_): \n");
|
||||||
PrintExtensions(wglGetExtensionsStringARB ? (char*)wglGetExtensionsStringARB(hDC) :
|
PrintExtensions(wglGetExtensionsStringARB ? (char*)wglGetExtensionsStringARB(hDC) :
|
||||||
(char*)wglGetExtensionsStringEXT(hDC));
|
(char*)wglGetExtensionsStringEXT());
|
||||||
}
|
}
|
||||||
/* enumerate all the formats */
|
/* enumerate all the formats */
|
||||||
if (wglew.ARB_pixel_format)
|
if (wglew_ARB_pixel_format)
|
||||||
{
|
{
|
||||||
int attrib[16], value[16], pf;
|
int attrib[16], value[16], pf;
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
|
Loading…
Reference in New Issue
Block a user