Merge remote branch 'main/master' into radeon-rewrite
Conflicts: src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_state.c src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/radeon_ioctl.c src/mesa/drivers/dri/radeon/radeon_screen.c
This commit is contained in:
commit
407e8ae5b1
50
Makefile
50
Makefile
|
@ -190,8 +190,6 @@ MAIN_FILES = \
|
|||
$(DIRECTORY)/configure.ac \
|
||||
$(DIRECTORY)/acinclude.m4 \
|
||||
$(DIRECTORY)/aclocal.m4 \
|
||||
$(DIRECTORY)/descrip.mms \
|
||||
$(DIRECTORY)/mms-config. \
|
||||
$(DIRECTORY)/bin/config.guess \
|
||||
$(DIRECTORY)/bin/config.sub \
|
||||
$(DIRECTORY)/bin/install-sh \
|
||||
|
@ -221,11 +219,11 @@ MAIN_FILES = \
|
|||
$(DIRECTORY)/include/GL/osmesa.h \
|
||||
$(DIRECTORY)/include/GL/svgamesa.h \
|
||||
$(DIRECTORY)/include/GL/vms_x_fix.h \
|
||||
$(DIRECTORY)/include/GL/wglext.h \
|
||||
$(DIRECTORY)/include/GL/wmesa.h \
|
||||
$(DIRECTORY)/src/Makefile \
|
||||
$(DIRECTORY)/src/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/Makefile* \
|
||||
$(DIRECTORY)/src/mesa/sources \
|
||||
$(DIRECTORY)/src/mesa/sources.mak \
|
||||
$(DIRECTORY)/src/mesa/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/gl.pc.in \
|
||||
$(DIRECTORY)/src/mesa/osmesa.pc.in \
|
||||
|
@ -233,13 +231,11 @@ MAIN_FILES = \
|
|||
$(DIRECTORY)/src/mesa/main/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/main/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/glapi/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/glapi/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/math/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/math/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
|
||||
|
@ -300,11 +296,36 @@ MAIN_FILES = \
|
|||
$(DIRECTORY)/progs/util/README \
|
||||
$(DIRECTORY)/progs/util/*.[ch] \
|
||||
$(DIRECTORY)/progs/util/sampleMakefile \
|
||||
$(DIRECTORY)/vms/analyze_map.com \
|
||||
$(DIRECTORY)/vms/xlib.opt \
|
||||
$(DIRECTORY)/vms/xlib_share.opt \
|
||||
$(DIRECTORY)/windows/VC8/
|
||||
|
||||
EGL_FILES = \
|
||||
$(DIRECTORY)/include/EGL/*.h \
|
||||
$(DIRECTORY)/include/GLES/*.h \
|
||||
$(DIRECTORY)/include/GLES2/*.h \
|
||||
$(DIRECTORY)/src/egl/Makefile \
|
||||
$(DIRECTORY)/src/egl/*/Makefile \
|
||||
$(DIRECTORY)/src/egl/*/*.[ch] \
|
||||
$(DIRECTORY)/src/egl/*/*/Makefile \
|
||||
$(DIRECTORY)/src/egl/*/*/*.[ch] \
|
||||
|
||||
GALLIUM_FILES = \
|
||||
$(DIRECTORY)/src/mesa/state_tracker/*[ch] \
|
||||
$(DIRECTORY)/src/gallium/Makefile \
|
||||
$(DIRECTORY)/src/gallium/Makefile.template \
|
||||
$(DIRECTORY)/src/gallium/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/*/Makefile.template \
|
||||
$(DIRECTORY)/src/gallium/*/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/*.[ch] \
|
||||
$(DIRECTORY)/src/gallium/*/*/*.py \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/Makefile \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/SConscript \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*.[ch] \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*.py \
|
||||
$(DIRECTORY)/src/gallium/*/*/*/*/*.[ch] \
|
||||
|
||||
|
||||
DRI_FILES = \
|
||||
$(DIRECTORY)/include/GL/internal/dri_interface.h \
|
||||
|
@ -325,15 +346,12 @@ DRI_FILES = \
|
|||
|
||||
SGI_GLU_FILES = \
|
||||
$(DIRECTORY)/src/glu/Makefile \
|
||||
$(DIRECTORY)/src/glu/descrip.mms \
|
||||
$(DIRECTORY)/src/glu/glu.pc.in \
|
||||
$(DIRECTORY)/src/glu/sgi/Makefile \
|
||||
$(DIRECTORY)/src/glu/sgi/Makefile.mgw \
|
||||
$(DIRECTORY)/src/glu/sgi/Makefile.win \
|
||||
$(DIRECTORY)/src/glu/sgi/Makefile.DJ \
|
||||
$(DIRECTORY)/src/glu/sgi/glu.def \
|
||||
$(DIRECTORY)/src/glu/sgi/dummy.cc \
|
||||
$(DIRECTORY)/src/glu/sgi/descrip.mms \
|
||||
$(DIRECTORY)/src/glu/sgi/glu.exports \
|
||||
$(DIRECTORY)/src/glu/sgi/glu.exports.darwin \
|
||||
$(DIRECTORY)/src/glu/sgi/mesaglu.opt \
|
||||
|
@ -438,7 +456,13 @@ DEPEND_FILES = \
|
|||
$(TOP)/src/glu/sgi/depend
|
||||
|
||||
|
||||
LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
|
||||
LIB_FILES = \
|
||||
$(MAIN_FILES) \
|
||||
$(EGL_FILES) \
|
||||
$(GALLIUM_FILES) \
|
||||
$(DRI_FILES) \
|
||||
$(SGI_GLU_FILES) \
|
||||
$(GLW_FILES)
|
||||
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
|
|
|
@ -32,7 +32,7 @@ import common
|
|||
default_statetrackers = 'mesa'
|
||||
|
||||
if common.default_platform in ('linux', 'freebsd', 'darwin'):
|
||||
default_drivers = 'softpipe,failover,i915simple,i965simple,trace'
|
||||
default_drivers = 'softpipe,failover,i915simple,trace'
|
||||
default_winsys = 'xlib'
|
||||
elif common.default_platform in ('winddk',):
|
||||
default_drivers = 'softpipe,i915simple,trace'
|
||||
|
@ -133,7 +133,7 @@ if dri:
|
|||
# LLVM
|
||||
if llvm:
|
||||
# See also http://www.scons.org/wiki/UsingPkgConfig
|
||||
env.ParseConfig('llvm-config --cflags --ldflags --libs backend bitreader engine ipo')
|
||||
env.ParseConfig('llvm-config --cflags --ldflags --libs backend bitreader engine instrumentation interpreter ipo')
|
||||
env.Append(CPPDEFINES = ['MESA_LLVM'])
|
||||
# Force C++ linkage
|
||||
env['LINK'] = env['CXX']
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2007-07-22'
|
||||
timestamp='2009-02-03'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -56,8 +56,8 @@ version="\
|
|||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -331,7 +331,20 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
eval $set_cc_for_build
|
||||
SUN_ARCH="i386"
|
||||
# If there is a compiler, see if it is configured for 64-bit objects.
|
||||
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
|
||||
# This test works for both compilers.
|
||||
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
|
||||
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
|
||||
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_64BIT_ARCH >/dev/null
|
||||
then
|
||||
SUN_ARCH="x86_64"
|
||||
fi
|
||||
fi
|
||||
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
# According to config.sub, this is the proper way to canonicalize
|
||||
|
@ -532,7 +545,7 @@ EOF
|
|||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit ;;
|
||||
*:AIX:*:[45])
|
||||
*:AIX:*:[456])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
|
@ -796,9 +809,12 @@ EOF
|
|||
x86)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
EM64T | authenticamd)
|
||||
EM64T | authenticamd | genuineintel)
|
||||
echo x86_64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
IA64)
|
||||
echo ia64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
esac ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
|
@ -833,7 +849,14 @@ EOF
|
|||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
|
@ -925,6 +948,9 @@ EOF
|
|||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
|
||||
exit ;;
|
||||
padre:Linux:*:*)
|
||||
echo sparc-unknown-linux-gnu
|
||||
exit ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
# Look for CPU level
|
||||
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
|
||||
|
@ -954,8 +980,8 @@ EOF
|
|||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa:Linux:*:*)
|
||||
echo xtensa-unknown-linux-gnu
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
|
@ -975,9 +1001,6 @@ EOF
|
|||
a.out-i386-linux)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit ;;
|
||||
coff-i386)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit ;;
|
||||
"")
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld) or
|
||||
# one that does not give us useful --help.
|
||||
|
@ -1131,6 +1154,16 @@ EOF
|
|||
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4; exit; } ;;
|
||||
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
|
||||
OS_REL='.3'
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
|
||||
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
|
||||
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
|
||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
|
||||
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
|
||||
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
|
||||
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
|
||||
echo m68k-unknown-lynxos${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -1206,6 +1239,9 @@ EOF
|
|||
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
|
||||
echo i586-pc-beos
|
||||
exit ;;
|
||||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
echo i586-pc-haiku
|
||||
exit ;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
echo sx4-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
@ -1314,6 +1350,9 @@ EOF
|
|||
i*86:rdos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-rdos
|
||||
exit ;;
|
||||
i*86:AROS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-aros
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
|
@ -1474,9 +1513,9 @@ This script, last modified $timestamp, has failed to recognize
|
|||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
and
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
|
||||
# Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2007-06-28'
|
||||
timestamp='2009-02-03'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
|
@ -72,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
|
|||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
|
@ -122,6 +122,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
|||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
kopensolaris*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
|
@ -249,13 +250,16 @@ case $basic_machine in
|
|||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| lm32 \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep \
|
||||
| maxq | mb | microblaze | mcore | mep | metag \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64octeon | mips64octeonel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64r5900 | mips64r5900el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
|
@ -277,7 +281,7 @@ case $basic_machine in
|
|||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
|
@ -286,7 +290,7 @@ case $basic_machine in
|
|||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
| z8k | z80)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
|
@ -329,14 +333,17 @@ case $basic_machine in
|
|||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| lm32-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64octeon-* | mips64octeonel-* \
|
||||
| mips64orion-* | mips64orionel-* \
|
||||
| mips64r5900-* | mips64r5900el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
|
@ -358,20 +365,24 @@ case $basic_machine in
|
|||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
| z8k-* | z80-*)
|
||||
;;
|
||||
# Recognize the basic CPU types without company name, with glob match.
|
||||
xtensa*)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
|
@ -435,6 +446,10 @@ case $basic_machine in
|
|||
basic_machine=m68k-apollo
|
||||
os=-bsd
|
||||
;;
|
||||
aros)
|
||||
basic_machine=i386-pc
|
||||
os=-aros
|
||||
;;
|
||||
aux)
|
||||
basic_machine=m68k-apple
|
||||
os=-aux
|
||||
|
@ -443,10 +458,22 @@ case $basic_machine in
|
|||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
blackfin)
|
||||
basic_machine=bfin-unknown
|
||||
os=-linux
|
||||
;;
|
||||
blackfin-*)
|
||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cegcc)
|
||||
basic_machine=arm-unknown
|
||||
os=-cegcc
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
|
@ -514,6 +541,10 @@ case $basic_machine in
|
|||
basic_machine=m88k-motorola
|
||||
os=-sysv3
|
||||
;;
|
||||
dicos)
|
||||
basic_machine=i686-pc
|
||||
os=-dicos
|
||||
;;
|
||||
djgpp)
|
||||
basic_machine=i586-pc
|
||||
os=-msdosdjgpp
|
||||
|
@ -668,6 +699,14 @@ case $basic_machine in
|
|||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
;;
|
||||
m68knommu-*)
|
||||
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
|
@ -813,6 +852,14 @@ case $basic_machine in
|
|||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
parisc)
|
||||
basic_machine=hppa-unknown
|
||||
os=-linux
|
||||
;;
|
||||
parisc-*)
|
||||
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
|
@ -1021,6 +1068,10 @@ case $basic_machine in
|
|||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
|
@ -1096,6 +1147,10 @@ case $basic_machine in
|
|||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
;;
|
||||
z80-*-coff)
|
||||
basic_machine=z80-unknown
|
||||
os=-sim
|
||||
;;
|
||||
none)
|
||||
basic_machine=none-none
|
||||
os=-none
|
||||
|
@ -1134,7 +1189,7 @@ case $basic_machine in
|
|||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
|
@ -1206,8 +1261,9 @@ case $os in
|
|||
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
|
||||
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
|
||||
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
|
||||
| -kopensolaris* \
|
||||
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
|
||||
| -aos* \
|
||||
| -aos* | -aros* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
|
@ -1216,7 +1272,7 @@ case $os in
|
|||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
|
@ -1356,6 +1412,9 @@ case $os in
|
|||
-zvmoe)
|
||||
os=-zvmoe
|
||||
;;
|
||||
-dicos*)
|
||||
os=-dicos
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
*)
|
||||
|
|
|
@ -66,12 +66,12 @@ GLU_DIRS = @GLU_DIRS@
|
|||
DRIVER_DIRS = @DRIVER_DIRS@
|
||||
GALLIUM_DIRS = @GALLIUM_DIRS@
|
||||
GALLIUM_AUXILIARY_DIRS = @GALLIUM_AUXILIARY_DIRS@
|
||||
GALLIUM_DRIVER_DIRS = @GALLIUM_DRIVER_DIRS@
|
||||
GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@
|
||||
GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@
|
||||
GALLIUM_WINSYS_DRM_DIRS = @GALLIUM_WINSYS_DRM_DIRS@
|
||||
GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@
|
||||
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
|
||||
# Which subdirs under $(TOP)/progs/ to enter:
|
||||
PROGRAM_DIRS = @PROGRAM_DIRS@
|
||||
|
@ -92,6 +92,7 @@ MOTIF_CFLAGS = @MOTIF_CFLAGS@
|
|||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \
|
||||
$(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@
|
||||
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \
|
||||
$(EXTRA_LIB_PATH) @GLU_LIB_DEPS@
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \
|
||||
|
@ -124,6 +125,9 @@ DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
|
|||
# Where libGL will look for DRI hardware drivers
|
||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||
|
||||
# Xorg driver install directory (for xorg state-tracker)
|
||||
XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@
|
||||
|
||||
# pkg-config substitutions
|
||||
GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@
|
||||
GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@
|
||||
|
|
|
@ -6,6 +6,8 @@ CONFIG_NAME = darwin
|
|||
|
||||
INSTALL_DIR = /usr/X11
|
||||
|
||||
X11_DIR = $(INSTALL_DIR)
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = gcc
|
||||
|
@ -21,9 +23,9 @@ DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
|||
ARCH_FLAGS += $(RC_CFLAGS)
|
||||
|
||||
CFLAGS = -ggdb3 -Os -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
|
||||
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS = -ggdb3 -Os -Wall -fno-strict-aliasing \
|
||||
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
-I$(INSTALL_DIR)/include -I$(X11_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.dylib
|
||||
|
@ -39,12 +41,12 @@ GLUT_LIB_GLOB = libglut.*dylib
|
|||
GLW_LIB_GLOB = libGLw.*dylib
|
||||
OSMESA_LIB_GLOB = libOSMesa.*dylib
|
||||
|
||||
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
|
||||
GL_LIB_DEPS = -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXt
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXt
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = glx/x11 mesa glu glut/glx glew
|
||||
|
|
|
@ -92,8 +92,8 @@ EGL_DRIVERS_DIRS = demo
|
|||
GALLIUM_DIRS = auxiliary drivers state_trackers
|
||||
GALLIUM_AUXILIARY_DIRS = draw translate cso_cache pipebuffer tgsi sct rtasm util indices
|
||||
GALLIUM_AUXILIARIES = $(foreach DIR,$(GALLIUM_AUXILIARY_DIRS),$(TOP)/src/gallium/auxiliary/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_DRIVER_DIRS = softpipe i915simple i965simple failover trace
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVER_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_DRIVERS_DIRS = softpipe i915simple failover trace
|
||||
GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a)
|
||||
GALLIUM_WINSYS_DIRS = xlib egl_xlib
|
||||
GALLIUM_WINSYS_DRM_DIRS =
|
||||
GALLIUM_STATE_TRACKERS_DIRS = glx
|
||||
|
@ -102,6 +102,7 @@ GALLIUM_STATE_TRACKERS_DIRS = glx
|
|||
# Library dependencies
|
||||
#EXTRA_LIB_PATH ?=
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
EGL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -ldl
|
||||
OSMESA_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
|
||||
|
@ -121,6 +122,9 @@ DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
|
|||
# Where libGL will look for DRI hardware drivers
|
||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||
|
||||
# Xorg driver install directory (for xorg state-tracker)
|
||||
XORG_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/xorg/modules/drivers
|
||||
|
||||
# pkg-config substitutions
|
||||
GL_PC_REQ_PRIV =
|
||||
GL_PC_LIB_PRIV =
|
||||
|
|
|
@ -22,7 +22,8 @@ DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
|||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
CFLAGS = -Wall -Wmissing-prototypes -Wdeclaration-after-statement \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||
$(DEFINES) $(ASM_FLAGS) $(X11_INCLUDES) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
|
|
|
@ -6,7 +6,7 @@ CONFIG_NAME = linux-cell
|
|||
|
||||
|
||||
# Omiting other gallium drivers:
|
||||
GALLIUM_DRIVER_DIRS = cell softpipe trace
|
||||
GALLIUM_DRIVERS_DIRS = cell softpipe trace
|
||||
|
||||
|
||||
# Compiler and flags
|
||||
|
|
|
@ -22,9 +22,9 @@ endif
|
|||
|
||||
ifeq ($(MESA_LLVM),1)
|
||||
# LLVM_CFLAGS=`llvm-config --cflags`
|
||||
LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo` -Wno-long-long
|
||||
LLVM_LDFLAGS=`llvm-config --ldflags backend bitreader engine ipo`
|
||||
LLVM_LIBS=`llvm-config --libs backend bitreader engine ipo`
|
||||
LLVM_CXXFLAGS=`llvm-config --cxxflags backend bitreader engine ipo interpreter instrumentation` -Wno-long-long
|
||||
LLVM_LDFLAGS=`llvm-config --ldflags backend bitreader engine ipo interpreter instrumentation`
|
||||
LLVM_LIBS=`llvm-config --libs backend bitreader engine ipo interpreter instrumentation`
|
||||
MKLIB_OPTIONS=-cplusplus
|
||||
else
|
||||
LLVM_CFLAGS=
|
||||
|
|
121
configure.ac
121
configure.ac
|
@ -87,7 +87,7 @@ dnl Compiler macros
|
|||
DEFINES=""
|
||||
AC_SUBST([DEFINES])
|
||||
case "$host_os" in
|
||||
*-gnu*)
|
||||
linux*|*-gnu*)
|
||||
DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
|
||||
;;
|
||||
solaris*)
|
||||
|
@ -307,6 +307,13 @@ if test "x$enable_asm" = xyes; then
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
sparc*)
|
||||
case "$host_os" in
|
||||
linux*)
|
||||
asm_arch=sparc
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$asm_arch" in
|
||||
|
@ -327,6 +334,12 @@ if test "x$enable_asm" = xyes; then
|
|||
MESA_ASM_SOURCES='$(PPC_SOURCES)'
|
||||
AC_MSG_RESULT([yes, ppc])
|
||||
;;
|
||||
sparc)
|
||||
ASM_FLAGS="-DUSE_SPARC_ASM"
|
||||
MESA_ASM_SOURCES='$(SPARC_SOURCES)'
|
||||
GLAPI_ASM_SOURCES='$(SPARC_API)'
|
||||
AC_MSG_RESULT([yes, sparc])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([no, platform not supported])
|
||||
;;
|
||||
|
@ -382,7 +395,7 @@ default_driver="xlib"
|
|||
case "$host_os" in
|
||||
linux*)
|
||||
case "$host_cpu" in
|
||||
i*86|x86_64|powerpc*) default_driver="dri";;
|
||||
i*86|x86_64|powerpc*|sparc*) default_driver="dri";;
|
||||
esac
|
||||
;;
|
||||
*freebsd* | dragonfly*)
|
||||
|
@ -409,14 +422,14 @@ esac
|
|||
dnl
|
||||
dnl Driver specific build directories
|
||||
dnl
|
||||
SRC_DIRS="mesa egl"
|
||||
SRC_DIRS="mesa egl glew"
|
||||
GLU_DIRS="sgi"
|
||||
WINDOW_SYSTEM=""
|
||||
GALLIUM_DIRS="auxiliary drivers state_trackers"
|
||||
GALLIUM_WINSYS_DIRS=""
|
||||
GALLIUM_WINSYS_DRM_DIRS=""
|
||||
GALLIUM_AUXILIARY_DIRS="draw translate cso_cache pipebuffer tgsi sct rtasm util"
|
||||
GALLIUM_DRIVER_DIRS="softpipe failover trace"
|
||||
GALLIUM_DRIVERS_DIRS="softpipe failover trace"
|
||||
GALLIUM_STATE_TRACKERS_DIRS=""
|
||||
|
||||
case "$mesa_driver" in
|
||||
|
@ -428,9 +441,6 @@ dri)
|
|||
DRIVER_DIRS="dri"
|
||||
WINDOW_SYSTEM="dri"
|
||||
GALLIUM_WINSYS_DIRS="drm $GALLIUM_WINSYS_DIRS"
|
||||
GALLIUM_WINSYS_DRM_DIRS="intel"
|
||||
GALLIUM_DRIVER_DIRS="$GALLIUM_DRIVER_DIRS i915simple i965simple"
|
||||
GALLIUM_STATE_TRACKERS_DIRS="egl"
|
||||
;;
|
||||
osmesa)
|
||||
DRIVER_DIRS="osmesa"
|
||||
|
@ -443,7 +453,7 @@ AC_SUBST([WINDOW_SYSTEM])
|
|||
AC_SUBST([GALLIUM_DIRS])
|
||||
AC_SUBST([GALLIUM_WINSYS_DIRS])
|
||||
AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
|
||||
AC_SUBST([GALLIUM_DRIVER_DIRS])
|
||||
AC_SUBST([GALLIUM_DRIVERS_DIRS])
|
||||
AC_SUBST([GALLIUM_AUXILIARY_DIRS])
|
||||
AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
|
||||
AC_SUBST([RADEON_CFLAGS])
|
||||
|
@ -867,6 +877,19 @@ AC_SUBST([OSMESA_MESA_DEPS])
|
|||
AC_SUBST([OSMESA_PC_REQ])
|
||||
AC_SUBST([OSMESA_PC_LIB_PRIV])
|
||||
|
||||
dnl
|
||||
dnl EGL configuration
|
||||
dnl
|
||||
if test "$x11_pkgconfig" = yes; then
|
||||
PKG_CHECK_MODULES([EGL],[x11])
|
||||
EGL_LIB_DEPS="$EGL_LIBS"
|
||||
else
|
||||
# should check these...
|
||||
EGL_LIB_DEPS="$X_LIBS -lX11"
|
||||
fi
|
||||
EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS $OS_LIBS"
|
||||
AC_SUBST([EGL_LIB_DEPS])
|
||||
|
||||
dnl
|
||||
dnl GLU configuration
|
||||
dnl
|
||||
|
@ -1087,6 +1110,86 @@ if test "x$enable_gallium" = xyes; then
|
|||
SRC_DIRS="$SRC_DIRS gallium gallium/winsys"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium state trackers configuration
|
||||
dnl
|
||||
AC_ARG_WITH([state-trackers],
|
||||
[AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@],
|
||||
[comma delimited state_trackers list, e.g.
|
||||
"egl,glx" @<:@default=auto@:>@])],
|
||||
[with_state_trackers="$withval"],
|
||||
[with_state_trackers=yes])
|
||||
|
||||
case "$with_state_trackers" in
|
||||
no)
|
||||
GALLIUM_STATE_TRACKERS_DIRS=""
|
||||
;;
|
||||
yes)
|
||||
# look at what else is built
|
||||
case "$mesa_driver" in
|
||||
dri)
|
||||
GALLIUM_STATE_TRACKERS_DIRS=egl
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# verify the requested state tracker exist
|
||||
state_trackers=`IFS=', '; echo $with_state_trackers`
|
||||
for tracker in $state_trackers; do
|
||||
test -d "$srcdir/src/gallium/state_trackers/$tracker" || \
|
||||
AC_MSG_ERROR([state tracker '$tracker' doesn't exist])
|
||||
done
|
||||
GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_ARG_WITH([xorg-driver-dir],
|
||||
[AS_HELP_STRING([--with-xorg-driver-dir=DIR],
|
||||
[Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])],
|
||||
[XORG_DRIVER_INSTALL_DIR="$withval"],
|
||||
[XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"])
|
||||
AC_SUBST([XORG_DRIVER_INSTALL_DIR])
|
||||
|
||||
dnl
|
||||
dnl Gallium Intel configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-intel],
|
||||
[AS_HELP_STRING([--disable-gallium-intel],
|
||||
[build gallium intel @<:@default=enabled@:>@])],
|
||||
[enable_gallium_intel="$enableval"],
|
||||
[enable_gallium_intel=yes])
|
||||
if test "x$enable_gallium_intel" = xyes; then
|
||||
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS intel"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915simple"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium Radeon configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-radeon],
|
||||
[AS_HELP_STRING([--enable-gallium-radeon],
|
||||
[build gallium radeon @<:@default=disabled@:>@])],
|
||||
[enable_gallium_radeon="$enableval"],
|
||||
[enable_gallium_radeon=no])
|
||||
if test "x$enable_gallium_radeon" = xyes; then
|
||||
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS radeon"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300"
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl Gallium Radeon configuration
|
||||
dnl
|
||||
AC_ARG_ENABLE([gallium-nouveau],
|
||||
[AS_HELP_STRING([--enable-gallium-nouveau],
|
||||
[build gallium nouveau @<:@default=disabled@:>@])],
|
||||
[enable_gallium_nouveau="$enableval"],
|
||||
[enable_gallium_nouveau=no])
|
||||
if test "x$enable_gallium_nouveau" = xyes; then
|
||||
GALLIUM_WINSYS_DRM_DIRS="$GALLIUM_WINSYS_DRM_DIRS nouveau"
|
||||
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nv04 nv10 nv20 nv30 nv40 nv50"
|
||||
fi
|
||||
|
||||
|
||||
dnl Restore LDFLAGS and CPPFLAGS
|
||||
LDFLAGS="$_SAVE_LDFLAGS"
|
||||
CPPFLAGS="$_SAVE_CPPFLAGS"
|
||||
|
@ -1140,7 +1243,7 @@ if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then
|
|||
echo " Winsys dirs: $GALLIUM_WINSYS_DIRS"
|
||||
echo " Winsys drm dirs:$GALLIUM_WINSYS_DRM_DIRS"
|
||||
echo " Auxiliary dirs: $GALLIUM_AUXILIARY_DIRS"
|
||||
echo " Driver dirs: $GALLIUM_DRIVER_DIRS"
|
||||
echo " Driver dirs: $GALLIUM_DRIVERS_DIRS"
|
||||
echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS"
|
||||
else
|
||||
echo " Gallium: no"
|
||||
|
|
|
@ -13,7 +13,7 @@ Contact
|
|||
|
||||
Status
|
||||
|
||||
XXX - Not complete yet!!!
|
||||
Obsolete.
|
||||
|
||||
Version
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ including GL_ATI_separate_stencil, GL_EXT_stencil_two_side and OpenGL 2.0
|
|||
<li>GL_EXT_vertex_array_bgra extension (software drivers, i965 driver)
|
||||
<li>GL_NV_texture_env_combine4 extension (software drivers, i965/i915 drivers)
|
||||
<li>GL_EXT_texture_swizzle extension (software drivers, i965 driver)
|
||||
<li>Updated SPARC assembly optimizations (David S. Miller)
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ typedef HWND NativeWindowType;
|
|||
typedef HBITMAP NativePixmapType;
|
||||
/** END Added for Windows **/
|
||||
|
||||
#elif defined(__gnu_linux__)
|
||||
#elif defined(__gnu_linux__) || defined(__FreeBSD__)
|
||||
|
||||
/** BEGIN Added for X (Mesa) **/
|
||||
#ifndef EGLAPI
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.1
|
||||
* Version: 7.5
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
*
|
||||
|
|
|
@ -48,34 +48,49 @@
|
|||
#define glAsyncMarkerSGIX MANGLE(AsyncMarkerSGIX)
|
||||
#define glAttachObjectARB MANGLE(AttachObjectARB)
|
||||
#define glAttachShader MANGLE(AttachShader)
|
||||
#define glBeginConditionalRender MANGLE(BeginConditionalRender)
|
||||
#define glBeginConditionalRenderNV MANGLE(BeginConditionalRenderNV)
|
||||
#define glBeginFragmentShaderATI MANGLE(BeginFragmentShaderATI)
|
||||
#define glBegin MANGLE(Begin)
|
||||
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
|
||||
#define glBeginQueryARB MANGLE(BeginQueryARB)
|
||||
#define glBeginQuery MANGLE(BeginQuery)
|
||||
#define glBeginTransformFeedbackEXT MANGLE(BeginTransformFeedbackEXT)
|
||||
#define glBeginTransformFeedback MANGLE(BeginTransformFeedback)
|
||||
#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
|
||||
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
|
||||
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
|
||||
#define glBindAttribLocation MANGLE(BindAttribLocation)
|
||||
#define glBindBufferARB MANGLE(BindBufferARB)
|
||||
#define glBindBufferBaseEXT MANGLE(BindBufferBaseEXT)
|
||||
#define glBindBufferBase MANGLE(BindBufferBase)
|
||||
#define glBindBufferBaseNV MANGLE(BindBufferBaseNV)
|
||||
#define glBindBuffer MANGLE(BindBuffer)
|
||||
#define glBindBufferOffsetEXT MANGLE(BindBufferOffsetEXT)
|
||||
#define glBindBufferOffsetNV MANGLE(BindBufferOffsetNV)
|
||||
#define glBindBufferRangeEXT MANGLE(BindBufferRangeEXT)
|
||||
#define glBindBufferRange MANGLE(BindBufferRange)
|
||||
#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
|
||||
#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
|
||||
#define glBindFragDataLocation MANGLE(BindFragDataLocation)
|
||||
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
|
||||
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
|
||||
#define glBindFramebuffer MANGLE(BindFramebuffer)
|
||||
#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
|
||||
#define glBindMaterialParameterEXT MANGLE(BindMaterialParameterEXT)
|
||||
#define glBindMultiTextureEXT MANGLE(BindMultiTextureEXT)
|
||||
#define glBindParameterEXT MANGLE(BindParameterEXT)
|
||||
#define glBindProgramARB MANGLE(BindProgramARB)
|
||||
#define glBindProgramNV MANGLE(BindProgramNV)
|
||||
#define glBindRenderbufferEXT MANGLE(BindRenderbufferEXT)
|
||||
#define glBindRenderbuffer MANGLE(BindRenderbuffer)
|
||||
#define glBindTexGenParameterEXT MANGLE(BindTexGenParameterEXT)
|
||||
#define glBindTextureEXT MANGLE(BindTextureEXT)
|
||||
#define glBindTexture MANGLE(BindTexture)
|
||||
#define glBindTextureUnitParameterEXT MANGLE(BindTextureUnitParameterEXT)
|
||||
#define glBindTransformFeedbackNV MANGLE(BindTransformFeedbackNV)
|
||||
#define glBindVertexArrayAPPLE MANGLE(BindVertexArrayAPPLE)
|
||||
#define glBindVertexArray MANGLE(BindVertexArray)
|
||||
#define glBindVertexShaderEXT MANGLE(BindVertexShaderEXT)
|
||||
#define glBinormal3bEXT MANGLE(Binormal3bEXT)
|
||||
#define glBinormal3bvEXT MANGLE(Binormal3bvEXT)
|
||||
|
@ -101,6 +116,7 @@
|
|||
#define glBlendFuncSeparateINGR MANGLE(BlendFuncSeparateINGR)
|
||||
#define glBlendFuncSeparate MANGLE(BlendFuncSeparate)
|
||||
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
|
||||
#define glBlitFramebuffer MANGLE(BlitFramebuffer)
|
||||
#define glBufferDataARB MANGLE(BufferDataARB)
|
||||
#define glBufferData MANGLE(BufferData)
|
||||
#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
|
||||
|
@ -109,8 +125,15 @@
|
|||
#define glCallList MANGLE(CallList)
|
||||
#define glCallLists MANGLE(CallLists)
|
||||
#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT)
|
||||
#define glCheckFramebufferStatus MANGLE(CheckFramebufferStatus)
|
||||
#define glCheckNamedFramebufferStatusEXT MANGLE(CheckNamedFramebufferStatusEXT)
|
||||
#define glClampColorARB MANGLE(ClampColorARB)
|
||||
#define glClampColor MANGLE(ClampColor)
|
||||
#define glClearAccum MANGLE(ClearAccum)
|
||||
#define glClearBufferfi MANGLE(ClearBufferfi)
|
||||
#define glClearBufferfv MANGLE(ClearBufferfv)
|
||||
#define glClearBufferiv MANGLE(ClearBufferiv)
|
||||
#define glClearBufferuiv MANGLE(ClearBufferuiv)
|
||||
#define glClearColorIiEXT MANGLE(ClearColorIiEXT)
|
||||
#define glClearColorIuiEXT MANGLE(ClearColorIuiEXT)
|
||||
#define glClearColor MANGLE(ClearColor)
|
||||
|
@ -123,6 +146,7 @@
|
|||
#define glClientActiveTextureARB MANGLE(ClientActiveTextureARB)
|
||||
#define glClientActiveTexture MANGLE(ClientActiveTexture)
|
||||
#define glClientActiveVertexStreamATI MANGLE(ClientActiveVertexStreamATI)
|
||||
#define glClientAttribDefaultEXT MANGLE(ClientAttribDefaultEXT)
|
||||
#define glClipPlane MANGLE(ClipPlane)
|
||||
#define glColor3b MANGLE(Color3b)
|
||||
#define glColor3bv MANGLE(Color3bv)
|
||||
|
@ -171,6 +195,7 @@
|
|||
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
|
||||
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
|
||||
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
|
||||
#define glColorMaski MANGLE(ColorMaski)
|
||||
#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
|
||||
#define glColorMask MANGLE(ColorMask)
|
||||
#define glColorMaterial MANGLE(ColorMaterial)
|
||||
|
@ -196,6 +221,12 @@
|
|||
#define glCombinerStageParameterfvNV MANGLE(CombinerStageParameterfvNV)
|
||||
#define glCompileShaderARB MANGLE(CompileShaderARB)
|
||||
#define glCompileShader MANGLE(CompileShader)
|
||||
#define glCompressedMultiTexImage1DEXT MANGLE(CompressedMultiTexImage1DEXT)
|
||||
#define glCompressedMultiTexImage2DEXT MANGLE(CompressedMultiTexImage2DEXT)
|
||||
#define glCompressedMultiTexImage3DEXT MANGLE(CompressedMultiTexImage3DEXT)
|
||||
#define glCompressedMultiTexSubImage1DEXT MANGLE(CompressedMultiTexSubImage1DEXT)
|
||||
#define glCompressedMultiTexSubImage2DEXT MANGLE(CompressedMultiTexSubImage2DEXT)
|
||||
#define glCompressedMultiTexSubImage3DEXT MANGLE(CompressedMultiTexSubImage3DEXT)
|
||||
#define glCompressedTexImage1DARB MANGLE(CompressedTexImage1DARB)
|
||||
#define glCompressedTexImage1D MANGLE(CompressedTexImage1D)
|
||||
#define glCompressedTexImage2DARB MANGLE(CompressedTexImage2DARB)
|
||||
|
@ -208,6 +239,12 @@
|
|||
#define glCompressedTexSubImage2D MANGLE(CompressedTexSubImage2D)
|
||||
#define glCompressedTexSubImage3DARB MANGLE(CompressedTexSubImage3DARB)
|
||||
#define glCompressedTexSubImage3D MANGLE(CompressedTexSubImage3D)
|
||||
#define glCompressedTextureImage1DEXT MANGLE(CompressedTextureImage1DEXT)
|
||||
#define glCompressedTextureImage2DEXT MANGLE(CompressedTextureImage2DEXT)
|
||||
#define glCompressedTextureImage3DEXT MANGLE(CompressedTextureImage3DEXT)
|
||||
#define glCompressedTextureSubImage1DEXT MANGLE(CompressedTextureSubImage1DEXT)
|
||||
#define glCompressedTextureSubImage2DEXT MANGLE(CompressedTextureSubImage2DEXT)
|
||||
#define glCompressedTextureSubImage3DEXT MANGLE(CompressedTextureSubImage3DEXT)
|
||||
#define glConvolutionFilter1DEXT MANGLE(ConvolutionFilter1DEXT)
|
||||
#define glConvolutionFilter1D MANGLE(ConvolutionFilter1D)
|
||||
#define glConvolutionFilter2DEXT MANGLE(ConvolutionFilter2DEXT)
|
||||
|
@ -228,6 +265,11 @@
|
|||
#define glCopyConvolutionFilter1D MANGLE(CopyConvolutionFilter1D)
|
||||
#define glCopyConvolutionFilter2DEXT MANGLE(CopyConvolutionFilter2DEXT)
|
||||
#define glCopyConvolutionFilter2D MANGLE(CopyConvolutionFilter2D)
|
||||
#define glCopyMultiTexImage1DEXT MANGLE(CopyMultiTexImage1DEXT)
|
||||
#define glCopyMultiTexImage2DEXT MANGLE(CopyMultiTexImage2DEXT)
|
||||
#define glCopyMultiTexSubImage1DEXT MANGLE(CopyMultiTexSubImage1DEXT)
|
||||
#define glCopyMultiTexSubImage2DEXT MANGLE(CopyMultiTexSubImage2DEXT)
|
||||
#define glCopyMultiTexSubImage3DEXT MANGLE(CopyMultiTexSubImage3DEXT)
|
||||
#define glCopyPixels MANGLE(CopyPixels)
|
||||
#define glCopyTexImage1DEXT MANGLE(CopyTexImage1DEXT)
|
||||
#define glCopyTexImage1D MANGLE(CopyTexImage1D)
|
||||
|
@ -239,6 +281,11 @@
|
|||
#define glCopyTexSubImage2D MANGLE(CopyTexSubImage2D)
|
||||
#define glCopyTexSubImage3DEXT MANGLE(CopyTexSubImage3DEXT)
|
||||
#define glCopyTexSubImage3D MANGLE(CopyTexSubImage3D)
|
||||
#define glCopyTextureImage1DEXT MANGLE(CopyTextureImage1DEXT)
|
||||
#define glCopyTextureImage2DEXT MANGLE(CopyTextureImage2DEXT)
|
||||
#define glCopyTextureSubImage1DEXT MANGLE(CopyTextureSubImage1DEXT)
|
||||
#define glCopyTextureSubImage2DEXT MANGLE(CopyTextureSubImage2DEXT)
|
||||
#define glCopyTextureSubImage3DEXT MANGLE(CopyTextureSubImage3DEXT)
|
||||
#define glCreateDebugObjectMESA MANGLE(CreateDebugObjectMESA)
|
||||
#define glCreateProgram MANGLE(CreateProgram)
|
||||
#define glCreateProgramObjectARB MANGLE(CreateProgramObjectARB)
|
||||
|
@ -258,6 +305,7 @@
|
|||
#define glDeleteFencesNV MANGLE(DeleteFencesNV)
|
||||
#define glDeleteFragmentShaderATI MANGLE(DeleteFragmentShaderATI)
|
||||
#define glDeleteFramebuffersEXT MANGLE(DeleteFramebuffersEXT)
|
||||
#define glDeleteFramebuffers MANGLE(DeleteFramebuffers)
|
||||
#define glDeleteLists MANGLE(DeleteLists)
|
||||
#define glDeleteObjectARB MANGLE(DeleteObjectARB)
|
||||
#define glDeleteOcclusionQueriesNV MANGLE(DeleteOcclusionQueriesNV)
|
||||
|
@ -267,10 +315,13 @@
|
|||
#define glDeleteQueriesARB MANGLE(DeleteQueriesARB)
|
||||
#define glDeleteQueries MANGLE(DeleteQueries)
|
||||
#define glDeleteRenderbuffersEXT MANGLE(DeleteRenderbuffersEXT)
|
||||
#define glDeleteRenderbuffers MANGLE(DeleteRenderbuffers)
|
||||
#define glDeleteShader MANGLE(DeleteShader)
|
||||
#define glDeleteTexturesEXT MANGLE(DeleteTexturesEXT)
|
||||
#define glDeleteTextures MANGLE(DeleteTextures)
|
||||
#define glDeleteTransformFeedbacksNV MANGLE(DeleteTransformFeedbacksNV)
|
||||
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
|
||||
#define glDeleteVertexArrays MANGLE(DeleteVertexArrays)
|
||||
#define glDeleteVertexShaderEXT MANGLE(DeleteVertexShaderEXT)
|
||||
#define glDepthBoundsdNV MANGLE(DepthBoundsdNV)
|
||||
#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
|
||||
|
@ -281,13 +332,16 @@
|
|||
#define glDetachObjectARB MANGLE(DetachObjectARB)
|
||||
#define glDetachShader MANGLE(DetachShader)
|
||||
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
|
||||
#define glDisableClientStateIndexedEXT MANGLE(DisableClientStateIndexedEXT)
|
||||
#define glDisableClientState MANGLE(DisableClientState)
|
||||
#define glDisablei MANGLE(Disablei)
|
||||
#define glDisableIndexedEXT MANGLE(DisableIndexedEXT)
|
||||
#define glDisable MANGLE(Disable)
|
||||
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
|
||||
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
|
||||
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
|
||||
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
|
||||
#define glDrawArraysInstancedARB MANGLE(DrawArraysInstancedARB)
|
||||
#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
|
||||
#define glDrawArrays MANGLE(DrawArrays)
|
||||
#define glDrawBuffer MANGLE(DrawBuffer)
|
||||
|
@ -296,6 +350,7 @@
|
|||
#define glDrawBuffers MANGLE(DrawBuffers)
|
||||
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
|
||||
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
|
||||
#define glDrawElementsInstancedARB MANGLE(DrawElementsInstancedARB)
|
||||
#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
|
||||
#define glDrawElements MANGLE(DrawElements)
|
||||
#define glDrawMeshArraysSUN MANGLE(DrawMeshArraysSUN)
|
||||
|
@ -304,6 +359,7 @@
|
|||
#define glDrawRangeElementArrayATI MANGLE(DrawRangeElementArrayATI)
|
||||
#define glDrawRangeElementsEXT MANGLE(DrawRangeElementsEXT)
|
||||
#define glDrawRangeElements MANGLE(DrawRangeElements)
|
||||
#define glDrawTransformFeedbackNV MANGLE(DrawTransformFeedbackNV)
|
||||
#define glEdgeFlag MANGLE(EdgeFlag)
|
||||
#define glEdgeFlagPointerEXT MANGLE(EdgeFlagPointerEXT)
|
||||
#define glEdgeFlagPointerListIBM MANGLE(EdgeFlagPointerListIBM)
|
||||
|
@ -311,18 +367,24 @@
|
|||
#define glEdgeFlagv MANGLE(EdgeFlagv)
|
||||
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
|
||||
#define glElementPointerATI MANGLE(ElementPointerATI)
|
||||
#define glEnableClientStateIndexedEXT MANGLE(EnableClientStateIndexedEXT)
|
||||
#define glEnableClientState MANGLE(EnableClientState)
|
||||
#define glEnablei MANGLE(Enablei)
|
||||
#define glEnableIndexedEXT MANGLE(EnableIndexedEXT)
|
||||
#define glEnable MANGLE(Enable)
|
||||
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
|
||||
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
|
||||
#define glEnableVertexAttribArray MANGLE(EnableVertexAttribArray)
|
||||
#define glEndConditionalRender MANGLE(EndConditionalRender)
|
||||
#define glEndConditionalRenderNV MANGLE(EndConditionalRenderNV)
|
||||
#define glEndFragmentShaderATI MANGLE(EndFragmentShaderATI)
|
||||
#define glEndList MANGLE(EndList)
|
||||
#define glEnd MANGLE(End)
|
||||
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
|
||||
#define glEndQueryARB MANGLE(EndQueryARB)
|
||||
#define glEndQuery MANGLE(EndQuery)
|
||||
#define glEndTransformFeedbackEXT MANGLE(EndTransformFeedbackEXT)
|
||||
#define glEndTransformFeedback MANGLE(EndTransformFeedback)
|
||||
#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
|
||||
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
|
||||
#define glEvalCoord1d MANGLE(EvalCoord1d)
|
||||
|
@ -350,6 +412,7 @@
|
|||
#define glFinishTextureSUNX MANGLE(FinishTextureSUNX)
|
||||
#define glFlush MANGLE(Flush)
|
||||
#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
|
||||
#define glFlushMappedBufferRange MANGLE(FlushMappedBufferRange)
|
||||
#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
|
||||
#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
|
||||
#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
|
||||
|
@ -385,13 +448,25 @@
|
|||
#define glFragmentMaterialfvSGIX MANGLE(FragmentMaterialfvSGIX)
|
||||
#define glFragmentMaterialiSGIX MANGLE(FragmentMaterialiSGIX)
|
||||
#define glFragmentMaterialivSGIX MANGLE(FragmentMaterialivSGIX)
|
||||
#define glFramebufferDrawBufferEXT MANGLE(FramebufferDrawBufferEXT)
|
||||
#define glFramebufferDrawBuffersEXT MANGLE(FramebufferDrawBuffersEXT)
|
||||
#define glFramebufferReadBufferEXT MANGLE(FramebufferReadBufferEXT)
|
||||
#define glFramebufferRenderbufferEXT MANGLE(FramebufferRenderbufferEXT)
|
||||
#define glFramebufferRenderbuffer MANGLE(FramebufferRenderbuffer)
|
||||
#define glFramebufferTexture1DEXT MANGLE(FramebufferTexture1DEXT)
|
||||
#define glFramebufferTexture1D MANGLE(FramebufferTexture1D)
|
||||
#define glFramebufferTexture2DEXT MANGLE(FramebufferTexture2DEXT)
|
||||
#define glFramebufferTexture2D MANGLE(FramebufferTexture2D)
|
||||
#define glFramebufferTexture3DEXT MANGLE(FramebufferTexture3DEXT)
|
||||
#define glFramebufferTexture3D MANGLE(FramebufferTexture3D)
|
||||
#define glFramebufferTextureARB MANGLE(FramebufferTextureARB)
|
||||
#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
|
||||
#define glFramebufferTextureFaceARB MANGLE(FramebufferTextureFaceARB)
|
||||
#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
|
||||
#define glFramebufferTextureLayerARB MANGLE(FramebufferTextureLayerARB)
|
||||
#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
|
||||
#define glFramebufferTextureLayer MANGLE(FramebufferTextureLayer)
|
||||
#define glFrameTerminatorGREMEDY MANGLE(FrameTerminatorGREMEDY)
|
||||
#define glFrameZoomSGIX MANGLE(FrameZoomSGIX)
|
||||
#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI)
|
||||
#define glFrontFace MANGLE(FrontFace)
|
||||
|
@ -400,10 +475,14 @@
|
|||
#define glGenBuffersARB MANGLE(GenBuffersARB)
|
||||
#define glGenBuffers MANGLE(GenBuffers)
|
||||
#define glGenerateMipmapEXT MANGLE(GenerateMipmapEXT)
|
||||
#define glGenerateMipmap MANGLE(GenerateMipmap)
|
||||
#define glGenerateMultiTexMipmapEXT MANGLE(GenerateMultiTexMipmapEXT)
|
||||
#define glGenerateTextureMipmapEXT MANGLE(GenerateTextureMipmapEXT)
|
||||
#define glGenFencesAPPLE MANGLE(GenFencesAPPLE)
|
||||
#define glGenFencesNV MANGLE(GenFencesNV)
|
||||
#define glGenFragmentShadersATI MANGLE(GenFragmentShadersATI)
|
||||
#define glGenFramebuffersEXT MANGLE(GenFramebuffersEXT)
|
||||
#define glGenFramebuffers MANGLE(GenFramebuffers)
|
||||
#define glGenLists MANGLE(GenLists)
|
||||
#define glGenOcclusionQueriesNV MANGLE(GenOcclusionQueriesNV)
|
||||
#define glGenProgramsARB MANGLE(GenProgramsARB)
|
||||
|
@ -411,10 +490,13 @@
|
|||
#define glGenQueriesARB MANGLE(GenQueriesARB)
|
||||
#define glGenQueries MANGLE(GenQueries)
|
||||
#define glGenRenderbuffersEXT MANGLE(GenRenderbuffersEXT)
|
||||
#define glGenRenderbuffers MANGLE(GenRenderbuffers)
|
||||
#define glGenSymbolsEXT MANGLE(GenSymbolsEXT)
|
||||
#define glGenTexturesEXT MANGLE(GenTexturesEXT)
|
||||
#define glGenTextures MANGLE(GenTextures)
|
||||
#define glGenTransformFeedbacksNV MANGLE(GenTransformFeedbacksNV)
|
||||
#define glGenVertexArraysAPPLE MANGLE(GenVertexArraysAPPLE)
|
||||
#define glGenVertexArrays MANGLE(GenVertexArrays)
|
||||
#define glGenVertexShadersEXT MANGLE(GenVertexShadersEXT)
|
||||
#define glGetActiveAttribARB MANGLE(GetActiveAttribARB)
|
||||
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
|
||||
|
@ -428,6 +510,7 @@
|
|||
#define glGetAttribLocationARB MANGLE(GetAttribLocationARB)
|
||||
#define glGetAttribLocation MANGLE(GetAttribLocation)
|
||||
#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT)
|
||||
#define glGetBooleani_v MANGLE(GetBooleani_v)
|
||||
#define glGetBooleanv MANGLE(GetBooleanv)
|
||||
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
|
||||
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
|
||||
|
@ -450,8 +533,10 @@
|
|||
#define glGetCombinerOutputParameterfvNV MANGLE(GetCombinerOutputParameterfvNV)
|
||||
#define glGetCombinerOutputParameterivNV MANGLE(GetCombinerOutputParameterivNV)
|
||||
#define glGetCombinerStageParameterfvNV MANGLE(GetCombinerStageParameterfvNV)
|
||||
#define glGetCompressedMultiTexImageEXT MANGLE(GetCompressedMultiTexImageEXT)
|
||||
#define glGetCompressedTexImageARB MANGLE(GetCompressedTexImageARB)
|
||||
#define glGetCompressedTexImage MANGLE(GetCompressedTexImage)
|
||||
#define glGetCompressedTextureImageEXT MANGLE(GetCompressedTextureImageEXT)
|
||||
#define glGetConvolutionFilterEXT MANGLE(GetConvolutionFilterEXT)
|
||||
#define glGetConvolutionFilter MANGLE(GetConvolutionFilter)
|
||||
#define glGetConvolutionParameterfvEXT MANGLE(GetConvolutionParameterfvEXT)
|
||||
|
@ -461,19 +546,24 @@
|
|||
#define glGetDebugLogLengthMESA MANGLE(GetDebugLogLengthMESA)
|
||||
#define glGetDebugLogMESA MANGLE(GetDebugLogMESA)
|
||||
#define glGetDetailTexFuncSGIS MANGLE(GetDetailTexFuncSGIS)
|
||||
#define glGetDoubleIndexedvEXT MANGLE(GetDoubleIndexedvEXT)
|
||||
#define glGetDoublev MANGLE(GetDoublev)
|
||||
#define glGetError MANGLE(GetError)
|
||||
#define glGetFenceivNV MANGLE(GetFenceivNV)
|
||||
#define glGetFinalCombinerInputParameterfvNV MANGLE(GetFinalCombinerInputParameterfvNV)
|
||||
#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV)
|
||||
#define glGetFloatIndexedvEXT MANGLE(GetFloatIndexedvEXT)
|
||||
#define glGetFloatv MANGLE(GetFloatv)
|
||||
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
|
||||
#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
|
||||
#define glGetFragDataLocation MANGLE(GetFragDataLocation)
|
||||
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
|
||||
#define glGetFragmentLightivSGIX MANGLE(GetFragmentLightivSGIX)
|
||||
#define glGetFragmentMaterialfvSGIX MANGLE(GetFragmentMaterialfvSGIX)
|
||||
#define glGetFragmentMaterialivSGIX MANGLE(GetFragmentMaterialivSGIX)
|
||||
#define glGetFramebufferAttachmentParameterivEXT MANGLE(GetFramebufferAttachmentParameterivEXT)
|
||||
#define glGetFramebufferAttachmentParameteriv MANGLE(GetFramebufferAttachmentParameteriv)
|
||||
#define glGetFramebufferParameterivEXT MANGLE(GetFramebufferParameterivEXT)
|
||||
#define glGetHandleARB MANGLE(GetHandleARB)
|
||||
#define glGetHistogramEXT MANGLE(GetHistogramEXT)
|
||||
#define glGetHistogram MANGLE(GetHistogram)
|
||||
|
@ -486,6 +576,7 @@
|
|||
#define glGetInfoLogARB MANGLE(GetInfoLogARB)
|
||||
#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX)
|
||||
#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
|
||||
#define glGetIntegeri_v MANGLE(GetIntegeri_v)
|
||||
#define glGetIntegerv MANGLE(GetIntegerv)
|
||||
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
|
||||
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
|
||||
|
@ -513,6 +604,30 @@
|
|||
#define glGetMinmaxParameterfv MANGLE(GetMinmaxParameterfv)
|
||||
#define glGetMinmaxParameterivEXT MANGLE(GetMinmaxParameterivEXT)
|
||||
#define glGetMinmaxParameteriv MANGLE(GetMinmaxParameteriv)
|
||||
#define glGetMultisamplefvNV MANGLE(GetMultisamplefvNV)
|
||||
#define glGetMultiTexEnvfvEXT MANGLE(GetMultiTexEnvfvEXT)
|
||||
#define glGetMultiTexEnvivEXT MANGLE(GetMultiTexEnvivEXT)
|
||||
#define glGetMultiTexGendvEXT MANGLE(GetMultiTexGendvEXT)
|
||||
#define glGetMultiTexGenfvEXT MANGLE(GetMultiTexGenfvEXT)
|
||||
#define glGetMultiTexGenivEXT MANGLE(GetMultiTexGenivEXT)
|
||||
#define glGetMultiTexImageEXT MANGLE(GetMultiTexImageEXT)
|
||||
#define glGetMultiTexLevelParameterfvEXT MANGLE(GetMultiTexLevelParameterfvEXT)
|
||||
#define glGetMultiTexLevelParameterivEXT MANGLE(GetMultiTexLevelParameterivEXT)
|
||||
#define glGetMultiTexParameterfvEXT MANGLE(GetMultiTexParameterfvEXT)
|
||||
#define glGetMultiTexParameterIivEXT MANGLE(GetMultiTexParameterIivEXT)
|
||||
#define glGetMultiTexParameterIuivEXT MANGLE(GetMultiTexParameterIuivEXT)
|
||||
#define glGetMultiTexParameterivEXT MANGLE(GetMultiTexParameterivEXT)
|
||||
#define glGetNamedBufferParameterivEXT MANGLE(GetNamedBufferParameterivEXT)
|
||||
#define glGetNamedBufferPointervEXT MANGLE(GetNamedBufferPointervEXT)
|
||||
#define glGetNamedBufferSubDataEXT MANGLE(GetNamedBufferSubDataEXT)
|
||||
#define glGetNamedFramebufferAttachmentParameterivEXT MANGLE(GetNamedFramebufferAttachmentParameterivEXT)
|
||||
#define glGetNamedProgramivEXT MANGLE(GetNamedProgramivEXT)
|
||||
#define glGetNamedProgramLocalParameterdvEXT MANGLE(GetNamedProgramLocalParameterdvEXT)
|
||||
#define glGetNamedProgramLocalParameterfvEXT MANGLE(GetNamedProgramLocalParameterfvEXT)
|
||||
#define glGetNamedProgramLocalParameterIivEXT MANGLE(GetNamedProgramLocalParameterIivEXT)
|
||||
#define glGetNamedProgramLocalParameterIuivEXT MANGLE(GetNamedProgramLocalParameterIuivEXT)
|
||||
#define glGetNamedProgramStringEXT MANGLE(GetNamedProgramStringEXT)
|
||||
#define glGetNamedRenderbufferParameterivEXT MANGLE(GetNamedRenderbufferParameterivEXT)
|
||||
#define glGetObjectBufferfvATI MANGLE(GetObjectBufferfvATI)
|
||||
#define glGetObjectBufferivATI MANGLE(GetObjectBufferivATI)
|
||||
#define glGetObjectParameterfvARB MANGLE(GetObjectParameterfvARB)
|
||||
|
@ -524,6 +639,7 @@
|
|||
#define glGetPixelMapusv MANGLE(GetPixelMapusv)
|
||||
#define glGetPixelTexGenParameterfvSGIS MANGLE(GetPixelTexGenParameterfvSGIS)
|
||||
#define glGetPixelTexGenParameterivSGIS MANGLE(GetPixelTexGenParameterivSGIS)
|
||||
#define glGetPointerIndexedvEXT MANGLE(GetPointerIndexedvEXT)
|
||||
#define glGetPointervEXT MANGLE(GetPointervEXT)
|
||||
#define glGetPointerv MANGLE(GetPointerv)
|
||||
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
|
||||
|
@ -555,6 +671,7 @@
|
|||
#define glGetQueryObjectuivARB MANGLE(GetQueryObjectuivARB)
|
||||
#define glGetQueryObjectuiv MANGLE(GetQueryObjectuiv)
|
||||
#define glGetRenderbufferParameterivEXT MANGLE(GetRenderbufferParameterivEXT)
|
||||
#define glGetRenderbufferParameteriv MANGLE(GetRenderbufferParameteriv)
|
||||
#define glGetSeparableFilterEXT MANGLE(GetSeparableFilterEXT)
|
||||
#define glGetSeparableFilter MANGLE(GetSeparableFilter)
|
||||
#define glGetShaderInfoLog MANGLE(GetShaderInfoLog)
|
||||
|
@ -562,6 +679,7 @@
|
|||
#define glGetShaderSourceARB MANGLE(GetShaderSourceARB)
|
||||
#define glGetShaderSource MANGLE(GetShaderSource)
|
||||
#define glGetSharpenTexFuncSGIS MANGLE(GetSharpenTexFuncSGIS)
|
||||
#define glGetStringi MANGLE(GetStringi)
|
||||
#define glGetString MANGLE(GetString)
|
||||
#define glGetTexBumpParameterfvATI MANGLE(GetTexBumpParameterfvATI)
|
||||
#define glGetTexBumpParameterivATI MANGLE(GetTexBumpParameterivATI)
|
||||
|
@ -576,9 +694,20 @@
|
|||
#define glGetTexLevelParameteriv MANGLE(GetTexLevelParameteriv)
|
||||
#define glGetTexParameterfv MANGLE(GetTexParameterfv)
|
||||
#define glGetTexParameterIivEXT MANGLE(GetTexParameterIivEXT)
|
||||
#define glGetTexParameterIiv MANGLE(GetTexParameterIiv)
|
||||
#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT)
|
||||
#define glGetTexParameterIuiv MANGLE(GetTexParameterIuiv)
|
||||
#define glGetTexParameteriv MANGLE(GetTexParameteriv)
|
||||
#define glGetTextureImageEXT MANGLE(GetTextureImageEXT)
|
||||
#define glGetTextureLevelParameterfvEXT MANGLE(GetTextureLevelParameterfvEXT)
|
||||
#define glGetTextureLevelParameterivEXT MANGLE(GetTextureLevelParameterivEXT)
|
||||
#define glGetTextureParameterfvEXT MANGLE(GetTextureParameterfvEXT)
|
||||
#define glGetTextureParameterIivEXT MANGLE(GetTextureParameterIivEXT)
|
||||
#define glGetTextureParameterIuivEXT MANGLE(GetTextureParameterIuivEXT)
|
||||
#define glGetTextureParameterivEXT MANGLE(GetTextureParameterivEXT)
|
||||
#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV)
|
||||
#define glGetTransformFeedbackVaryingEXT MANGLE(GetTransformFeedbackVaryingEXT)
|
||||
#define glGetTransformFeedbackVarying MANGLE(GetTransformFeedbackVarying)
|
||||
#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
|
||||
#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
|
||||
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
|
||||
|
@ -589,6 +718,7 @@
|
|||
#define glGetUniformLocation MANGLE(GetUniformLocation)
|
||||
#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
|
||||
#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
|
||||
#define glGetUniformuiv MANGLE(GetUniformuiv)
|
||||
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
|
||||
#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI)
|
||||
#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT)
|
||||
|
@ -605,7 +735,9 @@
|
|||
#define glGetVertexAttribfv MANGLE(GetVertexAttribfv)
|
||||
#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV)
|
||||
#define glGetVertexAttribIivEXT MANGLE(GetVertexAttribIivEXT)
|
||||
#define glGetVertexAttribIiv MANGLE(GetVertexAttribIiv)
|
||||
#define glGetVertexAttribIuivEXT MANGLE(GetVertexAttribIuivEXT)
|
||||
#define glGetVertexAttribIuiv MANGLE(GetVertexAttribIuiv)
|
||||
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
|
||||
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
|
||||
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
|
||||
|
@ -652,11 +784,13 @@
|
|||
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
|
||||
#define glIsBufferARB MANGLE(IsBufferARB)
|
||||
#define glIsBuffer MANGLE(IsBuffer)
|
||||
#define glIsEnabledi MANGLE(IsEnabledi)
|
||||
#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
|
||||
#define glIsEnabled MANGLE(IsEnabled)
|
||||
#define glIsFenceAPPLE MANGLE(IsFenceAPPLE)
|
||||
#define glIsFenceNV MANGLE(IsFenceNV)
|
||||
#define glIsFramebufferEXT MANGLE(IsFramebufferEXT)
|
||||
#define glIsFramebuffer MANGLE(IsFramebuffer)
|
||||
#define glIsList MANGLE(IsList)
|
||||
#define glIsObjectBufferATI MANGLE(IsObjectBufferATI)
|
||||
#define glIsOcclusionQueryNV MANGLE(IsOcclusionQueryNV)
|
||||
|
@ -666,11 +800,14 @@
|
|||
#define glIsQueryARB MANGLE(IsQueryARB)
|
||||
#define glIsQuery MANGLE(IsQuery)
|
||||
#define glIsRenderbufferEXT MANGLE(IsRenderbufferEXT)
|
||||
#define glIsRenderbuffer MANGLE(IsRenderbuffer)
|
||||
#define glIsShader MANGLE(IsShader)
|
||||
#define glIsTextureEXT MANGLE(IsTextureEXT)
|
||||
#define glIsTexture MANGLE(IsTexture)
|
||||
#define glIsTransformFeedbackNV MANGLE(IsTransformFeedbackNV)
|
||||
#define glIsVariantEnabledEXT MANGLE(IsVariantEnabledEXT)
|
||||
#define glIsVertexArrayAPPLE MANGLE(IsVertexArrayAPPLE)
|
||||
#define glIsVertexArray MANGLE(IsVertexArray)
|
||||
#define glLightEnviSGIX MANGLE(LightEnviSGIX)
|
||||
#define glLightf MANGLE(Lightf)
|
||||
#define glLightfv MANGLE(Lightfv)
|
||||
|
@ -707,11 +844,13 @@
|
|||
#define glMap2f MANGLE(Map2f)
|
||||
#define glMapBufferARB MANGLE(MapBufferARB)
|
||||
#define glMapBuffer MANGLE(MapBuffer)
|
||||
#define glMapBufferRange MANGLE(MapBufferRange)
|
||||
#define glMapControlPointsNV MANGLE(MapControlPointsNV)
|
||||
#define glMapGrid1d MANGLE(MapGrid1d)
|
||||
#define glMapGrid1f MANGLE(MapGrid1f)
|
||||
#define glMapGrid2d MANGLE(MapGrid2d)
|
||||
#define glMapGrid2f MANGLE(MapGrid2f)
|
||||
#define glMapNamedBufferEXT MANGLE(MapNamedBufferEXT)
|
||||
#define glMapObjectBufferATI MANGLE(MapObjectBufferATI)
|
||||
#define glMapParameterfvNV MANGLE(MapParameterfvNV)
|
||||
#define glMapParameterivNV MANGLE(MapParameterivNV)
|
||||
|
@ -719,11 +858,30 @@
|
|||
#define glMaterialfv MANGLE(Materialfv)
|
||||
#define glMateriali MANGLE(Materiali)
|
||||
#define glMaterialiv MANGLE(Materialiv)
|
||||
#define glMatrixFrustumEXT MANGLE(MatrixFrustumEXT)
|
||||
#define glMatrixIndexPointerARB MANGLE(MatrixIndexPointerARB)
|
||||
#define glMatrixIndexubvARB MANGLE(MatrixIndexubvARB)
|
||||
#define glMatrixIndexuivARB MANGLE(MatrixIndexuivARB)
|
||||
#define glMatrixIndexusvARB MANGLE(MatrixIndexusvARB)
|
||||
#define glMatrixLoaddEXT MANGLE(MatrixLoaddEXT)
|
||||
#define glMatrixLoadfEXT MANGLE(MatrixLoadfEXT)
|
||||
#define glMatrixLoadIdentityEXT MANGLE(MatrixLoadIdentityEXT)
|
||||
#define glMatrixLoadTransposedEXT MANGLE(MatrixLoadTransposedEXT)
|
||||
#define glMatrixLoadTransposefEXT MANGLE(MatrixLoadTransposefEXT)
|
||||
#define glMatrixMode MANGLE(MatrixMode)
|
||||
#define glMatrixMultdEXT MANGLE(MatrixMultdEXT)
|
||||
#define glMatrixMultfEXT MANGLE(MatrixMultfEXT)
|
||||
#define glMatrixMultTransposedEXT MANGLE(MatrixMultTransposedEXT)
|
||||
#define glMatrixMultTransposefEXT MANGLE(MatrixMultTransposefEXT)
|
||||
#define glMatrixOrthoEXT MANGLE(MatrixOrthoEXT)
|
||||
#define glMatrixPopEXT MANGLE(MatrixPopEXT)
|
||||
#define glMatrixPushEXT MANGLE(MatrixPushEXT)
|
||||
#define glMatrixRotatedEXT MANGLE(MatrixRotatedEXT)
|
||||
#define glMatrixRotatefEXT MANGLE(MatrixRotatefEXT)
|
||||
#define glMatrixScaledEXT MANGLE(MatrixScaledEXT)
|
||||
#define glMatrixScalefEXT MANGLE(MatrixScalefEXT)
|
||||
#define glMatrixTranslatedEXT MANGLE(MatrixTranslatedEXT)
|
||||
#define glMatrixTranslatefEXT MANGLE(MatrixTranslatefEXT)
|
||||
#define glMinmaxEXT MANGLE(MinmaxEXT)
|
||||
#define glMinmax MANGLE(Minmax)
|
||||
#define glMultiDrawArraysEXT MANGLE(MultiDrawArraysEXT)
|
||||
|
@ -734,6 +892,7 @@
|
|||
#define glMultiDrawRangeElementArrayAPPLE MANGLE(MultiDrawRangeElementArrayAPPLE)
|
||||
#define glMultiModeDrawArraysIBM MANGLE(MultiModeDrawArraysIBM)
|
||||
#define glMultiModeDrawElementsIBM MANGLE(MultiModeDrawElementsIBM)
|
||||
#define glMultiTexBufferEXT MANGLE(MultiTexBufferEXT)
|
||||
#define glMultiTexCoord1dARB MANGLE(MultiTexCoord1dARB)
|
||||
#define glMultiTexCoord1d MANGLE(MultiTexCoord1d)
|
||||
#define glMultiTexCoord1dvARB MANGLE(MultiTexCoord1dvARB)
|
||||
|
@ -806,12 +965,60 @@
|
|||
#define glMultiTexCoord4s MANGLE(MultiTexCoord4s)
|
||||
#define glMultiTexCoord4svARB MANGLE(MultiTexCoord4svARB)
|
||||
#define glMultiTexCoord4sv MANGLE(MultiTexCoord4sv)
|
||||
#define glMultiTexCoordPointerEXT MANGLE(MultiTexCoordPointerEXT)
|
||||
#define glMultiTexEnvfEXT MANGLE(MultiTexEnvfEXT)
|
||||
#define glMultiTexEnvfvEXT MANGLE(MultiTexEnvfvEXT)
|
||||
#define glMultiTexEnviEXT MANGLE(MultiTexEnviEXT)
|
||||
#define glMultiTexEnvivEXT MANGLE(MultiTexEnvivEXT)
|
||||
#define glMultiTexGendEXT MANGLE(MultiTexGendEXT)
|
||||
#define glMultiTexGendvEXT MANGLE(MultiTexGendvEXT)
|
||||
#define glMultiTexGenfEXT MANGLE(MultiTexGenfEXT)
|
||||
#define glMultiTexGenfvEXT MANGLE(MultiTexGenfvEXT)
|
||||
#define glMultiTexGeniEXT MANGLE(MultiTexGeniEXT)
|
||||
#define glMultiTexGenivEXT MANGLE(MultiTexGenivEXT)
|
||||
#define glMultiTexImage1DEXT MANGLE(MultiTexImage1DEXT)
|
||||
#define glMultiTexImage2DEXT MANGLE(MultiTexImage2DEXT)
|
||||
#define glMultiTexImage3DEXT MANGLE(MultiTexImage3DEXT)
|
||||
#define glMultiTexParameterfEXT MANGLE(MultiTexParameterfEXT)
|
||||
#define glMultiTexParameterfvEXT MANGLE(MultiTexParameterfvEXT)
|
||||
#define glMultiTexParameteriEXT MANGLE(MultiTexParameteriEXT)
|
||||
#define glMultiTexParameterIivEXT MANGLE(MultiTexParameterIivEXT)
|
||||
#define glMultiTexParameterIuivEXT MANGLE(MultiTexParameterIuivEXT)
|
||||
#define glMultiTexParameterivEXT MANGLE(MultiTexParameterivEXT)
|
||||
#define glMultiTexRenderbufferEXT MANGLE(MultiTexRenderbufferEXT)
|
||||
#define glMultiTexSubImage1DEXT MANGLE(MultiTexSubImage1DEXT)
|
||||
#define glMultiTexSubImage2DEXT MANGLE(MultiTexSubImage2DEXT)
|
||||
#define glMultiTexSubImage3DEXT MANGLE(MultiTexSubImage3DEXT)
|
||||
#define glMultMatrixd MANGLE(MultMatrixd)
|
||||
#define glMultMatrixf MANGLE(MultMatrixf)
|
||||
#define glMultTransposeMatrixdARB MANGLE(MultTransposeMatrixdARB)
|
||||
#define glMultTransposeMatrixd MANGLE(MultTransposeMatrixd)
|
||||
#define glMultTransposeMatrixfARB MANGLE(MultTransposeMatrixfARB)
|
||||
#define glMultTransposeMatrixf MANGLE(MultTransposeMatrixf)
|
||||
#define glNamedBufferDataEXT MANGLE(NamedBufferDataEXT)
|
||||
#define glNamedBufferSubDataEXT MANGLE(NamedBufferSubDataEXT)
|
||||
#define glNamedFramebufferRenderbufferEXT MANGLE(NamedFramebufferRenderbufferEXT)
|
||||
#define glNamedFramebufferTexture1DEXT MANGLE(NamedFramebufferTexture1DEXT)
|
||||
#define glNamedFramebufferTexture2DEXT MANGLE(NamedFramebufferTexture2DEXT)
|
||||
#define glNamedFramebufferTexture3DEXT MANGLE(NamedFramebufferTexture3DEXT)
|
||||
#define glNamedFramebufferTextureEXT MANGLE(NamedFramebufferTextureEXT)
|
||||
#define glNamedFramebufferTextureFaceEXT MANGLE(NamedFramebufferTextureFaceEXT)
|
||||
#define glNamedFramebufferTextureLayerEXT MANGLE(NamedFramebufferTextureLayerEXT)
|
||||
#define glNamedProgramLocalParameter4dEXT MANGLE(NamedProgramLocalParameter4dEXT)
|
||||
#define glNamedProgramLocalParameter4dvEXT MANGLE(NamedProgramLocalParameter4dvEXT)
|
||||
#define glNamedProgramLocalParameter4fEXT MANGLE(NamedProgramLocalParameter4fEXT)
|
||||
#define glNamedProgramLocalParameter4fvEXT MANGLE(NamedProgramLocalParameter4fvEXT)
|
||||
#define glNamedProgramLocalParameterI4iEXT MANGLE(NamedProgramLocalParameterI4iEXT)
|
||||
#define glNamedProgramLocalParameterI4ivEXT MANGLE(NamedProgramLocalParameterI4ivEXT)
|
||||
#define glNamedProgramLocalParameterI4uiEXT MANGLE(NamedProgramLocalParameterI4uiEXT)
|
||||
#define glNamedProgramLocalParameterI4uivEXT MANGLE(NamedProgramLocalParameterI4uivEXT)
|
||||
#define glNamedProgramLocalParameters4fvEXT MANGLE(NamedProgramLocalParameters4fvEXT)
|
||||
#define glNamedProgramLocalParametersI4ivEXT MANGLE(NamedProgramLocalParametersI4ivEXT)
|
||||
#define glNamedProgramLocalParametersI4uivEXT MANGLE(NamedProgramLocalParametersI4uivEXT)
|
||||
#define glNamedProgramStringEXT MANGLE(NamedProgramStringEXT)
|
||||
#define glNamedRenderbufferStorageEXT MANGLE(NamedRenderbufferStorageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleCoverageEXT MANGLE(NamedRenderbufferStorageMultisampleCoverageEXT)
|
||||
#define glNamedRenderbufferStorageMultisampleEXT MANGLE(NamedRenderbufferStorageMultisampleEXT)
|
||||
#define glNewList MANGLE(NewList)
|
||||
#define glNewObjectBufferATI MANGLE(NewObjectBufferATI)
|
||||
#define glNormal3b MANGLE(Normal3b)
|
||||
|
@ -845,6 +1052,7 @@
|
|||
#define glOrtho MANGLE(Ortho)
|
||||
#define glPassTexCoordATI MANGLE(PassTexCoordATI)
|
||||
#define glPassThrough MANGLE(PassThrough)
|
||||
#define glPauseTransformFeedbackNV MANGLE(PauseTransformFeedbackNV)
|
||||
#define glPixelDataRangeNV MANGLE(PixelDataRangeNV)
|
||||
#define glPixelMapfv MANGLE(PixelMapfv)
|
||||
#define glPixelMapuiv MANGLE(PixelMapuiv)
|
||||
|
@ -926,12 +1134,47 @@
|
|||
#define glProgramParameter4dvNV MANGLE(ProgramParameter4dvNV)
|
||||
#define glProgramParameter4fNV MANGLE(ProgramParameter4fNV)
|
||||
#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV)
|
||||
#define glProgramParameteriARB MANGLE(ProgramParameteriARB)
|
||||
#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT)
|
||||
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
|
||||
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
|
||||
#define glProgramStringARB MANGLE(ProgramStringARB)
|
||||
#define glProgramUniform1fEXT MANGLE(ProgramUniform1fEXT)
|
||||
#define glProgramUniform1fvEXT MANGLE(ProgramUniform1fvEXT)
|
||||
#define glProgramUniform1iEXT MANGLE(ProgramUniform1iEXT)
|
||||
#define glProgramUniform1ivEXT MANGLE(ProgramUniform1ivEXT)
|
||||
#define glProgramUniform1uiEXT MANGLE(ProgramUniform1uiEXT)
|
||||
#define glProgramUniform1uivEXT MANGLE(ProgramUniform1uivEXT)
|
||||
#define glProgramUniform2fEXT MANGLE(ProgramUniform2fEXT)
|
||||
#define glProgramUniform2fvEXT MANGLE(ProgramUniform2fvEXT)
|
||||
#define glProgramUniform2iEXT MANGLE(ProgramUniform2iEXT)
|
||||
#define glProgramUniform2ivEXT MANGLE(ProgramUniform2ivEXT)
|
||||
#define glProgramUniform2uiEXT MANGLE(ProgramUniform2uiEXT)
|
||||
#define glProgramUniform2uivEXT MANGLE(ProgramUniform2uivEXT)
|
||||
#define glProgramUniform3fEXT MANGLE(ProgramUniform3fEXT)
|
||||
#define glProgramUniform3fvEXT MANGLE(ProgramUniform3fvEXT)
|
||||
#define glProgramUniform3iEXT MANGLE(ProgramUniform3iEXT)
|
||||
#define glProgramUniform3ivEXT MANGLE(ProgramUniform3ivEXT)
|
||||
#define glProgramUniform3uiEXT MANGLE(ProgramUniform3uiEXT)
|
||||
#define glProgramUniform3uivEXT MANGLE(ProgramUniform3uivEXT)
|
||||
#define glProgramUniform4fEXT MANGLE(ProgramUniform4fEXT)
|
||||
#define glProgramUniform4fvEXT MANGLE(ProgramUniform4fvEXT)
|
||||
#define glProgramUniform4iEXT MANGLE(ProgramUniform4iEXT)
|
||||
#define glProgramUniform4ivEXT MANGLE(ProgramUniform4ivEXT)
|
||||
#define glProgramUniform4uiEXT MANGLE(ProgramUniform4uiEXT)
|
||||
#define glProgramUniform4uivEXT MANGLE(ProgramUniform4uivEXT)
|
||||
#define glProgramUniformMatrix2fvEXT MANGLE(ProgramUniformMatrix2fvEXT)
|
||||
#define glProgramUniformMatrix2x3fvEXT MANGLE(ProgramUniformMatrix2x3fvEXT)
|
||||
#define glProgramUniformMatrix2x4fvEXT MANGLE(ProgramUniformMatrix2x4fvEXT)
|
||||
#define glProgramUniformMatrix3fvEXT MANGLE(ProgramUniformMatrix3fvEXT)
|
||||
#define glProgramUniformMatrix3x2fvEXT MANGLE(ProgramUniformMatrix3x2fvEXT)
|
||||
#define glProgramUniformMatrix3x4fvEXT MANGLE(ProgramUniformMatrix3x4fvEXT)
|
||||
#define glProgramUniformMatrix4fvEXT MANGLE(ProgramUniformMatrix4fvEXT)
|
||||
#define glProgramUniformMatrix4x2fvEXT MANGLE(ProgramUniformMatrix4x2fvEXT)
|
||||
#define glProgramUniformMatrix4x3fvEXT MANGLE(ProgramUniformMatrix4x3fvEXT)
|
||||
#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
|
||||
#define glPushAttrib MANGLE(PushAttrib)
|
||||
#define glPushClientAttribDefaultEXT MANGLE(PushClientAttribDefaultEXT)
|
||||
#define glPushClientAttrib MANGLE(PushClientAttrib)
|
||||
#define glPushMatrix MANGLE(PushMatrix)
|
||||
#define glPushName MANGLE(PushName)
|
||||
|
@ -972,8 +1215,10 @@
|
|||
#define glRectsv MANGLE(Rectsv)
|
||||
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
|
||||
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
|
||||
#define glRenderbufferStorage MANGLE(RenderbufferStorage)
|
||||
#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
|
||||
#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT)
|
||||
#define glRenderbufferStorageMultisample MANGLE(RenderbufferStorageMultisample)
|
||||
#define glRenderMode MANGLE(RenderMode)
|
||||
#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN)
|
||||
#define glReplacementCodeubSUN MANGLE(ReplacementCodeubSUN)
|
||||
|
@ -1004,12 +1249,14 @@
|
|||
#define glResetMinmaxEXT MANGLE(ResetMinmaxEXT)
|
||||
#define glResetMinmax MANGLE(ResetMinmax)
|
||||
#define glResizeBuffersMESA MANGLE(ResizeBuffersMESA)
|
||||
#define glResumeTransformFeedbackNV MANGLE(ResumeTransformFeedbackNV)
|
||||
#define glRotated MANGLE(Rotated)
|
||||
#define glRotatef MANGLE(Rotatef)
|
||||
#define glSampleCoverageARB MANGLE(SampleCoverageARB)
|
||||
#define glSampleCoverage MANGLE(SampleCoverage)
|
||||
#define glSampleMapATI MANGLE(SampleMapATI)
|
||||
#define glSampleMaskEXT MANGLE(SampleMaskEXT)
|
||||
#define glSampleMaskIndexedNV MANGLE(SampleMaskIndexedNV)
|
||||
#define glSampleMaskSGIS MANGLE(SampleMaskSGIS)
|
||||
#define glSamplePatternEXT MANGLE(SamplePatternEXT)
|
||||
#define glSamplePatternSGIS MANGLE(SamplePatternSGIS)
|
||||
|
@ -1101,6 +1348,7 @@
|
|||
#define glTestFenceAPPLE MANGLE(TestFenceAPPLE)
|
||||
#define glTestFenceNV MANGLE(TestFenceNV)
|
||||
#define glTestObjectAPPLE MANGLE(TestObjectAPPLE)
|
||||
#define glTexBufferARB MANGLE(TexBufferARB)
|
||||
#define glTexBufferEXT MANGLE(TexBufferEXT)
|
||||
#define glTexBumpParameterfvATI MANGLE(TexBumpParameterfvATI)
|
||||
#define glTexBumpParameterivATI MANGLE(TexBumpParameterivATI)
|
||||
|
@ -1181,9 +1429,12 @@
|
|||
#define glTexParameterf MANGLE(TexParameterf)
|
||||
#define glTexParameterfv MANGLE(TexParameterfv)
|
||||
#define glTexParameterIivEXT MANGLE(TexParameterIivEXT)
|
||||
#define glTexParameterIiv MANGLE(TexParameterIiv)
|
||||
#define glTexParameteri MANGLE(TexParameteri)
|
||||
#define glTexParameterIuivEXT MANGLE(TexParameterIuivEXT)
|
||||
#define glTexParameterIuiv MANGLE(TexParameterIuiv)
|
||||
#define glTexParameteriv MANGLE(TexParameteriv)
|
||||
#define glTexRenderbufferNV MANGLE(TexRenderbufferNV)
|
||||
#define glTexSubImage1DEXT MANGLE(TexSubImage1DEXT)
|
||||
#define glTexSubImage1D MANGLE(TexSubImage1D)
|
||||
#define glTexSubImage2DEXT MANGLE(TexSubImage2DEXT)
|
||||
|
@ -1191,12 +1442,28 @@
|
|||
#define glTexSubImage3DEXT MANGLE(TexSubImage3DEXT)
|
||||
#define glTexSubImage3D MANGLE(TexSubImage3D)
|
||||
#define glTexSubImage4DSGIS MANGLE(TexSubImage4DSGIS)
|
||||
#define glTextureBufferEXT MANGLE(TextureBufferEXT)
|
||||
#define glTextureColorMaskSGIS MANGLE(TextureColorMaskSGIS)
|
||||
#define glTextureImage1DEXT MANGLE(TextureImage1DEXT)
|
||||
#define glTextureImage2DEXT MANGLE(TextureImage2DEXT)
|
||||
#define glTextureImage3DEXT MANGLE(TextureImage3DEXT)
|
||||
#define glTextureLightEXT MANGLE(TextureLightEXT)
|
||||
#define glTextureMaterialEXT MANGLE(TextureMaterialEXT)
|
||||
#define glTextureNormalEXT MANGLE(TextureNormalEXT)
|
||||
#define glTextureParameterfEXT MANGLE(TextureParameterfEXT)
|
||||
#define glTextureParameterfvEXT MANGLE(TextureParameterfvEXT)
|
||||
#define glTextureParameteriEXT MANGLE(TextureParameteriEXT)
|
||||
#define glTextureParameterIivEXT MANGLE(TextureParameterIivEXT)
|
||||
#define glTextureParameterIuivEXT MANGLE(TextureParameterIuivEXT)
|
||||
#define glTextureParameterivEXT MANGLE(TextureParameterivEXT)
|
||||
#define glTextureRenderbufferEXT MANGLE(TextureRenderbufferEXT)
|
||||
#define glTextureSubImage1DEXT MANGLE(TextureSubImage1DEXT)
|
||||
#define glTextureSubImage2DEXT MANGLE(TextureSubImage2DEXT)
|
||||
#define glTextureSubImage3DEXT MANGLE(TextureSubImage3DEXT)
|
||||
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
|
||||
#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
|
||||
#define glTransformFeedbackVaryingsEXT MANGLE(TransformFeedbackVaryingsEXT)
|
||||
#define glTransformFeedbackVaryings MANGLE(TransformFeedbackVaryings)
|
||||
#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
|
||||
#define glTranslated MANGLE(Translated)
|
||||
#define glTranslatef MANGLE(Translatef)
|
||||
|
@ -1209,7 +1476,9 @@
|
|||
#define glUniform1ivARB MANGLE(Uniform1ivARB)
|
||||
#define glUniform1iv MANGLE(Uniform1iv)
|
||||
#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
|
||||
#define glUniform1ui MANGLE(Uniform1ui)
|
||||
#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
|
||||
#define glUniform1uiv MANGLE(Uniform1uiv)
|
||||
#define glUniform2fARB MANGLE(Uniform2fARB)
|
||||
#define glUniform2f MANGLE(Uniform2f)
|
||||
#define glUniform2fvARB MANGLE(Uniform2fvARB)
|
||||
|
@ -1219,7 +1488,9 @@
|
|||
#define glUniform2ivARB MANGLE(Uniform2ivARB)
|
||||
#define glUniform2iv MANGLE(Uniform2iv)
|
||||
#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
|
||||
#define glUniform2ui MANGLE(Uniform2ui)
|
||||
#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
|
||||
#define glUniform2uiv MANGLE(Uniform2uiv)
|
||||
#define glUniform3fARB MANGLE(Uniform3fARB)
|
||||
#define glUniform3f MANGLE(Uniform3f)
|
||||
#define glUniform3fvARB MANGLE(Uniform3fvARB)
|
||||
|
@ -1229,7 +1500,9 @@
|
|||
#define glUniform3ivARB MANGLE(Uniform3ivARB)
|
||||
#define glUniform3iv MANGLE(Uniform3iv)
|
||||
#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
|
||||
#define glUniform3ui MANGLE(Uniform3ui)
|
||||
#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
|
||||
#define glUniform3uiv MANGLE(Uniform3uiv)
|
||||
#define glUniform4fARB MANGLE(Uniform4fARB)
|
||||
#define glUniform4f MANGLE(Uniform4f)
|
||||
#define glUniform4fvARB MANGLE(Uniform4fvARB)
|
||||
|
@ -1239,7 +1512,9 @@
|
|||
#define glUniform4ivARB MANGLE(Uniform4ivARB)
|
||||
#define glUniform4iv MANGLE(Uniform4iv)
|
||||
#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
|
||||
#define glUniform4ui MANGLE(Uniform4ui)
|
||||
#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
|
||||
#define glUniform4uiv MANGLE(Uniform4uiv)
|
||||
#define glUniformBufferEXT MANGLE(UniformBufferEXT)
|
||||
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
|
||||
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
|
||||
|
@ -1256,6 +1531,7 @@
|
|||
#define glUnlockArraysEXT MANGLE(UnlockArraysEXT)
|
||||
#define glUnmapBufferARB MANGLE(UnmapBufferARB)
|
||||
#define glUnmapBuffer MANGLE(UnmapBuffer)
|
||||
#define glUnmapNamedBufferEXT MANGLE(UnmapNamedBufferEXT)
|
||||
#define glUnmapObjectBufferATI MANGLE(UnmapObjectBufferATI)
|
||||
#define glUpdateObjectBufferATI MANGLE(UpdateObjectBufferATI)
|
||||
#define glUseProgram MANGLE(UseProgram)
|
||||
|
@ -1412,27 +1688,49 @@
|
|||
#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB)
|
||||
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
|
||||
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
|
||||
#define glVertexAttribDivisor MANGLE(VertexAttribDivisor)
|
||||
#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
|
||||
#define glVertexAttribI1i MANGLE(VertexAttribI1i)
|
||||
#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
|
||||
#define glVertexAttribI1iv MANGLE(VertexAttribI1iv)
|
||||
#define glVertexAttribI1uiEXT MANGLE(VertexAttribI1uiEXT)
|
||||
#define glVertexAttribI1ui MANGLE(VertexAttribI1ui)
|
||||
#define glVertexAttribI1uivEXT MANGLE(VertexAttribI1uivEXT)
|
||||
#define glVertexAttribI1uiv MANGLE(VertexAttribI1uiv)
|
||||
#define glVertexAttribI2iEXT MANGLE(VertexAttribI2iEXT)
|
||||
#define glVertexAttribI2i MANGLE(VertexAttribI2i)
|
||||
#define glVertexAttribI2ivEXT MANGLE(VertexAttribI2ivEXT)
|
||||
#define glVertexAttribI2iv MANGLE(VertexAttribI2iv)
|
||||
#define glVertexAttribI2uiEXT MANGLE(VertexAttribI2uiEXT)
|
||||
#define glVertexAttribI2ui MANGLE(VertexAttribI2ui)
|
||||
#define glVertexAttribI2uivEXT MANGLE(VertexAttribI2uivEXT)
|
||||
#define glVertexAttribI2uiv MANGLE(VertexAttribI2uiv)
|
||||
#define glVertexAttribI3iEXT MANGLE(VertexAttribI3iEXT)
|
||||
#define glVertexAttribI3i MANGLE(VertexAttribI3i)
|
||||
#define glVertexAttribI3ivEXT MANGLE(VertexAttribI3ivEXT)
|
||||
#define glVertexAttribI3iv MANGLE(VertexAttribI3iv)
|
||||
#define glVertexAttribI3uiEXT MANGLE(VertexAttribI3uiEXT)
|
||||
#define glVertexAttribI3ui MANGLE(VertexAttribI3ui)
|
||||
#define glVertexAttribI3uivEXT MANGLE(VertexAttribI3uivEXT)
|
||||
#define glVertexAttribI3uiv MANGLE(VertexAttribI3uiv)
|
||||
#define glVertexAttribI4bvEXT MANGLE(VertexAttribI4bvEXT)
|
||||
#define glVertexAttribI4bv MANGLE(VertexAttribI4bv)
|
||||
#define glVertexAttribI4iEXT MANGLE(VertexAttribI4iEXT)
|
||||
#define glVertexAttribI4i MANGLE(VertexAttribI4i)
|
||||
#define glVertexAttribI4ivEXT MANGLE(VertexAttribI4ivEXT)
|
||||
#define glVertexAttribI4iv MANGLE(VertexAttribI4iv)
|
||||
#define glVertexAttribI4svEXT MANGLE(VertexAttribI4svEXT)
|
||||
#define glVertexAttribI4sv MANGLE(VertexAttribI4sv)
|
||||
#define glVertexAttribI4ubvEXT MANGLE(VertexAttribI4ubvEXT)
|
||||
#define glVertexAttribI4ubv MANGLE(VertexAttribI4ubv)
|
||||
#define glVertexAttribI4uiEXT MANGLE(VertexAttribI4uiEXT)
|
||||
#define glVertexAttribI4ui MANGLE(VertexAttribI4ui)
|
||||
#define glVertexAttribI4uivEXT MANGLE(VertexAttribI4uivEXT)
|
||||
#define glVertexAttribI4uiv MANGLE(VertexAttribI4uiv)
|
||||
#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
|
||||
#define glVertexAttribI4usv MANGLE(VertexAttribI4usv)
|
||||
#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
|
||||
#define glVertexAttribIPointer MANGLE(VertexAttribIPointer)
|
||||
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
|
||||
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
|
||||
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
|
||||
|
|
|
@ -46,9 +46,9 @@ extern "C" {
|
|||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2008/11/14 */
|
||||
/* glext.h last updated 2009/03/04 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 44
|
||||
#define GL_GLEXT_VERSION 46
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
|
@ -3862,6 +3862,22 @@ extern "C" {
|
|||
#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
|
||||
#endif
|
||||
|
||||
#ifndef GL_ATI_meminfo
|
||||
#define GL_VBO_FREE_MEMORY_ATI 0x87FB
|
||||
#define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
|
||||
#define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_performance_monitor
|
||||
#define GL_COUNTER_TYPE_AMD 0x8BC0
|
||||
#define GL_COUNTER_RANGE_AMD 0x8BC1
|
||||
#define GL_UNSIGNED_INT64_AMD 0x8BC2
|
||||
#define GL_PERCENTAGE_AMD 0x8BC3
|
||||
#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
|
||||
#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
|
||||
#define GL_PERFMON_RESULT_AMD 0x8BC6
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
|
@ -5268,10 +5284,10 @@ typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divi
|
|||
#ifndef GL_ARB_map_buffer_range
|
||||
#define GL_ARB_map_buffer_range 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glMapBufferRange (GLenum, GLintptr, GLsizeiptr, GLbitfield);
|
||||
GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum, GLintptr, GLsizeiptr, GLbitfield);
|
||||
GLAPI void APIENTRY glFlushMappedBufferRange (GLenum, GLintptr, GLsizeiptr);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
|
||||
#endif
|
||||
|
||||
|
@ -8011,6 +8027,22 @@ typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERNVPROC) (void);
|
|||
|
||||
#ifndef GL_NV_present_video
|
||||
#define GL_NV_present_video 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glPresentFrameKeyedNV (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLuint, GLenum, GLuint, GLuint);
|
||||
GLAPI void APIENTRY glPresentFrameDualFillNV (GLuint, GLuint64EXT, GLuint, GLuint, GLenum, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint, GLenum, GLuint);
|
||||
GLAPI void APIENTRY glGetVideoivNV (GLuint, GLenum, GLint *);
|
||||
GLAPI void APIENTRY glGetVideouivNV (GLuint, GLenum, GLuint *);
|
||||
GLAPI void APIENTRY glGetVideoi64vNV (GLuint, GLenum, GLint64EXT *);
|
||||
GLAPI void APIENTRY glGetVideoui64vNV (GLuint, GLenum, GLuint64EXT *);
|
||||
GLAPI void APIENTRY glVideoParameterivNV (GLuint, GLenum, const GLint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
|
||||
typedef void (APIENTRYP PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOIVNVPROC) (GLuint video_slot, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOI64VNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT *params);
|
||||
typedef void (APIENTRYP PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT *params);
|
||||
typedef void (APIENTRYP PFNGLVIDEOPARAMETERIVNVPROC) (GLuint video_slot, GLenum pname, const GLint *params);
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_transform_feedback
|
||||
|
@ -8451,6 +8483,38 @@ typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
|
|||
typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
|
||||
#endif
|
||||
|
||||
#ifndef GL_ATI_meminfo
|
||||
#define GL_ATI_meminfo 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_AMD_performance_monitor
|
||||
#define GL_AMD_performance_monitor 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glGetPerfMonitorGroupsAMD (GLint *, GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCountersAMD (GLuint, GLint *, GLint *, GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorGroupStringAMD (GLuint, GLsizei, GLsizei *, GLchar *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCounterStringAMD (GLuint, GLuint, GLsizei, GLsizei *, GLchar *);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint, GLuint, GLenum, void *);
|
||||
GLAPI void APIENTRY glGenPerfMonitorsAMD (GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glDeletePerfMonitorsAMD (GLsizei, GLuint *);
|
||||
GLAPI void APIENTRY glSelectPerfMonitorCountersAMD (GLuint, GLboolean, GLuint, GLint, GLuint *);
|
||||
GLAPI void APIENTRY glBeginPerfMonitorAMD (GLuint);
|
||||
GLAPI void APIENTRY glEndPerfMonitorAMD (GLuint);
|
||||
GLAPI void APIENTRY glGetPerfMonitorCounterDataAMD (GLuint, GLenum, GLsizei, GLuint *, GLint *);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, void *data);
|
||||
typedef void (APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
||||
typedef void (APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
|
||||
typedef void (APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *counterList);
|
||||
typedef void (APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
|
||||
typedef void (APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
|
||||
typedef void (APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -74,22 +74,8 @@ extern "C" {
|
|||
# define __cdecl
|
||||
# define GLUT_DEFINED___CDECL
|
||||
# endif
|
||||
# ifndef _CRTIMP
|
||||
# ifdef _NTSDK
|
||||
/* Definition compatible with NT SDK */
|
||||
# define _CRTIMP
|
||||
# else
|
||||
/* Current definition */
|
||||
# ifdef _DLL
|
||||
# define _CRTIMP __declspec(dllimport)
|
||||
# else
|
||||
# define _CRTIMP
|
||||
# endif
|
||||
# endif
|
||||
# define GLUT_DEFINED__CRTIMP
|
||||
# endif
|
||||
# ifndef GLUT_BUILDING_LIB
|
||||
extern _CRTIMP void __cdecl exit(int);
|
||||
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/* GLUT callback calling convention for Win32. */
|
||||
|
@ -122,7 +108,7 @@ extern _CRTIMP void __cdecl exit(int);
|
|||
# define GLUTAPIENTRY
|
||||
# define GLUTAPIENTRYV
|
||||
# define GLUTCALLBACK
|
||||
# define GLUTAPI __attribute__((visibility("default")))
|
||||
# define GLUTAPI extern __attribute__((visibility("default")))
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@ typedef struct __DRIswrastExtensionRec __DRIswrastExtension;
|
|||
typedef struct __DRIbufferRec __DRIbuffer;
|
||||
typedef struct __DRIdri2ExtensionRec __DRIdri2Extension;
|
||||
typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension;
|
||||
typedef struct __DRI2flushExtensionRec __DRI2flushExtension;
|
||||
|
||||
/*@}*/
|
||||
|
||||
|
@ -245,6 +246,16 @@ struct __DRItexBufferExtensionRec {
|
|||
__DRIdrawable *pDraw);
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by drivers that implement DRI2
|
||||
*/
|
||||
#define __DRI2_FLUSH "DRI2_Flush"
|
||||
#define __DRI2_FLUSH_VERSION 1
|
||||
struct __DRI2flushExtensionRec {
|
||||
__DRIextension base;
|
||||
void (*flush)(__DRIdrawable *drawable);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* XML document describing the configuration options supported by the
|
||||
|
|
|
@ -0,0 +1,813 @@
|
|||
#ifndef __wglext_h_
|
||||
#define __wglext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number */
|
||||
/* wglext.h last updated 2009/03/03 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define WGL_WGLEXT_VERSION 12
|
||||
|
||||
#ifndef 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
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
#endif
|
||||
|
||||
#ifndef 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_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
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format_float
|
||||
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||
#endif
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
#define WGL_SAMPLES_3DFX 0x2061
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||
#define WGL_SAMPLES_EXT 0x2042
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_gamma
|
||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_image_buffer
|
||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_lock
|
||||
#endif
|
||||
|
||||
#ifndef 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_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||
#endif
|
||||
|
||||
#ifndef 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
|
||||
|
||||
#ifndef WGL_3DL_stereo_control
|
||||
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_video_out
|
||||
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||
#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define WGL_GPU_RAM_AMD 0x21A3
|
||||
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
#endif
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFEREXT);
|
||||
#endif
|
||||
#ifndef WGL_NV_present_video
|
||||
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||
#endif
|
||||
#ifndef WGL_NV_video_out
|
||||
DECLARE_HANDLE(HPVIDEODEV);
|
||||
#endif
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
DECLARE_HANDLE(HPGPUNV);
|
||||
DECLARE_HANDLE(HGPUNV);
|
||||
|
||||
typedef struct _GPU_DEVICE {
|
||||
DWORD cb;
|
||||
CHAR DeviceName[32];
|
||||
CHAR DeviceString[128];
|
||||
DWORD Flags;
|
||||
RECT rcVirtualScreen;
|
||||
} GPU_DEVICE, *PGPU_DEVICE;
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_ARB_buffer_region 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HANDLE WINAPI wglCreateBufferRegionARB (HDC, int, UINT);
|
||||
extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE);
|
||||
extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE, int, int, int, int);
|
||||
extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_multisample
|
||||
#define WGL_ARB_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#define WGL_ARB_extensions_string 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern const char * WINAPI wglGetExtensionsStringARB (HDC);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_ARB_pixel_format 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *);
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *);
|
||||
extern BOOL WINAPI wglChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define WGL_ARB_make_current_read 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglMakeContextCurrentARB (HDC, HDC, HGLRC);
|
||||
extern HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_ARB_pbuffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC, int, int, int, const int *);
|
||||
extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB);
|
||||
extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB, HDC);
|
||||
extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB);
|
||||
extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB, int, int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_ARB_render_texture 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB, int);
|
||||
extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB, int);
|
||||
extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB, const int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format_float
|
||||
#define WGL_ARB_pixel_format_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_ARB_create_context 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HGLRC WINAPI wglCreateContextAttribsARB (HDC, HGLRC, const int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_display_color_table
|
||||
#define WGL_EXT_display_color_table 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort);
|
||||
extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *, GLuint);
|
||||
extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort);
|
||||
extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_extensions_string
|
||||
#define WGL_EXT_extensions_string 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern const char * WINAPI wglGetExtensionsStringEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define WGL_EXT_make_current_read 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglMakeContextCurrentEXT (HDC, HDC, HGLRC);
|
||||
extern HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_EXT_pbuffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC, int, int, int, const int *);
|
||||
extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT);
|
||||
extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT, HDC);
|
||||
extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT);
|
||||
extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT, int, int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_EXT_pixel_format 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *);
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *);
|
||||
extern BOOL WINAPI wglChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
#define WGL_EXT_swap_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglSwapIntervalEXT (int);
|
||||
extern int WINAPI wglGetSwapIntervalEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_EXT_depth_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_vertex_array_range
|
||||
#define WGL_NV_vertex_array_range 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern void* WINAPI wglAllocateMemoryNV (GLsizei, GLfloat, GLfloat, GLfloat);
|
||||
extern void WINAPI wglFreeMemoryNV (void *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_3DFX_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_EXT_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_OML_sync_control
|
||||
#define WGL_OML_sync_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetSyncValuesOML (HDC, INT64 *, INT64 *, INT64 *);
|
||||
extern BOOL WINAPI wglGetMscRateOML (HDC, INT32 *, INT32 *);
|
||||
extern INT64 WINAPI wglSwapBuffersMscOML (HDC, INT64, INT64, INT64);
|
||||
extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC, int, INT64, INT64, INT64);
|
||||
extern BOOL WINAPI wglWaitForMscOML (HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *);
|
||||
extern BOOL WINAPI wglWaitForSbcOML (HDC, INT64, INT64 *, INT64 *, INT64 *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
#define WGL_I3D_digital_video_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC, int, int *);
|
||||
extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC, int, const int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_gamma
|
||||
#define WGL_I3D_gamma 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC, int, int *);
|
||||
extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC, int, const int *);
|
||||
extern BOOL WINAPI wglGetGammaTableI3D (HDC, int, USHORT *, USHORT *, USHORT *);
|
||||
extern BOOL WINAPI wglSetGammaTableI3D (HDC, int, const USHORT *, const USHORT *, const USHORT *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_genlock
|
||||
#define WGL_I3D_genlock 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglEnableGenlockI3D (HDC);
|
||||
extern BOOL WINAPI wglDisableGenlockI3D (HDC);
|
||||
extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC, BOOL *);
|
||||
extern BOOL WINAPI wglGenlockSourceI3D (HDC, UINT);
|
||||
extern BOOL WINAPI wglGetGenlockSourceI3D (HDC, UINT *);
|
||||
extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC, UINT);
|
||||
extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC, UINT *);
|
||||
extern BOOL WINAPI wglGenlockSampleRateI3D (HDC, UINT);
|
||||
extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC, UINT *);
|
||||
extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC, UINT);
|
||||
extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC, UINT *);
|
||||
extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC, UINT *, UINT *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_image_buffer
|
||||
#define WGL_I3D_image_buffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern LPVOID WINAPI wglCreateImageBufferI3D (HDC, DWORD, UINT);
|
||||
extern BOOL WINAPI wglDestroyImageBufferI3D (HDC, LPVOID);
|
||||
extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT);
|
||||
extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC, const LPVOID *, UINT);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_lock
|
||||
#define WGL_I3D_swap_frame_lock 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglEnableFrameLockI3D (void);
|
||||
extern BOOL WINAPI wglDisableFrameLockI3D (void);
|
||||
extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *);
|
||||
extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_usage
|
||||
#define WGL_I3D_swap_frame_usage 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetFrameUsageI3D (float *);
|
||||
extern BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
||||
extern BOOL WINAPI wglEndFrameTrackingI3D (void);
|
||||
extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *, DWORD *, float *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
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);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
#define WGL_ATI_pixel_format_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
#define WGL_NV_float_buffer 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_EXT_pixel_format_packed_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_EXT_framebuffer_sRGB 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NV_present_video 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern int WINAPI wglEnumerateVideoDevicesNV (HDC, HVIDEOOUTPUTDEVICENV *);
|
||||
extern BOOL WINAPI wglBindVideoDeviceNV (HDC, unsigned int, HVIDEOOUTPUTDEVICENV, const int *);
|
||||
extern BOOL WINAPI wglQueryCurrentContextNV (int, int *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_video_out
|
||||
#define WGL_NV_video_out 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetVideoDeviceNV (HDC, int, HPVIDEODEV *);
|
||||
extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV);
|
||||
extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV, HPBUFFERARB, int);
|
||||
extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB, int);
|
||||
extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB, int, unsigned long *, BOOL);
|
||||
extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV, unsigned long *, unsigned long *);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#define WGL_NV_swap_group 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglJoinSwapGroupNV (HDC, GLuint);
|
||||
extern BOOL WINAPI wglBindSwapBarrierNV (GLuint, GLuint);
|
||||
extern BOOL WINAPI wglQuerySwapGroupNV (HDC, GLuint *, GLuint *);
|
||||
extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC, GLuint *, GLuint *);
|
||||
extern BOOL WINAPI wglQueryFrameCountNV (HDC, GLuint *);
|
||||
extern BOOL WINAPI wglResetFrameCountNV (HDC);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_NV_gpu_affinity 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglEnumGpusNV (UINT, HGPUNV *);
|
||||
extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV, UINT, PGPU_DEVICE);
|
||||
extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *);
|
||||
extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC, UINT, HGPUNV *);
|
||||
extern BOOL WINAPI wglDeleteDCNV (HDC);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_AMD_gpu_association 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern UINT WINAPI wglGetGPUIDsAMD (UINT, UINT *);
|
||||
extern INT WINAPI wglGetGPUInfoAMD (UINT, int, GLenum, UINT, void *);
|
||||
extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC);
|
||||
extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT);
|
||||
extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT, HGLRC, const int *);
|
||||
extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC);
|
||||
extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC);
|
||||
extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
||||
extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
||||
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -3,6 +3,10 @@ SConscript([
|
|||
'demos/SConscript',
|
||||
'redbook/SConscript',
|
||||
'samples/SConscript',
|
||||
'tests/SConscript',
|
||||
'trivial/SConscript',
|
||||
'vp/SConscript',
|
||||
'vpglsl/SConscript',
|
||||
'fp/SConscript',
|
||||
'wgl/SConscript',
|
||||
])
|
||||
|
|
|
@ -92,6 +92,7 @@ static void Redisplay( void )
|
|||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
}
|
||||
|
|
|
@ -105,6 +105,7 @@ static void Redisplay (void)
|
|||
GLfloat seconds = (GLfloat) (t - t0) / 1000.0f;
|
||||
GLfloat fps = frames / seconds;
|
||||
printf ("%d frames in %6.3f seconds = %6.3f FPS\n", frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
t0 = t;
|
||||
frames = 0;
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glew.h>
|
||||
#include "GL/glut.h"
|
||||
#include "readtex.h"
|
||||
|
||||
|
@ -49,6 +50,45 @@ static GLboolean use_vertex_arrays = GL_FALSE;
|
|||
static GLboolean anim = GL_TRUE;
|
||||
static GLboolean NoClear = GL_FALSE;
|
||||
static GLint FrameParity = 0;
|
||||
static GLenum FilterIndex = 0;
|
||||
static GLint ClampIndex = 0;
|
||||
|
||||
|
||||
static struct {
|
||||
GLenum mode;
|
||||
const char *name;
|
||||
} ClampModes[] = {
|
||||
{ GL_CLAMP_TO_EDGE, "GL_CLAMP_TO_EDGE" },
|
||||
{ GL_CLAMP_TO_BORDER, "GL_CLAMP_TO_BORDER" },
|
||||
{ GL_CLAMP, "GL_CLAMP" },
|
||||
{ GL_REPEAT, "GL_REPEAT" }
|
||||
};
|
||||
|
||||
#define NUM_CLAMP_MODES (sizeof(ClampModes) / sizeof(ClampModes[0]))
|
||||
|
||||
|
||||
static struct {
|
||||
GLenum mag_mode, min_mode;
|
||||
const char *name;
|
||||
} FilterModes[] = {
|
||||
{ GL_NEAREST, GL_NEAREST, "GL_NEAREST, GL_NEAREST" },
|
||||
{ GL_NEAREST, GL_LINEAR, "GL_NEAREST, GL_LINEAR" },
|
||||
{ GL_NEAREST, GL_NEAREST_MIPMAP_NEAREST, "GL_NEAREST, GL_NEAREST_MIPMAP_NEAREST" },
|
||||
{ GL_NEAREST, GL_NEAREST_MIPMAP_LINEAR, "GL_NEAREST, GL_NEAREST_MIPMAP_LINEAR" },
|
||||
{ GL_NEAREST, GL_LINEAR_MIPMAP_NEAREST, "GL_NEAREST, GL_LINEAR_MIPMAP_NEAREST" },
|
||||
{ GL_NEAREST, GL_LINEAR_MIPMAP_LINEAR, "GL_NEAREST, GL_LINEAR_MIPMAP_LINEAR" },
|
||||
|
||||
{ GL_LINEAR, GL_NEAREST, "GL_LINEAR, GL_NEAREST" },
|
||||
{ GL_LINEAR, GL_LINEAR, "GL_LINEAR, GL_LINEAR" },
|
||||
{ GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, "GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST" },
|
||||
{ GL_LINEAR, GL_NEAREST_MIPMAP_LINEAR, "GL_LINEAR, GL_NEAREST_MIPMAP_LINEAR" },
|
||||
{ GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST, "GL_LINEAR, GL_LINEAR_MIPMAP_NEAREST" },
|
||||
{ GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR, "GL_LINEAR, GL_LINEAR_MIPMAP_LINEAR" }
|
||||
};
|
||||
|
||||
#define NUM_FILTER_MODES (sizeof(FilterModes) / sizeof(FilterModes[0]))
|
||||
|
||||
|
||||
|
||||
#define eps1 0.99
|
||||
#define br 20.0 /* box radius */
|
||||
|
@ -158,6 +198,8 @@ static void draw_skybox( void )
|
|||
|
||||
static void draw( void )
|
||||
{
|
||||
GLenum wrap;
|
||||
|
||||
if (NoClear) {
|
||||
/* This demonstrates how we can avoid calling glClear.
|
||||
* This method only works if every pixel in the window is painted for
|
||||
|
@ -183,6 +225,16 @@ static void draw( void )
|
|||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER,
|
||||
FilterModes[FilterIndex].min_mode);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER,
|
||||
FilterModes[FilterIndex].mag_mode);
|
||||
|
||||
wrap = ClampModes[ClampIndex].mode;
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, wrap);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, wrap);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_R, wrap);
|
||||
|
||||
glPushMatrix(); /*MODELVIEW*/
|
||||
glTranslatef( 0.0, 0.0, -EyeDist );
|
||||
|
||||
|
@ -256,6 +308,14 @@ static void key(unsigned char k, int x, int y)
|
|||
else
|
||||
glutIdleFunc(NULL);
|
||||
break;
|
||||
case 'f':
|
||||
FilterIndex = (FilterIndex + 1) % NUM_FILTER_MODES;
|
||||
printf("Tex filter: %s\n", FilterModes[FilterIndex].name);
|
||||
break;
|
||||
case 'c':
|
||||
ClampIndex = (ClampIndex + 1) % NUM_CLAMP_MODES;
|
||||
printf("Tex wrap mode: %s\n", ClampModes[ClampIndex].name);
|
||||
break;
|
||||
case 'm':
|
||||
mode = !mode;
|
||||
set_mode(mode);
|
||||
|
@ -321,7 +381,7 @@ static void reshape(int width, int height)
|
|||
static void init_checkers( void )
|
||||
{
|
||||
#define CUBE_TEX_SIZE 64
|
||||
GLubyte image[CUBE_TEX_SIZE][CUBE_TEX_SIZE][3];
|
||||
GLubyte image[CUBE_TEX_SIZE][CUBE_TEX_SIZE][4];
|
||||
static const GLubyte colors[6][3] = {
|
||||
{ 255, 0, 0 }, /* face 0 - red */
|
||||
{ 0, 255, 255 }, /* face 1 - cyan */
|
||||
|
@ -348,21 +408,25 @@ static void init_checkers( void )
|
|||
for (i = 0; i < CUBE_TEX_SIZE; i++) {
|
||||
for (j = 0; j < CUBE_TEX_SIZE; j++) {
|
||||
if ((i/4 + j/4) & 1) {
|
||||
image[i][j][0] = colors[f][0];
|
||||
image[i][j][0] = colors[f][2];
|
||||
image[i][j][1] = colors[f][1];
|
||||
image[i][j][2] = colors[f][2];
|
||||
image[i][j][2] = colors[f][0];
|
||||
image[i][j][3] = 255;
|
||||
}
|
||||
else {
|
||||
image[i][j][0] = 255;
|
||||
image[i][j][1] = 255;
|
||||
image[i][j][2] = 255;
|
||||
image[i][j][3] = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glTexImage2D(targets[f], 0, GL_RGB, CUBE_TEX_SIZE, CUBE_TEX_SIZE, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, image);
|
||||
glTexImage2D(targets[f], 0, GL_RGBA8, CUBE_TEX_SIZE, CUBE_TEX_SIZE, 0,
|
||||
GL_BGRA, GL_UNSIGNED_BYTE, image);
|
||||
}
|
||||
|
||||
glGenerateMipmapEXT(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
}
|
||||
|
||||
|
||||
|
@ -431,32 +495,30 @@ static void load_envmaps(void)
|
|||
|
||||
static void init( GLboolean useImageFiles )
|
||||
{
|
||||
GLenum filter;
|
||||
|
||||
/* check for extension */
|
||||
/* check for extensions */
|
||||
{
|
||||
char *exten = (char *) glGetString(GL_EXTENSIONS);
|
||||
if (!strstr(exten, "GL_ARB_texture_cube_map")) {
|
||||
printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* Needed for glGenerateMipmapEXT
|
||||
*/
|
||||
if (!strstr(exten, "GL_EXT_framebuffer_object")) {
|
||||
printf("Sorry, this demo requires GL_EXT_framebuffer_object\n");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));
|
||||
|
||||
if (useImageFiles) {
|
||||
load_envmaps();
|
||||
filter = GL_LINEAR;
|
||||
}
|
||||
else {
|
||||
init_checkers();
|
||||
filter = GL_NEAREST;
|
||||
}
|
||||
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, filter);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, filter);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
||||
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
|
@ -472,6 +534,8 @@ static void usage(void)
|
|||
printf("keys:\n");
|
||||
printf(" SPACE - toggle animation\n");
|
||||
printf(" CURSOR KEYS - rotation\n");
|
||||
printf(" c - toggle texture clamp/wrap mode\n");
|
||||
printf(" f - toggle texture filter mode\n");
|
||||
printf(" m - toggle texgen reflection mode\n");
|
||||
printf(" z/Z - change viewing distance\n");
|
||||
}
|
||||
|
@ -502,6 +566,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize(600, 500);
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
|
||||
glutCreateWindow("Texture Cube Mapping");
|
||||
glewInit();
|
||||
glutReshapeFunc( reshape );
|
||||
glutKeyboardFunc( key );
|
||||
glutSpecialFunc( specialkey );
|
||||
|
|
|
@ -386,6 +386,9 @@ DrawPositionedPiston(const Engine *eng, float crankAngle)
|
|||
glPushMatrix();
|
||||
glRotatef(-90, 1, 0, 0);
|
||||
glTranslatef(0, 0, pos);
|
||||
if (eng->PistonList)
|
||||
glCallList(eng->PistonList);
|
||||
else
|
||||
DrawPiston(eng);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
@ -961,6 +964,28 @@ Draw(void)
|
|||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
/* also print out a periodic fps to stdout. useful for trying to
|
||||
* figure out the performance impact of rendering the string above
|
||||
* with glBitmap.
|
||||
*/
|
||||
{
|
||||
static GLint T0 = 0;
|
||||
static GLint Frames = 0;
|
||||
GLint t = glutGet(GLUT_ELAPSED_TIME);
|
||||
|
||||
Frames++;
|
||||
|
||||
if (t - T0 >= 5000) {
|
||||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
|
|
@ -105,6 +105,7 @@ Redisplay(void)
|
|||
GLfloat fps = frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n",
|
||||
frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
t0 = t;
|
||||
frames = 0;
|
||||
}
|
||||
|
|
|
@ -314,6 +314,7 @@ draw(void)
|
|||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
}
|
||||
|
|
|
@ -219,6 +219,7 @@ draw(void)
|
|||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
if ((t >= 999.0 * autoexit) && (autoexit)) {
|
||||
|
|
|
@ -905,6 +905,7 @@ draw (void)
|
|||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ static void Display( void )
|
|||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ static void Redisplay (void)
|
|||
GLfloat seconds = (GLfloat) (t - t0) / 1000.0f;
|
||||
GLfloat fps = frames / seconds;
|
||||
printf ("%d frames in %6.3f seconds = %6.3f FPS\n", frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
t0 = t;
|
||||
frames = 0;
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
#define NO_STIPPLE 0x08000000
|
||||
#define POLYGON_FILL 0x10000000
|
||||
#define POLYGON_LINE 0x20000000
|
||||
#define POLYGON_POINT 0x40000000
|
||||
|
||||
#define LIGHT_MASK (LIT|UNLIT|REFLECT)
|
||||
#define FILTER_MASK (POINT_FILTER|LINEAR_FILTER)
|
||||
|
@ -81,7 +82,7 @@
|
|||
#define SHADE_MASK (SHADE_SMOOTH|SHADE_FLAT)
|
||||
#define FOG_MASK (FOG|NO_FOG)
|
||||
#define STIPPLE_MASK (STIPPLE|NO_STIPPLE)
|
||||
#define POLYGON_MASK (POLYGON_FILL|POLYGON_LINE)
|
||||
#define POLYGON_MASK (POLYGON_FILL|POLYGON_LINE|POLYGON_POINT)
|
||||
|
||||
#define MAXVERTS 10000
|
||||
static GLint maxverts = MAXVERTS;
|
||||
|
@ -147,7 +148,7 @@ static void read_surface( char *filename )
|
|||
static void print_flags( const char *msg, GLuint flags )
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s (0x%x): %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
|
||||
"%s (0x%x): %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
|
||||
msg, flags,
|
||||
(flags & GLVERTEX) ? "glVertex, " : "",
|
||||
(flags & DRAW_ARRAYS) ? "glDrawArrays, " : "",
|
||||
|
@ -166,7 +167,8 @@ static void print_flags( const char *msg, GLuint flags )
|
|||
(flags & MATERIALS) ? "materials, " : "",
|
||||
(flags & FOG) ? "fog, " : "",
|
||||
(flags & STIPPLE) ? "stipple, " : "",
|
||||
(flags & POLYGON_LINE) ? "polygon mode line, " : "");
|
||||
(flags & POLYGON_LINE) ? "polygon mode line, " : "",
|
||||
(flags & POLYGON_POINT) ? "polygon mode point, " : "");
|
||||
}
|
||||
|
||||
|
||||
|
@ -711,9 +713,12 @@ static void ModeMenu(int m)
|
|||
if (m & POLYGON_FILL) {
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
}
|
||||
else {
|
||||
else if (m & POLYGON_LINE) {
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
}
|
||||
else {
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_POINT);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GL_EXT_vertex_array
|
||||
|
@ -1089,6 +1094,7 @@ int main(int argc, char **argv)
|
|||
glutAddMenuEntry("", 0);
|
||||
glutAddMenuEntry("Polygon Mode Fill", POLYGON_FILL);
|
||||
glutAddMenuEntry("Polygon Mode Line", POLYGON_LINE);
|
||||
glutAddMenuEntry("Polygon Mode Points", POLYGON_POINT);
|
||||
glutAddMenuEntry("", 0);
|
||||
glutAddMenuEntry("Point Filtered", POINT_FILTER);
|
||||
glutAddMenuEntry("Linear Filtered", LINEAR_FILTER);
|
||||
|
|
|
@ -401,6 +401,7 @@ DrawWindow(void)
|
|||
GLfloat seconds = (t - t0) / 1000.0;
|
||||
GLfloat fps = frames / seconds;
|
||||
printf("%d frames in %g seconds = %g FPS\n", frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
t0 = t;
|
||||
frames = 0;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,10 @@ static void Idle( void )
|
|||
}
|
||||
|
||||
/*static int max( int a, int b ) { return a > b ? a : b; }*/
|
||||
|
||||
#ifndef min
|
||||
static int min( int a, int b ) { return a < b ? a : b; }
|
||||
#endif
|
||||
|
||||
static void DrawObject()
|
||||
{
|
||||
|
@ -150,6 +153,7 @@ static void Display( void )
|
|||
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
|
||||
drift_increment = 2.2 * seconds / Frames;
|
||||
T0 = t;
|
||||
|
|
|
@ -79,6 +79,7 @@ static void Display( void )
|
|||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
|
||||
fflush(stdout);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ TOP = ../..
|
|||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
SOURCES = \
|
||||
tri-tex.c \
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
Import('env')
|
||||
|
||||
if not env['GLUT']:
|
||||
Return()
|
||||
|
||||
env = env.Clone()
|
||||
|
||||
env.Prepend(CPPPATH = [
|
||||
'../util',
|
||||
])
|
||||
|
||||
env.Prepend(LIBS = ['$GLUT_LIB'])
|
||||
|
||||
env.Program(
|
||||
target = 'fp-tri',
|
||||
source = ['fp-tri.c'],
|
||||
)
|
|
@ -2,10 +2,19 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glut.h>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.c"
|
||||
|
||||
|
||||
#define TEXTURE_FILE "../images/bw.rgb"
|
||||
|
||||
unsigned show_fps = 0;
|
||||
unsigned int frame_cnt = 0;
|
||||
|
@ -15,11 +24,14 @@ static const char *filename = NULL;
|
|||
static void usage(char *name)
|
||||
{
|
||||
fprintf(stderr, "usage: %s [ options ] shader_filename\n", name);
|
||||
#ifndef WIN32
|
||||
fprintf(stderr, "\n" );
|
||||
fprintf(stderr, "options:\n");
|
||||
fprintf(stderr, " -fps show frames per second\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
void alarmhandler (int sig)
|
||||
{
|
||||
if (sig == SIGALRM) {
|
||||
|
@ -31,6 +43,7 @@ void alarmhandler (int sig)
|
|||
signal(SIGALRM, alarmhandler);
|
||||
alarm(5);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void args(int argc, char *argv[])
|
||||
{
|
||||
|
@ -57,6 +70,7 @@ static void args(int argc, char *argv[])
|
|||
|
||||
static void Init( void )
|
||||
{
|
||||
GLuint Texture;
|
||||
GLint errno;
|
||||
GLuint prognum;
|
||||
char buf[4096];
|
||||
|
@ -99,7 +113,70 @@ static void Init( void )
|
|||
}
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
|
||||
glClearColor(.3, .3, .3, 0);
|
||||
|
||||
/* Load texture */
|
||||
glGenTextures(1, &Texture);
|
||||
glBindTexture(GL_TEXTURE_2D, Texture);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
|
||||
printf("Error: couldn't load texture image file %s\n", TEXTURE_FILE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
glGenTextures(1, &Texture);
|
||||
glActiveTextureARB(GL_TEXTURE0_ARB + 1);
|
||||
glBindTexture(GL_TEXTURE_2D, Texture);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
{
|
||||
GLubyte data[32][32];
|
||||
int width = 32;
|
||||
int height = 32;
|
||||
int i;
|
||||
int j;
|
||||
|
||||
for (i = 0; i < 32; i++)
|
||||
for (j = 0; j < 32; j++)
|
||||
{
|
||||
/**
|
||||
** +-----------+
|
||||
** | W |
|
||||
** | +-----+ |
|
||||
** | | | |
|
||||
** | | B | |
|
||||
** | | | |
|
||||
** | +-----+ |
|
||||
** | |
|
||||
** +-----------+
|
||||
**/
|
||||
int i2 = i - height / 2;
|
||||
int j2 = j - width / 2;
|
||||
int h8 = height / 8;
|
||||
int w8 = width / 8;
|
||||
if ( -h8 <= i2 && i2 <= h8 && -w8 <= j2 && j2 <= w8 ) {
|
||||
data[i][j] = 0x00;
|
||||
} else if ( -2 * h8 <= i2 && i2 <= 2 * h8 && -2 * w8 <= j2 && j2 <= 2 * w8 ) {
|
||||
data[i][j] = 0x55;
|
||||
} else if ( -3 * h8 <= i2 && i2 <= 3 * h8 && -3 * w8 <= j2 && j2 <= 3 * w8 ) {
|
||||
data[i][j] = 0xaa;
|
||||
} else {
|
||||
data[i][j] = 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
glTexImage2D( GL_TEXTURE_2D, 0,
|
||||
GL_ALPHA8,
|
||||
32, 32, 0,
|
||||
GL_ALPHA, GL_UNSIGNED_BYTE, data );
|
||||
}
|
||||
|
||||
|
||||
glClearColor(.1, .3, .5, 0);
|
||||
}
|
||||
|
||||
static void Reshape(int width, int height)
|
||||
|
@ -142,7 +219,6 @@ static void Display(void)
|
|||
glEnd();
|
||||
|
||||
glFlush();
|
||||
|
||||
if (show_fps) {
|
||||
++frame_cnt;
|
||||
glutPostRedisplay();
|
||||
|
@ -158,14 +234,17 @@ int main(int argc, char **argv)
|
|||
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);
|
||||
args(argc, argv);
|
||||
glutCreateWindow(filename);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Display);
|
||||
Init();
|
||||
#ifndef WIN32
|
||||
if (show_fps) {
|
||||
signal(SIGALRM, alarmhandler);
|
||||
alarm(5);
|
||||
}
|
||||
#endif
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
!!ARBfp1.0
|
||||
TEMP R0;
|
||||
SUB R0.xy, fragment.position, {125}.x;
|
||||
MOV R0.zw, {0}.x;
|
||||
DP3 R0, R0, R0;
|
||||
SUB R0.x, R0, {10000}.x;
|
||||
KIL -R0.x;
|
||||
MOV result.color, fragment.color;
|
||||
END
|
|
@ -1,3 +1,4 @@
|
|||
!!ARBfp1.0
|
||||
MUL result.color, fragment.position, {.005}.x;
|
||||
MOV result.color, {0}.x;
|
||||
MUL result.color.xy, fragment.position, {.005}.x;
|
||||
END
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
!!ARBfp1.0
|
||||
TEMP R0;
|
||||
MUL R0, fragment.position, {0.03125}.x;
|
||||
TEX R0, R0, texture[1], 2D;
|
||||
KIL -R0;
|
||||
MOV result.color, fragment.color;
|
||||
END
|
|
@ -0,0 +1,8 @@
|
|||
!!ARBfp1.0
|
||||
TEMP R0;
|
||||
MUL R0, fragment.position, {0.008}.x;
|
||||
TEX R0, R0, texture[0], 2D;
|
||||
SUB R0, R0, {0.25}.x;
|
||||
KIL R0.xyzz;
|
||||
MOV result.color, fragment.color;
|
||||
END
|
|
@ -0,0 +1,6 @@
|
|||
!!ARBfp1.0
|
||||
TEMP R0;
|
||||
MOV R0, {0.0}.x;
|
||||
MUL R0.xy, fragment.position, {0.008}.x;
|
||||
TEX result.color, R0, texture[0], 2D;
|
||||
END
|
|
@ -0,0 +1,3 @@
|
|||
!!ARBfp1.0
|
||||
TEX result.color, fragment.color, texture[0], 2D;
|
||||
END
|
|
@ -18,6 +18,7 @@ samplers
|
|||
samplers_array
|
||||
shaderutil.c
|
||||
shaderutil.h
|
||||
shadow_sampler
|
||||
skinning
|
||||
texdemo1
|
||||
toyball
|
||||
|
|
|
@ -25,6 +25,7 @@ PROGS = \
|
|||
pointcoord \
|
||||
samplers \
|
||||
samplers_array \
|
||||
shadow_sampler \
|
||||
skinning \
|
||||
texdemo1 \
|
||||
toyball \
|
||||
|
|
|
@ -0,0 +1,341 @@
|
|||
/**
|
||||
* Test shadow2DRectProj() and shadow2D() functions.
|
||||
* Brian Paul
|
||||
* 11 April 2007
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glext.h>
|
||||
#include "extfuncs.h"
|
||||
|
||||
|
||||
/** Use GL_RECTANGLE texture (with projective texcoords)? */
|
||||
#define USE_RECT 01
|
||||
|
||||
#define TEXSIZE 16
|
||||
|
||||
|
||||
static char *FragProgFile = NULL;
|
||||
static char *VertProgFile = NULL;
|
||||
|
||||
static GLuint fragShader;
|
||||
static GLuint vertShader;
|
||||
static GLuint program;
|
||||
|
||||
static GLint uTexture2D;
|
||||
static GLint uTextureRect;
|
||||
|
||||
static GLint win = 0;
|
||||
|
||||
static GLenum Filter = GL_LINEAR;
|
||||
|
||||
static void
|
||||
CheckError(int line)
|
||||
{
|
||||
GLenum err = glGetError();
|
||||
if (err) {
|
||||
printf("GL Error %s (0x%x) at line %d\n",
|
||||
gluErrorString(err), (int) err, line);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
PrintString(const char *s)
|
||||
{
|
||||
while (*s) {
|
||||
glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Redisplay(void)
|
||||
{
|
||||
CheckError(__LINE__);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
CheckError(__LINE__);
|
||||
glUseProgram_func(program);
|
||||
CheckError(__LINE__);
|
||||
|
||||
glBegin(GL_POLYGON);
|
||||
#if USE_RECT
|
||||
/* scale coords by two to test projection */
|
||||
glTexCoord4f( 0, 0, 0, 2.0); glVertex2f(-1, -1);
|
||||
glTexCoord4f(2*TEXSIZE, 0, 2*1, 2.0); glVertex2f( 1, -1);
|
||||
glTexCoord4f(2*TEXSIZE, 2*TEXSIZE, 2*1, 2.0); glVertex2f( 1, 1);
|
||||
glTexCoord4f( 0, 2*TEXSIZE, 0, 2.0); glVertex2f(-1, 1);
|
||||
#else
|
||||
glTexCoord3f(0, 0, 0); glVertex2f(-1, -1);
|
||||
glTexCoord3f(1, 0, 1); glVertex2f( 1, -1);
|
||||
glTexCoord3f(1, 1, 1); glVertex2f( 1, 1);
|
||||
glTexCoord3f(0, 1, 0); glVertex2f(-1, 1);
|
||||
#endif
|
||||
glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
glUseProgram_func(0);
|
||||
glWindowPos2iARB(80, 20);
|
||||
PrintString("white black white black");
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Reshape(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0f, 0.0f, -8.0f);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
CleanUp(void)
|
||||
{
|
||||
glDeleteShader_func(fragShader);
|
||||
glDeleteShader_func(vertShader);
|
||||
glDeleteProgram_func(program);
|
||||
glutDestroyWindow(win);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Key(unsigned char key, int x, int y)
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
|
||||
switch(key) {
|
||||
case 27:
|
||||
CleanUp();
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
MakeTexture(void)
|
||||
{
|
||||
GLfloat image[TEXSIZE][TEXSIZE];
|
||||
GLuint i, j;
|
||||
|
||||
for (i = 0; i < TEXSIZE; i++) {
|
||||
for (j = 0; j < TEXSIZE; j++) {
|
||||
if (j < (TEXSIZE / 2)) {
|
||||
image[i][j] = 0.25;
|
||||
}
|
||||
else {
|
||||
image[i][j] = 0.75;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glActiveTexture(GL_TEXTURE0); /* unit 0 */
|
||||
glBindTexture(GL_TEXTURE_2D, 42);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, TEXSIZE, TEXSIZE, 0,
|
||||
GL_DEPTH_COMPONENT, GL_FLOAT, image);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, Filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, Filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB,
|
||||
GL_COMPARE_R_TO_TEXTURE_ARB);
|
||||
CheckError(__LINE__);
|
||||
|
||||
glActiveTexture(GL_TEXTURE1); /* unit 1 */
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 43);
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_DEPTH_COMPONENT,
|
||||
TEXSIZE, 10, 0,/*16x10*/
|
||||
GL_DEPTH_COMPONENT, GL_FLOAT, image);
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, Filter);
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, Filter);
|
||||
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_COMPARE_MODE_ARB,
|
||||
GL_COMPARE_R_TO_TEXTURE_ARB);
|
||||
CheckError(__LINE__);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
LoadAndCompileShader(GLuint shader, const char *text)
|
||||
{
|
||||
GLint stat;
|
||||
glShaderSource_func(shader, 1, (const GLchar **) &text, NULL);
|
||||
glCompileShader_func(shader);
|
||||
glGetShaderiv_func(shader, GL_COMPILE_STATUS, &stat);
|
||||
if (!stat) {
|
||||
GLchar log[1000];
|
||||
GLsizei len;
|
||||
glGetShaderInfoLog_func(shader, 1000, &len, log);
|
||||
fprintf(stderr, "fslight: problem compiling shader:\n%s\n", log);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Read a shader from a file.
|
||||
*/
|
||||
static void
|
||||
ReadShader(GLuint shader, const char *filename)
|
||||
{
|
||||
const int max = 100*1000;
|
||||
int n;
|
||||
char *buffer = (char*) malloc(max);
|
||||
FILE *f = fopen(filename, "r");
|
||||
if (!f) {
|
||||
fprintf(stderr, "fslight: Unable to open shader file %s\n", filename);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
n = fread(buffer, 1, max, f);
|
||||
printf("fslight: read %d bytes from shader file %s\n", n, filename);
|
||||
if (n > 0) {
|
||||
buffer[n] = 0;
|
||||
LoadAndCompileShader(shader, buffer);
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
CheckLink(GLuint prog)
|
||||
{
|
||||
GLint stat;
|
||||
glGetProgramiv_func(prog, GL_LINK_STATUS, &stat);
|
||||
if (!stat) {
|
||||
GLchar log[1000];
|
||||
GLsizei len;
|
||||
glGetProgramInfoLog_func(prog, 1000, &len, log);
|
||||
fprintf(stderr, "Linker error:\n%s\n", log);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Init(void)
|
||||
{
|
||||
static const char *fragShaderText =
|
||||
"uniform sampler2DShadow shadowTex2D; \n"
|
||||
"uniform sampler2DRectShadow shadowTexRect; \n"
|
||||
"void main() {\n"
|
||||
#if USE_RECT
|
||||
" gl_FragColor = shadow2DRectProj(shadowTexRect, gl_TexCoord[0]); \n"
|
||||
#else
|
||||
" gl_FragColor = shadow2D(shadowTex2D, gl_TexCoord[0].xyz); \n"
|
||||
#endif
|
||||
"}\n";
|
||||
static const char *vertShaderText =
|
||||
"void main() {\n"
|
||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
||||
" gl_TexCoord[0] = gl_MultiTexCoord0; \n"
|
||||
"}\n";
|
||||
const char *version;
|
||||
|
||||
#if USE_RECT
|
||||
if (!glutExtensionSupported("GL_ARB_texture_rectangle")) {
|
||||
printf("This program requires GL_ARB_texture_rectangle\n");
|
||||
exit(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
version = (const char *) glGetString(GL_VERSION);
|
||||
if (version[0] != '2' || version[1] != '.') {
|
||||
printf("This program requires OpenGL 2.x, found %s\n", version);
|
||||
exit(1);
|
||||
}
|
||||
printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
|
||||
|
||||
GetExtensionFuncs();
|
||||
|
||||
fragShader = glCreateShader_func(GL_FRAGMENT_SHADER);
|
||||
if (FragProgFile)
|
||||
ReadShader(fragShader, FragProgFile);
|
||||
else
|
||||
LoadAndCompileShader(fragShader, fragShaderText);
|
||||
|
||||
vertShader = glCreateShader_func(GL_VERTEX_SHADER);
|
||||
if (VertProgFile)
|
||||
ReadShader(vertShader, VertProgFile);
|
||||
else
|
||||
LoadAndCompileShader(vertShader, vertShaderText);
|
||||
|
||||
program = glCreateProgram_func();
|
||||
glAttachShader_func(program, fragShader);
|
||||
glAttachShader_func(program, vertShader);
|
||||
glLinkProgram_func(program);
|
||||
CheckLink(program);
|
||||
glUseProgram_func(program);
|
||||
|
||||
uTexture2D = glGetUniformLocation_func(program, "shadowTex2D");
|
||||
uTextureRect = glGetUniformLocation_func(program, "shadowTexRect");
|
||||
printf("uTexture2D %d uTextureRect %d\n", uTexture2D, uTextureRect);
|
||||
if (uTexture2D >= 0) {
|
||||
glUniform1i_func(uTexture2D, 0); /* use texture unit 0 */
|
||||
}
|
||||
if (uTextureRect >= 0) {
|
||||
glUniform1i_func(uTextureRect, 1); /* use texture unit 0 */
|
||||
}
|
||||
CheckError(__LINE__);
|
||||
|
||||
glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
|
||||
glColor3f(1, 1, 1);
|
||||
|
||||
MakeTexture();
|
||||
CheckError(__LINE__);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ParseOptions(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "-fs") == 0) {
|
||||
FragProgFile = argv[i+1];
|
||||
}
|
||||
else if (strcmp(argv[i], "-vs") == 0) {
|
||||
VertProgFile = argv[i+1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowPosition( 0, 0);
|
||||
glutInitWindowSize(400, 300);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
win = glutCreateWindow(argv[0]);
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Redisplay);
|
||||
ParseOptions(argc, argv);
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -14,7 +14,9 @@ arbvpwarpmesh
|
|||
arraytexture
|
||||
blendminmax
|
||||
blendsquare
|
||||
blendxor
|
||||
bufferobj
|
||||
bumpmap
|
||||
bug_3050
|
||||
bug_3101
|
||||
bug_3195
|
||||
|
@ -59,6 +61,8 @@ readtex.h
|
|||
seccolor
|
||||
sharedtex
|
||||
shader_api
|
||||
shaderutil.c
|
||||
shaderutil.h
|
||||
stencil_twoside
|
||||
stencil_wrap
|
||||
stencilwrap
|
||||
|
|
|
@ -8,7 +8,7 @@ TOP = ../..
|
|||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
SOURCES = \
|
||||
afsmultiarb.c \
|
||||
|
@ -28,6 +28,7 @@ SOURCES = \
|
|||
blendsquare.c \
|
||||
blendxor.c \
|
||||
bufferobj.c \
|
||||
bumpmap.c \
|
||||
bug_3050.c \
|
||||
bug_3101.c \
|
||||
bug_3195.c \
|
||||
|
@ -54,7 +55,10 @@ SOURCES = \
|
|||
jkrahntest.c \
|
||||
lineclip.c \
|
||||
manytex.c \
|
||||
mapbufrange.c \
|
||||
mapvbo.c \
|
||||
minmag.c \
|
||||
mipgen.c \
|
||||
mipmap_limits.c \
|
||||
mipmap_view.c \
|
||||
multipal.c \
|
||||
|
@ -145,6 +149,12 @@ afsmultiarb: afsmultiarb.o readtex.o
|
|||
afsmultiarb.o: afsmultiarb.c readtex.h
|
||||
$(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
|
||||
|
||||
bumpmap: bumpmap.o readtex.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) bumpmap.o readtex.o $(LIBS) -o $@
|
||||
|
||||
bumpmap.o: bumpmap.c readtex.h
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bumpmap.c -o $@
|
||||
|
||||
drawbuffers: drawbuffers.o
|
||||
$(APP_CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
|
||||
|
||||
|
@ -175,6 +185,11 @@ mipmap_view: mipmap_view.o readtex.o
|
|||
mipmap_view.o: mipmap_view.c readtex.h
|
||||
$(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
|
||||
mipmap_limits: mipmap_limits.o readtex.o
|
||||
$(APP_CC) $(CFLAGS) mipmap_limits.o readtex.o $(LIBS) -o $@
|
||||
|
||||
mipmap_limits.o: mipmap_limits.c readtex.h
|
||||
$(APP_CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
|
||||
fillrate: fillrate.o readtex.o
|
||||
$(APP_CC) $(CFLAGS) fillrate.o readtex.o $(LIBS) -o $@
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
Import('*')
|
||||
|
||||
if not env['GLUT']:
|
||||
Return()
|
||||
|
||||
env = env.Clone()
|
||||
|
||||
env.Prepend(CPPPATH = [
|
||||
'../util',
|
||||
])
|
||||
|
||||
env.Prepend(LIBS = [
|
||||
util,
|
||||
'$GLUT_LIB'
|
||||
])
|
||||
|
||||
if env['platform'] == 'windows':
|
||||
env.Append(CPPDEFINES = ['NOMINMAX'])
|
||||
env.Prepend(LIBS = ['winmm'])
|
||||
|
||||
linux_progs = [
|
||||
'api_speed',
|
||||
]
|
||||
|
||||
glx_progs = [
|
||||
'auxbuffer',
|
||||
'getprocaddress',
|
||||
'jkrahntest',
|
||||
'sharedtex',
|
||||
'texcompress2',
|
||||
'texobjshare',
|
||||
]
|
||||
|
||||
mesa_progs = [
|
||||
'debugger',
|
||||
]
|
||||
|
||||
progs = [
|
||||
'afsmultiarb',
|
||||
'antialias',
|
||||
'arbfpspec',
|
||||
'arbfptest1',
|
||||
'arbfptexture',
|
||||
'arbfptrig',
|
||||
'arbnpot-mipmap',
|
||||
'arbnpot',
|
||||
'arbvptest1',
|
||||
'arbvptest3',
|
||||
'arbvptorus',
|
||||
'arbvpwarpmesh',
|
||||
'arraytexture',
|
||||
'blendminmax',
|
||||
'blendsquare',
|
||||
'blendxor',
|
||||
'bufferobj',
|
||||
'bug_3050',
|
||||
'bug_3101',
|
||||
'bug_3195',
|
||||
'bug_texstore_i8',
|
||||
'calibrate_rast',
|
||||
'copypixrate',
|
||||
'crossbar',
|
||||
'cva',
|
||||
'dinoshade',
|
||||
'drawbuffers',
|
||||
'exactrast',
|
||||
'ext422square',
|
||||
'fbotest1',
|
||||
'fbotest2',
|
||||
'fbotexture',
|
||||
'fillrate',
|
||||
'floattex',
|
||||
'fog',
|
||||
'fogcoord',
|
||||
'fptest1',
|
||||
'fptexture',
|
||||
'interleave',
|
||||
'invert',
|
||||
'lineclip',
|
||||
'manytex',
|
||||
'mapbufrange',
|
||||
'mapvbo',
|
||||
'minmag',
|
||||
'mipgen',
|
||||
'mipmap_limits',
|
||||
'mipmap_view',
|
||||
'multipal',
|
||||
'multitexarray',
|
||||
'multiwindow',
|
||||
'no_s3tc',
|
||||
'packedpixels',
|
||||
'pbo',
|
||||
'prog_parameter',
|
||||
'projtex',
|
||||
'quads',
|
||||
'random',
|
||||
'readrate',
|
||||
'rubberband',
|
||||
'seccolor',
|
||||
'shader_api',
|
||||
'stencil_twoside',
|
||||
'stencil_wrap',
|
||||
'stencilwrap',
|
||||
'subtex',
|
||||
'subtexrate',
|
||||
'tex1d',
|
||||
'texcmp',
|
||||
'texfilt',
|
||||
'texgenmix',
|
||||
'texline',
|
||||
'texrect',
|
||||
'texwrap',
|
||||
'unfilledclip',
|
||||
'vao-01',
|
||||
'vao-02',
|
||||
'vparray',
|
||||
'vpeval',
|
||||
'vptest1',
|
||||
'vptest2',
|
||||
'vptest3',
|
||||
'vptorus',
|
||||
'vpwarpmesh',
|
||||
'yuvrect',
|
||||
'yuvsquare',
|
||||
'zcomp',
|
||||
'zdrawpix',
|
||||
'zreaddraw',
|
||||
]
|
||||
|
||||
for prog in progs:
|
||||
env.Program(
|
||||
target = prog,
|
||||
source = prog + '.c',
|
||||
)
|
|
@ -11,7 +11,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.h"
|
||||
|
@ -442,6 +442,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 300, 300 );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glewInit();
|
||||
glutCreateWindow(argv[0] );
|
||||
|
||||
Init( argc, argv );
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
@ -29,7 +30,7 @@ PrintString(const char *s)
|
|||
|
||||
|
||||
static void
|
||||
Polygon( GLint verts, GLfloat radius, GLfloat z )
|
||||
doPolygon( GLint verts, GLfloat radius, GLfloat z )
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < verts; i++) {
|
||||
|
@ -47,33 +48,33 @@ DrawObject( void )
|
|||
glLineWidth(3.0);
|
||||
glColor3f(1, 1, 1);
|
||||
glBegin(GL_LINE_LOOP);
|
||||
Polygon(12, 1.2, 0);
|
||||
doPolygon(12, 1.2, 0);
|
||||
glEnd();
|
||||
|
||||
glLineWidth(1.0);
|
||||
glColor3f(1, 1, 1);
|
||||
glBegin(GL_LINE_LOOP);
|
||||
Polygon(12, 1.1, 0);
|
||||
doPolygon(12, 1.1, 0);
|
||||
glEnd();
|
||||
|
||||
glColor3f(1, 0, 0);
|
||||
glBegin(GL_POLYGON);
|
||||
Polygon(12, 0.4, 0.3);
|
||||
doPolygon(12, 0.4, 0.3);
|
||||
glEnd();
|
||||
|
||||
glColor3f(0, 1, 0);
|
||||
glBegin(GL_POLYGON);
|
||||
Polygon(12, 0.6, 0.2);
|
||||
doPolygon(12, 0.6, 0.2);
|
||||
glEnd();
|
||||
|
||||
glColor3f(0, 0, 1);
|
||||
glBegin(GL_POLYGON);
|
||||
Polygon(12, 0.8, 0.1);
|
||||
doPolygon(12, 0.8, 0.1);
|
||||
glEnd();
|
||||
|
||||
glColor3f(1, 1, 1);
|
||||
glBegin(GL_POLYGON);
|
||||
Polygon(12, 1.0, 0);
|
||||
doPolygon(12, 1.0, 0);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
|
@ -225,6 +226,7 @@ main( int argc, char *argv[] )
|
|||
glutInitDisplayMode( GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE |
|
||||
GLUT_DEPTH | GLUT_MULTISAMPLE );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -37,9 +37,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#define inline __inline__
|
||||
|
@ -127,6 +125,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitDisplayMode( GLUT_RGB );
|
||||
|
||||
glutCreateWindow( argv[0] );
|
||||
glewInit();
|
||||
|
||||
if ( argc > 1 ) {
|
||||
count = strtoul( argv[1], NULL, 0 );
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
|
||||
|
@ -180,6 +180,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
@ -201,6 +201,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.c"
|
||||
|
@ -143,6 +143,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.c"
|
||||
|
@ -146,6 +146,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
GLubyte mipmapImage32[40][46][3];
|
||||
|
@ -175,6 +176,7 @@ int main(int argc, char** argv)
|
|||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
|
||||
glutInitWindowSize (500, 500);
|
||||
glutCreateWindow (argv[0]);
|
||||
glewInit();
|
||||
myinit();
|
||||
glutReshapeFunc (myReshape);
|
||||
glutDisplayFunc(display);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "../util/readtex.c"
|
||||
|
||||
|
@ -188,6 +189,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 400, 400 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static void Display( void )
|
||||
|
@ -155,6 +155,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static float Zrot = 0.0;
|
||||
|
@ -118,6 +118,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
|
||||
|
@ -174,6 +174,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static float Xrot = -60.0, Yrot = 0.0, Zrot = 0.0;
|
||||
|
@ -234,6 +234,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
|
@ -326,6 +327,7 @@ int main(int argc, char *argv[])
|
|||
glutInitWindowSize(350, 350);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
glutCreateWindow("Array texture test");
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutSpecialFunc(SpecialKey);
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 400;
|
||||
|
@ -200,6 +201,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "GL_EXT_blend_minmax test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 400;
|
||||
|
@ -169,6 +170,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "GL_NV_blend_square test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "readtex.c"
|
||||
|
||||
|
@ -183,6 +183,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutSpecialFunc(SpecialKey);
|
||||
|
|
|
@ -6,18 +6,19 @@
|
|||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#define NUM_OBJECTS 10
|
||||
|
||||
struct object
|
||||
{
|
||||
GLuint BufferID;
|
||||
GLuint VertexBufferID;
|
||||
GLuint ColorBufferID;
|
||||
GLuint ElementsBufferID;
|
||||
GLuint NumVerts;
|
||||
GLuint VertexOffset;
|
||||
|
@ -47,7 +48,7 @@ static void CheckError(int line)
|
|||
|
||||
static void DrawObject( const struct object *obj )
|
||||
{
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->VertexBufferID);
|
||||
glVertexPointer(3, GL_FLOAT, obj->VertexStride, (void *) obj->VertexOffset);
|
||||
glEnable(GL_VERTEX_ARRAY);
|
||||
|
||||
|
@ -62,6 +63,7 @@ static void DrawObject( const struct object *obj )
|
|||
glPopClientAttrib();
|
||||
}
|
||||
#endif
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->ColorBufferID);
|
||||
glColorPointer(3, GL_FLOAT, obj->ColorStride, (void *) obj->ColorOffset);
|
||||
glEnable(GL_COLOR_ARRAY);
|
||||
|
||||
|
@ -92,7 +94,7 @@ static void Display( void )
|
|||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
for (i = 0; i < NumObjects; i++) {
|
||||
float x = 5.0 * ((float) i / (NumObjects-1) - 0.5);
|
||||
float x = 7.0 * ((float) i / (NumObjects-1) - 0.5);
|
||||
glPushMatrix();
|
||||
glTranslatef(x, 0, 0);
|
||||
glRotatef(Xrot, 1, 0, 0);
|
||||
|
@ -125,8 +127,11 @@ static void Reshape( int width, int height )
|
|||
static void FreeBuffers(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < NUM_OBJECTS; i++)
|
||||
glDeleteBuffersARB(1, &Objects[i].BufferID);
|
||||
for (i = 0; i < NUM_OBJECTS; i++) {
|
||||
glDeleteBuffersARB(1, &Objects[i].VertexBufferID);
|
||||
glDeleteBuffersARB(1, &Objects[i].ColorBufferID);
|
||||
glDeleteBuffersARB(1, &Objects[i].ElementsBufferID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -182,7 +187,9 @@ static void SpecialKey( int key, int x, int y )
|
|||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Non-interleaved position/color data.
|
||||
*/
|
||||
static void MakeObject1(struct object *obj)
|
||||
{
|
||||
GLfloat *v, *c;
|
||||
|
@ -193,10 +200,11 @@ static void MakeObject1(struct object *obj)
|
|||
for (i = 0; i < 500; i++)
|
||||
buffer[i] = i & 0xff;
|
||||
|
||||
obj->BufferID = 0;
|
||||
glGenBuffersARB(1, &obj->BufferID);
|
||||
assert(obj->BufferID != 0);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
|
||||
obj->VertexBufferID = 0;
|
||||
glGenBuffersARB(1, &obj->VertexBufferID);
|
||||
obj->ColorBufferID = obj->VertexBufferID;
|
||||
assert(obj->VertexBufferID != 0);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->VertexBufferID);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, 500, buffer, GL_STATIC_DRAW_ARB);
|
||||
|
||||
for (i = 0; i < 500; i++)
|
||||
|
@ -257,13 +265,18 @@ static void MakeObject1(struct object *obj)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Interleaved position/color data.
|
||||
*/
|
||||
static void MakeObject2(struct object *obj)
|
||||
{
|
||||
GLfloat *v;
|
||||
int start = 40; /* bytes, to test non-zero array offsets */
|
||||
|
||||
glGenBuffersARB(1, &obj->BufferID);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
|
||||
glGenBuffersARB(1, &obj->VertexBufferID);
|
||||
obj->ColorBufferID = obj->VertexBufferID;
|
||||
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->VertexBufferID);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, 1000, NULL, GL_STATIC_DRAW_ARB);
|
||||
v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
|
||||
|
@ -287,6 +300,9 @@ static void MakeObject2(struct object *obj)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Use an index buffer and glDrawElements().
|
||||
*/
|
||||
static void MakeObject3(struct object *obj)
|
||||
{
|
||||
GLfloat vertexData[1000];
|
||||
|
@ -314,8 +330,10 @@ static void MakeObject3(struct object *obj)
|
|||
bytes = obj->NumVerts * (3 + 3) * sizeof(GLfloat);
|
||||
|
||||
/* Don't use glMap/UnmapBuffer for this object */
|
||||
glGenBuffersARB(1, &obj->BufferID);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
|
||||
glGenBuffersARB(1, &obj->VertexBufferID);
|
||||
obj->ColorBufferID = obj->VertexBufferID;
|
||||
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->VertexBufferID);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, bytes, vertexData, GL_STATIC_DRAW_ARB);
|
||||
|
||||
/* Setup a buffer of indices to test the ELEMENTS path */
|
||||
|
@ -332,6 +350,46 @@ static void MakeObject3(struct object *obj)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Vertex and color data in different buffers.
|
||||
*/
|
||||
static void MakeObject4(struct object *obj)
|
||||
{
|
||||
static const GLfloat vertexData[] = {
|
||||
0, -1, 0,
|
||||
0.5, 0, 0,
|
||||
0, 1, 0,
|
||||
-0.5, 0, 0
|
||||
};
|
||||
static const GLfloat colorData[] = {
|
||||
1, 1, 1,
|
||||
1, 1, 0,
|
||||
.5, .5, 0,
|
||||
1, 1, 0
|
||||
};
|
||||
|
||||
obj->VertexOffset = 0;
|
||||
obj->VertexStride = 0;
|
||||
obj->ColorOffset = 0;
|
||||
obj->ColorStride = 0;
|
||||
obj->NumVerts = 4;
|
||||
|
||||
glGenBuffersARB(1, &obj->VertexBufferID);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->VertexBufferID);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(vertexData), vertexData,
|
||||
GL_STATIC_DRAW_ARB);
|
||||
|
||||
glGenBuffersARB(1, &obj->ColorBufferID);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->ColorBufferID);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(colorData), colorData,
|
||||
GL_STATIC_DRAW_ARB);
|
||||
|
||||
/* Setup a buffer of indices to test the ELEMENTS path */
|
||||
obj->ElementsBufferID = 0;
|
||||
obj->NumElements = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void Init( void )
|
||||
{
|
||||
|
@ -358,7 +416,8 @@ static void Init( void )
|
|||
MakeObject1(Objects + 0);
|
||||
MakeObject2(Objects + 1);
|
||||
MakeObject3(Objects + 2);
|
||||
NumObjects = 3;
|
||||
MakeObject4(Objects + 3);
|
||||
NumObjects = 4;
|
||||
}
|
||||
|
||||
|
||||
|
@ -369,6 +428,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 600, 300 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 400;
|
||||
|
@ -154,6 +155,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "Bug #3050 Test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 400;
|
||||
|
@ -119,6 +120,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "Bug #3101 Test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
|
@ -264,6 +265,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 350, 350 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "Bug #3195 Test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static GLenum Target = GL_TEXTURE_2D;
|
||||
|
@ -180,6 +181,7 @@ int main(int argc, char **argv)
|
|||
glutInitDisplayMode(type);
|
||||
|
||||
win = glutCreateWindow("Tex test");
|
||||
glewInit();
|
||||
if (!win) {
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,208 @@
|
|||
/*
|
||||
* Copyright (c) 2009 VMware, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* on the rights to use, copy, modify, merge, publish, distribute, sub
|
||||
* license, and/or sell copies of the Software, and to permit persons to whom
|
||||
* the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
|
||||
* VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
* USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Simple test for testing ATI_envmap_bumpmap support.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.h"
|
||||
|
||||
static PFNGLGETTEXBUMPPARAMETERFVATIPROC glGetTexBumpParameterfvATI_func = NULL;
|
||||
static PFNGLGETTEXBUMPPARAMETERIVATIPROC glGetTexBumpParameterivATI_func = NULL;
|
||||
static PFNGLTEXBUMPPARAMETERFVATIPROC glTexBumpParameterfvATI_func = NULL;
|
||||
|
||||
static const char *TexFile = "../images/arch.rgb";
|
||||
|
||||
static const GLfloat Near = 5.0, Far = 25.0;
|
||||
|
||||
static void Display( void )
|
||||
{
|
||||
/* together with the construction of dudv map, do fixed translation
|
||||
in y direction (up), some cosine deformation in x and more
|
||||
deformation in y dir */
|
||||
GLfloat bumpMatrix[4] = {0.1, 0.0, 0.2, 0.1};
|
||||
|
||||
|
||||
glClearColor(0.2, 0.2, 0.8, 0);
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
/* this is the base map */
|
||||
glActiveTexture( GL_TEXTURE0 );
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glBindTexture( GL_TEXTURE_2D, 1 );
|
||||
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE );
|
||||
glTexEnvf( GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_REPLACE );
|
||||
glTexEnvf( GL_TEXTURE_ENV, GL_SOURCE0_RGB, GL_TEXTURE );
|
||||
|
||||
/* bump map */
|
||||
glActiveTexture( GL_TEXTURE1 );
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glBindTexture( GL_TEXTURE_2D, 2 );
|
||||
glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE );
|
||||
glTexEnvf( GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_BUMP_ENVMAP_ATI );
|
||||
glTexEnvf( GL_TEXTURE_ENV, GL_BUMP_TARGET_ATI, GL_TEXTURE0);
|
||||
|
||||
glTexBumpParameterfvATI_func(GL_BUMP_ROT_MATRIX_ATI, bumpMatrix);
|
||||
|
||||
glCallList(1);
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
static void Reshape( int width, int height )
|
||||
{
|
||||
GLfloat ar = (float) width / (float) height;
|
||||
glViewport( 0, 0, width, height );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glFrustum( -ar, ar, -1.0, 1.0, Near, Far );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
glTranslatef( 0.0, 0.0, -6.0 );
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void Init( void )
|
||||
{
|
||||
const char * const ver_string = (const char * const)
|
||||
glGetString( GL_VERSION );
|
||||
GLfloat temp[16][16][2];
|
||||
GLubyte *image = NULL;
|
||||
GLint imgWidth, imgHeight;
|
||||
GLenum imgFormat;
|
||||
GLint i,j;
|
||||
GLint param, paramArray[16];
|
||||
GLfloat paramMat[4];
|
||||
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION = %s\n", ver_string);
|
||||
|
||||
if ( !glutExtensionSupported("GL_ATI_envmap_bumpmap")) {
|
||||
printf("\nSorry, this program requires GL_ATI_envmap_bumpmap\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
glGetTexBumpParameterfvATI_func = glutGetProcAddress("glGetTexBumpParameterfvATI");
|
||||
glGetTexBumpParameterivATI_func = glutGetProcAddress("glGetTexBumpParameterivATI");
|
||||
glTexBumpParameterfvATI_func = glutGetProcAddress("glTexBumpParameterfvATI");
|
||||
|
||||
glGetTexBumpParameterivATI_func(GL_BUMP_ROT_MATRIX_SIZE_ATI, ¶m);
|
||||
printf("BUMP_ROT_MATRIX_SIZE_ATI = %d\n", param);
|
||||
glGetTexBumpParameterivATI_func(GL_BUMP_NUM_TEX_UNITS_ATI, ¶m);
|
||||
printf("BUMP_NUM_TEX_UNITS_ATI = %d\n", param);
|
||||
glGetTexBumpParameterfvATI_func(GL_BUMP_ROT_MATRIX_ATI, paramMat);
|
||||
printf("initial rot matrix %f %f %f %f\n", paramMat[0], paramMat[1], paramMat[2], paramMat[3]);
|
||||
glGetTexBumpParameterivATI_func(GL_BUMP_TEX_UNITS_ATI, paramArray);
|
||||
printf("units supporting bump mapping: ");
|
||||
for (i = 0; i < param; i++)
|
||||
printf("%d ", paramArray[i] - GL_TEXTURE0);
|
||||
printf("\n");
|
||||
|
||||
image = LoadRGBImage(TexFile, &imgWidth, &imgHeight, &imgFormat);
|
||||
if (!image) {
|
||||
printf("Couldn't read %s\n", TexFile);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
glBindTexture( GL_TEXTURE_2D, 1 );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, imgFormat, imgWidth, imgHeight, 0,
|
||||
imgFormat, GL_UNSIGNED_BYTE, image );
|
||||
|
||||
for (j = 0; j < 16; j++) {
|
||||
for (i = 0; i < 16; i++) {
|
||||
temp[j][i][0] = cos((float)(i) * 3.1415 / 16.0);
|
||||
temp[j][i][1] = -0.5;
|
||||
}
|
||||
}
|
||||
glBindTexture( GL_TEXTURE_2D, 2 );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
glTexImage2D( GL_TEXTURE_2D, 0, GL_DU8DV8_ATI, 16, 16, 0,
|
||||
GL_DUDV_ATI, GL_FLOAT, temp );
|
||||
|
||||
|
||||
glNewList( 1, GL_COMPILE );
|
||||
glBegin(GL_QUADS);
|
||||
glColor3f( 0.9, 0.0, 0.0 );
|
||||
glMultiTexCoord2f( GL_TEXTURE0, 0.0, 0.0 );
|
||||
glMultiTexCoord2f( GL_TEXTURE1, 0.0, 0.0 );
|
||||
glVertex2f(-1, -1);
|
||||
glMultiTexCoord2f( GL_TEXTURE0, 1.0, 0.0 );
|
||||
glMultiTexCoord2f( GL_TEXTURE1, 1.0, 0.0 );
|
||||
glVertex2f( 1, -1);
|
||||
glMultiTexCoord2f( GL_TEXTURE0, 1.0, 1.0 );
|
||||
glMultiTexCoord2f( GL_TEXTURE1, 1.0, 1.0 );
|
||||
glVertex2f( 1, 1);
|
||||
glMultiTexCoord2f( GL_TEXTURE0, 0.0, 1.0 );
|
||||
glMultiTexCoord2f( GL_TEXTURE1, 0.0, 1.0 );
|
||||
glVertex2f(-1, 1);
|
||||
glEnd();
|
||||
glEndList();
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 400, 400 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "GL_ATI_envmap_bumpmap test" );
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
@ -386,6 +387,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Draw);
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
* 26 Jan 2006
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static GLint WinWidth = 1000, WinHeight = 800;
|
||||
|
@ -260,6 +260,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(WinWidth, WinHeight);
|
||||
glutInitDisplayMode(mode);
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutSpecialFunc(SpecialKey);
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static const GLint tests[][8] = {
|
||||
|
@ -226,6 +227,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "GL_ARB_texture_env_crossbar test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <windows.h>
|
||||
#endif
|
||||
#define GL_GLEXT_LEGACY
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
|
@ -129,6 +130,7 @@ int main( int argc, char **argv )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitWindowPosition( 100, 100 );
|
||||
glutCreateWindow( "CVA Test" );
|
||||
glewInit();
|
||||
|
||||
/* Make sure the server supports GL 1.2 vertex arrays.
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
@ -81,6 +81,7 @@ find_line_column(const GLubyte *string, const GLubyte *pos,
|
|||
#define NV_FRAGMENT_PROGRAM 4
|
||||
|
||||
|
||||
|
||||
struct breakpoint {
|
||||
enum {PIXEL, LINE} type;
|
||||
int x, y;
|
||||
|
@ -101,7 +102,7 @@ static void Debugger2(GLenum target, GLvoid *data)
|
|||
{
|
||||
static GLuint skipCount = 0;
|
||||
const GLubyte *ln;
|
||||
GLint pos, line, column;
|
||||
GLint pos = 0, line, column;
|
||||
GLint id;
|
||||
int progType;
|
||||
GLint len;
|
||||
|
@ -721,6 +722,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 200, 200 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include <windows.h>
|
||||
#endif
|
||||
#define GL_GLEXT_LEGACY
|
||||
#include <GL/glew.h> /* OpenGL Utility Toolkit header */
|
||||
#include <GL/glut.h> /* OpenGL Utility Toolkit header */
|
||||
|
||||
/* Some <math.h> files do not define M_PI... */
|
||||
|
@ -823,6 +824,7 @@ main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
glutCreateWindow("Shadowy Leapin' Lizards");
|
||||
glewInit();
|
||||
|
||||
if (glutGet(GLUT_WINDOW_STENCIL_SIZE) <= 1) {
|
||||
printf("dinoshade: Sorry, I need at least 2 bits of stencil.\n");
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "extfuncs.h"
|
||||
|
||||
|
@ -294,6 +294,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Display);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 400, Height = 400;
|
||||
|
@ -34,14 +35,14 @@ static float Xtrans = 0, Ytrans = 0;
|
|||
static float Step = 0.125;
|
||||
|
||||
enum {
|
||||
POINTS,
|
||||
HLINES,
|
||||
VLINES,
|
||||
QUADS,
|
||||
MODE_POINTS,
|
||||
MODE_HLINES,
|
||||
MODE_VLINES,
|
||||
MODE_QUADS,
|
||||
NUM_MODES
|
||||
};
|
||||
|
||||
static int Mode = POINTS;
|
||||
static int Mode = MODE_POINTS;
|
||||
|
||||
|
||||
static void
|
||||
|
@ -58,7 +59,7 @@ Draw(void)
|
|||
glPushMatrix();
|
||||
glTranslatef(tx + Xtrans, ty + Ytrans, 0);
|
||||
|
||||
if (Mode == POINTS) {
|
||||
if (Mode == MODE_POINTS) {
|
||||
glBegin(GL_POINTS);
|
||||
for (j = 0; j < Height; j += 2) {
|
||||
for (i = 0; i < Width; i += 2) {
|
||||
|
@ -67,7 +68,7 @@ Draw(void)
|
|||
}
|
||||
glEnd();
|
||||
}
|
||||
else if (Mode == HLINES) {
|
||||
else if (Mode == MODE_HLINES) {
|
||||
glBegin(GL_LINES);
|
||||
for (i = 0; i < Height; i += 2) {
|
||||
glVertex2f(0, i);
|
||||
|
@ -75,7 +76,7 @@ Draw(void)
|
|||
}
|
||||
glEnd();
|
||||
}
|
||||
else if (Mode == VLINES) {
|
||||
else if (Mode == MODE_VLINES) {
|
||||
glBegin(GL_LINES);
|
||||
for (i = 0; i < Width; i += 2) {
|
||||
glVertex2f(i, 0 );
|
||||
|
@ -83,7 +84,7 @@ Draw(void)
|
|||
}
|
||||
glEnd();
|
||||
}
|
||||
else if (Mode == QUADS) {
|
||||
else if (Mode == MODE_QUADS) {
|
||||
glBegin(GL_QUADS);
|
||||
for (j = 0; j < Height; j += 4) {
|
||||
for (i = 0; i < Width; i += 4) {
|
||||
|
@ -189,6 +190,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutSpecialFunc(SpecialKey);
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
@ -249,6 +249,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow(argv[0] );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Win;
|
||||
|
@ -202,6 +202,7 @@ main( int argc, char *argv[] )
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Win = 0;
|
||||
|
@ -191,6 +191,7 @@ main( int argc, char *argv[] )
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
@ -26,9 +26,16 @@
|
|||
static int Win = 0;
|
||||
static int Width = 400, Height = 400;
|
||||
|
||||
static GLenum TexTarget = GL_TEXTURE_2D; /*GL_TEXTURE_RECTANGLE_ARB;*/
|
||||
#if 1
|
||||
static GLenum TexTarget = GL_TEXTURE_2D;
|
||||
static int TexWidth = 512, TexHeight = 512;
|
||||
/*static int TexWidth = 600, TexHeight = 600;*/
|
||||
static GLenum TexIntFormat = GL_RGB; /* either GL_RGB or GL_RGBA */
|
||||
#else
|
||||
static GLenum TexTarget = GL_TEXTURE_RECTANGLE_ARB;
|
||||
static int TexWidth = 200, TexHeight = 200;
|
||||
static GLenum TexIntFormat = GL_RGB5; /* either GL_RGB or GL_RGBA */
|
||||
#endif
|
||||
static GLuint TextureLevel = 0; /* which texture level to render to */
|
||||
|
||||
static GLuint MyFB;
|
||||
static GLuint TexObj;
|
||||
|
@ -38,8 +45,6 @@ static GLfloat Rot = 0.0;
|
|||
static GLboolean UsePackedDepthStencil = GL_FALSE;
|
||||
static GLboolean UsePackedDepthStencilBoth = GL_FALSE;
|
||||
static GLboolean Use_ARB_fbo = GL_FALSE;
|
||||
static GLuint TextureLevel = 0; /* which texture level to render to */
|
||||
static GLenum TexIntFormat = GL_RGB; /* either GL_RGB or GL_RGBA */
|
||||
static GLboolean Cull = GL_FALSE;
|
||||
static GLboolean Wireframe = GL_FALSE;
|
||||
|
||||
|
@ -404,8 +409,12 @@ AttachDepthAndStencilBuffers(GLuint fbo,
|
|||
return GL_FALSE;
|
||||
|
||||
status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
|
||||
if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
|
||||
glDeleteRenderbuffersEXT(1, depthRbOut);
|
||||
*depthRbOut = 0;
|
||||
glDeleteRenderbuffersEXT(1, &rb);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
*stencilRbOut = rb;
|
||||
}
|
||||
|
@ -554,15 +563,17 @@ Init(void)
|
|||
/* make two image levels */
|
||||
glTexImage2D(TexTarget, 0, TexIntFormat, TexWidth, TexHeight, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||
if (TexTarget == GL_TEXTURE_2D) {
|
||||
glTexImage2D(TexTarget, 1, TexIntFormat, TexWidth/2, TexHeight/2, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||
TexWidth = TexWidth >> TextureLevel;
|
||||
TexHeight = TexHeight >> TextureLevel;
|
||||
glTexParameteri(TexTarget, GL_TEXTURE_MAX_LEVEL, TextureLevel);
|
||||
}
|
||||
|
||||
glTexParameteri(TexTarget, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(TexTarget, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(TexTarget, GL_TEXTURE_BASE_LEVEL, TextureLevel);
|
||||
glTexParameteri(TexTarget, GL_TEXTURE_MAX_LEVEL, TextureLevel);
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
}
|
||||
|
||||
|
@ -576,7 +587,7 @@ Usage(void)
|
|||
printf("Usage:\n");
|
||||
printf(" -ds Use combined depth/stencil renderbuffer\n");
|
||||
printf(" -arb Try GL_ARB_framebuffer_object's mismatched buffer sizes\n");
|
||||
printf(" -ds2 Tye GL_ARB_framebuffer_object's GL_DEPTH_STENCIL_ATTACHMENT\n");
|
||||
printf(" -ds2 Try GL_ARB_framebuffer_object's GL_DEPTH_STENCIL_ATTACHMENT\n");
|
||||
printf("Keys:\n");
|
||||
printf(" a Toggle animation\n");
|
||||
printf(" s/s Step/rotate\n");
|
||||
|
@ -594,6 +605,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Display);
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "readtex.h"
|
||||
|
||||
|
@ -194,6 +194,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Draw);
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
#include "extfuncs.h"
|
||||
#include "readtex.h"
|
||||
|
@ -230,6 +231,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(400, 400);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Draw);
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
* Test to exercise fog modes and for comparison with GL_EXT_fog_coord.
|
||||
*/
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 600;
|
||||
|
@ -190,6 +190,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 600;
|
||||
|
@ -93,6 +93,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
@ -216,6 +216,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "../util/readtex.c"
|
||||
|
@ -141,6 +141,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( 250, 250 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int Width = 400;
|
||||
|
@ -386,6 +387,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "glInterleavedArrays test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.h"
|
||||
|
@ -186,6 +187,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( Width, Height );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "GL_MESA_pack_invert test" );
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static int win_width, win_height;
|
||||
|
@ -164,6 +165,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(win_width, win_height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(reshape);
|
||||
glutKeyboardFunc(key);
|
||||
glutDisplayFunc(display);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
@ -336,6 +337,7 @@ int main( int argc, char *argv[] )
|
|||
glutInitWindowSize( WinWidth, WinHeight );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
|
|
|
@ -0,0 +1,205 @@
|
|||
/*
|
||||
* Test glMapBuffer() and glMapBufferRange()
|
||||
*
|
||||
* Fill a VBO with vertex data to draw several colored quads.
|
||||
* On each redraw, update the geometry for just one rect in the VBO.
|
||||
*
|
||||
* Brian Paul
|
||||
* 4 March 2009
|
||||
*/
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static GLuint Win;
|
||||
static const GLuint NumRects = 10;
|
||||
static GLuint BufferID;
|
||||
static GLboolean Anim = GL_TRUE;
|
||||
static GLboolean UseBufferRange = GL_FALSE;
|
||||
|
||||
|
||||
|
||||
static const float RectData[] = {
|
||||
/* vertex */ /* color */
|
||||
0, -1, 0, 1, 0, 0,
|
||||
1, 0, 0, 1, 1, 0,
|
||||
0, 1, 0, 0, 1, 1,
|
||||
-1, 0, 0, 1, 0, 1
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* The buffer contains vertex positions (float[3]) and colors (float[3])
|
||||
* for 'NumRects' quads.
|
||||
* This function updates/rotates one quad in the buffer.
|
||||
*/
|
||||
static void
|
||||
UpdateRect(int r, float angle)
|
||||
{
|
||||
float *rect;
|
||||
int i;
|
||||
|
||||
assert(r < NumRects);
|
||||
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferID);
|
||||
if (UseBufferRange) {
|
||||
GLintptr offset = r * sizeof(RectData);
|
||||
GLsizeiptr length = sizeof(RectData);
|
||||
GLbitfield access = GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT;
|
||||
float *buf = (float *) glMapBufferRange(GL_ARRAY_BUFFER_ARB,
|
||||
offset, length, access);
|
||||
rect = buf;
|
||||
}
|
||||
else {
|
||||
/* map whole buffer */
|
||||
float *buf = (float *)
|
||||
glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
rect = buf + r * 24;
|
||||
}
|
||||
|
||||
/* set rect verts/colors */
|
||||
memcpy(rect, RectData, sizeof(RectData));
|
||||
|
||||
/* loop over four verts, updating vertices */
|
||||
for (i = 0; i < 4; i++) {
|
||||
float x = 0.2 * RectData[i*6+0];
|
||||
float y = 0.2 * RectData[i*6+1];
|
||||
float xpos = -2.5 + 0.5 * r;
|
||||
float ypos = 0.0;
|
||||
|
||||
/* translate and rotate vert */
|
||||
rect[i * 6 + 0] = xpos + x * cos(angle) + y * sin(angle);
|
||||
rect[i * 6 + 1] = ypos + x * sin(angle) - y * cos(angle);
|
||||
}
|
||||
|
||||
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
LoadBuffer(void)
|
||||
{
|
||||
static int frame = 0;
|
||||
float angle = glutGet(GLUT_ELAPSED_TIME) * 0.001;
|
||||
UpdateRect(frame % NumRects, angle);
|
||||
frame++;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Draw(void)
|
||||
{
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferID);
|
||||
glVertexPointer(3, GL_FLOAT, 24, 0);
|
||||
glEnable(GL_VERTEX_ARRAY);
|
||||
|
||||
glColorPointer(3, GL_FLOAT, 24, (void*) 12);
|
||||
glEnable(GL_COLOR_ARRAY);
|
||||
|
||||
glDrawArrays(GL_QUADS, 0, NumRects * 4);
|
||||
|
||||
if (0)
|
||||
glFinish();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Display(void)
|
||||
{
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
Draw();
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Reshape(int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(-3.0, 3.0, -1.0, 1.0, -1.0, 1.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Idle(void)
|
||||
{
|
||||
LoadBuffer();
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Key(unsigned char key, int x, int y)
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
if (key == 'a') {
|
||||
Anim = !Anim;
|
||||
glutIdleFunc(Anim ? Idle : NULL);
|
||||
}
|
||||
else if (key == 's') {
|
||||
LoadBuffer();
|
||||
}
|
||||
else if (key == 27) {
|
||||
glutDestroyWindow(Win);
|
||||
exit(0);
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Init(void)
|
||||
{
|
||||
GLuint BufferSize = NumRects * sizeof(RectData);
|
||||
float *buf;
|
||||
|
||||
if (!glutExtensionSupported("GL_ARB_vertex_buffer_object")) {
|
||||
printf("GL_ARB_vertex_buffer_object not found!\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
UseBufferRange = glutExtensionSupported("GL_ARB_map_buffer_range");
|
||||
printf("Use GL_ARB_map_buffer_range: %c\n", "NY"[UseBufferRange]);
|
||||
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
|
||||
/* initially load buffer with zeros */
|
||||
buf = (float *) calloc(1, BufferSize);
|
||||
|
||||
glGenBuffersARB(1, &BufferID);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferID);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, BufferSize, buf, GL_DYNAMIC_DRAW_ARB);
|
||||
|
||||
free(buf);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitWindowSize(800, 200);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(Display);
|
||||
glutIdleFunc(Anim ? Idle : NULL);
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* Test glMapBuffer() call immediately after glDrawArrays().
|
||||
* See details below.
|
||||
*
|
||||
* NOTE: Do not use freeglut with this test! It calls the Display()
|
||||
* callback twice right away instead of just once.
|
||||
*
|
||||
* Brian Paul
|
||||
* 27 Feb 2009
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static GLuint BufferID;
|
||||
|
||||
|
||||
static GLuint Win;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Create VBO (position and color) and load with data.
|
||||
*/
|
||||
static void
|
||||
SetupBuffers(void)
|
||||
{
|
||||
static const GLfloat data[] = {
|
||||
/* vertex */ /* color */
|
||||
0, -1, 0, 1, 1, 0,
|
||||
1, 0, 0, 1, 1, 0,
|
||||
0, 1, 0, 1, 1, 0,
|
||||
-1, 0, 0, 1, 1, 0
|
||||
};
|
||||
|
||||
glGenBuffersARB(1, &BufferID);
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferID);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(data), data,
|
||||
GL_STATIC_DRAW_ARB);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
Draw(void)
|
||||
{
|
||||
static int count = 1;
|
||||
|
||||
printf("Draw Frame %d\n", count);
|
||||
count++;
|
||||
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, BufferID);
|
||||
glVertexPointer(3, GL_FLOAT, 24, 0);
|
||||
glEnable(GL_VERTEX_ARRAY);
|
||||
|
||||
glColorPointer(3, GL_FLOAT, 24, (void*) 12);
|
||||
glEnable(GL_COLOR_ARRAY);
|
||||
|
||||
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
|
||||
|
||||
if (0)
|
||||
glFinish();
|
||||
|
||||
/* Immediately map the color buffer and change something.
|
||||
* This should not effect the first glDrawArrays above, but the
|
||||
* next time we draw we should see a black vertex.
|
||||
*/
|
||||
if (1) {
|
||||
GLfloat *m = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB,
|
||||
GL_WRITE_ONLY_ARB);
|
||||
m[3] = m[4] = m[5] = 0.0f; /* black vertex */
|
||||
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void Display( void )
|
||||
{
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
Draw();
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
static void Reshape( int width, int height )
|
||||
{
|
||||
float ar = (float) width / (float) height;
|
||||
glViewport( 0, 0, width, height );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glFrustum( -ar, ar, -1.0, 1.0, 5.0, 25.0 );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
glTranslatef( 0.0, 0.0, -15.0 );
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
if (key == 27) {
|
||||
glutDestroyWindow(Win);
|
||||
exit(0);
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void Init( void )
|
||||
{
|
||||
if (!glutExtensionSupported("GL_ARB_vertex_buffer_object")) {
|
||||
printf("GL_ARB_vertex_buffer_object not found!\n");
|
||||
exit(0);
|
||||
}
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
|
||||
SetupBuffers();
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 300, 300 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
Win = glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutDisplayFunc( Display );
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
|
@ -17,6 +17,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
|
||||
|
@ -189,6 +190,7 @@ main(int argc, char *argv[])
|
|||
glutInitWindowSize(Width, Height);
|
||||
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||
glutCreateWindow(argv[0]);
|
||||
glewInit();
|
||||
glutReshapeFunc(Reshape);
|
||||
glutKeyboardFunc(Key);
|
||||
glutDisplayFunc(redraw);
|
||||
|
|
|
@ -0,0 +1,207 @@
|
|||
/* Test GL_TEXTURE_BASE_LEVEL and GL_TEXTURE_MAX_LEVEL
|
||||
* Brian Paul
|
||||
* 10 May 2006
|
||||
*/
|
||||
|
||||
|
||||
/* Copyright (c) Mark J. Kilgard, 1994. */
|
||||
|
||||
/*
|
||||
* (c) Copyright 1993, Silicon Graphics, Inc.
|
||||
* ALL RIGHTS RESERVED
|
||||
* Permission to use, copy, modify, and distribute this software for
|
||||
* any purpose and without fee is hereby granted, provided that the above
|
||||
* copyright notice appear in all copies and that both the copyright notice
|
||||
* and this permission notice appear in supporting documentation, and that
|
||||
* the name of Silicon Graphics, Inc. not be used in advertising
|
||||
* or publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission.
|
||||
*
|
||||
* THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
|
||||
* AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
|
||||
* INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
|
||||
* GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
|
||||
* SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
|
||||
* KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
|
||||
* LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
|
||||
* THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
|
||||
* POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
* US Government Users Restricted Rights
|
||||
* Use, duplication, or disclosure by the Government is subject to
|
||||
* restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
|
||||
* (c)(1)(ii) of the Rights in Technical Data and Computer Software
|
||||
* clause at DFARS 252.227-7013 and/or in similar or successor
|
||||
* clauses in the FAR or the DOD or NASA FAR Supplement.
|
||||
* Unpublished-- rights reserved under the copyright laws of the
|
||||
* United States. Contractor/manufacturer is Silicon Graphics,
|
||||
* Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
|
||||
*
|
||||
* OpenGL(TM) is a trademark of Silicon Graphics, Inc.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.h"
|
||||
|
||||
|
||||
static GLfloat LodBias = 6.0; /* make smallest miplevel visible */
|
||||
static GLuint texImage;
|
||||
|
||||
#define WIDTH 2
|
||||
#define HEIGHT 2
|
||||
|
||||
static void
|
||||
InitValues(void)
|
||||
{
|
||||
LodBias = 6.0; /* make smallest miplevel visible */
|
||||
}
|
||||
|
||||
|
||||
static void MakeImage(void)
|
||||
{
|
||||
const GLubyte color0[4] = { 0xff, 0x80, 0x20, 0xff };
|
||||
const GLubyte color1[4] = { 0x10, 0x20, 0x40, 0xff };
|
||||
|
||||
GLubyte img[WIDTH*HEIGHT*3];
|
||||
int i, j;
|
||||
for (i = 0; i < HEIGHT; i++) {
|
||||
for (j = 0; j < WIDTH; j++) {
|
||||
int k = (i * WIDTH + j) * 3;
|
||||
int p = ((i+j)%2);
|
||||
if (p == 0) {
|
||||
img[k + 0] = color0[0];
|
||||
img[k + 1] = color0[1];
|
||||
img[k + 2] = color0[2];
|
||||
}
|
||||
else {
|
||||
img[k + 0] = color1[0];
|
||||
img[k + 1] = color1[1];
|
||||
img[k + 2] = color1[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, WIDTH, HEIGHT, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE, img);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void myinit(void)
|
||||
{
|
||||
InitValues();
|
||||
|
||||
glShadeModel(GL_FLAT);
|
||||
|
||||
glTranslatef(0.0, 0.0, -3.6);
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glGenTextures(1, &texImage);
|
||||
glBindTexture(GL_TEXTURE_2D, texImage);
|
||||
MakeImage();
|
||||
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 1);
|
||||
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, -1);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 1);
|
||||
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
|
||||
GL_NEAREST_MIPMAP_NEAREST);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void display(void)
|
||||
{
|
||||
GLfloat tcm = 1.0;
|
||||
glBindTexture(GL_TEXTURE_2D, texImage);
|
||||
|
||||
printf("Bias=%.2g\n", LodBias);
|
||||
fflush(stdout);
|
||||
|
||||
glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, LodBias);
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glBegin(GL_QUADS);
|
||||
glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0);
|
||||
glTexCoord2f(0.0, tcm); glVertex3f(-2.0, 1.0, 0.0);
|
||||
glTexCoord2f(tcm * 3000.0, tcm); glVertex3f(3000.0, 1.0, -6000.0);
|
||||
glTexCoord2f(tcm * 3000.0, 0.0); glVertex3f(3000.0, -1.0, -6000.0);
|
||||
glEnd();
|
||||
glFlush();
|
||||
}
|
||||
|
||||
static void myReshape(int w, int h)
|
||||
{
|
||||
glViewport(0, 0, w, h);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(60.0, 1.0*(GLfloat)w/(GLfloat)h, 1.0, 30000.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
static void
|
||||
key(unsigned char k, int x, int y)
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (k) {
|
||||
case 'l':
|
||||
LodBias -= 0.25;
|
||||
break;
|
||||
case 'L':
|
||||
LodBias += 0.25;
|
||||
break;
|
||||
case ' ':
|
||||
InitValues();
|
||||
break;
|
||||
case 27: /* Escape */
|
||||
exit(0);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
printf("usage:\n");
|
||||
printf(" l/L decrease/increase GL_TEXTURE_LOD_BIAS\n");
|
||||
printf(" SPACE reset values\n");
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB );
|
||||
glutInitWindowSize (600, 600);
|
||||
glutCreateWindow (argv[0]);
|
||||
glewInit();
|
||||
myinit();
|
||||
glutReshapeFunc (myReshape);
|
||||
glutDisplayFunc(display);
|
||||
glutKeyboardFunc(key);
|
||||
usage();
|
||||
glutMainLoop();
|
||||
return 0; /* ANSI C requires main to return int. */
|
||||
}
|
|
@ -51,19 +51,25 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <GL/glew.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
static GLint BaseLevel = 0, MaxLevel = 8;
|
||||
#include "readtex.h"
|
||||
|
||||
#define TEXTURE_FILE "../images/girl.rgb"
|
||||
|
||||
static GLint BaseLevel = 0, MaxLevel = 9;
|
||||
static GLfloat MinLod = -1, MaxLod = 9;
|
||||
static GLfloat LodBias = 0.0;
|
||||
static GLboolean NearestFilter = GL_TRUE;
|
||||
static GLuint texImage, texColor, texCurrent;
|
||||
|
||||
|
||||
static void
|
||||
InitValues(void)
|
||||
{
|
||||
BaseLevel = 0;
|
||||
MaxLevel = 8;
|
||||
MaxLevel = 9;
|
||||
MinLod = -1;
|
||||
MaxLod = 9;
|
||||
LodBias = 0.0;
|
||||
|
@ -74,7 +80,7 @@ InitValues(void)
|
|||
static void MakeImage(int level, int width, int height, const GLubyte color[4])
|
||||
{
|
||||
const int makeStripes = 0;
|
||||
GLubyte img[256*256*3];
|
||||
GLubyte img[512*512*3];
|
||||
int i, j;
|
||||
for (i = 0; i < height; i++) {
|
||||
for (j = 0; j < width; j++) {
|
||||
|
@ -98,9 +104,46 @@ static void MakeImage(int level, int width, int height, const GLubyte color[4])
|
|||
}
|
||||
|
||||
|
||||
static void makeImages(void)
|
||||
static void makeImages(int image)
|
||||
{
|
||||
static const GLubyte colors[8][3] = {
|
||||
#define WIDTH 512
|
||||
#define HEIGHT 512
|
||||
if (glutExtensionSupported("GL_SGIS_generate_mipmap") && image) {
|
||||
/* test auto mipmap generation */
|
||||
GLint width, height, i;
|
||||
GLenum format;
|
||||
GLubyte *image = LoadRGBImage(TEXTURE_FILE, &width, &height, &format);
|
||||
if (!image) {
|
||||
printf("Error: could not load texture image %s\n", TEXTURE_FILE);
|
||||
exit(1);
|
||||
}
|
||||
/* resize */
|
||||
if (width != WIDTH || height != HEIGHT) {
|
||||
GLubyte *newImage = malloc(WIDTH * HEIGHT * 4);
|
||||
gluScaleImage(format, width, height, GL_UNSIGNED_BYTE, image,
|
||||
WIDTH, HEIGHT, GL_UNSIGNED_BYTE, newImage);
|
||||
free(image);
|
||||
image = newImage;
|
||||
}
|
||||
printf("Using GL_SGIS_generate_mipmap\n");
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, format, WIDTH, HEIGHT, 0,
|
||||
format, GL_UNSIGNED_BYTE, image);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_FALSE);
|
||||
free(image);
|
||||
|
||||
/* make sure mipmap was really generated correctly */
|
||||
width = WIDTH; height = HEIGHT;
|
||||
for (i = 0; i < 10; i++) {
|
||||
GLint w, h;
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_WIDTH, &w);
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_HEIGHT, &h);
|
||||
printf("Level %d size: %d x %d\n", i, w, h);
|
||||
width /= 2;
|
||||
height /= 2;
|
||||
}
|
||||
} else {
|
||||
static const GLubyte colors[10][3] = {
|
||||
{128, 128, 128 },
|
||||
{ 0, 255, 255 },
|
||||
{ 255, 255, 0 },
|
||||
|
@ -108,15 +151,19 @@ static void makeImages(void)
|
|||
{ 255, 0, 0 },
|
||||
{ 0, 255, 0 },
|
||||
{ 0, 0, 255 },
|
||||
{ 0, 255, 255 },
|
||||
{ 255, 255, 0 },
|
||||
{ 255, 255, 255 }
|
||||
};
|
||||
int i, sz = 128;
|
||||
int i, sz = 512;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
MakeImage(i, sz, sz, colors[i]);
|
||||
printf("Level %d size: %d x %d\n", i, sz, sz);
|
||||
sz /= 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void myinit(void)
|
||||
{
|
||||
|
@ -129,7 +176,15 @@ static void myinit(void)
|
|||
glTranslatef(0.0, 0.0, -3.6);
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
makeImages();
|
||||
glGenTextures(1, &texImage);
|
||||
glBindTexture(GL_TEXTURE_2D, texImage);
|
||||
makeImages(1);
|
||||
glGenTextures(1, &texColor);
|
||||
glBindTexture(GL_TEXTURE_2D, texColor);
|
||||
makeImages(0);
|
||||
|
||||
texCurrent = texImage;
|
||||
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
|
||||
|
@ -138,7 +193,9 @@ static void myinit(void)
|
|||
|
||||
static void display(void)
|
||||
{
|
||||
GLfloat tcm = 4.0;
|
||||
GLfloat tcm = 1.0;
|
||||
glBindTexture(GL_TEXTURE_2D, texCurrent);
|
||||
|
||||
printf("BASE_LEVEL=%d MAX_LEVEL=%d MIN_LOD=%.2g MAX_LOD=%.2g Bias=%.2g Filter=%s\n",
|
||||
BaseLevel, MaxLevel, MinLod, MaxLod, LodBias,
|
||||
NearestFilter ? "NEAREST" : "LINEAR");
|
||||
|
@ -165,8 +222,8 @@ static void display(void)
|
|||
glBegin(GL_QUADS);
|
||||
glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0);
|
||||
glTexCoord2f(0.0, tcm); glVertex3f(-2.0, 1.0, 0.0);
|
||||
glTexCoord2f(tcm, tcm); glVertex3f(3000.0, 1.0, -6000.0);
|
||||
glTexCoord2f(tcm, 0.0); glVertex3f(3000.0, -1.0, -6000.0);
|
||||
glTexCoord2f(tcm * 3000.0, tcm); glVertex3f(3000.0, 1.0, -6000.0);
|
||||
glTexCoord2f(tcm * 3000.0, 0.0); glVertex3f(3000.0, -1.0, -6000.0);
|
||||
glEnd();
|
||||
glFlush();
|
||||
}
|
||||
|
@ -228,6 +285,12 @@ key(unsigned char k, int x, int y)
|
|||
case 'f':
|
||||
NearestFilter = !NearestFilter;
|
||||
break;
|
||||
case 't':
|
||||
if (texCurrent == texColor)
|
||||
texCurrent = texImage;
|
||||
else
|
||||
texCurrent = texColor;
|
||||
break;
|
||||
case ' ':
|
||||
InitValues();
|
||||
break;
|
||||
|
@ -250,6 +313,7 @@ static void usage(void)
|
|||
printf(" x/X decrease/increase GL_TEXTURE_MAX_LOD\n");
|
||||
printf(" l/L decrease/increase GL_TEXTURE_LOD_BIAS\n");
|
||||
printf(" f toggle nearest/linear filtering\n");
|
||||
printf(" t toggle texture color/image\n");
|
||||
printf(" SPACE reset values\n");
|
||||
}
|
||||
|
||||
|
@ -260,6 +324,7 @@ int main(int argc, char** argv)
|
|||
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
|
||||
glutInitWindowSize (600, 600);
|
||||
glutCreateWindow (argv[0]);
|
||||
glewInit();
|
||||
myinit();
|
||||
glutReshapeFunc (myReshape);
|
||||
glutDisplayFunc(display);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue