Compare commits
31 Commits
mesa-7.1-1
...
mesa-7.0.3
Author | SHA1 | Date | |
---|---|---|---|
|
85d882983f | ||
|
0206e20240 | ||
|
83a4719056 | ||
|
6cfe871c75 | ||
|
07c1fcc604 | ||
|
7959b95efa | ||
|
e325b76444 | ||
|
34eedc6a98 | ||
|
8c21c2e07e | ||
|
27425708f5 | ||
|
fc07b6cda0 | ||
|
562ed27eb5 | ||
|
0a0e09078d | ||
|
50bc5a75a7 | ||
|
6661f53eb3 | ||
|
b8782affc8 | ||
|
9a9e839b9b | ||
|
b04ccc9a03 | ||
|
aa522e14ee | ||
|
2c9e332bce | ||
|
e89deed74d | ||
|
5cb6f5515f | ||
|
c5024d4a5c | ||
|
62626467b4 | ||
|
c55a72ef48 | ||
|
8a353c4020 | ||
|
8261c40bb9 | ||
|
9fa552eb0f | ||
|
5f8ad807be | ||
|
b6e165d661 | ||
|
afbb645906 |
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,4 +0,0 @@
|
||||
*.dsp -crlf
|
||||
*.dsw -crlf
|
||||
*.sln -crlf
|
||||
*.vcproj -crlf
|
16
.gitignore
vendored
16
.gitignore
vendored
@@ -1,16 +0,0 @@
|
||||
*.a
|
||||
*.o
|
||||
*.so
|
||||
*.sw[a-z]
|
||||
*.pc
|
||||
*~
|
||||
depend
|
||||
depend.bak
|
||||
lib
|
||||
lib64
|
||||
configure
|
||||
autom4te.cache
|
||||
aclocal.m4
|
||||
config.log
|
||||
config.status
|
||||
cscope*
|
91
Makefile
91
Makefile
@@ -14,25 +14,25 @@ default: $(TOP)/configs/current
|
||||
|
||||
|
||||
doxygen:
|
||||
cd doxygen && $(MAKE)
|
||||
(cd doxygen ; make) ; \
|
||||
|
||||
clean:
|
||||
-@touch $(TOP)/configs/current
|
||||
-@for dir in $(SUBDIRS) ; do \
|
||||
@for dir in $(SUBDIRS) ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) clean) ; \
|
||||
fi \
|
||||
done
|
||||
-@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
|
||||
|
||||
|
||||
realclean: clean
|
||||
realclean:
|
||||
touch $(TOP)/configs/current
|
||||
$(MAKE) clean
|
||||
-rm -rf lib*
|
||||
-rm -f $(TOP)/configs/current
|
||||
-rm -f $(TOP)/configs/autoconf
|
||||
-rm -rf autom4te.cache
|
||||
-find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
|
||||
-name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
|
||||
-rm -f `find . -name \*.o`
|
||||
-rm -f `find . -name \*.a`
|
||||
-rm -f `find . -name \*.so`
|
||||
-rm -f `find . -name depend`
|
||||
|
||||
|
||||
|
||||
@@ -48,20 +48,14 @@ install:
|
||||
linux-directfb-install:
|
||||
cd src/mesa/drivers/directfb && $(MAKE) install
|
||||
|
||||
.PHONY: default doxygen clean realclean install linux-directfb-install
|
||||
|
||||
# If there's no current configuration file
|
||||
$(TOP)/configs/current:
|
||||
@echo
|
||||
@echo
|
||||
@echo "Please choose a configuration from the following list:"
|
||||
@ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
|
||||
@ls -1 $(TOP)/configs | grep -v "current\|default\|CVS"
|
||||
@echo
|
||||
@echo "Then type 'make <config>' (ex: 'make linux-x86')"
|
||||
@echo
|
||||
@echo "Or, run './configure' then 'make'"
|
||||
@echo "See './configure --help' for details"
|
||||
@echo
|
||||
@echo "(ignore the following error message)"
|
||||
@exit 1
|
||||
|
||||
@@ -72,20 +66,24 @@ aix-64 \
|
||||
aix-64-static \
|
||||
aix-gcc \
|
||||
aix-static \
|
||||
autoconf \
|
||||
beos \
|
||||
bluegene-osmesa \
|
||||
bluegene-xlc-osmesa \
|
||||
beos \
|
||||
catamount-osmesa-pgi \
|
||||
darwin \
|
||||
darwin-fat-32bit \
|
||||
darwin-fat-all \
|
||||
darwin-static \
|
||||
darwin-static-x86ppc \
|
||||
dragonfly \
|
||||
dragonfly-dri \
|
||||
dragonfly-dri-amd64 \
|
||||
dragonfly-dri-x86 \
|
||||
freebsd \
|
||||
freebsd-dri \
|
||||
freebsd-dri-amd64 \
|
||||
freebsd-dri-x86 \
|
||||
freebsd-static \
|
||||
hpux10 \
|
||||
hpux10-gcc \
|
||||
hpux10-static \
|
||||
@@ -174,25 +172,17 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-7.1
|
||||
LIB_NAME = MesaLib-7.1
|
||||
DEMO_NAME = MesaDemos-7.1
|
||||
GLUT_NAME = MesaGLUT-7.1
|
||||
DIRECTORY = Mesa-7.0.4
|
||||
LIB_NAME = MesaLib-7.0.4
|
||||
DEMO_NAME = MesaDemos-7.0.4
|
||||
GLUT_NAME = MesaGLUT-7.0.4
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
$(DIRECTORY)/configure \
|
||||
$(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 \
|
||||
$(DIRECTORY)/bin/mklib \
|
||||
$(DIRECTORY)/bin/minstall \
|
||||
$(DIRECTORY)/bin/version.mk \
|
||||
$(DIRECTORY)/configs/[a-z]* \
|
||||
$(DIRECTORY)/docs/*.html \
|
||||
$(DIRECTORY)/docs/COPYING \
|
||||
@@ -233,40 +223,48 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/depend \
|
||||
$(DIRECTORY)/src/mesa/main/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/main/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/main/sources \
|
||||
$(DIRECTORY)/src/mesa/glapi/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/glapi/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/glapi/sources \
|
||||
$(DIRECTORY)/src/mesa/math/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/math/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/math/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/grammar/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/sources \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.gc \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/*.syn \
|
||||
$(DIRECTORY)/src/mesa/shader/slang/library/Makefile \
|
||||
$(DIRECTORY)/src/mesa/swrast/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/swrast/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/swrast/sources \
|
||||
$(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/swrast_setup/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/swrast_setup/sources \
|
||||
$(DIRECTORY)/src/mesa/vbo/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/vbo/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/tnl/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/tnl/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/tnl/sources \
|
||||
$(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
|
||||
$(DIRECTORY)/src/mesa/drivers/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
|
||||
$(DIRECTORY)/src/mesa/drivers/beos/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/common/sources \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/drivers/fbdev/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
|
||||
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
|
||||
@@ -276,7 +274,6 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
|
||||
@@ -284,8 +281,8 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/descrip.mms \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/sources \
|
||||
$(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/ppc/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/sparc/*.[chS] \
|
||||
@@ -314,14 +311,12 @@ MAIN_FILES = \
|
||||
|
||||
DRI_FILES = \
|
||||
$(DIRECTORY)/include/GL/internal/dri_interface.h \
|
||||
$(DIRECTORY)/include/GL/internal/dri_sarea.h \
|
||||
$(DIRECTORY)/include/GL/internal/sarea.h \
|
||||
$(DIRECTORY)/src/glx/Makefile \
|
||||
$(DIRECTORY)/src/glx/x11/Makefile \
|
||||
$(DIRECTORY)/src/glx/x11/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/dri.pc.in \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
|
||||
@@ -340,8 +335,6 @@ SGI_GLU_FILES = \
|
||||
$(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 \
|
||||
$(DIRECTORY)/src/glu/sgi/include/gluos.h \
|
||||
$(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
|
||||
@@ -397,8 +390,7 @@ DEMO_FILES = \
|
||||
$(DIRECTORY)/progs/samples/*.c \
|
||||
$(DIRECTORY)/progs/glsl/Makefile* \
|
||||
$(DIRECTORY)/progs/glsl/*.c \
|
||||
$(DIRECTORY)/progs/glsl/*.frag \
|
||||
$(DIRECTORY)/progs/glsl/*.vert \
|
||||
$(DIRECTORY)/progs/glsl/*.txt \
|
||||
$(DIRECTORY)/progs/windml/Makefile.ugl \
|
||||
$(DIRECTORY)/progs/windml/*.c \
|
||||
$(DIRECTORY)/progs/windml/*.bmp \
|
||||
@@ -448,20 +440,9 @@ LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
|
||||
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
tarballs: rm_depend configure aclocal.m4 lib_gz demo_gz glut_gz \
|
||||
lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
|
||||
tarballs: rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
|
||||
|
||||
|
||||
# Helper for autoconf builds
|
||||
ACLOCAL = aclocal
|
||||
ACLOCAL_FLAGS =
|
||||
AUTOCONF = autoconf
|
||||
AC_FLAGS =
|
||||
aclocal.m4: configure.ac acinclude.m4
|
||||
$(ACLOCAL) $(ACLOCAL_FLAGS)
|
||||
configure: configure.ac aclocal.m4 acinclude.m4
|
||||
$(AUTOCONF) $(AC_FLAGS)
|
||||
|
||||
rm_depend:
|
||||
@for dep in $(DEPEND_FILES) ; do \
|
||||
rm -f $$dep ; \
|
||||
@@ -470,7 +451,6 @@ rm_depend:
|
||||
|
||||
lib_gz:
|
||||
rm -f configs/current ; \
|
||||
rm -f configs/autoconf ; \
|
||||
cd .. ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
gzip $(LIB_NAME).tar ; \
|
||||
@@ -490,7 +470,6 @@ glut_gz:
|
||||
|
||||
lib_bz2:
|
||||
rm -f configs/current ; \
|
||||
rm -f configs/autoconf ; \
|
||||
cd .. ; \
|
||||
tar -cf $(LIB_NAME).tar $(LIB_FILES) ; \
|
||||
bzip2 $(LIB_NAME).tar ; \
|
||||
@@ -510,7 +489,6 @@ glut_bz2:
|
||||
|
||||
lib_zip:
|
||||
rm -f configs/current ; \
|
||||
rm -f configs/autoconf ; \
|
||||
rm -f $(LIB_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -qr $(LIB_NAME).zip $(LIB_FILES) ; \
|
||||
@@ -538,6 +516,3 @@ md5:
|
||||
@-md5sum $(GLUT_NAME).tar.gz
|
||||
@-md5sum $(GLUT_NAME).tar.bz2
|
||||
@-md5sum $(GLUT_NAME).zip
|
||||
|
||||
.PHONY: tarballs rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 \
|
||||
glut_bz2 lib_zip demo_zip glut_zip md5
|
||||
|
119
acinclude.m4
119
acinclude.m4
@@ -1,119 +0,0 @@
|
||||
# A few convenience macros for Mesa, mostly to keep all the platform
|
||||
# specifics out of configure.ac.
|
||||
|
||||
# MESA_PIC_FLAGS()
|
||||
#
|
||||
# Find out whether to build PIC code using the option --enable-pic and
|
||||
# the configure enable_static/enable_shared settings. If PIC is needed,
|
||||
# figure out the necessary flags for the platform and compiler.
|
||||
#
|
||||
# The platform checks have been shamelessly taken from libtool and
|
||||
# stripped down to just what's needed for Mesa. See _LT_COMPILER_PIC in
|
||||
# /usr/share/aclocal/libtool.m4 or
|
||||
# http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=libltdl/m4/libtool.m4;hb=HEAD
|
||||
#
|
||||
AC_DEFUN([MESA_PIC_FLAGS],
|
||||
[AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_ARG_VAR([PIC_FLAGS], [compiler flags for PIC code])
|
||||
AC_ARG_ENABLE([pic],
|
||||
[AS_HELP_STRING([--disable-pic],
|
||||
[compile PIC objects @<:@default=enabled for shared builds
|
||||
on supported platforms@:>@])],
|
||||
[enable_pic="$enableval"
|
||||
test "x$enable_pic" = x && enable_pic=auto],
|
||||
[enable_pic=auto])
|
||||
# disable PIC by default for static builds
|
||||
if test "$enable_pic" = auto && test "$enable_static" = yes; then
|
||||
enable_pic=no
|
||||
fi
|
||||
# if PIC hasn't been explicitly disabled, try to figure out the flags
|
||||
if test "$enable_pic" != no; then
|
||||
AC_MSG_CHECKING([for $CC option to produce PIC])
|
||||
# allow the user's flags to override
|
||||
if test "x$PIC_FLAGS" = x; then
|
||||
# see if we're using GCC
|
||||
if test "x$GCC" = xyes; then
|
||||
case "$host_os" in
|
||||
aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
mingw*|os2*|pw32*)
|
||||
# This hack is so that the source file can tell whether
|
||||
# it is being built for inclusion in a dll (and should
|
||||
# export symbols for example).
|
||||
PIC_FLAGS="-DDLL_EXPORT"
|
||||
;;
|
||||
darwin*|rhapsody*)
|
||||
# PIC is the default on this platform
|
||||
# Common symbols not allowed in MH_DYLIB files
|
||||
PIC_FLAGS="-fno-common"
|
||||
;;
|
||||
hpux*)
|
||||
# PIC is the default for IA64 HP-UX and 64-bit HP-UX,
|
||||
# but not for PA HP-UX.
|
||||
case $host_cpu in
|
||||
hppa*64*|ia64*)
|
||||
;;
|
||||
*)
|
||||
PIC_FLAGS="-fPIC"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Everyone else on GCC uses -fPIC
|
||||
PIC_FLAGS="-fPIC"
|
||||
;;
|
||||
esac
|
||||
else # !GCC
|
||||
case "$host_os" in
|
||||
hpux9*|hpux10*|hpux11*)
|
||||
# PIC is the default for IA64 HP-UX and 64-bit HP-UX,
|
||||
# but not for PA HP-UX.
|
||||
case "$host_cpu" in
|
||||
hppa*64*|ia64*)
|
||||
# +Z the default
|
||||
;;
|
||||
*)
|
||||
PIC_FLAGS="+Z"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*|k*bsd*-gnu)
|
||||
case `basename "$CC"` in
|
||||
icc*|ecc*|ifort*)
|
||||
PIC_FLAGS="-KPIC"
|
||||
;;
|
||||
pgcc*|pgf77*|pgf90*|pgf95*)
|
||||
# Portland Group compilers (*not* the Pentium gcc
|
||||
# compiler, which looks to be a dead project)
|
||||
PIC_FLAGS="-fpic"
|
||||
;;
|
||||
ccc*)
|
||||
# All Alpha code is PIC.
|
||||
;;
|
||||
xl*)
|
||||
# IBM XL C 8.0/Fortran 10.1 on PPC
|
||||
PIC_FLAGS="-qpic"
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ C*|*Sun\ F*)
|
||||
# Sun C 5.9 or Sun Fortran
|
||||
PIC_FLAGS="-KPIC"
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
;;
|
||||
solaris*)
|
||||
PIC_FLAGS="-KPIC"
|
||||
;;
|
||||
sunos4*)
|
||||
PIC_FLAGS="-PIC"
|
||||
;;
|
||||
esac
|
||||
fi # GCC
|
||||
fi # PIC_FLAGS
|
||||
AC_MSG_RESULT([$PIC_FLAGS])
|
||||
fi
|
||||
AC_SUBST([PIC_FLAGS])
|
||||
])# MESA_PIC_FLAGS
|
16
autogen.sh
16
autogen.sh
@@ -1,16 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
srcdir=`dirname "$0"`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
SRCDIR=`(cd "$srcdir" && pwd)`
|
||||
ORIGDIR=`pwd`
|
||||
|
||||
if test "x$SRCDIR" != "x$ORIGDIR"; then
|
||||
echo "Mesa cannot be built when srcdir != builddir" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
autoreconf -v --install || exit 1
|
||||
|
||||
"$srcdir"/configure "$@"
|
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "Usage: $0 <target1> <target2>"
|
||||
echo "Highlight differences between Mesa configs"
|
||||
echo "Example:"
|
||||
echo " $0 linux linux-x86"
|
||||
}
|
||||
|
||||
die()
|
||||
{
|
||||
echo "$@" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
-h|--help) usage; exit 0;;
|
||||
esac
|
||||
|
||||
[ $# -lt 2 ] && die 2 targets needed. See $0 --help
|
||||
target1=$1
|
||||
target2=$2
|
||||
|
||||
topdir=$(cd "`dirname $0`"/..; pwd)
|
||||
cd "$topdir"
|
||||
|
||||
[ -f "./configs/$target1" ] || die Missing configs/$target1
|
||||
[ -f "./configs/$target2" ] || die Missing configs/$target2
|
||||
|
||||
trap 'rm -f "$t1" "$t2"' 0
|
||||
|
||||
t1=$(mktemp)
|
||||
t2=$(mktemp)
|
||||
|
||||
make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t1
|
||||
TOP = .
|
||||
include \$(TOP)/configs/$target1
|
||||
default:
|
||||
EOF
|
||||
|
||||
make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t2
|
||||
TOP = .
|
||||
include \$(TOP)/configs/$target2
|
||||
default:
|
||||
EOF
|
||||
|
||||
diff -pu -I'^#' $t1 $t2
|
1516
bin/config.guess
vendored
1516
bin/config.guess
vendored
File diff suppressed because it is too large
Load Diff
1626
bin/config.sub
vendored
1626
bin/config.sub
vendored
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
minstall
|
@@ -42,8 +42,6 @@ if [ $# -ge 2 ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PWDSAVE=`pwd`
|
||||
|
||||
# determine file's type
|
||||
if [ -h "$FILE" ] ; then
|
||||
#echo $FILE is a symlink
|
||||
@@ -59,6 +57,7 @@ if [ $# -ge 2 ] ; then
|
||||
|
||||
FILE=`basename "$FILE"`
|
||||
# Go to $DEST and make the link
|
||||
PWDSAVE="$PWD"
|
||||
cd "$DEST" # pushd
|
||||
$RM "$FILE"
|
||||
$SYMLINK "$TARGET" "$FILE"
|
||||
|
48
bin/mklib
48
bin/mklib
@@ -43,7 +43,7 @@ ARCH="auto"
|
||||
ARCHOPT=""
|
||||
NOPREFIX=0
|
||||
EXPORTS=""
|
||||
ID=""
|
||||
|
||||
|
||||
#
|
||||
# Parse arguments
|
||||
@@ -61,8 +61,7 @@ do
|
||||
echo ' -minor N specifies minor version number (default is 0)'
|
||||
echo ' -patch N specifies patch version number (default is 0)'
|
||||
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
||||
echo ' -LDIR search in DIR for library dependencies at build time'
|
||||
echo ' -RDIR search in DIR for library dependencies at run time'
|
||||
echo ' -LDIR search in DIR for library dependencies'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -ldflags OPT specify any additional linker flags in OPT'
|
||||
@@ -75,7 +74,6 @@ do
|
||||
echo ' -altopts OPTS alternate options to override all others'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -id NAME Sets the id of the dylib (Darwin)'
|
||||
echo ' -h, --help display this information and exit'
|
||||
exit 1
|
||||
;;
|
||||
@@ -109,14 +107,15 @@ do
|
||||
-L*)
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
-R*)
|
||||
-pthread)
|
||||
# this is a special case (see bugzilla 10876)
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
-Wl*)
|
||||
# Another special case for DragonFly
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
-Wl*)
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
-pthread)
|
||||
# this is a special case (see bugzilla 10876)
|
||||
DEPS="$DEPS $1"
|
||||
;;
|
||||
'-pthread')
|
||||
@@ -154,10 +153,6 @@ do
|
||||
shift 1;
|
||||
EXPORTS=$1
|
||||
;;
|
||||
'-id')
|
||||
shift 1;
|
||||
ID=$1
|
||||
;;
|
||||
-*)
|
||||
echo "mklib: Unknown option: " $1 ;
|
||||
exit 1
|
||||
@@ -201,7 +196,6 @@ if [ ] ; then
|
||||
echo PATCH is $PATCH
|
||||
echo DEPS are $DEPS
|
||||
echo "EXPORTS in" $EXPORTS
|
||||
echo ID is $ID
|
||||
echo "-----------------"
|
||||
fi
|
||||
|
||||
@@ -277,7 +271,7 @@ case $ARCH in
|
||||
if [ $EXPORTS ] ; then
|
||||
#OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
|
||||
# Make the 'exptmp' file for --version-script option
|
||||
echo "{" > exptmp
|
||||
echo "VERSION_${MAJOR}.${MINOR} {" > exptmp
|
||||
echo "global:" >> exptmp
|
||||
sed 's/$/;/' ${EXPORTS} >> exptmp
|
||||
echo "local:" >> exptmp
|
||||
@@ -346,7 +340,7 @@ case $ARCH in
|
||||
# use g++
|
||||
LINK="g++"
|
||||
else
|
||||
echo "mklib: warning: can't find C++ compiler, trying CC."
|
||||
echo "mklib: warning: can't find C++ comiler, trying CC."
|
||||
LINK="CC"
|
||||
fi
|
||||
else
|
||||
@@ -375,11 +369,9 @@ case $ARCH in
|
||||
# Check if objects are SPARC v9
|
||||
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
|
||||
set ${OBJECTS}
|
||||
if [ ${LINK} = "cc" -o ${LINK} = "CC" ] ; then
|
||||
SPARCV9=`file $1 | grep SPARCV9`
|
||||
if [ "${SPARCV9}" ] ; then
|
||||
OPTS="${OPTS} -xarch=v9"
|
||||
fi
|
||||
SPARCV9=`file $1 | grep SPARCV9`
|
||||
if [ "${SPARCV9}" ] ; then
|
||||
OPTS="${OPTS} -xarch=v9"
|
||||
fi
|
||||
if [ "${ALTOPTS}" ] ; then
|
||||
OPTS=${ALTOPTS}
|
||||
@@ -391,7 +383,7 @@ case $ARCH in
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
else
|
||||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} -h ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||
fi
|
||||
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
|
||||
@@ -636,19 +628,13 @@ case $ARCH in
|
||||
LIBSUFFIX="bundle"
|
||||
OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
|
||||
else
|
||||
LIBSUFFIX="dylib"
|
||||
if [ -z "$ID" ] ; then
|
||||
ID="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
fi
|
||||
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name ${ID}"
|
||||
LIBSUFFIX="dylib"
|
||||
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
fi
|
||||
|
||||
if [ ${EXPORTS} ] ; then
|
||||
if [ -f ${EXPORTS}".darwin" ] ; then
|
||||
EXPORTS=$EXPORTS".darwin"
|
||||
fi
|
||||
OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
|
||||
fi
|
||||
fi
|
||||
|
||||
LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
||||
LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
|
||||
|
@@ -1,17 +0,0 @@
|
||||
#!/usr/bin/make -sf
|
||||
# Print the various Mesa version fields. This is mostly used to add the
|
||||
# version to configure.
|
||||
|
||||
# This reflects that this script is usually called from the toplevel
|
||||
TOP = .
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
version:
|
||||
@echo $(MESA_VERSION)
|
||||
major:
|
||||
@echo $(MESA_MAJOR)
|
||||
minor:
|
||||
@echo $(MESA_MINOR)
|
||||
tiny:
|
||||
@echo $(MESA_TINY)
|
2
configs/.gitignore
vendored
2
configs/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
current
|
||||
autoconf
|
@@ -1,107 +0,0 @@
|
||||
# Autoconf configuration
|
||||
|
||||
# Pull in the defaults
|
||||
include $(TOP)/configs/default
|
||||
|
||||
# This is generated by configure
|
||||
CONFIG_NAME = autoconf
|
||||
|
||||
# Compiler and flags
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
OPT_FLAGS = @OPT_FLAGS@
|
||||
ARCH_FLAGS = @ARCH_FLAGS@
|
||||
ASM_FLAGS = @ASM_FLAGS@
|
||||
PIC_FLAGS = @PIC_FLAGS@
|
||||
DEFINES = @DEFINES@
|
||||
CFLAGS = @CPPFLAGS@ @CFLAGS@ \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ \
|
||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
LDFLAGS = @LDFLAGS@
|
||||
EXTRA_LIB_PATH = @EXTRA_LIB_PATH@
|
||||
|
||||
# Assembler
|
||||
ASM_SOURCES = @ASM_SOURCES@
|
||||
ASM_API = @ASM_API@
|
||||
|
||||
# Misc tools and flags
|
||||
MAKE = @MAKE@
|
||||
SHELL = @SHELL@
|
||||
MKLIB_OPTIONS = @MKLIB_OPTIONS@
|
||||
MKDEP = @MKDEP@
|
||||
MKDEP_OPTIONS = @MKDEP_OPTIONS@
|
||||
|
||||
# Python and flags (generally only needed by the developers)
|
||||
PYTHON2 = python
|
||||
PYTHON_FLAGS = -t -O -O
|
||||
|
||||
# Library names (base name)
|
||||
GL_LIB = GL
|
||||
GLU_LIB = GLU
|
||||
GLUT_LIB = glut
|
||||
GLW_LIB = GLw
|
||||
OSMESA_LIB = @OSMESA_LIB@
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = @GL_LIB_NAME@
|
||||
GLU_LIB_NAME = @GLU_LIB_NAME@
|
||||
GLUT_LIB_NAME = @GLUT_LIB_NAME@
|
||||
GLW_LIB_NAME = @GLW_LIB_NAME@
|
||||
OSMESA_LIB_NAME = @OSMESA_LIB_NAME@
|
||||
|
||||
# Directories to build
|
||||
LIB_DIR = @LIB_DIR@
|
||||
SRC_DIRS = @SRC_DIRS@
|
||||
GLU_DIRS = @GLU_DIRS@
|
||||
DRIVER_DIRS = @DRIVER_DIRS@
|
||||
# Which subdirs under $(TOP)/progs/ to enter:
|
||||
PROGRAM_DIRS = @PROGRAM_DIRS@
|
||||
|
||||
# Driver specific build vars
|
||||
DRI_DIRS = @DRI_DIRS@
|
||||
WINDOW_SYSTEM = @WINDOW_SYSTEM@
|
||||
USING_EGL = @USING_EGL@
|
||||
|
||||
# Dependencies
|
||||
X11_INCLUDES = @X11_INCLUDES@
|
||||
|
||||
# GLw motif setup
|
||||
GLW_SOURCES = @GLW_SOURCES@
|
||||
MOTIF_CFLAGS = @MOTIF_CFLAGS@
|
||||
|
||||
# Library/program dependencies
|
||||
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@
|
||||
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@ \
|
||||
$(EXTRA_LIB_PATH) @GLUT_LIB_DEPS@
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \
|
||||
$(EXTRA_LIB_PATH) @GLW_LIB_DEPS@
|
||||
APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
|
||||
|
||||
# DRI dependencies
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
|
||||
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
|
||||
LIBDRM_LIB = @LIBDRM_LIBS@
|
||||
DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@
|
||||
EXPAT_INCLUDES = @EXPAT_INCLUDES@
|
||||
|
||||
# Autoconf directories
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
libdir = @libdir@
|
||||
includedir = @includedir@
|
||||
|
||||
# Installation directories (for make install)
|
||||
INSTALL_DIR = $(prefix)
|
||||
INSTALL_LIB_DIR = $(libdir)
|
||||
INSTALL_INC_DIR = $(includedir)
|
||||
|
||||
# DRI installation directories
|
||||
DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@
|
||||
|
||||
# Where libGL will look for DRI hardware drivers
|
||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
@@ -1,42 +0,0 @@
|
||||
# MinGW config include file updated for Mesa 7.0
|
||||
#
|
||||
# Updated : by Heromyth, on 2007-7-21
|
||||
# Email : zxpmyth@yahoo.com.cn
|
||||
# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
|
||||
# The others havn't been tested yet.
|
||||
# 2) The generated DLLs are *not* compatible with the ones built
|
||||
# with the other compilers like VC8, especially for GLUT.
|
||||
# 3) Although more tests are needed, it can be used individually!
|
||||
|
||||
# The generated DLLs by MingW with STDCALL are not totally compatible
|
||||
# with the ones linked by Microsoft's compilers.
|
||||
#
|
||||
# xxx_USING_STDCALL = 1 Compiling MESA with __stdcall. This is default!
|
||||
#
|
||||
# xxx_USING_STDCALL = 0 Compiling MESA without __stdcall. I like this:)
|
||||
#
|
||||
|
||||
# In fact, GL_USING_STDCALL and GLUT_USING_STDCALL can be
|
||||
# different. For example:
|
||||
#
|
||||
# GL_USING_STDCALL = 0
|
||||
# GLUT_USING_STDCALL = 1
|
||||
#
|
||||
# Suggested setting:
|
||||
#
|
||||
# ALL_USING_STDCALL = 1
|
||||
#
|
||||
# That's default!
|
||||
#
|
||||
|
||||
|
||||
ALL_USING_STDCALL = 1
|
||||
|
||||
|
||||
ifeq ($(ALL_USING_STDCALL),1)
|
||||
GL_USING_STDCALL = 1
|
||||
GLUT_USING_STDCALL = 1
|
||||
else
|
||||
GL_USING_STDCALL = 0
|
||||
GLUT_USING_STDCALL = 0
|
||||
endif
|
@@ -4,26 +4,22 @@ include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = darwin
|
||||
|
||||
INSTALL_DIR = /usr/X11
|
||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||
-D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = gcc
|
||||
PIC_FLAGS = -fPIC
|
||||
DEFINES = -D_DARWIN_C_SOURCE -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L \
|
||||
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS \
|
||||
-DGLX_INDIRECT_RENDERING \
|
||||
-DGLX_ALIAS_UNSUPPORTED
|
||||
CFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
|
||||
CXXFLAGS = -I/usr/X11/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin $(DEFINES)
|
||||
|
||||
# -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx/x11
|
||||
# -DIN_DRI_DRIVER
|
||||
CFLAGS += $(RC_CFLAGS)
|
||||
CXXFLAGS += $(RC_CFLAGS)
|
||||
|
||||
ARCH_FLAGS += $(RC_CFLAGS)
|
||||
|
||||
CFLAGS = -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing \
|
||||
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
CXXFLAGS = -g -O2 -Wall -fno-strict-aliasing \
|
||||
-I$(INSTALL_DIR)/include $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES)
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.dylib
|
||||
@@ -32,24 +28,13 @@ GLUT_LIB_NAME = libglut.dylib
|
||||
GLW_LIB_NAME = libGLw.dylib
|
||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = libGL.*dylib
|
||||
GLU_LIB_GLOB = libGLU.*dylib
|
||||
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
|
||||
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
|
||||
GL_LIB_DEPS = -L/usr/X11/lib -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -lGL -lGLU -L/usr/X11R6/lib -lX11 -lXmu -lXi -lXext
|
||||
GLW_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXt $(TOP)/lib/GL.dylib
|
||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
|
||||
# omit glw lib for now:
|
||||
SRC_DIRS = glx/x11 mesa glu glw glut/glx
|
||||
GLU_DIRS = sgi
|
||||
SRC_DIRS = glx/x11 glu glut/glx mesa
|
||||
DRIVER_DIRS = osmesa
|
||||
#DRIVER_DIRS = dri
|
||||
DRI_DIRS = swrast
|
||||
PROGRAM_DIRS = xdemos
|
||||
|
28
configs/darwin-static
Normal file
28
configs/darwin-static
Normal file
@@ -0,0 +1,28 @@
|
||||
# Configuration for Darwin / MacOS X, making static libs
|
||||
|
||||
include $(TOP)/configs/darwin
|
||||
|
||||
CONFIG_NAME = darwin-static
|
||||
|
||||
# Compiler and flags
|
||||
CFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
CXXFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
MKLIB_OPTIONS = -static
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.a
|
||||
GLU_LIB_NAME = libGLU.a
|
||||
GLUT_LIB_NAME = libglut.a
|
||||
GLW_LIB_NAME = libGLw.a
|
||||
OSMESA_LIB_NAME = libOSMesa.a
|
||||
|
||||
GL_LIB_DEPS =
|
||||
OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS =
|
||||
GLUT_LIB_DEPS =
|
||||
GLW_LIB_DEPS =
|
||||
APP_LIB_DEPS = -Wl,-search_paths_first -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lstdc++ -lgcc_s.1 -lm
|
30
configs/darwin-static-x86ppc
Normal file
30
configs/darwin-static-x86ppc
Normal file
@@ -0,0 +1,30 @@
|
||||
# Configuration for Darwin / MacOS X, making static libs
|
||||
|
||||
include $(TOP)/configs/darwin
|
||||
|
||||
CONFIG_NAME = darwin-static
|
||||
|
||||
# Compiler and flags
|
||||
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
||||
-I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||
MKLIB_OPTIONS = -static -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.a
|
||||
GLU_LIB_NAME = libGLU.a
|
||||
GLUT_LIB_NAME = libglut.a
|
||||
GLW_LIB_NAME = libGLw.a
|
||||
OSMESA_LIB_NAME = libOSMesa.a
|
||||
|
||||
GL_LIB_DEPS =
|
||||
OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS =
|
||||
GLUT_LIB_DEPS =
|
||||
GLW_LIB_DEPS =
|
||||
APP_LIB_DEPS = -Wl,-search_paths_first -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lstdc++ -lgcc_s.1 -lm
|
@@ -22,8 +22,8 @@ DRI_DIRS = mach64 mga r128 r200 r300 radeon s3v savage tdfx trident
|
||||
|
||||
ARCH_X86 = i386 amd64
|
||||
|
||||
ifneq ($(findstring $(DEB_BUILD_ARCH), $(ARCH_X86)),)
|
||||
DRI_DIRS += i810 i915 i915tex i965 sis unichrome
|
||||
ifneq ($(filter $(DEB_HOST_ARCH_CPU), $(ARCH_X86)),)
|
||||
DRI_DIRS += i810 i915 i965 sis unichrome
|
||||
endif
|
||||
|
||||
ifeq ($(DEB_BUILD_ARCH), sparc)
|
||||
|
@@ -9,9 +9,8 @@ CONFIG_NAME = default
|
||||
|
||||
# Version info
|
||||
MESA_MAJOR=7
|
||||
MESA_MINOR=1
|
||||
MESA_TINY=0
|
||||
MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
|
||||
MESA_MINOR=0
|
||||
MESA_TINY=4
|
||||
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
@@ -25,13 +24,11 @@ LDFLAGS =
|
||||
GLU_CFLAGS =
|
||||
|
||||
# Misc tools and flags
|
||||
SHELL = /bin/sh
|
||||
MKLIB = $(SHELL) $(TOP)/bin/mklib
|
||||
MKLIB_OPTIONS =
|
||||
MKDEP = makedepend
|
||||
MKDEP_OPTIONS = -fdepend
|
||||
MAKE = make
|
||||
INSTALL = $(SHELL) $(TOP)/bin/minstall
|
||||
INSTALL = $(TOP)/bin/minstall
|
||||
|
||||
# Tools for regenerating glapi (generally only needed by the developers)
|
||||
PYTHON2 = python
|
||||
@@ -54,12 +51,6 @@ GLUT_LIB_NAME = lib$(GLUT_LIB).so
|
||||
GLW_LIB_NAME = lib$(GLW_LIB).so
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).so
|
||||
|
||||
# globs used to install the lib and all symlinks
|
||||
GL_LIB_GLOB = $(GL_LIB_NAME)*
|
||||
GLU_LIB_GLOB = $(GLU_LIB_NAME)*
|
||||
GLUT_LIB_GLOB = $(GLUT_LIB_NAME)*
|
||||
GLW_LIB_GLOB = $(GLW_LIB_NAME)*
|
||||
OSMESA_LIB_GLOB = $(OSMESA_LIB_NAME)*
|
||||
|
||||
# Optional assembly language optimization files for libGL
|
||||
ASM_SOURCES =
|
||||
@@ -67,7 +58,6 @@ ASM_SOURCES =
|
||||
# GLw widget sources (Append "GLwMDrawA.c" here and add -lXm to GLW_LIB_DEPS in
|
||||
# order to build the Motif widget too)
|
||||
GLW_SOURCES = GLwDrawA.c
|
||||
MOTIF_CFLAGS = -I/usr/include/Motif1.2
|
||||
|
||||
|
||||
# Directories to build
|
||||
@@ -84,18 +74,17 @@ PROGRAM_DIRS = demos redbook samples glsl xdemos
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
|
||||
OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXi -lm
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
|
||||
|
||||
# Program dependencies - specific GL/glut libraries added in Makefiles
|
||||
APP_LIB_DEPS = -lm
|
||||
|
||||
|
||||
|
||||
# Installation directories (for make install)
|
||||
INSTALL_DIR = /usr/local
|
||||
INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
|
||||
INSTALL_INC_DIR = $(INSTALL_DIR)/include
|
||||
DRI_DRIVER_INSTALL_DIR = $(INSTALL_LIB_DIR)/dri
|
||||
DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri
|
||||
|
||||
# Where libGL will look for DRI hardware drivers
|
||||
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
|
||||
|
38
configs/dragonfly
Normal file
38
configs/dragonfly
Normal file
@@ -0,0 +1,38 @@
|
||||
# Configuration for DragonFly
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = DragonFly
|
||||
|
||||
# Compiler and flags
|
||||
CC = cc
|
||||
CXX = c++
|
||||
MAKE = gmake
|
||||
|
||||
OPT_FLAGS = -O2
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
|
||||
-DHZ=100
|
||||
|
||||
X11_INCLUDES = -I/usr/pkg/include
|
||||
|
||||
CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) \
|
||||
-ffast-math -pedantic
|
||||
|
||||
CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES)
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
EXTRA_LIB_PATH = -L/usr/pkg/lib
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) \
|
||||
-l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
|
||||
|
||||
# Installation directories (for make install)
|
||||
INSTALL_DIR = /usr/pkg
|
||||
DRI_DRIVER_INSTALL_DIR = /usr/pkg/lib/modules/dri/
|
||||
|
56
configs/dragonfly-dri
Normal file
56
configs/dragonfly-dri
Normal file
@@ -0,0 +1,56 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for dragonfly-dri: DragonFly DRI hardware drivers
|
||||
|
||||
include $(TOP)/configs/dragonfly
|
||||
|
||||
CONFIG_NAME = dragonfly-dri
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O -g
|
||||
|
||||
EXPAT_INCLUDES = -I/usr/pkg/include
|
||||
X11_INCLUDES = -I/usr/pkg/include
|
||||
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
|
||||
-DHAVE_ALIAS
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes \
|
||||
-std=c99 -Wundef -ffast-math $(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi \
|
||||
-pedantic $(ASM_FLAGS) $(X11_INCLUDES)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
||||
DRI_LIB_DEPS = -L/usr/pkg/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = -L/usr/pkg/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread $(LIBDRM_LIB)
|
||||
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/pkg/lib -lGLU -lGL -lX11 -lXmu \
|
||||
-lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/pkg/lib -lGL -lXt -lX11
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glx/x11 mesa glu glut/glx glw
|
||||
DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM = dri
|
||||
|
||||
DRM_SOURCE_PATH = $(TOP)/../drm
|
||||
|
||||
# ffb and gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
|
||||
unichrome savage sis
|
||||
|
10
configs/dragonfly-dri-amd64
Normal file
10
configs/dragonfly-dri-amd64
Normal file
@@ -0,0 +1,10 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for dragonfly-dri-amd64: DragonFly DRI hardware drivers
|
||||
|
||||
include $(TOP)/configs/dragonfly-dri
|
||||
|
||||
CONFIG_NAME = dragonfly-dri-x86-64
|
||||
|
||||
ASM_FLAGS = -DUSE_X86_64_ASM
|
||||
ASM_SOURCES = $(X86-64_SOURCES)
|
||||
ASM_API = $(X86-64_API)
|
13
configs/dragonfly-dri-x86
Normal file
13
configs/dragonfly-dri-x86
Normal file
@@ -0,0 +1,13 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for dragonfly-dri-x86: DragonFly DRI hardware drivers
|
||||
|
||||
include $(TOP)/configs/dragonfly-dri
|
||||
|
||||
CONFIG_NAME = dragonfly-dri-x86
|
||||
|
||||
# Unnecessary on x86, generally.
|
||||
PIC_FLAGS =
|
||||
|
||||
ASM_FLAGS = -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM
|
||||
ASM_SOURCES = $(X86_SOURCES)
|
||||
ASM_API = $(X86_API)
|
@@ -15,7 +15,7 @@ PIC_FLAGS = -fPIC
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -DUSE_XSHM \
|
||||
-DHZ=100
|
||||
|
||||
X11_INCLUDES = -I/usr/local/include
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES) -ffast-math -pedantic
|
||||
|
||||
@@ -27,5 +27,5 @@ GLUT_CFLAGS = -fexceptions
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
EXTRA_LIB_PATH = -L/usr/local/lib
|
||||
EXTRA_LIB_PATH = -L/usr/X11R6/lib
|
||||
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
|
||||
|
@@ -9,10 +9,10 @@ CONFIG_NAME = freebsd-dri
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O -g
|
||||
OPT_FLAGS = -O
|
||||
|
||||
EXPAT_INCLUDES = -I/usr/local/include
|
||||
X11_INCLUDES = -I/usr/local/include
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING \
|
||||
-DHAVE_ALIAS
|
||||
@@ -32,11 +32,11 @@ ASM_SOURCES =
|
||||
LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
||||
DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -pthread $(LIBDRM_LIB)
|
||||
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
|
||||
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lX11
|
||||
|
||||
|
||||
# Directories
|
||||
|
27
configs/freebsd-static
Normal file
27
configs/freebsd-static
Normal file
@@ -0,0 +1,27 @@
|
||||
# Configuration for generic FreeBSD, making static libs
|
||||
# Written by cy on 2008-04-23.
|
||||
|
||||
include $(TOP)/configs/freebsd
|
||||
|
||||
CONFIG_NAME = freebsd-static
|
||||
|
||||
MKLIB_OPTIONS = -static
|
||||
PIC_FLAGS =
|
||||
|
||||
# Library names (actual file names)
|
||||
GL_LIB_NAME = libGL.a
|
||||
GLU_LIB_NAME = libGLU.a
|
||||
GLUT_LIB_NAME = libglut.a
|
||||
GLW_LIB_NAME = libGLw.a
|
||||
OSMESA_LIB_NAME = libOSMesa.a
|
||||
|
||||
# Library/program dependencies (static libs don't have dependencies)
|
||||
GL_LIB_DEPS =
|
||||
OSMESA_LIB_DEPS =
|
||||
GLU_LIB_DEPS =
|
||||
GLUT_LIB_DEPS =
|
||||
GLW_LIB_DEPS =
|
||||
|
||||
# Need to specify all libraries we may need
|
||||
APP_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXmu -lXt -lXi -lpthread \
|
||||
-lstdc++ -lm
|
@@ -47,7 +47,8 @@ LIBDRM_CFLAGS = `pkg-config --cflags libdrm`
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
|
||||
-lm -lpthread -ldl $(LIBDRM_LIB)
|
||||
-lm -lpthread -ldl \
|
||||
$(LIBDRM_LIB)
|
||||
|
||||
|
||||
# This is now 0 by default since it seems to confuse the hell out of people
|
||||
@@ -70,5 +71,5 @@ WINDOW_SYSTEM=dri
|
||||
|
||||
# gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
|
||||
DRI_DIRS = i810 i915tex i915 i965 mach64 mga r128 r200 r300 radeon s3v \
|
||||
savage sis tdfx trident unichrome ffb
|
||||
|
55
configs/linux-dri-bp
Normal file
55
configs/linux-dri-bp
Normal file
@@ -0,0 +1,55 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-dri
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
MKDEP = /usr/X11R6/bin/makedepend
|
||||
#MKDEP = gcc -M
|
||||
#MKDEP_OPTIONS = -MF depend
|
||||
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -g
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
|
||||
ARCH_FLAGS ?=
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DDRI_NEW_INTERFACE_ONLY -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
|
||||
GLUT_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = $(EXTRA_LIB_PATH) -L$(LIB_DIR) -l$(GL_LIB) -lXt -lX11
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glx/x11 mesa glu glut/glx glw
|
||||
DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM=dri
|
||||
|
||||
# ffb and gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 radeon s3v \
|
||||
savage sis tdfx trident unichrome fb
|
@@ -20,5 +20,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64
|
||||
# the new interface. i810 are missing because there is no x86-64
|
||||
# system where they could *ever* be used.
|
||||
#
|
||||
DRI_DIRS = i915 i965 mach64 mga r128 r200 r300 radeon savage tdfx unichrome
|
||||
DRI_DIRS = i915tex i915 i965 mach64 mga r128 r200 radeon tdfx unichrome savage r300
|
||||
|
||||
|
@@ -70,4 +70,4 @@ WINDOW_SYSTEM=dri
|
||||
# gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||
savage sis tdfx trident unichrome ffb
|
||||
savage sis tdfx trident unichrome ffb nouveau
|
||||
|
@@ -9,8 +9,17 @@ CONFIG_NAME = linux-osmesa
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
PIC_FLAGS = -fPIC
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||
-DPTHREADS -DUSE_XSHM -DHAVE_POSIX_MEMALIGN
|
||||
|
||||
CFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -ffast-math
|
||||
|
||||
CXXFLAGS = -ansi -pedantic $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
@@ -25,4 +34,5 @@ PROGRAM_DIRS = osdemos
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lm -lpthread
|
||||
APP_LIB_DEPS = -lOSMesa -lGLU
|
||||
|
||||
|
@@ -1,31 +1,19 @@
|
||||
# Configuration for 16 bits/channel OSMesa library on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-osmesa
|
||||
|
||||
CONFIG_NAME = linux-osmesa16
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
DEFINES += -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=32
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa16
|
||||
OSMESA_LIB_NAME = libOSMesa16.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lm -lpthread
|
||||
APP_LIB_DEPS = -l$(OSMESA_LIB)
|
||||
|
||||
|
@@ -1,14 +1,10 @@
|
||||
# Configuration for 16 bits/channel OSMesa library on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-osmesa16
|
||||
|
||||
CONFIG_NAME = linux-osmesa16-static
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
CXXFLAGS = -O3 -ansi -pedantic -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
MKLIB_OPTIONS = -static
|
||||
PIC_FLAGS =
|
||||
|
||||
@@ -17,16 +13,5 @@ CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa16
|
||||
OSMESA_LIB_NAME = libOSMesa16.a
|
||||
OSMESA_LIB_NAME = lib$(OSMESA_LIB).a
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
APP_LIB_DEPS = -lm -lpthread
|
||||
|
@@ -1,31 +1,22 @@
|
||||
# Configuration for 32 bits/channel OSMesa library on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
include $(TOP)/configs/linux-osmesa
|
||||
|
||||
CONFIG_NAME = linux-osmesa32
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
|
||||
|
||||
# Work around aliasing bugs - developers should comment this out
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
CXXFLAGS += -fno-strict-aliasing
|
||||
DEFINES += -DCHAN_BITS=32 -DDEFAULT_SOFTWARE_DEPTH_BITS=31
|
||||
|
||||
# Library names
|
||||
OSMESA_LIB = OSMesa32
|
||||
OSMESA_LIB_NAME = libOSMesa32.so
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu
|
||||
DRIVER_DIRS = osmesa
|
||||
PROGRAM_DIRS =
|
||||
|
||||
|
||||
# Dependencies
|
||||
OSMESA_LIB_DEPS = -lm -lpthread
|
||||
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
|
||||
APP_LIB_DEPS = -lm -lpthread
|
||||
APP_LIB_DEPS = -l$(OSMESA_LIB)
|
||||
|
||||
|
@@ -24,8 +24,7 @@ PCIACCESS_LIB = `pkg-config --libs pciaccess`
|
||||
|
||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||
-D_BSD_SOURCE -D_GNU_SOURCE -DHAVE_POSIX_MEMALIGN \
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DHAVE_ALIAS
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DDRM_USE_MALLOC -DIN_DRI_DRIVER
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
|
22
configs/linux-tcc
Normal file
22
configs/linux-tcc
Normal file
@@ -0,0 +1,22 @@
|
||||
# Configuration for debugging on Linux
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-tcc
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
TCC_DIR=/home/progs/tcc-0.9.20
|
||||
|
||||
CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DUSE_TCC -I$(TCC_DIR)
|
||||
|
||||
CXXFLAGS = -g -ansi -pedantic -Wall -Wundef -fPIC -ffast-math -D_POSIX_SOURCE -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG -DMESA_DEBUG
|
||||
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L$(TCC_DIR) -ltcc -ldl
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXt -L/usr/X11R6/lib -lX11
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
1087
configure.ac
1087
configure.ac
File diff suppressed because it is too large
Load Diff
42
debian/changelog
vendored
42
debian/changelog
vendored
@@ -1,34 +1,26 @@
|
||||
mesa (7.1-1) experimental; urgency=low
|
||||
mesa (7.0.3-7) unstable; urgency=low
|
||||
|
||||
* Add parallel build support.
|
||||
* New upstream development release
|
||||
+ libGLU now only exports its public interface (closes: #319388)
|
||||
* Some more parallel build updates.
|
||||
* Cherry-pick patch from upstream:
|
||||
Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
|
||||
(closes: #484180).
|
||||
* Also build the x86-specific dri drivers on kfreebsd (closes: #492894).
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Wed, 27 Aug 2008 19:52:24 +0200
|
||||
-- Julien Cristau <jcristau@debian.org> Sun, 14 Dec 2008 07:34:58 +0530
|
||||
|
||||
mesa (7.1~rc3-1) experimental; urgency=low
|
||||
mesa (7.0.3-6) unstable; urgency=high
|
||||
|
||||
[ Julien Cristau ]
|
||||
* New upstream release candidate (updated to git commit 4fab47b1).
|
||||
* Build against libdrm >= 2.3.1.
|
||||
* 04_osmesa_version.diff: fix libOSMesa versioning, to revert accidental
|
||||
SONAME bump.
|
||||
* Update debian/copyright to the SGI Free Software License B, version 2.0.
|
||||
It now mirrors the free X11 license used by X.Org (closes: #368560).
|
||||
http://www.sgi.com/company_info/newsroom/press_releases/2008/september/opengl.html
|
||||
|
||||
[ Timo Aaltonen ]
|
||||
* Refresh patches, and drop obsolete 00_create-libdir.patch and
|
||||
01_fix-makefile.patch.
|
||||
* Build-depend on x11proto-dri2-dev.
|
||||
* Drop mesa-swx11-source.
|
||||
* Add dri_interface.h to mesa-common-dev.
|
||||
* Add gl.pc to libgl1-mesa-dev
|
||||
* rules: Replace the old build system with the new autotools-based
|
||||
system.
|
||||
* Run autoreconf before building the various flavours..
|
||||
* Add automake & autoconf to build-deps.
|
||||
* Use --enable-glx-tls for dri.
|
||||
-- Julien Cristau <jcristau@debian.org> Sat, 20 Sep 2008 16:30:44 +0200
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sun, 13 Jul 2008 19:41:42 +0200
|
||||
mesa (7.0.3-5) unstable; urgency=low
|
||||
|
||||
* Disable the i915tex driver, it doesn't build against libdrm 2.3.1.
|
||||
* Pull from mesa_7_0_branch (27425708).
|
||||
|
||||
-- Julien Cristau <jcristau@debian.org> Sat, 12 Jul 2008 18:56:19 +0200
|
||||
|
||||
mesa (7.0.3-4) unstable; urgency=low
|
||||
|
||||
|
17
debian/control
vendored
17
debian/control
vendored
@@ -4,11 +4,7 @@ Priority: optional
|
||||
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
|
||||
Uploaders: Thierry Reding <thierry@gilfi.de>, Julien Cristau <jcristau@debian.org>, David Nusinow <dnusinow@debian.org>, Brice Goglin <bgoglin@debian.org>
|
||||
Standards-Version: 3.7.3
|
||||
Build-Depends: debhelper (>= 5), quilt (>= 0.40), pkg-config,
|
||||
libdrm-dev (>= 2.3.1) [!hurd-i386], libx11-dev, xutils-dev,
|
||||
x11proto-gl-dev (>= 1.4.8), x11proto-dri2-dev, libxxf86vm-dev,
|
||||
libexpat1-dev, lesstif2-dev, dpkg-dev (>= 1.13.19), libxfixes-dev,
|
||||
libxdamage-dev, libxext-dev, autoconf, automake
|
||||
Build-Depends: debhelper (>= 5), quilt (>= 0.40), pkg-config, libdrm-dev (>= 2.2.0) [!hurd-i386], libx11-dev, xutils-dev, x11proto-gl-dev (>= 1.4.8), libxxf86vm-dev, libexpat1-dev, lesstif2-dev, dpkg-dev (>= 1.13.19), libxfixes-dev, libxdamage-dev, libxext-dev
|
||||
Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/mesa
|
||||
Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/mesa.git
|
||||
Homepage: http://mesa3d.sourceforge.net/
|
||||
@@ -339,6 +335,17 @@ Description: A free implementation of the OpenGL API -- development files
|
||||
The headers and static libraries for compiling programs that use this
|
||||
library are included.
|
||||
|
||||
Package: mesa-swx11-source
|
||||
Section: libdevel
|
||||
Architecture: all
|
||||
Description: Mesa software rasteriser source -- development files
|
||||
This package contains the source to the Mesa software rasteriser, which
|
||||
implements all of Mesa's GL support in software. It powers the X11 and
|
||||
X server backends (assuming unaccelerated indirect). This package is
|
||||
provided mainly for modular X servers which support GL, and need the
|
||||
software rasteriser source to build the GLcore module for unaccelerated
|
||||
indirect rendering.
|
||||
|
||||
Package: mesa-utils
|
||||
Section: x11
|
||||
Priority: optional
|
||||
|
297
debian/copyright
vendored
297
debian/copyright
vendored
@@ -65,283 +65,32 @@ License:
|
||||
Some files, as listed below, are made available under the SGI Free B
|
||||
license. This license is as follows:
|
||||
|
||||
SGI FREE SOFTWARE LICENSE B (Version 1.1 [02/22/2000])
|
||||
SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
|
||||
|
||||
1. Definitions.
|
||||
|
||||
1.1. "Additional Notice Provisions" means such additional provisions as
|
||||
appear in the Notice in Original Code under the heading "Additional
|
||||
Notice Provisions."
|
||||
|
||||
1.2. "Covered Code" means the Original Code or Modifications, or any
|
||||
combination thereof.
|
||||
|
||||
1.3. "Hardware" means any physical device that accepts input, processes
|
||||
input, stores the results of processing, and/or provides output.
|
||||
|
||||
1.4. "Larger Work" means a work that combines Covered Code or portions
|
||||
thereof with code not governed by the terms of this License.
|
||||
|
||||
1.5. "Licensable" means having the right to grant, to the maximum extent
|
||||
possible, whether at the time of the initial grant or subsequently
|
||||
acquired, any and all of the rights conveyed herein.
|
||||
|
||||
1.6. "License" means this document.
|
||||
|
||||
1.7. "Licensed Patents" means patent claims Licensable by SGI that are
|
||||
infringed by the use or sale of Original Code or any Modifications
|
||||
provided by SGI, or any combination thereof.
|
||||
|
||||
1.8. "Modifications" means any addition to or deletion from the
|
||||
substance or structure of the Original Code or any previous
|
||||
Modifications. When Covered Code is released as a series of files,
|
||||
a Modification is:
|
||||
|
||||
A. Any addition to the contents of a file containing Original Code
|
||||
and/or addition to or deletion from the contents of a file
|
||||
containing previous Modifications.
|
||||
|
||||
B. Any new file that contains any part of the Original Code or
|
||||
previous Modifications.
|
||||
|
||||
1.9. "Notice" means any notice in Original Code or Covered Code, as
|
||||
required by and in compliance with this License.
|
||||
|
||||
1.10. "Original Code" means source code of computer software code that
|
||||
is described in the source code Notice required by Exhibit A as
|
||||
Original Code, and updates and error corrections specifically
|
||||
thereto.
|
||||
|
||||
1.11. "Recipient" means an individual or a legal entity exercising
|
||||
rights under, and complying with all of the terms of, this License
|
||||
or a future version of this License issued under Section 8. For
|
||||
legal entities, "Recipient" includes any entity that controls, is
|
||||
controlled by, or is under common control with Recipient. For
|
||||
purposes of this definition, "control" of an entity means (a) the
|
||||
power, direct or indirect, to direct or manage such entity, or (b)
|
||||
ownership of fifty percent (50%) or more of the outstanding shares
|
||||
or beneficial ownership of such entity.
|
||||
|
||||
1.12. "Recipient Patents" means patent claims Licensable by a Recipient
|
||||
that are infringed by the use or sale of Original Code or any
|
||||
Modifications provided by SGI, or any combination thereof.
|
||||
|
||||
1.13. "SGI" means Silicon Graphics, Inc.
|
||||
|
||||
1.14. "SGI Patents" means patent claims Licensable by SGI other than the
|
||||
Licensed Patents.
|
||||
|
||||
2. License Grant and Restrictions.
|
||||
|
||||
2.1. SGI License Grant. Subject to the terms of this License and any
|
||||
third party intellectual property claims, for the duration of
|
||||
intellectual property protections inherent in the Original Code,
|
||||
SGI hereby grants Recipient a worldwide, royalty-free,
|
||||
non-exclusive license, to do the following: (i) under copyrights
|
||||
Licensable by SGI, to reproduce, distribute, create derivative
|
||||
works from, and, to the extent applicable, display and perform the
|
||||
Original Code and/or any Modifications provided by SGI alone and/or
|
||||
as part of a Larger Work; and (ii) under any Licensable Patents, to
|
||||
make, have made, use, sell, offer for sale, import and/or otherwise
|
||||
transfer the Original Code and/or any Modifications provided by
|
||||
SGI. Recipient accepts the terms and conditions of this License by
|
||||
undertaking any of the aforementioned actions. The patent license
|
||||
shall apply to the Covered Code if, at the time any related
|
||||
Modification is added, such addition of the Modification causes
|
||||
such combination to be covered by the Licensed Patents. The patent
|
||||
license in Section 2.1(ii) shall not apply to any other
|
||||
combinations that include the Modification. No patent license is
|
||||
provided under SGI Patents for infringements of SGI Patents by
|
||||
Modifications not provided by SGI or combinations of Original Code
|
||||
and Modifications not provided by SGI.
|
||||
|
||||
2.2. Recipient License Grant. Subject to the terms of this License and
|
||||
any third party intellectual property claims, Recipient hereby
|
||||
grants SGI and any other Recipients a worldwide, royalty-free,
|
||||
non-exclusive license, under any Recipient Patents, to make, have
|
||||
made, use, sell, offer for sale, import and/or otherwise transfer
|
||||
the Original Code and/or any Modifications provided by SGI.
|
||||
|
||||
2.3. No License For Hardware Implementations. The licenses granted in
|
||||
Section 2.1 and 2.2 are not applicable to implementation in
|
||||
Hardware of the algorithms embodied in the Original Code or any
|
||||
Modifications provided by SGI .
|
||||
|
||||
3. Redistributions.
|
||||
|
||||
3.1. Retention of Notice/Copy of License. The Notice set forth in
|
||||
Exhibit A, below, must be conspicuously retained or included in any
|
||||
and all redistributions of Covered Code. For distributions of the
|
||||
Covered Code in source code form, the Notice must appear in every
|
||||
file that can include a text comments field; in executable form,
|
||||
the Notice and a copy of this License must appear in related
|
||||
documentation or collateral where the Recipient’s rights relating
|
||||
to Covered Code are described. Any Additional Notice Provisions
|
||||
which actually appears in the Original Code must also be retained
|
||||
or included in any and all redistributions of Covered Code.
|
||||
|
||||
3.2. Alternative License. Provided that Recipient is in compliance with
|
||||
the terms of this License, Recipient may, so long as without
|
||||
derogation of any of SGI’s rights in and to the Original Code,
|
||||
distribute the source code and/or executable version(s) of Covered
|
||||
Code under (1) this License; (2) a license identical to this
|
||||
License but for only such changes as are necessary in order to
|
||||
clarify Recipient’s role as licensor of Modifications; and/or (3) a
|
||||
license of Recipient’s choosing, containing terms different from
|
||||
this License, provided that the license terms include this Section
|
||||
3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be
|
||||
modified or superseded by any other terms of such license. If
|
||||
Recipient elects to use any license other than this License,
|
||||
Recipient must make it absolutely clear that any of its terms which
|
||||
differ from this License are offered by Recipient alone, and not by
|
||||
SGI. It is emphasized that this License is a limited license, and,
|
||||
regardless of the license form employed by Recipient in accordance
|
||||
with this Section 3.2, Recipient may relicense only such rights, in
|
||||
Original Code and Modifications by SGI, as it has actually been
|
||||
granted by SGI in this License.
|
||||
|
||||
3.3. Indemnity. Recipient hereby agrees to indemnify SGI for any
|
||||
liability incurred by SGI as a result of any such alternative
|
||||
license terms Recipient offers.
|
||||
|
||||
4. Termination. This License and the rights granted hereunder will
|
||||
terminate automatically if Recipient breaches any term herein and
|
||||
fails to cure such breach within 30 days thereof. Any sublicense to
|
||||
the Covered Code that is properly granted shall survive any
|
||||
termination of this License, absent termination by the terms of such
|
||||
sublicense. Provisions that, by their nature, must remain in effect
|
||||
beyond the termination of this License, shall survive.
|
||||
|
||||
5. No Trademark Or Other Rights. This License does not grant any rights
|
||||
to: (i) any software apart from the Covered Code, nor shall any
|
||||
other rights or licenses not expressly granted hereunder arise by
|
||||
implication, estoppel or otherwise with respect to the Covered Code;
|
||||
(ii) any trade name, trademark or service mark whatsoever, including
|
||||
without limitation any related right for purposes of endorsement or
|
||||
promotion of products derived from the Covered Code, without prior
|
||||
written permission of SGI; or (iii) any title to or ownership of the
|
||||
Original Code, which shall at all times remains with SGI. All rights
|
||||
in the Original Code not expressly granted under this License are
|
||||
reserved.
|
||||
|
||||
6. Compliance with Laws; Non-Infringement. There are various worldwide
|
||||
laws, regulations, and executive orders applicable to dispositions
|
||||
of Covered Code, including without limitation export, re-export, and
|
||||
import control laws, regulations, and executive orders, of the U.S.
|
||||
government and other countries, and Recipient is reminded it is
|
||||
obliged to obey such laws, regulations, and executive orders.
|
||||
Recipient may not distribute Covered Code that (i) in any way
|
||||
infringes (directly or contributorily) any intellectual property
|
||||
rights of any kind of any other person or entity or (ii) breaches
|
||||
any representation or warranty, express, implied or statutory, to
|
||||
which, under any applicable law, it might be deemed to have been
|
||||
subject.
|
||||
|
||||
7. Claims of Infringement. If Recipient learns of any third party claim
|
||||
that any disposition of Covered Code and/or functionality wholly or
|
||||
partially infringes the third party's intellectual property rights,
|
||||
Recipient will promptly notify SGI of such claim.
|
||||
|
||||
8. Versions of the License. SGI may publish revised and/or new versions
|
||||
of the License from time to time, each with a distinguishing version
|
||||
number. Once Covered Code has been published under a particular
|
||||
version of the License, Recipient may, for the duration of the
|
||||
license, continue to use it under the terms of that version, or
|
||||
choose to use such Covered Code under the terms of any subsequent
|
||||
version published by SGI. Subject to the provisions of Sections 3
|
||||
and 4 of this License, only SGI may modify the terms applicable to
|
||||
Covered Code created under this License.
|
||||
|
||||
9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL
|
||||
EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED,
|
||||
INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS
|
||||
OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY
|
||||
AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE
|
||||
IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING,
|
||||
REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL
|
||||
PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED
|
||||
HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER.
|
||||
|
||||
10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY,
|
||||
WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT
|
||||
LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
|
||||
CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
|
||||
LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF
|
||||
DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||
RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||
THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
|
||||
|
||||
11. Indemnity. Recipient shall be solely responsible for damages
|
||||
arising, directly or indirectly, out of its utilization of rights
|
||||
under this License. Recipient will defend, indemnify and hold
|
||||
harmless Silicon Graphics, Inc. from and against any loss,
|
||||
liability, damages, costs or expenses (including the payment of
|
||||
reasonable attorneys fees) arising out of Recipient's use,
|
||||
modification, reproduction and distribution of the Covered Code or
|
||||
out of any representation or warranty made by Recipient.
|
||||
|
||||
12. U.S. Government End Users. The Covered Code is a "commercial item"
|
||||
consisting of "commercial computer software" as such terms are
|
||||
defined in title 48 of the Code of Federal Regulations and all U.S.
|
||||
Government End Users acquire only the rights set forth in this
|
||||
License and are subject to the terms of this License.
|
||||
|
||||
13. Miscellaneous. This License represents the complete agreement
|
||||
concerning the its subject matter. If any provision of this License
|
||||
is held to be unenforceable, such provision shall be reformed so as
|
||||
to achieve as nearly as possible the same legal and economic effect
|
||||
as the original provision and the remainder of this License will
|
||||
remain in effect. This License shall be governed by and construed
|
||||
in accordance with the laws of the United States and the State of
|
||||
California as applied to agreements entered into and to be
|
||||
performed entirely within California between California residents.
|
||||
Any litigation relating to this License shall be subject to the
|
||||
exclusive jurisdiction of the Federal Courts of the Northern
|
||||
District of California (or, absent subject matter jurisdiction in
|
||||
such courts, the courts of the State of California), with venue
|
||||
lying exclusively in Santa Clara County, California, with the
|
||||
losing party responsible for costs, including without limitation,
|
||||
court costs and reasonable attorneys fees and expenses. The
|
||||
application of the United Nations Convention on Contracts for the
|
||||
International Sale of Goods is expressly excluded. Any law or
|
||||
regulation that provides that the language of a contract shall be
|
||||
construed against the drafter shall not apply to this License.
|
||||
|
||||
Exhibit A
|
||||
|
||||
License Applicability. Except to the extent portions of this file are
|
||||
made subject to an alternative license as permitted in the SGI Free
|
||||
Software License B, Version 1.1 (the "License"), the contents of this
|
||||
file are subject only to the provisions of the License. You may not use
|
||||
this file except in compliance with the License. You may obtain a copy
|
||||
of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
|
||||
Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
|
||||
|
||||
http://oss.sgi.com/projects/FreeB
|
||||
|
||||
Note that, as provided in the License, the Software is distributed on an
|
||||
"AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
|
||||
DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
|
||||
CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
|
||||
PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
|
||||
Original Code. The Original Code is: [name of software, version number,
|
||||
and release date], developed by Silicon Graphics, Inc. The Original Code
|
||||
is Copyright (c) [dates of first publication, as appearing in the Notice
|
||||
in the Original Code] Silicon Graphics, Inc. Copyright in any portions
|
||||
created by third parties is as indicated elsewhere herein. All Rights
|
||||
Copyright (C) [dates of first publication] Silicon Graphics, Inc. All Rights
|
||||
Reserved.
|
||||
|
||||
Additional Notice Provisions: [such additional provisions, if any, as
|
||||
appear in the Notice in the Original Code under the heading "Additional
|
||||
Notice Provisions"]
|
||||
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 the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, 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 including the dates of first publication and either
|
||||
this permission notice or a reference to http://oss.sgi.com/projects/FreeB/
|
||||
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
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC. 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.
|
||||
Except as contained in this notice, the name of Silicon Graphics, Inc. shall
|
||||
not be used in advertising or otherwise to promote the sale, use or other
|
||||
dealings in this Software without prior written authorization from Silicon
|
||||
Graphics, Inc.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
|
1
debian/libgl1-mesa-dev.install
vendored
1
debian/libgl1-mesa-dev.install
vendored
@@ -1,2 +1 @@
|
||||
usr/lib/libGL.so
|
||||
usr/lib/pkgconfig/gl.pc
|
||||
|
1
debian/mesa-common-dev.install
vendored
1
debian/mesa-common-dev.install
vendored
@@ -2,4 +2,3 @@ usr/include/GL/gl.h
|
||||
usr/include/GL/glext.h
|
||||
usr/include/GL/gl_mangle.h
|
||||
usr/include/GL/glx*.h
|
||||
usr/include/GL/internal/dri_interface.h
|
||||
|
1
debian/mesa-swx11-source.install
vendored
Normal file
1
debian/mesa-swx11-source.install
vendored
Normal file
@@ -0,0 +1 @@
|
||||
usr/share/mesa-source/*
|
17
debian/patches/00_create-libdir.patch
vendored
Normal file
17
debian/patches/00_create-libdir.patch
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
Patch that allows the Mesa makefile to create a LIB_DIR that is more than one
|
||||
level below TOP.
|
||||
|
||||
This patch by Thierry Reding.
|
||||
Not submitted to Mesa.
|
||||
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -29,7 +29,7 @@
|
||||
done
|
||||
|
||||
$(TOP)/$(LIB_DIR):
|
||||
- -mkdir $(TOP)/$(LIB_DIR)
|
||||
+ mkdir -p $(TOP)/$(LIB_DIR)
|
||||
|
||||
|
||||
clean:
|
18
debian/patches/01_fix-makefile.patch
vendored
Normal file
18
debian/patches/01_fix-makefile.patch
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
Do not build OSMesa for a standalone configuration, since Debian only ships
|
||||
OSMesa in a separate package.
|
||||
|
||||
This patch by Thierry Reding.
|
||||
|
||||
Index: mesa/src/mesa/Makefile
|
||||
===================================================================
|
||||
--- mesa.orig/src/mesa/Makefile 2007-04-25 01:44:31.000000000 +0200
|
||||
+++ mesa/src/mesa/Makefile 2007-04-25 01:44:58.000000000 +0200
|
||||
@@ -105,7 +105,7 @@
|
||||
$(OSMESA_DRIVER_OBJECTS)
|
||||
|
||||
|
||||
-stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
|
||||
+stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
|
||||
|
||||
osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
|
||||
|
@@ -4,15 +4,15 @@ This patch by David Nusinow.
|
||||
|
||||
Index: mesa/src/mesa/main/imports.h
|
||||
===================================================================
|
||||
--- mesa.orig/src/mesa/main/imports.h 2008-07-01 15:26:57.000000000 +0300
|
||||
+++ mesa/src/mesa/main/imports.h 2008-07-01 15:45:49.000000000 +0300
|
||||
--- mesa.orig/src/mesa/main/imports.h 2007-04-25 01:44:31.000000000 +0200
|
||||
+++ mesa/src/mesa/main/imports.h 2007-04-25 01:45:04.000000000 +0200
|
||||
@@ -158,8 +158,9 @@
|
||||
*** USE_IEEE: Determine if we're using IEEE floating point
|
||||
***/
|
||||
#if defined(__i386__) || defined(__386__) || defined(__sparc__) || \
|
||||
- defined(__s390x__) || defined(__powerpc__) || \
|
||||
+ defined(__s390__) || defined(__s390x__) || defined(__powerpc__) || \
|
||||
defined(__x86_64__) || \
|
||||
defined(__amd64__) || defined(__x86_64__) || \
|
||||
+ defined(__m68k__) || \
|
||||
defined(ia64) || defined(__ia64__) || \
|
||||
defined(__hppa__) || defined(hpux) || \
|
||||
|
@@ -10,20 +10,18 @@ Also remove references to GLU library since it is not required
|
||||
and we don't actually build it at this point.
|
||||
|
||||
|
||||
Index: mesa/progs/xdemos/Makefile
|
||||
===================================================================
|
||||
--- mesa.orig/progs/xdemos/Makefile 2008-07-01 15:26:56.000000000 +0300
|
||||
+++ mesa/progs/xdemos/Makefile 2008-07-01 15:48:47.000000000 +0300
|
||||
--- mesa.orig/progs/xdemos/Makefile
|
||||
+++ mesa/progs/xdemos/Makefile
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
-PROGS = \
|
||||
+PROGS ?= \
|
||||
corender \
|
||||
glthreads \
|
||||
glxdemo \
|
||||
@@ -60,6 +60,11 @@
|
||||
glxgears \
|
||||
@@ -55,6 +55,11 @@
|
||||
extra: $(EXTRA_PROGS)
|
||||
|
||||
|
||||
@@ -35,10 +33,8 @@ Index: mesa/progs/xdemos/Makefile
|
||||
clean:
|
||||
-rm -f $(PROGS) $(EXTRA_PROGS)
|
||||
-rm -f *.o *~
|
||||
Index: mesa/progs/Makefile
|
||||
===================================================================
|
||||
--- mesa.orig/progs/Makefile 2008-07-01 15:26:56.000000000 +0300
|
||||
+++ mesa/progs/Makefile 2008-07-01 15:48:07.000000000 +0300
|
||||
--- mesa.orig/progs/Makefile
|
||||
+++ mesa/progs/Makefile
|
||||
@@ -21,8 +21,12 @@
|
||||
fi \
|
||||
done
|
||||
@@ -52,4 +48,4 @@ Index: mesa/progs/Makefile
|
||||
+ done
|
||||
|
||||
clean:
|
||||
-@for dir in $(SUBDIRS) tests ; do \
|
||||
@for dir in $(SUBDIRS) tests ; do \
|
||||
|
22
debian/patches/04_osmesa_version.diff
vendored
22
debian/patches/04_osmesa_version.diff
vendored
@@ -1,22 +0,0 @@
|
||||
Index: mesa/src/mesa/drivers/osmesa/Makefile
|
||||
===================================================================
|
||||
--- mesa.orig/src/mesa/drivers/osmesa/Makefile
|
||||
+++ mesa/src/mesa/drivers/osmesa/Makefile
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
$(TOP)/lib/$(OSMESA_LIB_NAME): $(OBJECTS)
|
||||
$(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
|
||||
+ -major 6 -minor 5 -patch 3 \
|
||||
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
$(OSMESA_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# with all the other Mesa sources (compiled with -DCHAN_BITS=16/32
|
||||
osmesa16: $(OBJECTS) $(CORE_MESA)
|
||||
$(MKLIB) -o $(OSMESA_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
|
||||
- -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
|
||||
+ -major 6 -minor 5 -patch 3 \
|
||||
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
|
||||
$(OSMESA_LIB_DEPS) $(OBJECTS) $(CORE_MESA)
|
||||
|
3
debian/patches/series
vendored
3
debian/patches/series
vendored
@@ -1,3 +1,4 @@
|
||||
00_create-libdir.patch
|
||||
01_fix-makefile.patch
|
||||
02_use-ieee-fp-on-s390-and-m68k.patch
|
||||
03_optional-progs-and-install.patch
|
||||
04_osmesa_version.diff
|
||||
|
221
debian/rules
vendored
221
debian/rules
vendored
@@ -5,207 +5,99 @@
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
CFLAGS = -Wall -g
|
||||
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
|
||||
MAKEFLAGS += -j$(NUMJOBS)
|
||||
endif
|
||||
|
||||
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
|
||||
DEB_BUILD_DIR ?= $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
|
||||
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
|
||||
confflags += --build=$(DEB_HOST_GNU_TYPE)
|
||||
else
|
||||
confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
|
||||
endif
|
||||
|
||||
export DEB_BUILD_ARCH
|
||||
|
||||
# choose which configurations to build
|
||||
include debian/scripts/choose-configs
|
||||
|
||||
# build the following configurations by default
|
||||
CONFIGS = $(SWX11_GLU_CONFIGS) \
|
||||
dri \
|
||||
osmesa \
|
||||
osmesa-static \
|
||||
osmesa16 \
|
||||
osmesa16-static \
|
||||
osmesa32 \
|
||||
osmesa32-static
|
||||
|
||||
STAMP_DIR = debian/stamp
|
||||
STAMP = $(STAMP_DIR)/$(DEB_BUILD_GNU_TYPE)
|
||||
BUILD_STAMPS = $(addprefix $(STAMP)-build-, $(CONFIGS))
|
||||
INSTALL_TARGETS = $(addprefix install-, $(CONFIGS))
|
||||
|
||||
QUILT_STAMPFN = $(STAMP_DIR)/patch
|
||||
include /usr/share/quilt/quilt.make
|
||||
|
||||
confflags-common = \
|
||||
--disable-glu \
|
||||
--disable-glut \
|
||||
--disable-glw \
|
||||
CFLAGS="$(CFLAGS)"
|
||||
|
||||
DRI_DRIVERS = swrast
|
||||
|
||||
# hurd doesn't do direct rendering
|
||||
ifeq ($(DEB_HOST_ARCH_OS), hurd)
|
||||
DIRECT_RENDERING = --disable-driglx-direct
|
||||
CFLAGS = -Wall -g
|
||||
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||
CFLAGS += -O0
|
||||
else
|
||||
DIRECT_RENDERING = --enable-driglx-direct
|
||||
DRI_DRIVERS += mach64 mga r128 r200 r300 radeon s3v savage tdfx trident
|
||||
CFLAGS += -O2
|
||||
endif
|
||||
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
||||
INSTALL_PROGRAM += -s
|
||||
endif
|
||||
|
||||
ifeq ($(DEB_HOST_GNU_CPU), i486)
|
||||
DRI_DRIVERS += i810 i915 i965 sis unichrome
|
||||
else ifeq ($(DEB_HOST_GNU_CPU), x86_64)
|
||||
DRI_DRIVERS += i915 i965 sis unichrome
|
||||
else ifeq ($(DEB_HOST_ARCH), sparc)
|
||||
DRI_DRIVERS += ffb
|
||||
endif
|
||||
DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
|
||||
DEB_BUILD_DIR ?= $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
|
||||
|
||||
confflags-dri = \
|
||||
--with-driver=dri \
|
||||
--with-dri-drivers="$(DRI_DRIVERS)" \
|
||||
--with-demos=xdemos \
|
||||
--libdir=/usr/lib/glx \
|
||||
--with-dri-driverdir=/usr/lib/dri \
|
||||
--enable-glx-tls \
|
||||
$(DIRECT_RENDERING) \
|
||||
$(confflags-common)
|
||||
export DEB_BUILD_ARCH
|
||||
export DEB_HOST_ARCH_CPU
|
||||
|
||||
confflags-osmesa = \
|
||||
--with-driver=osmesa \
|
||||
--with-demos= \
|
||||
$(confflags-common)
|
||||
# choose which configurations to build
|
||||
SWX11_GLU_CONFIGS =
|
||||
DRI_CONFIGS =
|
||||
|
||||
confflags-osmesa-static = \
|
||||
--with-driver=osmesa \
|
||||
--enable-static \
|
||||
--with-demos= \
|
||||
$(confflags-common)
|
||||
include debian/scripts/choose-configs
|
||||
|
||||
confflags-osmesa16 = \
|
||||
--with-driver=osmesa \
|
||||
--with-osmesa-bits=16 \
|
||||
--with-demos= \
|
||||
$(confflags-common)
|
||||
# build the following configurations by default
|
||||
CONFIGS = $(SWX11_GLU_CONFIGS) \
|
||||
$(DRI_CONFIGS) \
|
||||
debian-osmesa \
|
||||
debian-osmesa-static \
|
||||
debian-osmesa16 \
|
||||
debian-osmesa16-static \
|
||||
debian-osmesa32 \
|
||||
debian-osmesa32-static
|
||||
|
||||
confflags-osmesa16-static = \
|
||||
--with-driver=osmesa \
|
||||
--with-osmesa-bits=16 \
|
||||
--enable-static \
|
||||
--with-demos= \
|
||||
$(confflags-common)
|
||||
|
||||
confflags-osmesa32 = \
|
||||
--with-driver=osmesa \
|
||||
--with-osmesa-bits=32 \
|
||||
--with-demos= \
|
||||
$(confflags-common)
|
||||
|
||||
confflags-osmesa32-static = \
|
||||
--with-driver=osmesa \
|
||||
--with-osmesa-bits=32 \
|
||||
--enable-static \
|
||||
--with-demos= \
|
||||
$(confflags-common)
|
||||
|
||||
confflags-swx11+glu = \
|
||||
--with-driver=xlib \
|
||||
--disable-gl-osmesa \
|
||||
--with-demos= \
|
||||
--disable-glut \
|
||||
CFLAGS="$(CFLAGS)"
|
||||
|
||||
confflags-swx11+glu-static = \
|
||||
--with-driver=xlib \
|
||||
--disable-gl-osmesa \
|
||||
--enable-static \
|
||||
--with-demos= \
|
||||
--disable-glut \
|
||||
CFLAGS="$(CFLAGS)"
|
||||
|
||||
confflags-swx11+glu-i386-i686 = \
|
||||
--with-driver=xlib \
|
||||
--disable-gl-osmesa \
|
||||
--with-demos= \
|
||||
--disable-glut \
|
||||
--libdir=/usr/lib/i686/cmov \
|
||||
CFLAGS="$(CFLAGS) -march=i686"
|
||||
|
||||
configure: $(QUILT_STAMPFN) configure.ac
|
||||
autoreconf -vfi
|
||||
STAMP = $(STAMP_DIR)/$(DEB_BUILD_GNU_TYPE)
|
||||
BUILD_STAMPS = $(addprefix $(STAMP)-build-, $(CONFIGS))
|
||||
ARCH_INSTALL_STAMPS = $(addprefix $(STAMP)-install-, $(CONFIGS))
|
||||
INDEP_INSTALL_STAMPS = $(STAMP_DIR)/install-source
|
||||
|
||||
# list the configurations that will built
|
||||
configs:
|
||||
@echo Building the following configurations: $(CONFIGS)
|
||||
|
||||
$(STAMP_DIR)/stamp:
|
||||
$(STAMP_DIR):
|
||||
dh_testdir
|
||||
mkdir -p $(STAMP_DIR)
|
||||
>$@
|
||||
mkdir -p $@
|
||||
|
||||
$(QUILT_STAMPFN): $(STAMP_DIR)
|
||||
|
||||
$(QUILT_STAMPFN): $(STAMP_DIR)/stamp
|
||||
|
||||
build: $(BUILD_STAMPS)
|
||||
|
||||
$(STAMP)-build-%: configure
|
||||
$(STAMP)-build-%: patch
|
||||
dh_testdir
|
||||
|
||||
mkdir -p $(DEB_BUILD_DIR)/$*
|
||||
find $(CURDIR)/* -maxdepth 0 -not -path '$(DEB_BUILD_DIR)*' | \
|
||||
xargs cp -rlf -t $(DEB_BUILD_DIR)/$*
|
||||
cd $(DEB_BUILD_DIR)/$* && \
|
||||
../../configure --prefix=/usr --mandir=\$${prefix}/share/man \
|
||||
--infodir=\$${prefix}/share/info --sysconfdir=/etc \
|
||||
--localstatedir=/var $(confflags) $(confflags-$*)
|
||||
ln -sf $* $(DEB_BUILD_DIR)/$*/configs/current
|
||||
cd $(DEB_BUILD_DIR)/$* && $(MAKE)
|
||||
|
||||
touch $@
|
||||
|
||||
install:
|
||||
# Add here commands to install the package into debian/tmp
|
||||
pre-install:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
$(MAKE) -f debian/rules $(INSTALL_TARGETS)
|
||||
rm -rf $(INSTALL_STAMPS)
|
||||
|
||||
install-%: $(STAMP)-build-%
|
||||
cd $(DEB_BUILD_DIR)/$* && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
|
||||
install: pre-install $(ARCH_INSTALL_STAMPS)
|
||||
|
||||
$(STAMP)-install-%: $(STAMP)-build-%
|
||||
# Add here commands to install the package into debian/tmp
|
||||
cd $(DEB_BUILD_DIR)/$* && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
|
||||
touch $@
|
||||
|
||||
$(STAMP_DIR)/install-source: pre-install
|
||||
# install Mesa source for mesa-swx11-source package
|
||||
chmod a+x debian/scripts/install-source.sh
|
||||
debian/scripts/install-source.sh
|
||||
touch $@
|
||||
|
||||
clean: unpatch
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
rm -rf .pc
|
||||
|
||||
rm -f config.cache config.log config.status
|
||||
rm -f */config.cache */config.log */config.status
|
||||
rm -f conftest* */conftest*
|
||||
rm -rf autom4te.cache */autom4te.cache
|
||||
rm -rf obj-*
|
||||
rm -rf configure config.guess config.sub config.h.in
|
||||
rm -rf $$(find -name Makefile.in)
|
||||
rm -rf aclocal.m4 missing depcomp install-sh ltmain.sh
|
||||
rm -rf $(STAMP_DIR)
|
||||
|
||||
dh_clean
|
||||
dh_clean --exclude ./Makefile.orig
|
||||
rm -rf $(DEB_BUILD_DIR) $(STAMP_DIR)
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: install
|
||||
binary-indep: build install $(INDEP_INSTALL_STAMPS)
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs -i
|
||||
@@ -222,13 +114,13 @@ binary-indep: install
|
||||
dh_builddeb -i
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch: install
|
||||
binary-arch: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs -s
|
||||
dh_installdocs -s
|
||||
dh_installexamples -s
|
||||
dh_install -s --sourcedir=debian/tmp --list-missing
|
||||
dh_install --sourcedir=debian/tmp --list-missing -s
|
||||
dh_installman -s
|
||||
dh_link -s
|
||||
dh_strip -plibgl1-mesa-swx11 --dbg-package=libgl1-mesa-swx11-dbg
|
||||
@@ -245,4 +137,5 @@ binary-arch: install
|
||||
dh_builddeb -s
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: configs build clean binary-indep binary-arch binary install
|
||||
.PHONY: configs build clean binary-indep binary-arch binary install configure
|
||||
|
||||
|
24
debian/scripts/choose-configs
vendored
24
debian/scripts/choose-configs
vendored
@@ -8,20 +8,18 @@
|
||||
|
||||
# choose an architecture-specific build of swx11 and GLU if a matching
|
||||
# configuration exists
|
||||
#ifneq ($(wildcard configs/debian-swx11+glu-$(DEB_BUILD_ARCH)),)
|
||||
# SWX11_GLU_CONFIGS := debian-swx11+glu-$(DEB_BUILD_ARCH)
|
||||
#else
|
||||
# SWX11_GLU_CONFIGS := debian-swx11+glu-any
|
||||
#endif
|
||||
ifneq ($(wildcard configs/debian-swx11+glu-$(DEB_BUILD_ARCH)),)
|
||||
SWX11_GLU_CONFIGS := debian-swx11+glu-$(DEB_BUILD_ARCH)
|
||||
else
|
||||
SWX11_GLU_CONFIGS := debian-swx11+glu-any
|
||||
endif
|
||||
|
||||
# same for static builds
|
||||
#ifneq ($(wildcard configs/debian-swx11+glu-static-$(DEB_BUILD_ARCH)),)
|
||||
# SWX11_GLU_CONFIGS += debian-swx11+glu-static-$(DEB_BUILD_ARCH)
|
||||
#else
|
||||
# SWX11_GLU_CONFIGS += debian-swx11+glu-static-any
|
||||
#endif
|
||||
|
||||
SWX11_GLU_CONFIGS := swx11+glu swx11+glu-static
|
||||
ifneq ($(wildcard configs/debian-swx11+glu-static-$(DEB_BUILD_ARCH)),)
|
||||
SWX11_GLU_CONFIGS += debian-swx11+glu-static-$(DEB_BUILD_ARCH)
|
||||
else
|
||||
SWX11_GLU_CONFIGS += debian-swx11+glu-static-any
|
||||
endif
|
||||
|
||||
# and for the GLX/DRI-enabled libGL
|
||||
ifneq ($(wildcard configs/debian-indirect-$(DEB_BUILD_ARCH)),)
|
||||
@@ -38,7 +36,7 @@ endif
|
||||
## CPU-optimized configurations ##############################################
|
||||
|
||||
ifeq ($(DEB_BUILD_ARCH), i386)
|
||||
SWX11_GLU_CONFIGS += swx11+glu-i386-i686
|
||||
SWX11_GLU_CONFIGS += debian-swx11+glu-i386-i686
|
||||
# DRI_CONFIGS += debian-dri-i386-i686
|
||||
endif
|
||||
|
||||
|
@@ -1,805 +0,0 @@
|
||||
Name
|
||||
|
||||
MESA_texture_array
|
||||
|
||||
Name Strings
|
||||
|
||||
GL_MESA_texture_array
|
||||
|
||||
Contact
|
||||
|
||||
Ian Romanick, IBM (idr 'at' us.ibm.com)
|
||||
|
||||
IP Status
|
||||
|
||||
No known IP issues.
|
||||
|
||||
Status
|
||||
|
||||
Shipping in Mesa 7.1
|
||||
|
||||
Version
|
||||
|
||||
$Date: 2007/05/16$ $Revision: 0.4$
|
||||
|
||||
Number
|
||||
|
||||
TBD
|
||||
|
||||
Dependencies
|
||||
|
||||
OpenGL 1.2 or GL_EXT_texture3D is required.
|
||||
|
||||
Support for ARB_fragment_program is assumed, but not required.
|
||||
|
||||
Support for ARB_fragment_program_shadow is assumed, but not required.
|
||||
|
||||
Support for EXT_framebuffer_object is assumed, but not required.
|
||||
|
||||
Written based on the wording of the OpenGL 2.0 specification and
|
||||
ARB_fragment_program_shadow but not dependent on them.
|
||||
|
||||
Overview
|
||||
|
||||
There are a number of circumstances where an application may wish to
|
||||
blend two textures out of a larger set of textures. Moreover, in some
|
||||
cases the selected textures may vary on a per-fragment basis within
|
||||
a polygon. Several examples include:
|
||||
|
||||
1. High dynamic range textures. The application stores several
|
||||
different "exposures" of an image as different textures. On a
|
||||
per-fragment basis, the application selects which exposures are
|
||||
used.
|
||||
|
||||
2. A terrain engine where the altitude of a point determines the
|
||||
texture applied to it. If the transition is from beach sand to
|
||||
grass to rocks to snow, the application will store each texture
|
||||
in a different texture map, and dynamically select which two
|
||||
textures to blend at run-time.
|
||||
|
||||
3. Storing short video clips in textures. Each depth slice is a
|
||||
single frame of video.
|
||||
|
||||
Several solutions to this problem have been proposed, but they either
|
||||
involve using a separate texture unit for each texture map or using 3D
|
||||
textures without mipmaps. Both of these options have major drawbacks.
|
||||
|
||||
This extension provides a third alternative that eliminates the major
|
||||
drawbacks of both previous methods. A new texture target,
|
||||
TEXTURE_2D_ARRAY, is added that functions identically to TEXTURE_3D in
|
||||
all aspects except the sizes of the non-base level images. In
|
||||
traditional 3D texturing, the size of the N+1 LOD is half the size
|
||||
of the N LOD in all three dimensions. For the TEXTURE_2D_ARRAY target,
|
||||
the height and width of the N+1 LOD is halved, but the depth is the
|
||||
same for all levels of detail. The texture then becomes an array of
|
||||
2D textures. The per-fragment texel is selected by the R texture
|
||||
coordinate.
|
||||
|
||||
References:
|
||||
|
||||
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011557
|
||||
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=000516
|
||||
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=011903
|
||||
http://www.delphi3d.net/articles/viewarticle.php?article=terraintex.htm
|
||||
|
||||
New Procedures and Functions
|
||||
|
||||
All functions come directly from EXT_texture_array.
|
||||
|
||||
void FramebufferTextureLayerEXT(enum target, enum attachment,
|
||||
uint texture, int level, int layer);
|
||||
|
||||
New Tokens
|
||||
|
||||
All token names and values come directly from EXT_texture_array.
|
||||
|
||||
Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by
|
||||
the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and
|
||||
GetDoublev, and by the <target> parameter of TexImage3D, GetTexImage,
|
||||
GetTexLevelParameteriv, GetTexLevelParameterfv, GetTexParameteriv, and
|
||||
GetTexParameterfv:
|
||||
|
||||
TEXTURE_1D_ARRAY_EXT 0x8C18
|
||||
TEXTURE_2D_ARRAY_EXT 0x8C1A
|
||||
|
||||
Accepted by the <target> parameter of TexImage2D, TexSubImage2D,
|
||||
CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D,
|
||||
CompressedTexSubImage2D, GetTexLevelParameteriv, and
|
||||
GetTexLevelParameterfv:
|
||||
|
||||
TEXTURE_1D_ARRAY_EXT
|
||||
PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
|
||||
|
||||
Accepted by the <target> parameter of TexImage3D, TexSubImage3D,
|
||||
CopyTexSubImage3D, CompressedTexImage3D, CompressedTexSubImage3D,
|
||||
GetTexLevelParameteriv, and GetTexLevelParameterfv:
|
||||
|
||||
TEXTURE_2D_ARRAY_EXT
|
||||
PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
|
||||
|
||||
Accepted by the <pname> parameter of GetBooleanv, GetIntegerv,
|
||||
GetFloatv, and GetDoublev
|
||||
|
||||
TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
|
||||
TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
|
||||
MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
|
||||
|
||||
Accepted by the <param> parameter of TexParameterf, TexParameteri,
|
||||
TexParameterfv, and TexParameteriv when the <pname> parameter is
|
||||
TEXTURE_COMPARE_MODE_ARB:
|
||||
|
||||
COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E
|
||||
|
||||
(Note: COMPARE_REF_DEPTH_TO_TEXTURE_EXT is simply an alias for the
|
||||
existing COMPARE_R_TO_TEXTURE token in OpenGL 2.0; the alternate name
|
||||
reflects the fact that the R coordinate is not always used.)
|
||||
|
||||
Accepted by the <internalformat> parameter of TexImage3D and
|
||||
CompressedTexImage3D, and by the <format> parameter of
|
||||
CompressedTexSubImage3D:
|
||||
|
||||
COMPRESSED_RGB_S3TC_DXT1_EXT
|
||||
COMPRESSED_RGBA_S3TC_DXT1_EXT
|
||||
COMPRESSED_RGBA_S3TC_DXT3_EXT
|
||||
COMPRESSED_RGBA_S3TC_DXT5_EXT
|
||||
|
||||
Accepted by the <pname> parameter of
|
||||
GetFramebufferAttachmentParameterivEXT:
|
||||
|
||||
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
|
||||
|
||||
(Note: FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER is simply an alias for the
|
||||
FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT token provided in
|
||||
EXT_framebuffer_object. This extension generalizes the notion of
|
||||
"<zoffset>" to include layers of an array texture.)
|
||||
|
||||
Additions to Chapter 2 of the OpenGL 2.0 Specification (OpenGL Operation)
|
||||
|
||||
None
|
||||
|
||||
Additions to Chapter 3 of the OpenGL 2.0 Specification (Rasterization)
|
||||
|
||||
-- Section 3.8.1 "Texture Image Specification"
|
||||
|
||||
Change the first paragraph (page 150) to say (spec changes identical to
|
||||
EXT_texture_array):
|
||||
|
||||
"The command
|
||||
|
||||
void TexImage3D(enum target, int level, int internalformat,
|
||||
sizei width, sizei height, sizei depth, int border,
|
||||
enum format, enum type, void *data);
|
||||
|
||||
is used to specify a three-dimensional texture image. target must be one
|
||||
one of TEXTURE_3D for a three-dimensional texture or
|
||||
TEXTURE_2D_ARRAY_EXT for an two-dimensional array texture.
|
||||
Additionally, target may be either PROXY_TEXTURE_3D for a
|
||||
three-dimensional proxy texture, or PROXY_TEXTURE_2D_ARRAY_EXT for a
|
||||
two-dimensional proxy array texture."
|
||||
|
||||
Change the fourth paragraph on page 151 to say (spec changes identical
|
||||
to EXT_texture_array):
|
||||
|
||||
"Textures with a base internal format of DEPTH_COMPONENT are supported
|
||||
by texture image specification commands only if target is TEXTURE_1D,
|
||||
TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_2D_ARRAY_EXT,
|
||||
PROXY_TEXTURE_1D, PROXY_TEXTURE_2D, PROXY_TEXTURE_1D_ARRAY_EXT, or
|
||||
PROXY_TEXTURE_2D_ARRAY_EXT. Using this format in conjunction with any
|
||||
other target will result in an INVALID_OPERATION error."
|
||||
|
||||
|
||||
Change the fourth paragraph on page 156 to say (spec changes identical
|
||||
to EXT_texture_array):
|
||||
|
||||
"The command
|
||||
|
||||
void TexImage2D(enum target, int level,
|
||||
int internalformat, sizei width, sizei height,
|
||||
int border, enum format, enum type, void *data);
|
||||
|
||||
is used to specify a two-dimensional texture image. target must be one
|
||||
of TEXTURE_2D for a two-dimensional texture, TEXTURE_1D_ARRAY_EXT for a
|
||||
one-dimensional array texture, or one of TEXTURE_CUBE_MAP_POSITIVE_X,
|
||||
TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE_MAP_POSITIVE_Y,
|
||||
TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or
|
||||
TEXTURE_CUBE_MAP_NEGATIVE_Z for a cube map texture. Additionally,
|
||||
target may be either PROXY_TEXTURE_2D for a two-dimensional proxy
|
||||
texture, PROXY_TEXTURE_1D_ARRAY_EXT for a one-dimensional proxy array
|
||||
texture, or PROXY TEXTURE_CUBE_MAP for a cube map proxy texture in the
|
||||
special case discussed in section 3.8.11. The other parameters match
|
||||
the corresponding parameters of TexImage3D.
|
||||
|
||||
For the purposes of decoding the texture image, TexImage2D is
|
||||
equivalent to calling TexImage3D with corresponding arguments and depth
|
||||
of 1, except that
|
||||
|
||||
* The border depth, d_b, is zero, and the depth of the image is
|
||||
always 1 regardless of the value of border.
|
||||
|
||||
* The border height, h_b, is zero if <target> is
|
||||
TEXTURE_1D_ARRAY_EXT, and <border> otherwise.
|
||||
|
||||
* Convolution will be performed on the image (possibly changing its
|
||||
width and height) if SEPARABLE 2D or CONVOLUTION 2D is enabled.
|
||||
|
||||
* UNPACK SKIP IMAGES is ignored."
|
||||
|
||||
-- Section 3.8.2 "Alternate Texture Image Specification Commands"
|
||||
|
||||
Change the second paragraph (page 159) (spec changes identical
|
||||
to EXT_texture_array):
|
||||
|
||||
"The command
|
||||
|
||||
void CopyTexImage2D(enum target, int level,
|
||||
enum internalformat, int x, int y, sizei width,
|
||||
sizei height, int border);
|
||||
|
||||
defines a two-dimensional texture image in exactly the manner of
|
||||
TexImage2D, except that the image data are taken from the framebuffer
|
||||
rather than from client memory. Currently, target must be one of
|
||||
TEXTURE_2D, TEXTURE_1D_ARRAY_EXT, TEXTURE_CUBE_MAP_POSITIVE_X,
|
||||
TEXTURE_CUBE_MAP_NEGATIVE_X, TEXTURE_CUBE MAP_POSITIVE_Y,
|
||||
TEXTURE_CUBE_MAP_NEGATIVE_Y, TEXTURE_CUBE_MAP_POSITIVE_Z, or
|
||||
TEXTURE_CUBE_MAP_NEGATIVE_Z.
|
||||
|
||||
|
||||
Change the last paragraph on page 160 to say (spec changes identical
|
||||
to EXT_texture_array):
|
||||
|
||||
"Currently the target arguments of TexSubImage1D and CopyTexSubImage1D
|
||||
must be TEXTURE_1D, the target arguments of TexSubImage2D and
|
||||
CopyTexSubImage2D must be one of TEXTURE_2D, TEXTURE_1D_ARRAY_EXT,
|
||||
TEXTURE_CUBE_MAP_POSITIVE_X, TEXTURE_CUBE_MAP_NEGATIVE_X,
|
||||
TEXTURE_CUBE_MAP_POSITIVE_Y, TEXTURE_CUBE_MAP_NEGATIVE_Y,
|
||||
TEXTURE_CUBE_MAP_POSITIVE_Z, or TEXTURE_CUBE_MAP_NEGATIVE_Z, and the
|
||||
target arguments of TexSubImage3D and CopyTexSubImage3D must be
|
||||
TEXTURE_3D or TEXTURE_2D_ARRAY_EXT. ..."
|
||||
|
||||
|
||||
-- Section 3.8.4 "Texture Parameters"
|
||||
|
||||
Change the first paragraph (page 166) to say:
|
||||
|
||||
"Various parameters control how the texel array is treated when
|
||||
specified or changed, and when applied to a fragment. Each parameter is
|
||||
set by calling
|
||||
|
||||
void TexParameter{if}(enum target, enum pname, T param);
|
||||
void TexParameter{if}v(enum target, enum pname, T params);
|
||||
|
||||
target is the target, either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
|
||||
TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT."
|
||||
|
||||
|
||||
-- Section 3.8.8 "Texture Minification" in the section "Scale Factor and Level of Detail"
|
||||
|
||||
Change the first paragraph (page 172) to say:
|
||||
|
||||
"Let s(x,y) be the function that associates an s texture coordinate
|
||||
with each set of window coordinates (x,y) that lie within a primitive;
|
||||
define t(x,y) and r(x,y) analogously. Let u(x,y) = w_t * s(x,y),
|
||||
v(x,y) = h_t * t(x,y), and w(x,y) = d_t * r(x,y), where w_t, h_t,
|
||||
and d_t are as defined by equations 3.15, 3.16, and 3.17 with
|
||||
w_s, h_s, and d_s equal to the width, height, and depth of the
|
||||
image array whose level is level_base. For a one-dimensional
|
||||
texture or a one-dimensional array texture, define v(x,y) = 0 and
|
||||
w(x,y) = 0; for a two-dimensional texture or a two-dimensional array
|
||||
texture, define w(x,y) = 0..."
|
||||
|
||||
-- Section 3.8.8 "Texture Minification" in the section "Mipmapping"
|
||||
|
||||
Change the third paragraph (page 174) to say:
|
||||
|
||||
"For a two-dimensional texture, two-dimensional array texture, or
|
||||
cube map texture,"
|
||||
|
||||
Change the fourth paragraph (page 174) to say:
|
||||
|
||||
"And for a one-dimensional texture or a one-dimensional array texture,"
|
||||
|
||||
After the first paragraph (page 175) add:
|
||||
|
||||
"For one-dimensional array textures, h_b and d_b are treated as 1,
|
||||
regardless of the actual values, when performing mipmap calculations.
|
||||
For two-dimensional array textures, d_b is always treated as one,
|
||||
regardless of the actual value, when performing mipmap calculations."
|
||||
|
||||
-- Section 3.8.8 "Automatic Mipmap Generation" in the section "Mipmapping"
|
||||
|
||||
Change the third paragraph (page 176) to say (spec changes identical
|
||||
to EXT_texture_array):
|
||||
|
||||
"The contents of the derived arrays are computed by repeated, filtered
|
||||
reduction of the level_base array. For one- and two-dimensional array
|
||||
textures, each layer is filtered independently. ..."
|
||||
|
||||
-- Section 3.8.8 "Manual Mipmap Generation" in the section "Mipmapping"
|
||||
|
||||
Change first paragraph to say (spec changes identical to
|
||||
EXT_texture_array):
|
||||
|
||||
"Mipmaps can be generated manually with the command
|
||||
|
||||
void GenerateMipmapEXT(enum target);
|
||||
|
||||
where <target> is one of TEXTURE_1D, TEXTURE_2D, TEXTURE_CUBE_MAP,
|
||||
TEXTURE_3D, TEXTURE_1D_ARRAY, or TEXTURE_2D_ARRAY. Mipmap generation
|
||||
affects the texture image attached to <target>. ..."
|
||||
|
||||
-- Section 3.8.10 "Texture Completeness"
|
||||
|
||||
Change the second paragaph (page 177) to say (spec changes identical
|
||||
to EXT_texture_array):
|
||||
|
||||
"For one-, two-, or three-dimensional textures and one- or
|
||||
two-dimensional array textures, a texture is complete if the following
|
||||
conditions all hold true:"
|
||||
|
||||
-- Section 3.8.11 "Texture State and Proxy State"
|
||||
|
||||
Change the second and third paragraphs (page 179) to say (spec changes
|
||||
identical to EXT_texture_array):
|
||||
|
||||
"In addition to image arrays for one-, two-, and three-dimensional
|
||||
textures, one- and two-dimensional array textures, and the six image
|
||||
arrays for the cube map texture, partially instantiated image arrays
|
||||
are maintained for one-, two-, and three-dimensional textures and one-
|
||||
and two-dimensional array textures. Additionally, a single proxy image
|
||||
array is maintained for the cube map texture. Each proxy image array
|
||||
includes width, height, depth, border width, and internal format state
|
||||
values, as well as state for the red, green, blue, alpha, luminance,
|
||||
and intensity component resolutions. Proxy image arrays do not include
|
||||
image data, nor do they include texture properties. When TexImage3D is
|
||||
executed with target specified as PROXY_TEXTURE_3D, the
|
||||
three-dimensional proxy state values of the specified level-of-detail
|
||||
are recomputed and updated. If the image array would not be supported
|
||||
by TexImage3D called with target set to TEXTURE 3D, no error is
|
||||
generated, but the proxy width, height, depth, border width, and
|
||||
component resolutions are set to zero. If the image array would be
|
||||
supported by such a call to TexImage3D, the proxy state values are set
|
||||
exactly as though the actual image array were being specified. No pixel
|
||||
data are transferred or processed in either case.
|
||||
|
||||
Proxy arrays for one- and two-dimensional textures and one- and
|
||||
two-dimensional array textures are operated on in the same way when
|
||||
TexImage1D is executed with target specified as PROXY_TEXTURE_1D,
|
||||
TexImage2D is executed with target specified as PROXY_TEXTURE_2D or
|
||||
PROXY_TEXTURE_1D_ARRAY_EXT, or TexImage3D is executed with target
|
||||
specified as PROXY_TETXURE_2D_ARRAY_EXT."
|
||||
|
||||
-- Section 3.8.12 "Texture Objects"
|
||||
|
||||
Change section (page 180) to say (spec changes identical to
|
||||
EXT_texture_array):
|
||||
|
||||
"In addition to the default textures TEXTURE_1D, TEXTURE_2D,
|
||||
TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_EXT,
|
||||
named one-, two-, and three-dimensional, cube map, and one- and
|
||||
two-dimensional array texture objects can be created and operated upon.
|
||||
The name space for texture objects is the unsigned integers, with zero
|
||||
reserved by the GL.
|
||||
|
||||
A texture object is created by binding an unused name to TEXTURE_1D,
|
||||
TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or
|
||||
TEXTURE_2D_ARRAY_EXT. The binding is effected by calling
|
||||
|
||||
void BindTexture(enum target, uint texture);
|
||||
|
||||
with <target> set to the desired texture target and <texture> set to
|
||||
the unused name. The resulting texture object is a new state vector,
|
||||
comprising all the state values listed in section 3.8.11, set to the
|
||||
same initial values. If the new texture object is bound to TEXTURE_1D,
|
||||
TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or
|
||||
TEXTURE_2D_ARRAY_EXT, it is and remains a one-, two-,
|
||||
three-dimensional, cube map, one- or two-dimensional array texture
|
||||
respectively until it is deleted.
|
||||
|
||||
BindTexture may also be used to bind an existing texture object to
|
||||
either TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
|
||||
TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT. The error
|
||||
INVALID_OPERATION is generated if an attempt is made to bind a texture
|
||||
object of different dimensionality than the specified target. If the
|
||||
bind is successful no change is made to the state of the bound texture
|
||||
object, and any previous binding to target is broken.
|
||||
|
||||
While a texture object is bound, GL operations on the target to which
|
||||
it is bound affect the bound object, and queries of the target to which
|
||||
it is bound return state from the bound object. If texture mapping of
|
||||
the dimensionality of the target to which a texture object is bound is
|
||||
enabled, the state of the bound texture object directs the texturing
|
||||
operation.
|
||||
|
||||
In the initial state, TEXTURE_1D, TEXTURE_2D, TEXTURE_3D,
|
||||
TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and TEXTURE_2D_ARRAY_EXT have
|
||||
one-, two-, three-dimensional, cube map, and one- and two-dimensional
|
||||
array texture state vectors respectively associated with them. In order
|
||||
that access to these initial textures not be lost, they are treated as
|
||||
texture objects all of whose names are 0. The initial one-, two-,
|
||||
three-dimensional, cube map, one- and two-dimensional array textures
|
||||
are therefore operated upon, queried, and applied as TEXTURE_1D,
|
||||
TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, and
|
||||
TEXTURE_2D_ARRAY_EXT respectively while 0 is bound to the corresponding
|
||||
targets.
|
||||
|
||||
Change second paragraph on page 181 to say (spec changes identical to
|
||||
EXT_texture_array):
|
||||
|
||||
"... If a texture that is currently bound to one of the targets
|
||||
TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP,
|
||||
TEXTURE_1D_ARRAY_EXT, or TEXTURE_2D_ARRAY_EXT is deleted, it is as
|
||||
though BindTexture had been executed with the same target and texture
|
||||
zero. ..."
|
||||
|
||||
Change second paragraph on page 182 to say (spec changes identical to
|
||||
EXT_texture_array):
|
||||
|
||||
"The texture object name space, including the initial one-, two-, and
|
||||
three dimensional, cube map, and one- and two-dimensional array texture
|
||||
objects, is shared among all texture units. ..."
|
||||
|
||||
|
||||
-- Section 3.8.14 "Depth Texture Comparison Modes" in "Texture Comparison Modes"
|
||||
|
||||
Change second through fourth paragraphs (page 188) to say:
|
||||
|
||||
"Let D_t be the depth texture value, in the range [0, 1]. For
|
||||
texture lookups from one- and two-dimesional, rectangle, and
|
||||
one-dimensional array targets, let R be the interpolated <r>
|
||||
texture coordinate, clamped to the range [0, 1]. For texture lookups
|
||||
from two-dimesional array texture targets, let R be the interpolated
|
||||
<q> texture coordinate, clamped to the range [0, 1]. Then the
|
||||
effective texture value L_t, I_t, or A_t is computed as follows:
|
||||
|
||||
If the value of TEXTURE_COMPARE_MODE is NONE, then
|
||||
|
||||
r = Dt
|
||||
|
||||
If the value of TEXTURE_COMPARE_MODE is
|
||||
COMPARE_REF_DEPTH_TO_TEXTURE_EXT), then r depends on the texture
|
||||
comparison function as shown in table 3.27."
|
||||
|
||||
-- Section 3.8.15 "Texture Application"
|
||||
|
||||
Change the first paragraph (page 189) to say:
|
||||
|
||||
"Texturing is enabled or disabled using the generic Enable and Disable
|
||||
commands, respectively, with the symbolic constants TEXTURE_1D,
|
||||
TEXTURE_2D, TEXTURE_3D, TEXTURE_CUBE_MAP, TEXTURE_1D_ARRAY_EXT, or
|
||||
TEXTURE_2D_ARRAY_EXT to enable one-, two-, three-dimensional, cube
|
||||
map, one-dimensional array, or two-dimensional array texture,
|
||||
respectively. If both two- and one-dimensional textures are enabled,
|
||||
the two-dimensional texture is used. If the three-dimensional and
|
||||
either of the two- or one-dimensional textures is enabled, the
|
||||
three-dimensional texture is used. If the cube map texture and any of
|
||||
the three-, two-, or one-dimensional textures is enabled, then cube map
|
||||
texturing is used. If one-dimensional array texture is enabled and any
|
||||
of cube map, three-, two-, or one-dimensional textures is enabled,
|
||||
one-dimensional array texturing is used. If two-dimensional array
|
||||
texture is enabled and any of cube map, three-, two-, one-dimensional
|
||||
textures or one-dimensional array texture is enabled, two-dimensional
|
||||
array texturing is used..."
|
||||
|
||||
-- Section 3.11.2 of ARB_fragment_program (Fragment Program Grammar and Restrictions):
|
||||
|
||||
(mostly add to existing grammar rules)
|
||||
|
||||
<optionName> ::= "MESA_texture_array"
|
||||
|
||||
<texTarget> ::= "1D"
|
||||
| "2D"
|
||||
| "3D"
|
||||
| "CUBE"
|
||||
| "RECT"
|
||||
| <arrayTarget> (if program option is present)
|
||||
| <shadowTarget> (if program option is present)
|
||||
|
||||
<arrayTarget> ::= "ARRAY1D"
|
||||
| "ARRAY2D"
|
||||
|
||||
<shadowTarget> ::= "SHADOW1D"
|
||||
| "SHADOW2D"
|
||||
| "SHADOWRECT"
|
||||
| <shadowArrayTarget> (if program option is present)
|
||||
|
||||
<shadowArrayTarget> ::= "SHADOWARRAY1D"
|
||||
| "SHADOWARRAY2D"
|
||||
|
||||
|
||||
-- Add Section 3.11.4.5.4 "Texture Stack Option"
|
||||
|
||||
"If a fragment program specifies the "MESA_texture_array" program
|
||||
option, the <texTarget> rule is modified to add the texture targets
|
||||
ARRAY1D and ARRAY2D (See Section 3.11.2)."
|
||||
|
||||
-- Section 3.11.6 "Fragment Program Texture Instruction Set"
|
||||
|
||||
(replace 1st and 2nd paragraphs with the following paragraphs)
|
||||
|
||||
"The first three texture instructions described below specify the
|
||||
mapping of 4-tuple input vectors to 4-tuple output vectors.
|
||||
The sampling of the texture works as described in section 3.8,
|
||||
except that texture environments and texture functions are not
|
||||
applicable, and the texture enables hierarchy is replaced by explicit
|
||||
references to the desired texture target (i.e., 1D, 2D, 3D, cube map,
|
||||
rectangle, ARRAY1D, ARRAY2D). These texture instructions specify
|
||||
how the 4-tuple is mapped into the coordinates used for sampling. The
|
||||
following function is used to describe the texture sampling in the
|
||||
descriptions below:
|
||||
|
||||
vec4 TextureSample(vec4 coord, float lodBias, int texImageUnit,
|
||||
enum texTarget);
|
||||
|
||||
Note that not all four components of the texture coordinates <coord>
|
||||
are used by all texture targets. Component usage for each <texTarget>
|
||||
is defined in table X.
|
||||
|
||||
coordinates used
|
||||
texTarget Texture Type s t r layer shadow
|
||||
---------------- --------------------- ----- ----- ------
|
||||
1D TEXTURE_1D x - - - -
|
||||
2D TEXTURE_2D x y - - -
|
||||
3D TEXTURE_3D x y z - -
|
||||
CUBE TEXTURE_CUBE_MAP x y z - -
|
||||
RECT TEXTURE_RECTANGLE_ARB x y - - -
|
||||
ARRAY1D TEXTURE_1D_ARRAY_EXT x - - y -
|
||||
ARRAY2D TEXTURE_2D_ARRAY_EXT x y - z -
|
||||
SHADOW1D TEXTURE_1D x - - - z
|
||||
SHADOW2D TEXTURE_2D x y - - z
|
||||
SHADOWRECT TEXTURE_RECTANGLE_ARB x y - - z
|
||||
SHADOWARRAY1D TEXTURE_1D_ARRAY_EXT x - - y z
|
||||
SHADOWARRAY2D TEXTURE_2D_ARRAY_EXT x y - z w
|
||||
|
||||
Table X: Texture types accessed for each of the <texTarget>, and
|
||||
coordinate mappings. The "coordinates used" column indicate the
|
||||
input values used for each coordinate of the texture lookup, the
|
||||
layer selector for array textures, and the reference value for
|
||||
texture comparisons."
|
||||
|
||||
-- Section 3.11.6.2 "TXP: Project coordinate and map to color"
|
||||
|
||||
Add to the end of the section:
|
||||
|
||||
"A program will fail to load if the TXP instruction is used in
|
||||
conjunction with the SHADOWARRAY2D target."
|
||||
|
||||
Additions to Chapter 4 of the OpenGL 2.0 Specification (Per-Fragment Operations)
|
||||
|
||||
-- Section 4.4.2.3 "Attaching Texture Images to a Framebuffer"
|
||||
|
||||
Add to the end of the section (spec changes identical to
|
||||
EXT_texture_array):
|
||||
|
||||
"The command
|
||||
|
||||
void FramebufferTextureLayerEXT(enum target, enum attachment,
|
||||
uint texture, int level, int layer);
|
||||
|
||||
operates identically to FramebufferTexture3DEXT, except that it
|
||||
attaches a single layer of a three-dimensional texture or a one- or
|
||||
two-dimensional array texture. <layer> is an integer indicating the
|
||||
layer number, and is treated identically to the <zoffset> parameter in
|
||||
FramebufferTexture3DEXT. The error INVALID_VALUE is generated if
|
||||
<layer> is negative. The error INVALID_OPERATION is generated if
|
||||
<texture> is non-zero and is not the name of a three dimensional
|
||||
texture or one- or two-dimensional array texture. Unlike
|
||||
FramebufferTexture3D, no <textarget> parameter is accepted.
|
||||
|
||||
If <texture> is non-zero and the command does not result in an error,
|
||||
the framebuffer attachment state corresponding to <attachment> is
|
||||
updated as in the other FramebufferTexture commands, except that
|
||||
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT is set to <layer>."
|
||||
|
||||
-- Section 4.4.4.1 "Framebuffer Attachment Completeness"
|
||||
|
||||
Add to the end of the list of completeness rules (spec changes
|
||||
identical to EXT_texture_array):
|
||||
|
||||
"* If FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE and
|
||||
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT names a one- or
|
||||
two-dimensional array texture, then
|
||||
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT must be smaller than the
|
||||
number of layers in the texture."
|
||||
|
||||
Additions to Chapter 5 of the OpenGL 2.0 Specification (Special Functions)
|
||||
|
||||
-- Section 5.4 "Display Lists"
|
||||
|
||||
Change the first paragraphi on page 242 to say (spec changes
|
||||
identical to EXT_texture_array):
|
||||
|
||||
"TexImage3D, TexImage2D, TexImage1D, Histogram, and ColorTable are
|
||||
executed immediately when called with the corresponding proxy arguments
|
||||
PROXY_TEXTURE_3D or PROXY_TEXTURE_2D_ARRAY_EXT; PROXY_TEXTURE_2D,
|
||||
PROXY_TEXTURE_CUBE_MAP, or PROXY_TEXTURE_1D_ARRAY_EXT;
|
||||
PROXY_TEXTURE_1D; PROXY_HISTOGRAM; and PROXY_COLOR_TABLE,
|
||||
PROXY_POST_CONVOLUTION_COLOR_TABLE, or
|
||||
PROXY_POST_COLOR_MATRIX_COLOR_TABLE."
|
||||
|
||||
Additions to Chapter 6 of the OpenGL 2.0 Specification (State and State Requests)
|
||||
|
||||
-- Section 6.1.3 "Enumerated Queries"
|
||||
|
||||
Add after the line beginning "If the value of
|
||||
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT is TEXTURE" (spec changes
|
||||
identical to EXT_texture_array):
|
||||
|
||||
"If <pname> is FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT and the
|
||||
texture object named FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT is a
|
||||
three-dimensional texture or a one- or two-dimensional array texture,
|
||||
then <params> will contain the number of texture layer attached to the
|
||||
attachment point. Otherwise, <params> will contain the value zero."
|
||||
|
||||
-- Section 6.1.4 "Texture Queries"
|
||||
|
||||
Change the first three paragraphs (page 248) to say (spec changes
|
||||
identical to EXT_texture_array):
|
||||
|
||||
"The command
|
||||
|
||||
void GetTexImage(enum tex, int lod, enum format,
|
||||
enum type, void *img);
|
||||
|
||||
is used to obtain texture images. It is somewhat different from the
|
||||
other get commands; tex is a symbolic value indicating which texture
|
||||
(or texture face in the case of a cube map texture target name) is to
|
||||
be obtained. TEXTURE_1D, TEXTURE_2D, TEXTURE_3D, TEXTURE_1D_ARRAY_EXT,
|
||||
and TEXTURE_2D_ARRAY_EXT indicate a one-, two-, or three-dimensional
|
||||
texture, or one- or two-dimensional array texture, respectively.
|
||||
TEXTURE_CUBE_MAP_POSITIVE_X, ...
|
||||
|
||||
GetTexImage obtains... from the first image to the last for
|
||||
three-dimensional textures. One- and two-dimensional array textures
|
||||
are treated as two- and three-dimensional images, respectively, where
|
||||
the layers are treated as rows or images. These groups are then...
|
||||
|
||||
For three-dimensional and two-dimensional array textures, pixel storage
|
||||
operations are applied as if the image were two-dimensional, except
|
||||
that the additional pixel storage state values PACK_IMAGE_HEIGHT and
|
||||
PACK_SKIP_IMAGES are applied. ..."
|
||||
|
||||
Additions to Appendix A of the OpenGL 2.0 Specification (Invariance)
|
||||
|
||||
None
|
||||
|
||||
Additions to the AGL/GLX/WGL Specifications
|
||||
|
||||
None
|
||||
|
||||
GLX Protocol
|
||||
|
||||
None
|
||||
|
||||
Dependencies on ARB_fragment_program
|
||||
|
||||
If ARB_fragment_program is not supported, the changes to section 3.11
|
||||
should be ignored.
|
||||
|
||||
Dependencies on EXT_framebuffer_object
|
||||
|
||||
If EXT_framebuffer_object is not supported, the changes to section
|
||||
3.8.8 ("Manual Mipmap Generation"), 4.4.2.3, and 6.1.3 should be ignored.
|
||||
|
||||
Dependencies on EXT_texture_compression_s3tc and NV_texture_compression_vtc
|
||||
|
||||
(Identical dependency as EXT_texture_array.)
|
||||
|
||||
S3TC texture compression is supported for two-dimensional array textures.
|
||||
When <target> is TEXTURE_2D_ARRAY_EXT, each layer is stored independently
|
||||
as a compressed two-dimensional textures. When specifying or querying
|
||||
compressed images using one of the S3TC formats, the images are provided
|
||||
and/or returned as a series of two-dimensional textures stored
|
||||
consecutively in memory, with the layer closest to zero specified first.
|
||||
For array textures, images are not arranged in 4x4x4 or 4x4x2 blocks as in
|
||||
the three-dimensional compression format provided in the
|
||||
EXT_texture_compression_vtc extension. Pixel store parameters, including
|
||||
those specific to three-dimensional images, are ignored when compressed
|
||||
image data are provided or returned, as in the
|
||||
EXT_texture_compression_s3tc extension.
|
||||
|
||||
S3TC compression is not supported for one-dimensional texture targets in
|
||||
EXT_texture_compression_s3tc, and is not supported for one-dimensional
|
||||
array textures in this extension. If compressed one-dimensional arrays
|
||||
are needed, use a two-dimensional texture with a height of one.
|
||||
|
||||
This extension allows the use of the four S3TC internal format types in
|
||||
TexImage3D, CompressedTexImage3D, and CompressedTexSubImage3D calls.
|
||||
|
||||
Errors
|
||||
|
||||
None
|
||||
|
||||
New State
|
||||
|
||||
(add to table 6.15, p. 276)
|
||||
|
||||
Initial
|
||||
Get Value Type Get Command Value Description Sec. Attribute
|
||||
---------------------------- ----- ----------- ----- -------------------- ------ ---------
|
||||
TEXTURE_BINDING_1D_ARRAY_EXT 2*xZ+ GetIntegerv 0 texture object bound 3.8.12 texture
|
||||
to TEXTURE_1D_ARRAY
|
||||
TEXTURE_BINDING_2D_ARRAY_EXT 2*xZ+ GetIntegerv 0 texture object bound 3.8.12 texture
|
||||
to TEXTURE_2D_ARRAY
|
||||
|
||||
|
||||
New Implementation Dependent State
|
||||
|
||||
(add to Table 6.32, p. 293)
|
||||
|
||||
Minimum
|
||||
Get Value Type Get Command Value Description Sec. Attribute
|
||||
---------------------------- ---- ----------- ------- ------------------ ----- ---------
|
||||
MAX_TEXTURE_ARRAY_LAYERS_EXT Z+ GetIntegerv 64 maximum number of 3.8.1 -
|
||||
layers for texture
|
||||
arrays
|
||||
|
||||
Issues
|
||||
|
||||
(1) Is "texture stack" a good name for this functionality?
|
||||
|
||||
NO. The name is changed to "array texture" to match the
|
||||
nomenclature used by GL_EXT_texture_array.
|
||||
|
||||
(2) Should the R texture coordinate be treated as normalized or
|
||||
un-normalized? If it were un-normalized, floor(R) could be thought
|
||||
of as a direct index into the array texture. This may be more
|
||||
convenient for applications.
|
||||
|
||||
RESOLVED. All texture coordinates are normalized. The issue of
|
||||
un-normalized texture coordinates has been discussed in the ARB
|
||||
before and should be left for a layered extension.
|
||||
|
||||
RE-RESOLVED. The R coordinate is un-normalized. Accessing an array
|
||||
using [0, layers-1] coordinates is much more natural.
|
||||
|
||||
(3) How does LOD selection work for stacked textures?
|
||||
|
||||
RESOLVED. For 2D array textures the R coordinate is ignored, and
|
||||
the LOD selection equations for 2D textures are used. For 1D
|
||||
array textures the T coordinate is ignored, and the LOD selection
|
||||
equations for 1D textures are used. The expected usage is in a
|
||||
fragment program with an explicit LOD selection.
|
||||
|
||||
(4) What is the maximum size of a 2D array texture? Is it the same
|
||||
as for a 3D texture, or should a new query be added? How about for 1D
|
||||
array textures?
|
||||
|
||||
RESOLVED. A new query is added.
|
||||
|
||||
(5) How are array textures exposed in GLSL?
|
||||
|
||||
RESOLVED. Use GL_EXT_texture_array.
|
||||
|
||||
(6) Should a 1D array texture also be exposed?
|
||||
|
||||
RESOLVED. For orthogonality, yes.
|
||||
|
||||
(7) How are stacked textures attached to framebuffer objects?
|
||||
|
||||
RESOLVED. Layers of both one- and two-dimensional array textures
|
||||
are attached using FreambufferTextureLayerEXT. Once attached, the
|
||||
array texture layer behaves exactly as either a one- or
|
||||
two-dimensional texture.
|
||||
|
||||
(8) How is this extension related to GL_EXT_texture_array?
|
||||
|
||||
This extension adapats GL_MESAX_texture_stack to the notation,
|
||||
indexing, and FBO access of GL_EXT_texture_array. This extension
|
||||
replaces the GLSL support of GL_EXT_texture_array with
|
||||
GL_ARB_fragment_program support.
|
||||
|
||||
Assembly program support is also provided by GL_NV_gpu_program4.
|
||||
GL_NV_gpu_program4 also adds support for other features that are
|
||||
specific to Nvidia hardware, while this extension adds only support
|
||||
for array textures.
|
||||
|
||||
Much of text of this extension that has changed since
|
||||
GL_MESAX_texture_stack comes directly from either
|
||||
GL_EXT_texture_array or GL_NV_gpu_program4.
|
||||
|
||||
Revision History
|
||||
|
||||
||2005/11/15||0.1||idr||Initial draft MESAX version.||
|
||||
||2005/12/07||0.2||idr||Added framebuffer object interactions.||
|
||||
||2005/12/12||0.3||idr||Updated fragment program interactions.||
|
||||
||2007/05/16||0.4||idr||Converted to MESA_texture_array. Brought in line with EXT_texture_array and NV_gpu_program4.||
|
@@ -1,163 +1,163 @@
|
||||
File: docs/README.WIN32
|
||||
|
||||
Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
|
||||
|
||||
Quick Start
|
||||
----- -----
|
||||
|
||||
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
|
||||
directory. The libs and demos build separately, so if you do not care
|
||||
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
|
||||
more than one ZIP file, they all need to be unzipped into the same
|
||||
directory. Don't worry, you will not overwrite anything.
|
||||
|
||||
The Windows build system uses Microsoft Visual Studio. Project files
|
||||
for a specific version of Visual Studio are in their own directory in
|
||||
the top-level "windows" directory. For example, Visual Studio 8 files
|
||||
are in windows/VC8.
|
||||
|
||||
Support has been dropped for versions of Visual Studio prior to 8. The
|
||||
main reason is because Microsoft now provides a free compiler and
|
||||
developer environment. Visual Studio Express can be found at
|
||||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
|
||||
|
||||
You'll also need the Platform SDK. Instructions for obtaining and
|
||||
using the SDK with Visual Studio Express can be found at
|
||||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
|
||||
|
||||
If you are stuck using VC6 or VC7, you may start with these project
|
||||
files, but you may need to modify them to reflect changes in the
|
||||
Mesa source code tree. If you sucessfully update the project files,
|
||||
please submit them to the author of this document so that they may
|
||||
be included in the next distribution.
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
to build GLUT and some demo programs are in the progs directory.
|
||||
|
||||
Makefiles are no longer shipped or supported, but can be generated
|
||||
from the projects using Visual Studio.
|
||||
|
||||
|
||||
Windows Drivers
|
||||
------- -------
|
||||
|
||||
At this time, only the GDI driver is known to work. Most of the demos
|
||||
in progs/demos should work with this driver.
|
||||
|
||||
Source code also exists in the tree for other drivers in
|
||||
src/mesa/drivers/windows, but the status of this code is unknown.
|
||||
|
||||
The GDI driver operates basically by writing pixel spans into a DIB
|
||||
section and then blitting the DIB to the window. The driver was
|
||||
recently cleaned up and rewitten and so may have bugs or may be
|
||||
missing some functionality. The older versions of the CVS source may
|
||||
be useful in figuring out any problems, or report them to me.
|
||||
|
||||
To build Mesa with the GDI driver, build the mesa, gdi, and glu
|
||||
projects in the Visual Studio workspace found at
|
||||
|
||||
windows/VC8/mesa/mesa.sln
|
||||
|
||||
The osmesa DLL can also be built with the osmesa project.
|
||||
|
||||
The build system creates a lib top-level directory and copies
|
||||
resulting LIB and DLL files to this lib directory. The files are:
|
||||
|
||||
OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
|
||||
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
|
||||
|
||||
If the MesaDemos ZIP file was extracted, the DLL files are also copied
|
||||
to the demos directory. This facilitates running the demos as described
|
||||
below.
|
||||
|
||||
|
||||
GLUT and Demos
|
||||
---- --- -----
|
||||
|
||||
A Visual Studio workspace can be found at
|
||||
|
||||
windows/VC8/progs/progs.sln
|
||||
|
||||
It can be used to build GLUT and a few demos. The GLUT lib and DLL
|
||||
are copied to the top-level lib directory, along with the Mesa libs.
|
||||
|
||||
The demo build system expects to find the LIB files in the top level
|
||||
lib directory, so you must build the Mesa libs first. The demo
|
||||
executables are placed in the demos directory, because some of them
|
||||
rely on data files found there. Also, the Mesa lib DLL's were copied
|
||||
there by the Mesa lib build process. Therefore, you should be able to
|
||||
simply run the demo executables from the demo directory.
|
||||
|
||||
If you want to run the demos from the Visual Studio, you may have to
|
||||
change the startup directory and explicitly state where the executables are.
|
||||
|
||||
You may also build all the demo programs by using a makefile. Go to
|
||||
the progs/demos directory and make sure you have executed VCVARS32.BAT
|
||||
or whatever setup script is appropriate for your compiler. Then,
|
||||
|
||||
nmake -f Makefile.win
|
||||
|
||||
should build all the demos.
|
||||
|
||||
|
||||
Build System Notes
|
||||
----- ------ -----
|
||||
|
||||
VC6 (not actively supported)
|
||||
---
|
||||
|
||||
Visual Studio 6 does not recognize files with the .cc extension as C++
|
||||
language files, without a lot of unnatural tweaking. So, the VC6
|
||||
build process uses custom build steps to compile these files in the
|
||||
GLU library.
|
||||
|
||||
Two additional configurations are provided, Debug x86 and Release x86
|
||||
that activate the shader code compilation by defining SLANG_86. It is
|
||||
unknown if and how this works.
|
||||
|
||||
VC7 (not actively supported)
|
||||
---
|
||||
|
||||
The above-mentioned .cc problem does not exist in this version.
|
||||
|
||||
VC8
|
||||
---
|
||||
|
||||
No notes.
|
||||
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
After building, you can copy the above DLL files to a place in your
|
||||
PATH such as $SystemRoot/SYSTEM32. If you don't like putting things
|
||||
in a system directory, place them in the same directory as the
|
||||
executable(s). Be careful about accidentially overwriting files of
|
||||
the same name in the SYSTEM32 directory.
|
||||
|
||||
The DLL files are built so that the external entry points use the
|
||||
stdcall calling convention.
|
||||
|
||||
Static LIB files are not built. The LIB files that are built with are
|
||||
the linker import files associated with the DLL files.
|
||||
|
||||
The si-glu sources are used to build the GLU libs. This was done
|
||||
mainly to get the better tessellator code.
|
||||
|
||||
To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
|
||||
to the project settings. You will also need to edit src/mesa.def to
|
||||
change all the gl* symbols to mgl*. Because this is easy to do with a
|
||||
global replace operation in a text editor, no additional mangled
|
||||
version of mesa.def is maintained or shipped.
|
||||
|
||||
If you have a Windows-related build problem or question, it is
|
||||
probably better to direct it to me (kschultz@users.sourceforge.net),
|
||||
rather than directly to the other Mesa developers. I will help you as
|
||||
much as I can. I also monitor the Mesa mailing lists and will answer
|
||||
questions in this area there as well.
|
||||
|
||||
|
||||
Karl Schultz
|
||||
File: docs/README.WIN32
|
||||
|
||||
Last updated: Apr 25, 2007 - Karl Schultz - kschultz@users.sourceforge.net
|
||||
|
||||
Quick Start
|
||||
----- -----
|
||||
|
||||
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
|
||||
directory. The libs and demos build separately, so if you do not care
|
||||
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
|
||||
more than one ZIP file, they all need to be unzipped into the same
|
||||
directory. Don't worry, you will not overwrite anything.
|
||||
|
||||
The Windows build system uses Microsoft Visual Studio. Project files
|
||||
for a specific version of Visual Studio are in their own directory in
|
||||
the top-level "windows" directory. For example, Visual Studio 8 files
|
||||
are in windows/VC8.
|
||||
|
||||
Support has been dropped for versions of Visual Studio prior to 8. The
|
||||
main reason is because Microsoft now provides a free compiler and
|
||||
developer environment. Visual Studio Express can be found at
|
||||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/default.aspx
|
||||
|
||||
You'll also need the Platform SDK. Instructions for obtaining and
|
||||
using the SDK with Visual Studio Express can be found at
|
||||
|
||||
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
|
||||
|
||||
If you are stuck using VC6 or VC7, you may start with these project
|
||||
files, but you may need to modify them to reflect changes in the
|
||||
Mesa source code tree. If you sucessfully update the project files,
|
||||
please submit them to the author of this document so that they may
|
||||
be included in the next distribution.
|
||||
|
||||
The project files to build the core Mesa library, Windows Mesa
|
||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||
to build GLUT and some demo programs are in the progs directory.
|
||||
|
||||
Makefiles are no longer shipped or supported, but can be generated
|
||||
from the projects using Visual Studio.
|
||||
|
||||
|
||||
Windows Drivers
|
||||
------- -------
|
||||
|
||||
At this time, only the GDI driver is known to work. Most of the demos
|
||||
in progs/demos should work with this driver.
|
||||
|
||||
Source code also exists in the tree for other drivers in
|
||||
src/mesa/drivers/windows, but the status of this code is unknown.
|
||||
|
||||
The GDI driver operates basically by writing pixel spans into a DIB
|
||||
section and then blitting the DIB to the window. The driver was
|
||||
recently cleaned up and rewitten and so may have bugs or may be
|
||||
missing some functionality. The older versions of the CVS source may
|
||||
be useful in figuring out any problems, or report them to me.
|
||||
|
||||
To build Mesa with the GDI driver, build the mesa, gdi, and glu
|
||||
projects in the Visual Studio workspace found at
|
||||
|
||||
windows/VC8/mesa/mesa.sln
|
||||
|
||||
The osmesa DLL can also be built with the osmesa project.
|
||||
|
||||
The build system creates a lib top-level directory and copies
|
||||
resulting LIB and DLL files to this lib directory. The files are:
|
||||
|
||||
OPENGL32.LIB, GLU32.LIB, OSMESA32.LIB
|
||||
OPENGL32.DLL, GLU32.DLL, OSMESA32.DLL
|
||||
|
||||
If the MesaDemos ZIP file was extracted, the DLL files are also copied
|
||||
to the demos directory. This facilitates running the demos as described
|
||||
below.
|
||||
|
||||
|
||||
GLUT and Demos
|
||||
---- --- -----
|
||||
|
||||
A Visual Studio workspace can be found at
|
||||
|
||||
windows/VC8/progs/progs.sln
|
||||
|
||||
It can be used to build GLUT and a few demos. The GLUT lib and DLL
|
||||
are copied to the top-level lib directory, along with the Mesa libs.
|
||||
|
||||
The demo build system expects to find the LIB files in the top level
|
||||
lib directory, so you must build the Mesa libs first. The demo
|
||||
executables are placed in the demos directory, because some of them
|
||||
rely on data files found there. Also, the Mesa lib DLL's were copied
|
||||
there by the Mesa lib build process. Therefore, you should be able to
|
||||
simply run the demo executables from the demo directory.
|
||||
|
||||
If you want to run the demos from the Visual Studio, you may have to
|
||||
change the startup directory and explicitly state where the executables are.
|
||||
|
||||
You may also build all the demo programs by using a makefile. Go to
|
||||
the progs/demos directory and make sure you have executed VCVARS32.BAT
|
||||
or whatever setup script is appropriate for your compiler. Then,
|
||||
|
||||
nmake -f Makefile.win
|
||||
|
||||
should build all the demos.
|
||||
|
||||
|
||||
Build System Notes
|
||||
----- ------ -----
|
||||
|
||||
VC6 (not actively supported)
|
||||
---
|
||||
|
||||
Visual Studio 6 does not recognize files with the .cc extension as C++
|
||||
language files, without a lot of unnatural tweaking. So, the VC6
|
||||
build process uses custom build steps to compile these files in the
|
||||
GLU library.
|
||||
|
||||
Two additional configurations are provided, Debug x86 and Release x86
|
||||
that activate the shader code compilation by defining SLANG_86. It is
|
||||
unknown if and how this works.
|
||||
|
||||
VC7 (not actively supported)
|
||||
---
|
||||
|
||||
The above-mentioned .cc problem does not exist in this version.
|
||||
|
||||
VC8
|
||||
---
|
||||
|
||||
No notes.
|
||||
|
||||
|
||||
General
|
||||
-------
|
||||
|
||||
After building, you can copy the above DLL files to a place in your
|
||||
PATH such as $SystemRoot/SYSTEM32. If you don't like putting things
|
||||
in a system directory, place them in the same directory as the
|
||||
executable(s). Be careful about accidentially overwriting files of
|
||||
the same name in the SYSTEM32 directory.
|
||||
|
||||
The DLL files are built so that the external entry points use the
|
||||
stdcall calling convention.
|
||||
|
||||
Static LIB files are not built. The LIB files that are built with are
|
||||
the linker import files associated with the DLL files.
|
||||
|
||||
The si-glu sources are used to build the GLU libs. This was done
|
||||
mainly to get the better tessellator code.
|
||||
|
||||
To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
|
||||
to the project settings. You will also need to edit src/mesa.def to
|
||||
change all the gl* symbols to mgl*. Because this is easy to do with a
|
||||
global replace operation in a text editor, no additional mangled
|
||||
version of mesa.def is maintained or shipped.
|
||||
|
||||
If you have a Windows-related build problem or question, it is
|
||||
probably better to direct it to me (kschultz@users.sourceforge.net),
|
||||
rather than directly to the other Mesa developers. I will help you as
|
||||
much as I can. I also monitor the Mesa mailing lists and will answer
|
||||
questions in this area there as well.
|
||||
|
||||
|
||||
Karl Schultz
|
||||
|
@@ -1,289 +0,0 @@
|
||||
<html>
|
||||
|
||||
<title>Compilation and Installation using Autoconf</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<h1>Compilation and Installation using Autoconf</h1>
|
||||
|
||||
<ol>
|
||||
<li><a href="#basic">Basic Usage</a></li>
|
||||
<li><a href="#driver">Driver Options</a></li>
|
||||
<ul>
|
||||
<li><a href="#xlib">Xlib Driver Options</a></li>
|
||||
<li><a href="#dri">DRI Driver Options</a></li>
|
||||
<li><a href="#osmesa">OSMesa Driver Options</a></li>
|
||||
</ul>
|
||||
<li><a href="#library">Library Options</a></li>
|
||||
<ul>
|
||||
<li><a href="#glu">GLU</a></li>
|
||||
<li><a href="#glw">GLw</a></li>
|
||||
<li><a href="#glut">GLUT</a></li>
|
||||
</ul>
|
||||
<li><a href="#demos">Demo Program Options</a></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<a name="basic">
|
||||
<h2>1. Basic Usage</h2>
|
||||
|
||||
<p>
|
||||
The autoconf generated configure script can be used to guess your
|
||||
platform and change various options for building Mesa. To use the
|
||||
configure script, type:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
./configure
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
To see a short description of all the options, type <code>./configure
|
||||
--help</code>. If you are using a development snapshot and the configure
|
||||
script does not exist, type <code>./autogen.sh</code> to generate it
|
||||
first. If you know the options you want to pass to
|
||||
<code>configure</code>, you can pass them to <code>autogen.sh</code>. It
|
||||
will run <code>configure</code> with these options after it is
|
||||
generated. Once you have run <code>configure</code> and set the options
|
||||
to your preference, type:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
make
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
This will produce libGL.so and several other libraries depending on the
|
||||
options you have chosen. Later, if you want to rebuild for a different
|
||||
configuration run <code>make realclean</code> before rebuilding.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Some of the generic autoconf options are used with Mesa:
|
||||
|
||||
<ul>
|
||||
<li><code>--prefix=PREFIX</code> - This is the root directory where
|
||||
files will be installed by <code>make install</code>. The default is
|
||||
<code>/usr/local</code>.
|
||||
</li>
|
||||
<li><code>--exec-prefix=EPREFIX</code> - This is the root directory
|
||||
where architecture-dependent files will be installed. In Mesa, this is
|
||||
only used to derive the directory for the libraries. The default is
|
||||
<code>${prefix}</code>.
|
||||
</li>
|
||||
<li><code>--libdir=LIBDIR</code> - This option specifies the directory
|
||||
where the GL libraries will be installed. The default is
|
||||
<code>${exec_prefix}/lib</code>. It also serves as the name of the
|
||||
library staging area in the source tree. For instance, if the option
|
||||
<code>--libdir=/usr/local/lib64</code> is used, the libraries will be
|
||||
created in a <code>lib64</code> directory at the top of the Mesa source
|
||||
tree.
|
||||
</li>
|
||||
<li><code>--enable-static, --disable-shared</code> - By default, Mesa
|
||||
will build shared libraries. Either of these options will force static
|
||||
libraries to be built. It is not currently possible to build static and
|
||||
shared libraries in a single pass.
|
||||
</li>
|
||||
<li><code>CC, CFLAGS, CXX, CXXFLAGS</code> - These environment variables
|
||||
control the C and C++ compilers used during the build. By default,
|
||||
<code>gcc</code> and <code>g++</code> are used with the options
|
||||
<code>"-g -O2"</code>.
|
||||
</li>
|
||||
<li><code>LDFLAGS</code> - An environment variable specifying flags to
|
||||
pass when linking programs. These are normally empty, but can be used
|
||||
to direct the linker to use libraries in nonstandard directories. For
|
||||
example, <code>LDFLAGS="-L/usr/X11R6/lib"</code>.
|
||||
</li>
|
||||
<li><code>PKG_CONFIG_PATH</code> - When available, the
|
||||
<code>pkg-config</code> utility is used to search for external libraries
|
||||
on the system. This environment variable is used to control the search
|
||||
path for <code>pkg-config</code>. For instance, setting
|
||||
<code>PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig</code> will search for
|
||||
package metadata in <code>/usr/X11R6</code> before the standard
|
||||
directories.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
There are also a few general options for altering the Mesa build:
|
||||
<ul>
|
||||
<li><code>--with-x</code> - When the X11 development libraries are
|
||||
needed, the <code>pkg-config</code> utility <a href="#pkg-config">will
|
||||
be used</a> for locating them. If they cannot be found through
|
||||
<code>pkg-config</code> a fallback routing using <code>imake</code> will
|
||||
be used. In this case, the <code>--with-x</code>,
|
||||
<code>--x-includes</code> and <code>--x-libraries</code> options can
|
||||
control the use of X for Mesa.
|
||||
</li>
|
||||
<li><code>--enable-gl-osmesa</code> - The <a href="osmesa.html">OSMesa
|
||||
library</a> can be built on top of libGL for drivers that provide it.
|
||||
This option controls whether to build libOSMesa. By default, this is
|
||||
enabled for the Xlib driver and disabled otherwise. Note that this
|
||||
option is different than using OSMesa as the driver.
|
||||
</li>
|
||||
<li><code>--enable-debug</code> - This option will enable compiler
|
||||
options and macros to aid in debugging the Mesa libraries.
|
||||
</li>
|
||||
<li><code>--disable-asm</code> - There are assembly routines
|
||||
available for a few architectures. These will be used by default if
|
||||
one of these architectures is detected. This option ensures that
|
||||
assembly will not be used.
|
||||
</li>
|
||||
<li><code>--enable-32-bit, --enable-64-bit</code> - By default, the
|
||||
build will compile code as directed by the environment variables
|
||||
<code>CC</code>, <code>CFLAGS</code>, etc. If the compiler is
|
||||
<code>gcc</code>, these options offer a helper to add the compiler flags
|
||||
to force 32- or 64-bit code generation as used on the x86 and x86_64
|
||||
architectures.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
<a name="driver">
|
||||
<h2>2. Driver Options</h2>
|
||||
|
||||
<p>
|
||||
There are several different driver modes that Mesa can use. These are
|
||||
described in more detail in the <a href="install.html">basic
|
||||
installation instructions</a>. The Mesa driver is controlled through the
|
||||
configure option --with-driver. There are currently three supported
|
||||
options in the configure script.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<a name="xlib">
|
||||
<li><b><em>Xlib</em></b> - This is the default mode for building Mesa.
|
||||
It uses Xlib as a software renderer to do all rendering. It corresponds
|
||||
to the option <code>--with-driver=xlib</code>. The libX11 and libXext
|
||||
libraries, as well as the X11 development headers, will be need to
|
||||
support the Xlib driver.
|
||||
</li>
|
||||
|
||||
<a name="dri">
|
||||
<li><b><em>DRI</em></b> - This mode uses the DRI hardware drivers for
|
||||
accelerated OpenGL rendering. Enable the DRI drivers with the option
|
||||
<code>--with-driver=dri</code>. See the <a href="install.html">basic
|
||||
installation instructions</a> for details on prerequisites for the DRI
|
||||
drivers.
|
||||
</li>
|
||||
|
||||
<!-- DRI specific options -->
|
||||
<p>
|
||||
<ul>
|
||||
<li><code>--with-dri-driverdir=DIR</code> - This option specifies the
|
||||
location the DRI drivers will be installed to and the location libGL
|
||||
will search for DRI drivers. The default is <code>${libdir}/dri</code>.
|
||||
</li>
|
||||
<li><code>--with-dri-drivers=DRIVER,DRIVER,...</code> - This option
|
||||
allows a specific set of DRI drivers to be built. For example,
|
||||
<code>--with-dri-drivers="swrast,i965,radeon,nouveau"</code>. By
|
||||
default, the drivers will be chosen depending on the target platform.
|
||||
See the directory <code>src/mesa/drivers/dri</code> in the source tree
|
||||
for available drivers. Beware that the swrast DRI driver is used by both
|
||||
libGL and the X.Org xserver GLX module to do software rendering, so you
|
||||
may run into problems if it is not available.</li>
|
||||
<!-- This explanation might be totally bogus. Kristian? -->
|
||||
<li><code>--disable-driglx-direct</code> - Disable direct rendering in
|
||||
GLX. Normally, direct hardware rendering through the DRI drivers and
|
||||
indirect software rendering are enabled in GLX. This option disables
|
||||
direct rendering entirely. It can be useful on architectures where
|
||||
kernel DRM modules are not available.
|
||||
</li>
|
||||
<li><code>--enable-glx-tls</code> - Enable Thread Local Storage (TLS) in
|
||||
GLX.
|
||||
</li>
|
||||
<li><code>--with-expat=DIR</code> - The DRI-enabled libGL uses expat to
|
||||
parse the DRI configuration files in <code>/etc/drirc</code> and
|
||||
<code>~/.drirc</code>. This option allows a specific expat installation
|
||||
to be used. For example, <code>--with-expat=/usr/local</code> will
|
||||
search for expat headers and libraries in <code>/usr/local/include</code>
|
||||
and <code>/usr/local/lib</code>, respectively.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<a name="osmesa">
|
||||
<li><b><em>OSMesa</em></b> - No libGL is built in this
|
||||
mode. Instead, the driver code is built into the Off-Screen Mesa
|
||||
(OSMesa) library. See the <a href="osmesa.html">Off-Screen Rendering</a>
|
||||
page for more details.
|
||||
</li>
|
||||
|
||||
<!-- OSMesa specific options -->
|
||||
<p>
|
||||
<ul>
|
||||
<li><code>--with-osmesa-bits=BITS</code> - This option allows the size
|
||||
of the color channel in bits to be specified. By default, an 8-bit
|
||||
channel will be used, and the driver will be named libOSMesa. Other
|
||||
options are 16- and 32-bit color channels, which will add the bit size
|
||||
to the library name. For example, <code>--with-osmesa-bits=16</code>
|
||||
will create the libOSMesa16 library with a 16-bit color channel.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="library">
|
||||
<h2>3. Library Options</h2>
|
||||
|
||||
<p>
|
||||
The configure script provides more fine grained control over the GL
|
||||
libraries that will be built. More details on the specific GL libraries
|
||||
can be found in the <a href="install.html">basic installation
|
||||
instructions</a>.
|
||||
|
||||
<ul>
|
||||
<a name="glu">
|
||||
<li><b><em>GLU</em></b> - The libGLU library will be built by default
|
||||
on all drivers. This can be disable with the option
|
||||
<code>--disable-glu</code>.
|
||||
</li>
|
||||
|
||||
<a name="glw">
|
||||
<li><b><em>GLw</em></b> - The libGLw library will be built by default
|
||||
if libGLU has been enabled. This can be disable with the option
|
||||
<code>--disable-glw</code>.
|
||||
</li>
|
||||
|
||||
<a name="glut">
|
||||
<li><b><em>GLUT</em></b> - The libglut library will be built by default
|
||||
if libGLU has been enabled and the glut source code from the MesaGLUT
|
||||
tarball is available. This can be disable with the option
|
||||
<code>--disable-glut</code>.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
<a name="demos">
|
||||
<h2>4. Demo Program Options</h2>
|
||||
|
||||
<p>
|
||||
There are many demonstration programs in the MesaDemos tarball. If the
|
||||
programs are available when <code>./configure</code> is run, a subset of
|
||||
the programs will be built depending on the driver and library options
|
||||
chosen. See the directory <code>progs</code> for the full set of demos.
|
||||
|
||||
<ul>
|
||||
<li><code>--with-demos=DEMOS,DEMOS,...</code> - This option allows a
|
||||
specific set of demo programs to be built. For example,
|
||||
<code>--with-demos="xdemos,slang"</code>. Beware that if this option is
|
||||
used, it will not be ensured that the necessary GL libraries will be
|
||||
available.
|
||||
</li>
|
||||
<li><code>--without-demos</code> - This completely disables building the
|
||||
demo programs. It is equivalent to <code>--with-demos=no</code>.
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -9,9 +9,9 @@
|
||||
<H1>Bug Database</H1>
|
||||
|
||||
<p>
|
||||
The Mesa bug database is hosted on
|
||||
<a href="http://freedesktop.org" target="_parent">freedesktop.org</a>.
|
||||
The old bug database on SourceForge is no longer used.
|
||||
The Mesa bug database is now hosted on
|
||||
<a href="http://freedesktop.org" target="_parent">freedesktop.org</a>
|
||||
instead of SourceForge.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -26,20 +26,16 @@ Please follow these bug reporting guidelines:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Check if a new version of Mesa is available which might have fixed
|
||||
the problem.
|
||||
<li>Check if your bug is already reported in the database.
|
||||
<li>Monitor your bug report for requests for additional information, etc.
|
||||
<li>If you're reporting a crash, try to use your debugger (gdb) to get a stack
|
||||
trace. Also, recompile Mesa in debug mode to get more detailed information.
|
||||
<li>Describe in detail how to reproduce the bug, especially with games
|
||||
and applications that the Mesa developers might not be familiar with.
|
||||
<li>Make sure you're using the most recent version of Mesa
|
||||
<li>Make sure your bug isn't already reported
|
||||
<li>Include as much information as possible in the report
|
||||
<li>Provide a simple GLUT-based test program if possible
|
||||
<li>Check back for follow-ups to the report
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Bug reports will automatically be forwarded by bugzilla to the Mesa
|
||||
developer's mailing list.
|
||||
Bug reports will automatically be forwarded to the Mesa developer's mailing
|
||||
list.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
107
docs/cell.html
107
docs/cell.html
@@ -1,107 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Cell Driver</TITLE>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<H1>Mesa Cell Driver</H1>
|
||||
|
||||
<p>
|
||||
The Mesa
|
||||
<a href="http://en.wikipedia.org/wiki/Cell_%28microprocessor%29" target="_parent">Cell</a>
|
||||
driver is part of the
|
||||
<a href="http://www.tungstengraphics.com/wiki/index.php/Gallium3D" target="_parent">Gallium3D</a>
|
||||
architecture.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="http://www.tungstengraphics.com/" target="_parent">Tungsten Graphics</a>
|
||||
is leading the project.
|
||||
Two phases are planned.
|
||||
First, to implement the framework for parallel rasterization using the Cell
|
||||
SPEs, including texture mapping.
|
||||
Second, to implement a full-featured OpenGL driver with support for GLSL, etc.
|
||||
</p>
|
||||
|
||||
|
||||
<H2>Source Code</H2>
|
||||
|
||||
<p>
|
||||
The Cell driver source code is on the <code>gallium-0.1</code> branch of the
|
||||
git repository.
|
||||
After you've cloned the repository, check out the branch with:
|
||||
</p>
|
||||
<pre>
|
||||
git-checkout -b gallium-0.1 origin/gallium-0.1
|
||||
</pre>
|
||||
<p>
|
||||
To build the driver you'll need the IBM Cell SDK (version 2.1 or 3.0).
|
||||
To use the driver you'll need a Cell system, such as a PS3 running Linux,
|
||||
or the Cell Simulator (untested, though).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If using Cell SDK 3.0, first edit configs/linux-cell and add
|
||||
<code>-DSPU_MAIN_PARAM_LONG_LONG</code> to the SPU_CFLAGS.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To compile the code, run <code>make linux-cell</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To use the library, make sure <code>LD_LIBRARY_PATH</code> points the Mesa/lib/
|
||||
directory that contains <code>libGL.so</code>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Verify that the Cell driver is being used by running <code>glxinfo</code>
|
||||
and looking for:
|
||||
<pre>
|
||||
OpenGL renderer string: Gallium 0.1, Cell on Xlib
|
||||
</pre>
|
||||
|
||||
|
||||
<H2>Driver Implementation Summary</H2>
|
||||
|
||||
<p>
|
||||
Rasterization is parallelized across the SPUs in a tiled-based manner.
|
||||
Batches of transformed triangles are sent to the SPUs (actually, pulled by from
|
||||
main memory by the SPUs).
|
||||
Each SPU loops over a set of 32x32-pixel screen tiles, rendering the triangles
|
||||
into each tile.
|
||||
Because of the limited SPU memory, framebuffer tiles are paged in/out of
|
||||
SPU local store as needed.
|
||||
Similarly, textures are tiled and brought into local store as needed.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
More recently, vertex transformation has been parallelized across the SPUs
|
||||
as well.
|
||||
</p>
|
||||
|
||||
|
||||
<H2>Status</H2>
|
||||
|
||||
<p>
|
||||
As of February 2008 the driver supports smooth/flat shaded triangle rendering
|
||||
with Z testing and simple texture mapping.
|
||||
Simple demos like gears run successfully.
|
||||
To test texture mapping, try progs/demos/texcyl (press right mouse button for
|
||||
rendering options).
|
||||
</p>
|
||||
|
||||
|
||||
<H2>Contributing</H2>
|
||||
|
||||
<p>
|
||||
If you're interested in contributing to the effort, familiarize yourself
|
||||
with the code, join the <a href="lists.html">mesa3d-dev mailing list</a>,
|
||||
and describe what you'd like to do.
|
||||
</p>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
@@ -48,7 +48,6 @@ a:visited {
|
||||
<li><a href="lists.html" target="MainFrame">Mailing Lists</a>
|
||||
<li><a href="bugs.html" target="MainFrame">Bug Database</a>
|
||||
<li><a href="webmaster.html" target="MainFrame">Webmaster</a>
|
||||
<li><a href="http://dri.freedesktop.org/" target="MainFrame">Wiki</a>
|
||||
</ul>
|
||||
|
||||
<b>User Topics</b>
|
||||
@@ -76,7 +75,6 @@ a:visited {
|
||||
<li><a href="subset.html" target="MainFrame">Mesa Subset Driver</a>
|
||||
<li><a href="glfbdev-driver.html" target="MainFrame">glFBDev Driver</a>
|
||||
<LI><A HREF="dispatch.html" target="MainFrame">GL Dispatch</A>
|
||||
<li><a href="cell.html" target="MainFrame">Cell Driver</A>
|
||||
</ul>
|
||||
|
||||
<b>Links</b>
|
||||
|
@@ -135,12 +135,12 @@ Update the docs/VERSIONS file too.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Edit the MESA_MAJOR, MESA_MINOR and MESA_TINY version numbers in
|
||||
configs/default.
|
||||
Edit configs/default and change the MESA_MAJOR, MESA_MINOR and MESA_TINY
|
||||
version numbers.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Make sure the values in src/mesa/main/version.h are correct.
|
||||
Make sure the values in src/mesa/main/version.h is correct.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@@ -9,9 +9,7 @@
|
||||
<H1>Downloading</H1>
|
||||
|
||||
<p>
|
||||
Current development release: <b>7.1</b>
|
||||
<br>
|
||||
Last stable release: <b>7.0.4</b>
|
||||
Last stable release: <b>7.0.2</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -20,11 +18,6 @@ Primary download site:
|
||||
target="_parent">SourceForge</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When a new release is coming, release candidates (betas) can be found
|
||||
<a href="http://www.mesa3d.org/beta/">here</a>.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
Mesa is distributed in several parts:
|
||||
|
221
docs/drivers.html
Normal file
221
docs/drivers.html
Normal file
@@ -0,0 +1,221 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Writing Mesa Device Drivers</TITLE>
|
||||
|
||||
<BODY text="#000000" bgcolor="#55bbff" link="#111188">
|
||||
|
||||
<center><h1>Writing Mesa Device Drivers</h1></center>
|
||||
|
||||
<h2>Introduction</h2>
|
||||
|
||||
<p>
|
||||
Several different classes of drivers can be identified:
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>100% Software Driver</b> -
|
||||
a software driver that does not utilize accelerated graphics hardware.
|
||||
Such a driver will basically just write (and read) pixel values to the
|
||||
computer's frame buffer or a malloc'd color buffer.
|
||||
Examples include the X11/XMesa driver, the Windows driver and OSMesa.
|
||||
</li>
|
||||
<br>
|
||||
<li><b>Hardware Rasterization Driver</b> -
|
||||
for graphics hardware that implements accelerated point/line/triangle
|
||||
rasterization, but relies on core Mesa for vertex transformation.
|
||||
Examples include the DRI 3Dfx, Matrox, and Rage 128 drivers.
|
||||
</li>
|
||||
<br>
|
||||
<li><b>Hardware Transformation and Rasterization Driver</b> -
|
||||
for graphics hardware that implements accelerated rasterization and vertex
|
||||
transformation.
|
||||
Examples include the DRI Radeon and R200 drivers.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Each class of driver builds on the functionality of the preceeding one.
|
||||
For example, a hardware rasterization driver may need to fall back to
|
||||
software rasterization when a particular OpenGL state combination is set
|
||||
but not supported by the hardware (perhaps smooth, stippled, textured
|
||||
triangles).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Likewise, a hardware transformation driver might need to fall back to
|
||||
software-based transformation when a particular, seldom-used lighting
|
||||
mode is enabled.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>Getting Started</h2>
|
||||
|
||||
<p>
|
||||
The best way to get started writing a new driver is to find an existing
|
||||
driver similar to what you plan to implement, and then study it.
|
||||
</p>
|
||||
<p>
|
||||
It's not feasible for this document to explain every detail of writing
|
||||
a driver.
|
||||
The minute details can be gleaned by looking at existing drivers.
|
||||
This document focuses on the high-level concepts and will perhaps expand
|
||||
on the details in the future.
|
||||
</p>
|
||||
<p>
|
||||
For examples of 100% software drivers, the OSMesa and XMesa (fake/stand-alone
|
||||
GLX) drivers are the best examples.
|
||||
</p>
|
||||
<p>
|
||||
For examples of hardware drivers, the DRI Radeon and R200 drivers are good
|
||||
examples.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>Programming API vs. Drivers</h2>
|
||||
|
||||
<p>
|
||||
There are two aspects to a Mesa device driver:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><b>Public programming API</b> -
|
||||
this is the interface which application programmers use.
|
||||
Examples are the GLX, WGL and OSMesa interfaces.
|
||||
If you're developing a device driver for a new operating system or
|
||||
window system you'll have to design and implement an <em>OpenGL glue</em>
|
||||
interface similar to these.
|
||||
This interface will, in turn, communicate with the internal driver code.
|
||||
</li>
|
||||
<br>
|
||||
<li><b>Private/internal driver code</b> -
|
||||
this is the code which (effectively) translates OpenGL API calls into
|
||||
rendering operations.
|
||||
The device driver must manage hardware resources, track OpenGL state
|
||||
and implement or dispatch the fundamental rendering operations such as
|
||||
point, line, triangle and image rendering.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
The remainder of this document will focus on the later part.
|
||||
Furthermore, we'll use the GLX interface for examples.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
In the case of the DRI drivers, the public GLX interface is contained in
|
||||
the <b>libGL.so</b> library.
|
||||
libGL.so, in turn, dynamically loads one of the DRI drivers (such as
|
||||
radeon_dri.so).
|
||||
Both libGL.so and the driver modules talk to the X window system via the
|
||||
DRI extension.
|
||||
Furthermore, the driver modules interface to the graphics hardware with
|
||||
the help of a kernel module and the conventional 2D X server driver.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Software Driver Overview</h2>
|
||||
|
||||
<p>
|
||||
A software driver is primarily concerned with writing pixel values to the
|
||||
system's color buffer (and reading them back).
|
||||
The color buffers might be window canvases (typically the front
|
||||
color buffer) and/or off-screen image buffers (typically the back color
|
||||
buffer).
|
||||
The depth, stencil and accumulation buffers will be implemented within
|
||||
core Mesa.
|
||||
</p>
|
||||
<p>
|
||||
The software driver must also be concerned with allocation and deallocation
|
||||
of rendering contexts, frame buffers and pixel formats (visuals).
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Rendering Contexts</h3>
|
||||
|
||||
<p>
|
||||
The glue interface will always have a function for creating new rendering
|
||||
contexts (such as glXCreateContext).
|
||||
The device driver must have a function which allocates and initializes
|
||||
a device-specific rendering context.
|
||||
</p>
|
||||
|
||||
|
||||
<h3>Frame Buffers</h3>
|
||||
|
||||
<p>
|
||||
The <em>frame buffer</em> can either be a screen region defined by a window
|
||||
or the entire screen.
|
||||
</p>
|
||||
<p>
|
||||
In either case, the device driver must implement functions for allocating,
|
||||
initializing and managing frame buffers.
|
||||
<p>
|
||||
|
||||
|
||||
<h3>Spans</h3>
|
||||
|
||||
<p>
|
||||
The fundamental rendering operation is to write (and read)
|
||||
<em>spans</em> of pixels to the front / back color buffers.
|
||||
A span is a horizontal array of pixel colors with an array of mask
|
||||
flags. The span begins at a particular (x,y) screen coordinate,
|
||||
extends for N pixels, describes N RGBA colors (or color indexes) and
|
||||
has an array of N boolean flags indicating which pixels to write and skip.
|
||||
<p>
|
||||
|
||||
<h3>Miscellaneous functions</h3>
|
||||
|
||||
<p>
|
||||
Additionally, a software driver will typically have functions for
|
||||
binding rendering contexts to frame buffers (via glXMakeCurrent),
|
||||
swapping color buffers (via glXSwapBuffers), synchronization
|
||||
(via glFlush/glFinish) and queries (via glGetString).
|
||||
</p>
|
||||
|
||||
<h3>Optimizations</h3>
|
||||
|
||||
<p>
|
||||
A software driver might implement optimized routines for drawing lines
|
||||
and triangles for common cases (such as smooth shading with depth-testing).
|
||||
Then, the span functions can be bypassed for a little extra speed.
|
||||
The OSMesa and XMesa drivers have examples of this.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>Hardware Driver Overview</h2>
|
||||
|
||||
<p>
|
||||
To do...
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>OOP-Style Inheritance and Specialization</h2>
|
||||
|
||||
<p>
|
||||
Even though Mesa and most device drivers are written in C, object oriented
|
||||
programming principles are used in several places.
|
||||
</p>
|
||||
|
||||
<h3>Rendering Contexts</h3>
|
||||
|
||||
<p>
|
||||
Every Mesa device driver will need to define a device-specific rendering
|
||||
context structure.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>State Tracking</h2>
|
||||
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
@@ -187,7 +187,24 @@ has Mesa packages (like RPM or DEB) which you can easily install.
|
||||
</a></p>
|
||||
|
||||
|
||||
<h2><a name="part2">2.2 I get undefined symbols such as bgnpolygon, v3f, etc...</a></h2>
|
||||
<h2><a name="part2">2.2 Running <code>configure; make</code> doesn't Work</a></h2>
|
||||
<p>
|
||||
Mesa no longer supports GNU autoconf/automake. Why?
|
||||
<ul>
|
||||
<li>It seemed to seldom work on anything but Linux
|
||||
<li>The config files were hard to maintain and hard to understand
|
||||
<li>libtool caused a lot of grief
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Now Mesa again uses a conventional Makefile system (as it did originally).
|
||||
Basically, each Makefile in the tree includes one of the configuration
|
||||
files from the config/ directory.
|
||||
The config files specify all the variables for a variety of popular systems.
|
||||
</p>
|
||||
|
||||
|
||||
<h2><a name="part2">2.3 I get undefined symbols such as bgnpolygon, v3f, etc...</a></h2>
|
||||
<p>
|
||||
<a name="part2">You're application is written in IRIS GL, not OpenGL.
|
||||
IRIS GL was the predecessor to OpenGL and is a different thing (almost)
|
||||
@@ -196,7 +213,7 @@ Mesa's not the solution.
|
||||
</a></p>
|
||||
|
||||
|
||||
<h2><a name="part2">2.3 Where is the GLUT library?</a></h2>
|
||||
<h2><a name="part2">2.4 Where is the GLUT library?</a></h2>
|
||||
<p>
|
||||
<a name="part2">GLUT (OpenGL Utility Toolkit) is in the separate MesaGLUT-x.y.z.tar.gz file.
|
||||
If you don't already have GLUT installed, you should grab the MesaGLUT
|
||||
@@ -205,7 +222,7 @@ package and compile it with the rest of Mesa.
|
||||
|
||||
|
||||
|
||||
<h2><a name="part2">2.4 What's the proper place for the libraries and headers?</a></h2>
|
||||
<h2><a name="part2">2.5 What's the proper place for the libraries and headers?</a></h2>
|
||||
<p>
|
||||
<a name="part2">On Linux-based systems you'll want to follow the
|
||||
</a><a href="http://oss.sgi.com/projects/ogl-sample/ABI/index.html"
|
||||
@@ -328,9 +345,9 @@ will fix the problem.
|
||||
First, join the <a href="http://www.mesa3d.org/lists.html">Mesa3d-dev
|
||||
mailing list</a>.
|
||||
That's where Mesa development is discussed.
|
||||
</p>
|
||||
</a></p>
|
||||
<p>
|
||||
The <a href="http://www.opengl.org/documentation" target="_parent">
|
||||
The </a><a href="http://www.opengl.org/documentation" target="_parent">
|
||||
OpenGL Specification</a> is the bible for OpenGL implemention work.
|
||||
You should read it.
|
||||
</p>
|
||||
|
@@ -21,42 +21,10 @@
|
||||
<a name="unix-x11">
|
||||
<H2>1. Unix/X11 Compilation and Installation</H1>
|
||||
|
||||
|
||||
<h3>1.1 Prerequisites for DRI and Hardware Acceleration</h3>
|
||||
<h3>1.1 Compilation</h3>
|
||||
|
||||
<p>
|
||||
To build Mesa 7.1 with DRI-based hardware acceleration you must first have
|
||||
the <a href="http://dri.freedesktop.org/libdrm/" target="_parent">DRM version 2.3.1</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
You should also be using the Xorg server version 1.4 or 1.5.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h3>1.2 Autoconf Compilation</h3>
|
||||
|
||||
<p>
|
||||
Mesa may be <a href="autoconf.html">built using autoconf</a>.
|
||||
This should work well on most GNU-based systems.
|
||||
When that fails, the traditional Mesa build system is available.
|
||||
|
||||
|
||||
|
||||
<h3>1.3 Traditional Compilation</h3>
|
||||
|
||||
<p>
|
||||
The traditional Mesa build system is based on a collection of pre-defined
|
||||
system configurations.
|
||||
</p>
|
||||
<p>
|
||||
To see the list of configurations, type <b>make</b> alone.
|
||||
Then choose a configuration from the list and type <b>make configname</b>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa may be built in several different ways using the predefined configurations:
|
||||
Mesa may be compiled in several different ways:
|
||||
</p>
|
||||
<ul>
|
||||
<li><b><em>Stand-alone/Xlib mode</em></b> - Mesa will be compiled as
|
||||
@@ -81,6 +49,43 @@ accelerated OpenGL rendering (for ATI, Intel, Matrox, etc) will be built.
|
||||
The libGL.so library will support the GLX extension and will load/use
|
||||
the DRI hardware drivers.
|
||||
|
||||
<p>
|
||||
<b>Prerequisites:</b>
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li>
|
||||
<p>
|
||||
For Mesa 7.0.2 <a href="http://dri.freedesktop.org/libdrm/">
|
||||
DRM version 2.3</a> is required.
|
||||
</p>
|
||||
<p>
|
||||
To check if you already have it, run:
|
||||
<br>
|
||||
<code>pkg-config --modversion libdrm</code>
|
||||
</p>
|
||||
<p>
|
||||
You can download and install a <a href="http://dri.freedesktop.org/libdrm/">
|
||||
tarball release</a> or get the code from git with:
|
||||
<br>
|
||||
<code>git clone git://anongit.freedesktop.org/git/mesa/drm</code>
|
||||
<br>
|
||||
Then revert to the drm-2.3.0 tag with:
|
||||
<br>
|
||||
<code>git-reset --hard drm-2.3.0</code>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Relatively recent
|
||||
<a href="http://freedesktop.org/wiki/Software_2fXserver" target="_parent">
|
||||
X.org</a> release.
|
||||
Mesa depends on a number of X header and library files.
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
|
||||
<p>
|
||||
Build Mesa and the DRI hardware drivers by running
|
||||
@@ -93,13 +98,8 @@ There are also <code>linux-dri-x86</code>, <code>linux-dri-x86-64</code>,
|
||||
and <code>linux-ppc</code> configurations which are optimized for those
|
||||
architectures.
|
||||
</p>
|
||||
<p>
|
||||
Make sure you have the prerequisite versions of DRM and Xserver mentioned
|
||||
above.
|
||||
</p>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ Later, if you want to rebuild for a different configuration run
|
||||
</p>
|
||||
|
||||
|
||||
<h3>1.4 The libraries</h3>
|
||||
<h3>1.2 The libraries</h3>
|
||||
|
||||
<p>
|
||||
When compilation has finished, look in the top-level <code>lib/</code>
|
||||
@@ -150,15 +150,15 @@ lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSM
|
||||
If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
||||
</p>
|
||||
<pre>
|
||||
-rwxr-xr-x 1 brian users 15607851 Jul 21 12:11 ffb_dri.so
|
||||
-rwxr-xr-x 1 brian users 15148747 Jul 21 12:11 i810_dri.so
|
||||
-rwxr-xr-x 1 brian users 14497814 Jul 21 12:11 i830_dri.so
|
||||
-rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i915_dri.so
|
||||
-rwxr-xr-x 1 brian users 15607851 Jul 21 12:11 ffb_dri.so*
|
||||
-rwxr-xr-x 1 brian users 15148747 Jul 21 12:11 i810_dri.so*
|
||||
-rwxr-xr-x 1 brian users 14497814 Jul 21 12:11 i830_dri.so*
|
||||
-rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i915_dri.so*
|
||||
-rwxr-xr-x 1 brian users 11320803 Jul 21 12:11 mach64_dri.so
|
||||
-rwxr-xr-x 1 brian users 11418014 Jul 21 12:12 mga_dri.so
|
||||
-rwxr-xr-x 1 brian users 11064426 Jul 21 12:12 r128_dri.so
|
||||
-rwxr-xr-x 1 brian users 11849858 Jul 21 12:12 r200_dri.so
|
||||
-rwxr-xr-x 1 brian users 16050488 Jul 21 12:11 r300_dri.so
|
||||
-rwxr-xr-x 1 brian users 16050488 Jul 21 12:11 r300_dri.so*
|
||||
-rwxr-xr-x 1 brian users 11757388 Jul 21 12:12 radeon_dri.so
|
||||
-rwxr-xr-x 1 brian users 11232304 Jul 21 12:13 s3v_dri.so
|
||||
-rwxr-xr-x 1 brian users 11062970 Jul 21 12:13 savage_dri.so
|
||||
@@ -169,7 +169,7 @@ If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
||||
</pre>
|
||||
|
||||
|
||||
<h3>1.5 Running the demos</h3>
|
||||
<h3>1.3 Running the demos</h3>
|
||||
|
||||
<p>
|
||||
If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
|
||||
@@ -178,15 +178,18 @@ bunch of demonstration programs.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Before running a demo, you'll probably have to set two environment variables
|
||||
to indicate where the libraries are located. For example:
|
||||
Before running a demo, you may have to set an environment variable
|
||||
(such as <b>LD_LIBRARY_PATH</b> on Linux) to indicate where the
|
||||
libraries are located. For example:
|
||||
<p>
|
||||
<blockquote>
|
||||
<b>cd lib/</b>
|
||||
<b>cd</b> into the Mesa <b>lib/</b> directory.
|
||||
<br>
|
||||
<b>export LD_LIBRARY_PATH=${PWD}</b>
|
||||
<b>setenv LD_LIBRARY_PATH ${cwd}</b> (if using csh or tcsh shell)
|
||||
<br>
|
||||
<b>export LIBGL_DRIVERS_PATH=${PWD}</b> (if using DRI drivers)
|
||||
or,
|
||||
<br>
|
||||
<b>export LD_LIBRARY_PATH=${PWD}</b> (if using bash or sh shell)
|
||||
</blockquote>
|
||||
|
||||
<p>
|
||||
@@ -244,7 +247,7 @@ Retrace your steps if this doesn't look right.
|
||||
</p>
|
||||
|
||||
|
||||
<H3>1.6 Installing the header and library files</H3>
|
||||
<H3>1.4 Installing the header and library files</H3>
|
||||
|
||||
<p>
|
||||
The standard location for the OpenGL header files on Unix-type systems is
|
||||
@@ -284,7 +287,7 @@ This is a handy way to compare multiple OpenGL implementations.
|
||||
</p>
|
||||
|
||||
|
||||
<H3>1.7 Building OpenGL Programs With pkg-config</H3>
|
||||
<H3>1.5 pkg-config support</H3>
|
||||
|
||||
<p>
|
||||
Running <code>make install</code> will install package configuration files
|
||||
|
@@ -22,10 +22,9 @@ for modern GPUs.
|
||||
|
||||
<p>
|
||||
Mesa ties into several other open-source projects: the
|
||||
<a href="http://dri.freedesktop.org/" target="_parent">Direct Rendering
|
||||
Infrastructure</a> and <a href="http://x.org" target="_parent">X.org</a> to
|
||||
provide OpenGL support to users of X on Linux, FreeBSD and other operating
|
||||
systems.
|
||||
<a href="http://dri.sf.net/" target="_parent">Direct Rendering Infrastructure</a>
|
||||
and <a href="http://x.org" target="_parent">X.org</a> to provide OpenGL
|
||||
support to users of X on Linux, FreeBSD and other operating systems.
|
||||
</p>
|
||||
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<H1>Mailing Lists</H1>
|
||||
|
||||
|
||||
<p>There are four Mesa 3D / DRI mailing lists:
|
||||
<p>There are four Mesa mailing lists:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
@@ -19,14 +19,14 @@ versions are sent to this list.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-users"
|
||||
target="_parent">mesa3d-users</a> - intended for users of the Mesa and DRI.
|
||||
target="_parent">mesa3d-users</a> - intended for users of the Mesa library.
|
||||
Newbie questions are appropriate, but please try the general OpenGL
|
||||
resources and Mesa/DRI documentation first.
|
||||
resources and Mesa documentation first.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="https://lists.sourceforge.net/lists/listinfo/mesa3d-dev"
|
||||
target="_parent">mesa3d-dev</a> - for discussion of Mesa and Direct Rendering
|
||||
Infrastructure development. Not for beginners.
|
||||
target="_parent">mesa3d-dev</a> - for discussion of Mesa development.
|
||||
Not for beginners.
|
||||
</li>
|
||||
<br>
|
||||
<li><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-commit"
|
||||
@@ -37,9 +37,6 @@ Note: the old mesa3d-cvs list is no longer in use.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>For mailing lists about Direct Rendering Modules (drm) in Linux/BSD
|
||||
kernels, see <a href="http://dri.freedesktop.org/wiki/MailingLists">wiki</a>.
|
||||
|
||||
<p>
|
||||
<b>Notice</b>: non-member posts to any of these lists will be automatically
|
||||
rejected.
|
||||
|
21
docs/memory.html
Normal file
21
docs/memory.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa News</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>DRI Memory Management</H1>
|
||||
|
||||
<p>
|
||||
Thomas Hellström's
|
||||
<a href="http://www.tungstengraphics.com/mm.pdf">Memory Management
|
||||
whitepaper</a> describes the goals, design and implementation of the
|
||||
new DRI memory management system.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -11,23 +11,6 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<h2>August 26, 2008</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.1.html">Mesa 7.1</a> is released.
|
||||
This is a new development release.
|
||||
It should be relatively stable, but those especially concerned about
|
||||
stability should wait for the 7.2 release or use Mesa 7.0.4 (the
|
||||
previous stable release).
|
||||
</p>
|
||||
|
||||
|
||||
<h2>August 16, 2008</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.0.4.html">Mesa 7.0.4</a> is released.
|
||||
This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>April 4, 2008</h2>
|
||||
<p>
|
||||
<a href="relnotes-7.0.3.html">Mesa 7.0.3</a> is released.
|
||||
@@ -35,14 +18,6 @@ This is a bug-fix release.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>January 24, 2008</h2>
|
||||
|
||||
<p>
|
||||
Added a new page describing the <a href="cell.html">Mesa Cell driver</a>.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<h2>November 13, 2007</h2>
|
||||
|
||||
<p>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.0.4 Release Notes / August 16, 2008</H1>
|
||||
<H1>Mesa 7.0.4 Release Notes / (TBD 2008)</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
|
||||
@@ -17,15 +17,6 @@ Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
909afa3a01ae31478d363837681415ac MesaLib-7.0.4.tar.gz
|
||||
8d7bacbe0234742a5d08c8088c4619e9 MesaLib-7.0.4.tar.bz2
|
||||
5e44261ef85b049a868e1785d9adc276 MesaLib-7.0.4.zip
|
||||
53dcd77d37a819feaf50b5fcdd0a6e0f MesaDemos-7.0.4.tar.gz
|
||||
c1215b31c5f7b85f81eed3bfba07d556 MesaDemos-7.0.4.tar.bz2
|
||||
b1825a7361f116b28d82d328077630b4 MesaDemos-7.0.4.zip
|
||||
d7677d015f52602d1bf8b837fb717848 MesaGLUT-7.0.4.tar.gz
|
||||
f5f8b46f7e763d9f7b7d1d115c1c44ee MesaGLUT-7.0.4.tar.bz2
|
||||
a786775271a02c62a3370b13b26bf48d MesaGLUT-7.0.4.zip
|
||||
</pre>
|
||||
|
||||
|
||||
@@ -45,7 +36,6 @@ a786775271a02c62a3370b13b26bf48d MesaGLUT-7.0.4.zip
|
||||
|
||||
<h2>Changes</h2>
|
||||
<ul>
|
||||
<li>Including the latest glext.h and glxext.h header files from Khronos
|
||||
<li>Added support for DragonFly OS
|
||||
<li>Added a build config for FreeBSD static libs (Anatolij Shkodin)
|
||||
<li>Enabled GL_EXT_multi_draw_arrays extension in R200/R300 drivers
|
||||
|
@@ -1,86 +0,0 @@
|
||||
<HTML>
|
||||
|
||||
<TITLE>Mesa Release Notes</TITLE>
|
||||
|
||||
<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
||||
|
||||
<BODY>
|
||||
|
||||
<body bgcolor="#eeeeee">
|
||||
|
||||
<H1>Mesa 7.1 Release Notes / August 26, 2008</H1>
|
||||
|
||||
<p>
|
||||
Mesa 7.1 is a new development release.
|
||||
There have been many internal code changes since Mesa 7.0.x.
|
||||
It should be relatively stable, but those who are especially concerned about
|
||||
stability should wait for Mesa 7.2 or use Mesa 7.0.4 (the previous stable
|
||||
release).
|
||||
</p>
|
||||
</>
|
||||
Note that this version of Mesa does not use the GEM memory manager.
|
||||
The master branch of git uses GEM.
|
||||
</p>
|
||||
<p>
|
||||
DRM version 2.3.1 should be used with Mesa 7.1
|
||||
</p>
|
||||
|
||||
|
||||
<h2>MD5 checksums</h2>
|
||||
<pre>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>New features</h2>
|
||||
<ul>
|
||||
<li>autoconf-based configuration (and clean-up of Makefiles)
|
||||
<li>Assorted DRI driver enhancements
|
||||
<li>Reduced dependencies between X server and Mesa
|
||||
<li>GL_EXT_texture_from_pixmap extension for Xlib driver
|
||||
<li>Support for the GL shading language with i965 driver (implemented by Intel)
|
||||
<li>ATI R500 series support (Radeon X1300–X1950) in r300 DRI driver
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Bug fixes</h2>
|
||||
<ul>
|
||||
<li>Numerous GLSL fixes
|
||||
<li>Fixed some error code/detection bugs in the GLSL-related API functions
|
||||
<li>Lots of DRI driver fixes.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>To Do (someday) items</h2>
|
||||
<ul>
|
||||
<li>Remove the MEMCPY() and _mesa_memcpy() wrappers and just use memcpy().
|
||||
Probably do the same for malloc, calloc, etc.
|
||||
The wrappers were useful in the past for memory debugging but now we
|
||||
have valgrind. Not worried about SunOS 4 support anymore either...
|
||||
<li>Switch to freeglut
|
||||
<li>Fix linux-glide target/driver.
|
||||
<li>Improved lambda and derivative calculation for frag progs.
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Driver Status</h2>
|
||||
|
||||
<pre>
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa/GLX (on Xlib) implements OpenGL 2.1
|
||||
OSMesa (off-screen) implements OpenGL 2.1
|
||||
Windows/Win32 implements OpenGL 2.1
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA unsupported
|
||||
Wind River UGL unsupported
|
||||
DJGPP unsupported
|
||||
GGI unsupported
|
||||
BeOS unsupported
|
||||
Allegro unsupported
|
||||
D3D unsupported
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -20,7 +20,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="relnotes-7.1.html">7.1 release notes</A>
|
||||
<LI><A HREF="relnotes-7.0.4.html">7.0.4 release notes</A>
|
||||
<LI><A HREF="relnotes-7.0.3.html">7.0.3 release notes</A>
|
||||
<LI><A HREF="relnotes-7.0.2.html">7.0.2 release notes</A>
|
||||
|
@@ -85,27 +85,6 @@ Once your account is established:
|
||||
</ol>
|
||||
|
||||
|
||||
<H2>Windows Users</H2>
|
||||
|
||||
<p>
|
||||
If you're <a href="http://git.or.cz/gitwiki/WindowsInstall" target="_parent">
|
||||
using git on Windows</a> you'll want to enable automatic CR/LF conversion in
|
||||
your local copy of the repository:
|
||||
</p>
|
||||
<pre>
|
||||
git config --global core.autocrlf true
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
This will cause git to convert all text files to CR+LF on checkout,
|
||||
and to LF on commit.
|
||||
</p>
|
||||
<p>
|
||||
Unix users don't need to set this option.
|
||||
</p>
|
||||
<br>
|
||||
|
||||
|
||||
<a name="developer">
|
||||
<H2>Development Branches</H2>
|
||||
|
||||
|
@@ -25,10 +25,9 @@ Contents
|
||||
<li><a href="#unsup">Unsupported Features</a>
|
||||
<li><a href="#notes">Implementation Notes</a>
|
||||
<li><a href="#hints">Programming Hints</a>
|
||||
<li><a href="#standalone">Stand-alone GLSL Compiler</a>
|
||||
<li><a href="#standalone">Stand-alone Compiler</a>
|
||||
<li><a href="#implementation">Compiler Implementation</a>
|
||||
<li><a href="#validation">Compiler Validation</a>
|
||||
<li><a href="#120">GLSL 1.20 support</a>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -134,7 +133,7 @@ These issues will be addressed/resolved in the future.
|
||||
|
||||
|
||||
<a name="standalone">
|
||||
<h2>Stand-alone GLSL Compiler</h2>
|
||||
<h2>Stand-alone Compiler</h2>
|
||||
|
||||
<p>
|
||||
A unique stand-alone GLSL compiler driver has been added to Mesa.
|
||||
@@ -156,10 +155,12 @@ This tool is useful for:
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
After building Mesa, the glslcompiler can be built by manually running:
|
||||
To build the glslcompiler program (this will be improved someday):
|
||||
</p>
|
||||
<pre>
|
||||
cd src/mesa/drivers/glslcompiler
|
||||
cd src/mesa
|
||||
make libmesa.a
|
||||
cd drivers/glslcompiler
|
||||
make
|
||||
</pre>
|
||||
|
||||
@@ -169,31 +170,20 @@ Here's an example of using the compiler to compile a vertex shader and
|
||||
emit GL_ARB_vertex_program-style instructions:
|
||||
</p>
|
||||
<pre>
|
||||
bin/glslcompiler --debug --numbers --fs progs/glsl/CH06-brick.frag.txt
|
||||
glslcompiler --arb --linenumbers --vs vertshader.txt
|
||||
</pre>
|
||||
<p>
|
||||
results in:
|
||||
The output may look similar to this:
|
||||
</p>
|
||||
<pre>
|
||||
# Fragment Program/Shader
|
||||
0: RCP TEMP[4].x, UNIFORM[2].xxxx;
|
||||
1: RCP TEMP[4].y, UNIFORM[2].yyyy;
|
||||
2: MUL TEMP[3].xy, VARYING[0], TEMP[4];
|
||||
3: MOV TEMP[1], TEMP[3];
|
||||
4: MUL TEMP[0].w, TEMP[1].yyyy, CONST[4].xxxx;
|
||||
5: FRC TEMP[1].z, TEMP[0].wwww;
|
||||
6: SGT.C TEMP[0].w, TEMP[1].zzzz, CONST[4].xxxx;
|
||||
7: IF (NE.wwww); # (if false, goto 9);
|
||||
8: ADD TEMP[1].x, TEMP[1].xxxx, CONST[4].xxxx;
|
||||
9: ENDIF;
|
||||
10: FRC TEMP[1].xy, TEMP[1];
|
||||
11: SGT TEMP[2].xy, UNIFORM[3], TEMP[1];
|
||||
12: MUL TEMP[1].z, TEMP[2].xxxx, TEMP[2].yyyy;
|
||||
13: LRP TEMP[0], TEMP[1].zzzz, UNIFORM[0], UNIFORM[1];
|
||||
14: MUL TEMP[0].xyz, TEMP[0], VARYING[1].xxxx;
|
||||
15: MOV OUTPUT[0].xyz, TEMP[0];
|
||||
16: MOV OUTPUT[0].w, CONST[4].yyyy;
|
||||
17: END
|
||||
!!ARBvp1.0
|
||||
0: MOV result.texcoord[0], vertex.texcoord[0];
|
||||
1: DP4 temp0.x, state.matrix.mvp.row[0], vertex.position;
|
||||
2: DP4 temp0.y, state.matrix.mvp.row[1], vertex.position;
|
||||
3: DP4 temp0.z, state.matrix.mvp.row[2], vertex.position;
|
||||
4: DP4 temp0.w, state.matrix.mvp.row[3], vertex.position;
|
||||
5: MOV result.position, temp0;
|
||||
6: END
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
@@ -319,39 +309,5 @@ should be added.
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<a name="120">
|
||||
<h2>GLSL 1.20 support</h2>
|
||||
|
||||
<p>
|
||||
Support for GLSL version 1.20 is underway. Status as follows.
|
||||
</p>
|
||||
|
||||
<h3>Supported</h3>
|
||||
<ul>
|
||||
<li><code>mat2x3, mat2x4</code>, etc. types and functions
|
||||
<li><code>transpose(), outerProduct(), matrixCompMult()</code> functions
|
||||
(but untested)
|
||||
<li>precision qualifiers (lowp, mediump, highp)
|
||||
</ul>
|
||||
|
||||
<h3>Partially Complete</h3>
|
||||
<ul>
|
||||
<li><code>invariant</code> qualifier
|
||||
</ul>
|
||||
|
||||
<h3>Not Completed</h3>
|
||||
<ul>
|
||||
<li><code>array.length()</code> method
|
||||
<li><code>float[5] a;</code> array syntax
|
||||
<li><code>centroid</code> qualifier
|
||||
<li>unsized array constructors
|
||||
<li>initializers for uniforms
|
||||
<li>const initializers calling built-in functions
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
76
include/GL/foomesa.h
Normal file
76
include/GL/foomesa.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 3.0
|
||||
* Copyright (C) 1995-1998 Brian Paul
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Example Foo/Mesa interface. See src/ddsample.c for more info.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#ifndef FOOMESA_H
|
||||
#define FOOMESA_H
|
||||
|
||||
|
||||
|
||||
typedef struct foo_mesa_visual *FooMesaVisual;
|
||||
|
||||
typedef struct foo_mesa_buffer *FooMesaBuffer;
|
||||
|
||||
typedef struct foo_mesa_context *FooMesaContext;
|
||||
|
||||
|
||||
|
||||
#ifdef BEOS
|
||||
#pragma export on
|
||||
#endif
|
||||
|
||||
|
||||
extern FooMesaVisual FooMesaChooseVisual( /* your params */ );
|
||||
|
||||
extern void FooMesaDestroyVisual( FooMesaVisual visual );
|
||||
|
||||
|
||||
extern FooMesaBuffer FooMesaCreateBuffer( FooMesaVisual visual,
|
||||
void *your_window_id );
|
||||
|
||||
extern void FooMesaDestroyBuffer( FooMesaBuffer buffer );
|
||||
|
||||
|
||||
extern FooMesaContext FooMesaCreateContext( FooMesaVisual visual,
|
||||
FooMesaContext sharelist );
|
||||
|
||||
extern void FooMesaDestroyContext( FooMesaContext context );
|
||||
|
||||
|
||||
extern void FooMesaMakeCurrent( FooMesaContext context, FooMesaBuffer buffer );
|
||||
|
||||
|
||||
extern void FooMesaSwapBuffers( FooMesaBuffer buffer );
|
||||
|
||||
|
||||
/* Probably some more functions... */
|
||||
|
||||
|
||||
#ifdef BEOS
|
||||
#pragma export off
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 6.5.1
|
||||
* Version: 7.0
|
||||
*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2007 Brian Paul 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"),
|
||||
@@ -2210,39 +2210,6 @@ GLAPI void GLAPIENTRY glGetProgramRegisterfvMESA(GLenum target, GLsizei len, con
|
||||
#endif /* GL_MESA_program_debug */
|
||||
|
||||
|
||||
#ifndef GL_MESA_texture_array
|
||||
#define GL_MESA_texture_array 1
|
||||
|
||||
/* GL_MESA_texture_array uses the same enum values as GL_EXT_texture_array.
|
||||
*/
|
||||
#ifndef GL_EXT_texture_array
|
||||
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glFramebufferTextureLayerEXT(GLenum target,
|
||||
GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
#endif /* GL_GLEXT_PROTOTYPES */
|
||||
|
||||
#if 0
|
||||
/* (temporarily) disabled because of collision with typedef in glext.h
|
||||
* that happens if apps include both gl.h and glext.h
|
||||
*/
|
||||
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target,
|
||||
GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
#endif
|
||||
|
||||
#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18
|
||||
#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19
|
||||
#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A
|
||||
#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B
|
||||
#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C
|
||||
#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D
|
||||
#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef GL_ATI_blend_equation_separate
|
||||
#define GL_ATI_blend_equation_separate 1
|
||||
|
||||
|
@@ -46,9 +46,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glext.h last updated 2008/08/10 */
|
||||
/* glext.h last updated 2008/03/24 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GL_GLEXT_VERSION 41
|
||||
#define GL_GLEXT_VERSION 40
|
||||
|
||||
#ifndef GL_VERSION_1_2
|
||||
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
|
||||
@@ -479,117 +479,6 @@ extern "C" {
|
||||
#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B
|
||||
#endif
|
||||
|
||||
#ifndef GL_VERSION_3_0
|
||||
#define GL_COMPARE_REF_TO_TEXTURE GL_COMPARE_R_TO_TEXTURE_ARB
|
||||
#define GL_CLIP_DISTANCE0 GL_CLIP_PLANE0
|
||||
#define GL_CLIP_DISTANCE1 GL_CLIP_PLANE1
|
||||
#define GL_CLIP_DISTANCE2 GL_CLIP_PLANE2
|
||||
#define GL_CLIP_DISTANCE3 GL_CLIP_PLANE3
|
||||
#define GL_CLIP_DISTANCE4 GL_CLIP_PLANE4
|
||||
#define GL_CLIP_DISTANCE5 GL_CLIP_PLANE5
|
||||
#define GL_MAX_CLIP_DISTANCES GL_MAX_CLIP_PLANES
|
||||
#define GL_MAJOR_VERSION 0x821B
|
||||
#define GL_MINOR_VERSION 0x821C
|
||||
#define GL_NUM_EXTENSIONS 0x821D
|
||||
#define GL_CONTEXT_FLAGS 0x821E
|
||||
#define GL_DEPTH_BUFFER 0x8223
|
||||
#define GL_STENCIL_BUFFER 0x8224
|
||||
#define GL_COMPRESSED_RED 0x8225
|
||||
#define GL_COMPRESSED_RG 0x8226
|
||||
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
|
||||
#define GL_RGBA32F 0x8814
|
||||
#define GL_RGB32F 0x8815
|
||||
#define GL_RGBA16F 0x881A
|
||||
#define GL_RGB16F 0x881B
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
|
||||
#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
|
||||
#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
|
||||
#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
|
||||
#define GL_CLAMP_VERTEX_COLOR 0x891A
|
||||
#define GL_CLAMP_FRAGMENT_COLOR 0x891B
|
||||
#define GL_CLAMP_READ_COLOR 0x891C
|
||||
#define GL_FIXED_ONLY 0x891D
|
||||
#define GL_MAX_VARYING_COMPONENTS GL_MAX_VARYING_FLOATS
|
||||
#define GL_TEXTURE_RED_TYPE 0x8C10
|
||||
#define GL_TEXTURE_GREEN_TYPE 0x8C11
|
||||
#define GL_TEXTURE_BLUE_TYPE 0x8C12
|
||||
#define GL_TEXTURE_ALPHA_TYPE 0x8C13
|
||||
#define GL_TEXTURE_LUMINANCE_TYPE 0x8C14
|
||||
#define GL_TEXTURE_INTENSITY_TYPE 0x8C15
|
||||
#define GL_TEXTURE_DEPTH_TYPE 0x8C16
|
||||
#define GL_UNSIGNED_NORMALIZED 0x8C17
|
||||
#define GL_TEXTURE_1D_ARRAY 0x8C18
|
||||
#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
|
||||
#define GL_TEXTURE_2D_ARRAY 0x8C1A
|
||||
#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
|
||||
#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
|
||||
#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
|
||||
#define GL_R11F_G11F_B10F 0x8C3A
|
||||
#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
|
||||
#define GL_RGB9_E5 0x8C3D
|
||||
#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
|
||||
#define GL_TEXTURE_SHARED_SIZE 0x8C3F
|
||||
#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
|
||||
#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
|
||||
#define GL_PRIMITIVES_GENERATED 0x8C87
|
||||
#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
|
||||
#define GL_RASTERIZER_DISCARD 0x8C89
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
|
||||
#define GL_INTERLEAVED_ATTRIBS 0x8C8C
|
||||
#define GL_SEPARATE_ATTRIBS 0x8C8D
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
|
||||
#define GL_RGBA32UI 0x8D70
|
||||
#define GL_RGB32UI 0x8D71
|
||||
#define GL_RGBA16UI 0x8D76
|
||||
#define GL_RGB16UI 0x8D77
|
||||
#define GL_RGBA8UI 0x8D7C
|
||||
#define GL_RGB8UI 0x8D7D
|
||||
#define GL_RGBA32I 0x8D82
|
||||
#define GL_RGB32I 0x8D83
|
||||
#define GL_RGBA16I 0x8D88
|
||||
#define GL_RGB16I 0x8D89
|
||||
#define GL_RGBA8I 0x8D8E
|
||||
#define GL_RGB8I 0x8D8F
|
||||
#define GL_RED_INTEGER 0x8D94
|
||||
#define GL_GREEN_INTEGER 0x8D95
|
||||
#define GL_BLUE_INTEGER 0x8D96
|
||||
#define GL_ALPHA_INTEGER 0x8D97
|
||||
#define GL_RGB_INTEGER 0x8D98
|
||||
#define GL_RGBA_INTEGER 0x8D99
|
||||
#define GL_BGR_INTEGER 0x8D9A
|
||||
#define GL_BGRA_INTEGER 0x8D9B
|
||||
#define GL_SAMPLER_1D_ARRAY 0x8DC0
|
||||
#define GL_SAMPLER_2D_ARRAY 0x8DC1
|
||||
#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
|
||||
#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
|
||||
#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
|
||||
#define GL_UNSIGNED_INT_VEC2 0x8DC6
|
||||
#define GL_UNSIGNED_INT_VEC3 0x8DC7
|
||||
#define GL_UNSIGNED_INT_VEC4 0x8DC8
|
||||
#define GL_INT_SAMPLER_1D 0x8DC9
|
||||
#define GL_INT_SAMPLER_2D 0x8DCA
|
||||
#define GL_INT_SAMPLER_3D 0x8DCB
|
||||
#define GL_INT_SAMPLER_CUBE 0x8DCC
|
||||
#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
|
||||
#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
|
||||
#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
|
||||
#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
|
||||
#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
|
||||
#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
|
||||
#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
|
||||
#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
|
||||
#define GL_QUERY_WAIT 0x8E13
|
||||
#define GL_QUERY_NO_WAIT 0x8E14
|
||||
#define GL_QUERY_BY_REGION_WAIT 0x8E15
|
||||
#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_multitexture
|
||||
#define GL_TEXTURE0_ARB 0x84C0
|
||||
#define GL_TEXTURE1_ARB 0x84C1
|
||||
@@ -1085,175 +974,6 @@ extern "C" {
|
||||
#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_depth_buffer_float
|
||||
#define GL_DEPTH_COMPONENT32F 0x8CAC
|
||||
#define GL_DEPTH32F_STENCIL8 0x8CAD
|
||||
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_draw_instanced
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_framebuffer_object
|
||||
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
|
||||
#define GL_FRAMEBUFFER_DEFAULT 0x8218
|
||||
#define GL_FRAMEBUFFER_UNDEFINED 0x8219
|
||||
#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
|
||||
#define GL_INDEX 0x8222
|
||||
#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
|
||||
#define GL_DEPTH_STENCIL 0x84F9
|
||||
#define GL_UNSIGNED_INT_24_8 0x84FA
|
||||
#define GL_DEPTH24_STENCIL8 0x88F0
|
||||
#define GL_TEXTURE_STENCIL_SIZE 0x88F1
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING
|
||||
#define GL_RENDERBUFFER_BINDING 0x8CA7
|
||||
#define GL_READ_FRAMEBUFFER 0x8CA8
|
||||
#define GL_DRAW_FRAMEBUFFER 0x8CA9
|
||||
#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
|
||||
#define GL_RENDERBUFFER_SAMPLES 0x8CAB
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
|
||||
#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
|
||||
#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#define GL_COLOR_ATTACHMENT1 0x8CE1
|
||||
#define GL_COLOR_ATTACHMENT2 0x8CE2
|
||||
#define GL_COLOR_ATTACHMENT3 0x8CE3
|
||||
#define GL_COLOR_ATTACHMENT4 0x8CE4
|
||||
#define GL_COLOR_ATTACHMENT5 0x8CE5
|
||||
#define GL_COLOR_ATTACHMENT6 0x8CE6
|
||||
#define GL_COLOR_ATTACHMENT7 0x8CE7
|
||||
#define GL_COLOR_ATTACHMENT8 0x8CE8
|
||||
#define GL_COLOR_ATTACHMENT9 0x8CE9
|
||||
#define GL_COLOR_ATTACHMENT10 0x8CEA
|
||||
#define GL_COLOR_ATTACHMENT11 0x8CEB
|
||||
#define GL_COLOR_ATTACHMENT12 0x8CEC
|
||||
#define GL_COLOR_ATTACHMENT13 0x8CED
|
||||
#define GL_COLOR_ATTACHMENT14 0x8CEE
|
||||
#define GL_COLOR_ATTACHMENT15 0x8CEF
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#define GL_RENDERBUFFER_WIDTH 0x8D42
|
||||
#define GL_RENDERBUFFER_HEIGHT 0x8D43
|
||||
#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
|
||||
#define GL_STENCIL_INDEX1 0x8D46
|
||||
#define GL_STENCIL_INDEX4 0x8D47
|
||||
#define GL_STENCIL_INDEX8 0x8D48
|
||||
#define GL_STENCIL_INDEX16 0x8D49
|
||||
#define GL_RENDERBUFFER_RED_SIZE 0x8D50
|
||||
#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
|
||||
#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
|
||||
#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
|
||||
#define GL_MAX_SAMPLES 0x8D57
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_framebuffer_sRGB
|
||||
#define GL_FRAMEBUFFER_SRGB 0x8DB9
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_geometry_shader4
|
||||
#define GL_LINES_ADJACENCY_ARB 0x000A
|
||||
#define GL_LINE_STRIP_ADJACENCY_ARB 0x000B
|
||||
#define GL_TRIANGLES_ADJACENCY_ARB 0x000C
|
||||
#define GL_TRIANGLE_STRIP_ADJACENCY_ARB 0x000D
|
||||
#define GL_PROGRAM_POINT_SIZE_ARB 0x8642
|
||||
#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB 0x8C29
|
||||
#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB 0x8DA7
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB 0x8DA8
|
||||
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB 0x8DA9
|
||||
#define GL_GEOMETRY_SHADER_ARB 0x8DD9
|
||||
#define GL_GEOMETRY_VERTICES_OUT_ARB 0x8DDA
|
||||
#define GL_GEOMETRY_INPUT_TYPE_ARB 0x8DDB
|
||||
#define GL_GEOMETRY_OUTPUT_TYPE_ARB 0x8DDC
|
||||
#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB 0x8DDD
|
||||
#define GL_MAX_VERTEX_VARYING_COMPONENTS_ARB 0x8DDE
|
||||
#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB 0x8DDF
|
||||
#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB 0x8DE0
|
||||
#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB 0x8DE1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_half_float_vertex
|
||||
#define GL_HALF_FLOAT 0x140B
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_instanced_arrays
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_map_buffer_range
|
||||
#define GL_MAP_READ_BIT 0x0001
|
||||
#define GL_MAP_WRITE_BIT 0x0002
|
||||
#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
|
||||
#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
|
||||
#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
|
||||
#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_texture_buffer_object
|
||||
#define GL_TEXTURE_BUFFER_ARB 0x8C2A
|
||||
#define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B
|
||||
#define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C
|
||||
#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D
|
||||
#define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_texture_compression_rgtc
|
||||
#define GL_COMPRESSED_RED_RGTC1 0x8DBB
|
||||
#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
|
||||
#define GL_COMPRESSED_RG_RGTC2 0x8DBD
|
||||
#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_texture_rg
|
||||
#define GL_RG 0x8227
|
||||
#define GL_RG_INTEGER 0x8228
|
||||
#define GL_R8 0x8229
|
||||
#define GL_R16 0x822A
|
||||
#define GL_RG8 0x822B
|
||||
#define GL_RG16 0x822C
|
||||
#define GL_R16F 0x822D
|
||||
#define GL_R32F 0x822E
|
||||
#define GL_RG16F 0x822F
|
||||
#define GL_RG32F 0x8230
|
||||
#define GL_R8I 0x8231
|
||||
#define GL_R8UI 0x8232
|
||||
#define GL_R16I 0x8233
|
||||
#define GL_R16UI 0x8234
|
||||
#define GL_R32I 0x8235
|
||||
#define GL_R32UI 0x8236
|
||||
#define GL_RG8I 0x8237
|
||||
#define GL_RG8UI 0x8238
|
||||
#define GL_RG16I 0x8239
|
||||
#define GL_RG16UI 0x823A
|
||||
#define GL_RG32I 0x823B
|
||||
#define GL_RG32UI 0x823C
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_vertex_array_object
|
||||
#define GL_VERTEX_ARRAY_BINDING 0x85B5
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_abgr
|
||||
#define GL_ABGR_EXT 0x8000
|
||||
#endif
|
||||
@@ -3662,40 +3382,6 @@ extern "C" {
|
||||
#ifndef GL_GREMEDY_frame_terminator
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_conditional_render
|
||||
#define GL_QUERY_WAIT_NV 0x8E13
|
||||
#define GL_QUERY_NO_WAIT_NV 0x8E14
|
||||
#define GL_QUERY_BY_REGION_WAIT_NV 0x8E15
|
||||
#define GL_QUERY_BY_REGION_NO_WAIT_NV 0x8E16
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_present_video
|
||||
#define GL_FRAME_NV 0x8E26
|
||||
#define GL_FIELDS_NV 0x8E27
|
||||
#define GL_CURRENT_TIME_NV 0x8E28
|
||||
#define GL_NUM_FILL_STREAMS_NV 0x8E29
|
||||
#define GL_PRESENT_TIME_NV 0x8E2A
|
||||
#define GL_PRESENT_DURATION_NV 0x8E2B
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_transform_feedback
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_EXT 0x8C8E
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT 0x8C84
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT 0x8C85
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT 0x8C8F
|
||||
#define GL_INTERLEAVED_ATTRIBS_EXT 0x8C8C
|
||||
#define GL_SEPARATE_ATTRIBS_EXT 0x8C8D
|
||||
#define GL_PRIMITIVES_GENERATED_EXT 0x8C87
|
||||
#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT 0x8C88
|
||||
#define GL_RASTERIZER_DISCARD_EXT 0x8C89
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT 0x8C8A
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT 0x8C8B
|
||||
#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT 0x8C80
|
||||
#define GL_TRANSFORM_FEEDBACK_VARYINGS_EXT 0x8C83
|
||||
#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT 0x8C7F
|
||||
#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT 0x8C76
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -3733,16 +3419,16 @@ typedef unsigned short GLhalfNV;
|
||||
#endif
|
||||
|
||||
#ifndef GLEXT_64_TYPES_DEFINED
|
||||
/* This code block is duplicated in glxext.h, so must be protected */
|
||||
/* This code block is duplicated in glext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GL_EXT_timer_query extension). */
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
#elif defined(__sun__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
#if defined(__arch64__)
|
||||
typedef long int int64_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
#else
|
||||
@@ -3750,7 +3436,7 @@ typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined( __VMS ) || defined(__sgi)
|
||||
#elif defined( __VMS )
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
@@ -4304,10 +3990,6 @@ typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei co
|
||||
typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
|
||||
#endif
|
||||
|
||||
#ifndef GL_VERSION_3_0
|
||||
#define GL_VERSION_3_0 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_multitexture
|
||||
#define GL_ARB_multitexture 1
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
@@ -4887,54 +4569,6 @@ typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
|
||||
#define GL_ARB_pixel_buffer_object 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_depth_buffer_float
|
||||
#define GL_ARB_depth_buffer_float 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_draw_instanced
|
||||
#define GL_ARB_draw_instanced 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_framebuffer_object
|
||||
#define GL_ARB_framebuffer_object 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_framebuffer_sRGB
|
||||
#define GL_ARB_framebuffer_sRGB 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_geometry_shader4
|
||||
#define GL_ARB_geometry_shader4 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_half_float_vertex
|
||||
#define GL_ARB_half_float_vertex 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_instanced_arrays
|
||||
#define GL_ARB_instanced_arrays 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_map_buffer_range
|
||||
#define GL_ARB_map_buffer_range 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_texture_buffer_object
|
||||
#define GL_ARB_texture_buffer_object 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_texture_compression_rgtc
|
||||
#define GL_ARB_texture_compression_rgtc 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_texture_rg
|
||||
#define GL_ARB_texture_rg 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_ARB_vertex_array_object
|
||||
#define GL_ARB_vertex_array_object 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_abgr
|
||||
#define GL_EXT_abgr 1
|
||||
#endif
|
||||
@@ -7629,18 +7263,6 @@ GLAPI void APIENTRY glFrameTerminatorGREMEDY (void);
|
||||
typedef void (APIENTRYP PFNGLFRAMETERMINATORGREMEDYPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_conditional_render
|
||||
#define GL_NV_conditional_render 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_NV_present_video
|
||||
#define GL_NV_present_video 1
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_transform_feedback
|
||||
#define GL_EXT_transform_feedback 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -46,9 +46,9 @@ extern "C" {
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number, required by OpenGL ABI for Linux */
|
||||
/* glxext.h last updated 2008/08/10 */
|
||||
/* glxext.h last updated 2007/04/21 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define GLX_GLXEXT_VERSION 20
|
||||
#define GLX_GLXEXT_VERSION 19
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
#define GLX_WINDOW_BIT 0x00000001
|
||||
@@ -346,26 +346,6 @@ extern "C" {
|
||||
#define GLX_AUX9_EXT 0x20EB
|
||||
#endif
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
#define GLX_GLX_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
#endif
|
||||
|
||||
#ifndef GLX_NV_video_out
|
||||
#define GLX_GLX_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define GLX_GLX_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define GLX_GLX_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define GLX_GLX_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define GLX_GLX_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define GLX_GLX_VIDEO_OUT_FRAME_NV 0x20C8
|
||||
#define GLX_GLX_VIDEO_OUT_FIELD_1_NV 0x20C9
|
||||
#define GLX_GLX_VIDEO_OUT_FIELD_2_NV 0x20CA
|
||||
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_1_2_NV 0x20CB
|
||||
#define GLX_GLX_VIDEO_OUT_STACKED_FIELDS_2_1_NV 0x20CC
|
||||
#endif
|
||||
|
||||
#ifndef GLX_NV_swap_group
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
@@ -400,7 +380,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
#ifndef GLEXT_64_TYPES_DEFINED
|
||||
/* This code block is duplicated in glext.h, so must be protected */
|
||||
/* This code block is duplicated in glxext.h, so must be protected */
|
||||
#define GLEXT_64_TYPES_DEFINED
|
||||
/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
|
||||
/* (as used in the GLX_OML_sync_control extension). */
|
||||
@@ -409,7 +389,7 @@ typedef struct {
|
||||
#elif defined(__sun__) || defined(__digital__)
|
||||
#include <inttypes.h>
|
||||
#if defined(__STDC__)
|
||||
#if defined(__arch64__) || defined(_LP64)
|
||||
#if defined(__arch64__)
|
||||
typedef long int int64_t;
|
||||
typedef unsigned long int uint64_t;
|
||||
#else
|
||||
@@ -417,7 +397,7 @@ typedef long long int int64_t;
|
||||
typedef unsigned long long int uint64_t;
|
||||
#endif /* __arch64__ */
|
||||
#endif /* __STDC__ */
|
||||
#elif defined( __VMS ) || defined(__sgi)
|
||||
#elif defined( __VMS )
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
@@ -797,18 +777,6 @@ typedef void ( * PFNGLXBINDTEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable,
|
||||
typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawable, int buffer);
|
||||
#endif
|
||||
|
||||
#ifndef GLX_NV_present_video
|
||||
#define GLX_NV_present_video 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_NV_video_out
|
||||
#define GLX_NV_video_out 1
|
||||
#endif
|
||||
|
||||
#ifndef GLX_NV_swap_group
|
||||
#define GLX_NV_swap_group 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
* Copyright 2007-2008 Red Hat, Inc.
|
||||
* (C) Copyright IBM Corporation 2004
|
||||
* All Rights Reserved.
|
||||
*
|
||||
@@ -34,20 +33,13 @@
|
||||
*
|
||||
* \author Kevin E. Martin <kevin@precisioninsight.com>
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
* \author Kristian Høgsberg <krh@redhat.com>
|
||||
*/
|
||||
|
||||
#ifndef DRI_INTERFACE_H
|
||||
#define DRI_INTERFACE_H
|
||||
|
||||
/* Make this something other than __APPLE__ for other arcs with no drm.h */
|
||||
#ifndef __APPLE__
|
||||
#include <GL/internal/glcore.h>
|
||||
#include <drm.h>
|
||||
#else
|
||||
typedef unsigned int drm_context_t;
|
||||
typedef unsigned int drm_drawable_t;
|
||||
typedef struct drm_clip_rect drm_clip_rect_t;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name DRI interface structures
|
||||
@@ -56,190 +48,65 @@ typedef struct drm_clip_rect drm_clip_rect_t;
|
||||
* side library and the DRI (direct rendering infrastructure).
|
||||
*/
|
||||
/*@{*/
|
||||
typedef struct __DRIdisplayRec __DRIdisplay;
|
||||
typedef struct __DRIscreenRec __DRIscreen;
|
||||
typedef struct __DRIcontextRec __DRIcontext;
|
||||
typedef struct __DRIdrawableRec __DRIdrawable;
|
||||
typedef struct __DRIconfigRec __DRIconfig;
|
||||
typedef struct __DRIframebufferRec __DRIframebuffer;
|
||||
typedef struct __DRIversionRec __DRIversion;
|
||||
|
||||
typedef struct __DRIcoreExtensionRec __DRIcoreExtension;
|
||||
typedef struct __DRIextensionRec __DRIextension;
|
||||
typedef struct __DRIcopySubBufferExtensionRec __DRIcopySubBufferExtension;
|
||||
typedef struct __DRIswapControlExtensionRec __DRIswapControlExtension;
|
||||
typedef struct __DRIallocateExtensionRec __DRIallocateExtension;
|
||||
typedef struct __DRIframeTrackingExtensionRec __DRIframeTrackingExtension;
|
||||
typedef struct __DRImediaStreamCounterExtensionRec __DRImediaStreamCounterExtension;
|
||||
typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension;
|
||||
typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension;
|
||||
typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension;
|
||||
typedef struct __DRIswrastExtensionRec __DRIswrastExtension;
|
||||
typedef struct __DRIdisplayRec __DRIdisplay;
|
||||
typedef struct __DRIscreenRec __DRIscreen;
|
||||
typedef struct __DRIcontextRec __DRIcontext;
|
||||
typedef struct __DRIdrawableRec __DRIdrawable;
|
||||
typedef struct __DRIdriverRec __DRIdriver;
|
||||
typedef struct __DRIframebufferRec __DRIframebuffer;
|
||||
typedef struct __DRIversionRec __DRIversion;
|
||||
typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods;
|
||||
typedef unsigned long __DRIid;
|
||||
typedef void __DRInativeDisplay;
|
||||
/*@}*/
|
||||
|
||||
|
||||
/**
|
||||
* Extension struct. Drivers 'inherit' from this struct by embedding
|
||||
* it as the first element in the extension struct.
|
||||
* \name Functions provided by the driver loader.
|
||||
*/
|
||||
/*@{*/
|
||||
/**
|
||||
* Type of a pointer to \c glXGetScreenDriver, as returned by
|
||||
* \c glXGetProcAddress. This function is used to get the name of the DRI
|
||||
* driver for the specified screen of the specified display. The driver
|
||||
* name is typically used with \c glXGetDriverConfig.
|
||||
*
|
||||
* We never break API in for a DRI extension. If we need to change
|
||||
* the way things work in a non-backwards compatible manner, we
|
||||
* introduce a new extension. During a transition period, we can
|
||||
* leave both the old and the new extension in the driver, which
|
||||
* allows us to move to the new interface without having to update the
|
||||
* loader(s) in lock step.
|
||||
* \sa glXGetScreenDriver, glXGetProcAddress, glXGetDriverConfig
|
||||
*/
|
||||
typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int scrNum);
|
||||
|
||||
/**
|
||||
* Type of a pointer to \c glXGetDriverConfig, as returned by
|
||||
* \c glXGetProcAddress. This function is used to get the XML document
|
||||
* describing the configuration options available for the specified driver.
|
||||
*
|
||||
* However, we can add entry points to an extension over time as long
|
||||
* as we don't break the old ones. As we add entry points to an
|
||||
* extension, we increase the version number. The corresponding
|
||||
* #define can be used to guard code that accesses the new entry
|
||||
* points at compile time and the version field in the extension
|
||||
* struct can be used at run-time to determine how to use the
|
||||
* extension.
|
||||
* \sa glXGetDriverConfig, glXGetProcAddress, glXGetScreenDriver
|
||||
*/
|
||||
struct __DRIextensionRec {
|
||||
const char *name;
|
||||
int version;
|
||||
};
|
||||
typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName);
|
||||
|
||||
/**
|
||||
* The first set of extension are the screen extensions, returned by
|
||||
* __DRIcore::getExtensions(). This entry point will return a list of
|
||||
* extensions and the loader can use the ones it knows about by
|
||||
* casting them to more specific extensions and advertising any GLX
|
||||
* extensions the DRI extensions enables.
|
||||
* Type of a pointer to \c glxEnableExtension, as returned by
|
||||
* \c __DRIinterfaceMethods::getProcAddress. This function is used to enable
|
||||
* a GLX extension on the specified screen.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Used by drivers to indicate support for setting the read drawable.
|
||||
*/
|
||||
#define __DRI_READ_DRAWABLE "DRI_ReadDrawable"
|
||||
#define __DRI_READ_DRAWABLE_VERSION 1
|
||||
|
||||
/**
|
||||
* Used by drivers that implement the GLX_MESA_copy_sub_buffer extension.
|
||||
*/
|
||||
#define __DRI_COPY_SUB_BUFFER "DRI_CopySubBuffer"
|
||||
#define __DRI_COPY_SUB_BUFFER_VERSION 1
|
||||
struct __DRIcopySubBufferExtensionRec {
|
||||
__DRIextension base;
|
||||
void (*copySubBuffer)(__DRIdrawable *drawable, int x, int y, int w, int h);
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by drivers that implement the GLX_SGI_swap_control or
|
||||
* GLX_MESA_swap_control extension.
|
||||
*/
|
||||
#define __DRI_SWAP_CONTROL "DRI_SwapControl"
|
||||
#define __DRI_SWAP_CONTROL_VERSION 1
|
||||
struct __DRIswapControlExtensionRec {
|
||||
__DRIextension base;
|
||||
void (*setSwapInterval)(__DRIdrawable *drawable, unsigned int inteval);
|
||||
unsigned int (*getSwapInterval)(__DRIdrawable *drawable);
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by drivers that implement the GLX_MESA_allocate_memory.
|
||||
*/
|
||||
#define __DRI_ALLOCATE "DRI_Allocate"
|
||||
#define __DRI_ALLOCATE_VERSION 1
|
||||
struct __DRIallocateExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
void *(*allocateMemory)(__DRIscreen *screen, GLsizei size,
|
||||
GLfloat readfreq, GLfloat writefreq,
|
||||
GLfloat priority);
|
||||
|
||||
void (*freeMemory)(__DRIscreen *screen, GLvoid *pointer);
|
||||
|
||||
GLuint (*memoryOffset)(__DRIscreen *screen, const GLvoid *pointer);
|
||||
};
|
||||
|
||||
/**
|
||||
* Used by drivers that implement the GLX_MESA_swap_frame_usage extension.
|
||||
*/
|
||||
#define __DRI_FRAME_TRACKING "DRI_FrameTracking"
|
||||
#define __DRI_FRAME_TRACKING_VERSION 1
|
||||
struct __DRIframeTrackingExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* Enable or disable frame usage tracking.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable);
|
||||
|
||||
/**
|
||||
* Retrieve frame usage information.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*queryFrameTracking)(__DRIdrawable *drawable,
|
||||
int64_t * sbc, int64_t * missedFrames,
|
||||
float * lastMissedUsage, float * usage);
|
||||
};
|
||||
typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name );
|
||||
/*@}*/
|
||||
|
||||
|
||||
/**
|
||||
* Used by drivers that implement the GLX_SGI_video_sync extension.
|
||||
* \name Functions and data provided by the driver.
|
||||
*/
|
||||
#define __DRI_MEDIA_STREAM_COUNTER "DRI_MediaStreamCounter"
|
||||
#define __DRI_MEDIA_STREAM_COUNTER_VERSION 1
|
||||
struct __DRImediaStreamCounterExtensionRec {
|
||||
__DRIextension base;
|
||||
/*@{*/
|
||||
|
||||
/**
|
||||
* Wait for the MSC to equal target_msc, or, if that has already passed,
|
||||
* the next time (MSC % divisor) is equal to remainder. If divisor is
|
||||
* zero, the function will return as soon as MSC is greater than or equal
|
||||
* to target_msc.
|
||||
*/
|
||||
int (*waitForMSC)(__DRIdrawable *drawable,
|
||||
int64_t target_msc, int64_t divisor, int64_t remainder,
|
||||
int64_t * msc, int64_t * sbc);
|
||||
|
||||
/**
|
||||
* Get the number of vertical refreshes since some point in time before
|
||||
* this function was first called (i.e., system start up).
|
||||
*/
|
||||
int (*getDrawableMSC)(__DRIscreen *screen, __DRIdrawable *drawable,
|
||||
int64_t *msc);
|
||||
};
|
||||
|
||||
|
||||
#define __DRI_TEX_OFFSET "DRI_TexOffset"
|
||||
#define __DRI_TEX_OFFSET_VERSION 1
|
||||
struct __DRItexOffsetExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* Method to override base texture image with a driver specific 'offset'.
|
||||
* The depth passed in allows e.g. to ignore the alpha channel of texture
|
||||
* images where the non-alpha components don't occupy a whole texel.
|
||||
*
|
||||
* For GLX_EXT_texture_from_pixmap with AIGLX.
|
||||
*/
|
||||
void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
|
||||
unsigned long long offset, GLint depth, GLuint pitch);
|
||||
};
|
||||
|
||||
|
||||
#define __DRI_TEX_BUFFER "DRI_TexBuffer"
|
||||
#define __DRI_TEX_BUFFER_VERSION 1
|
||||
struct __DRItexBufferExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* Method to override base texture image with the contents of a
|
||||
* __DRIdrawable.
|
||||
*
|
||||
* For GLX_EXT_texture_from_pixmap with AIGLX.
|
||||
*/
|
||||
void (*setTexBuffer)(__DRIcontext *pDRICtx,
|
||||
GLint target,
|
||||
__DRIdrawable *pDraw);
|
||||
};
|
||||
typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn,
|
||||
__DRIscreen *psc, const __GLcontextModes * modes,
|
||||
const __DRIversion * ddx_version, const __DRIversion * dri_version,
|
||||
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
|
||||
void * pSAREA, int fd, int internal_api_version,
|
||||
const __DRIinterfaceMethods * interface,
|
||||
__GLcontextModes ** driver_modes);
|
||||
typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC;
|
||||
extern CREATENEWSCREENFUNC __driCreateNewScreen_20050727;
|
||||
|
||||
|
||||
/**
|
||||
@@ -250,289 +117,6 @@ extern const char __driConfigOptions[];
|
||||
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* The following extensions describe loader features that the DRI
|
||||
* driver can make use of. Some of these are mandatory, such as the
|
||||
* getDrawableInfo extension for DRI and the DRI Loader extensions for
|
||||
* DRI2, while others are optional, and if present allow the driver to
|
||||
* expose certain features. The loader pass in a NULL terminated
|
||||
* array of these extensions to the driver in the createNewScreen
|
||||
* constructor.
|
||||
*/
|
||||
|
||||
typedef struct __DRIgetDrawableInfoExtensionRec __DRIgetDrawableInfoExtension;
|
||||
typedef struct __DRIsystemTimeExtensionRec __DRIsystemTimeExtension;
|
||||
typedef struct __DRIdamageExtensionRec __DRIdamageExtension;
|
||||
typedef struct __DRIloaderExtensionRec __DRIloaderExtension;
|
||||
typedef struct __DRIswrastLoaderExtensionRec __DRIswrastLoaderExtension;
|
||||
|
||||
|
||||
/**
|
||||
* Callback to getDrawableInfo protocol
|
||||
*/
|
||||
#define __DRI_GET_DRAWABLE_INFO "DRI_GetDrawableInfo"
|
||||
#define __DRI_GET_DRAWABLE_INFO_VERSION 1
|
||||
struct __DRIgetDrawableInfoExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* This function is used to get information about the position, size, and
|
||||
* clip rects of a drawable.
|
||||
*/
|
||||
GLboolean (* getDrawableInfo) ( __DRIdrawable *drawable,
|
||||
unsigned int * index, unsigned int * stamp,
|
||||
int * x, int * y, int * width, int * height,
|
||||
int * numClipRects, drm_clip_rect_t ** pClipRects,
|
||||
int * backX, int * backY,
|
||||
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects,
|
||||
void *loaderPrivate);
|
||||
};
|
||||
|
||||
/**
|
||||
* Callback to get system time for media stream counter extensions.
|
||||
*/
|
||||
#define __DRI_SYSTEM_TIME "DRI_SystemTime"
|
||||
#define __DRI_SYSTEM_TIME_VERSION 1
|
||||
struct __DRIsystemTimeExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* Get the 64-bit unadjusted system time (UST).
|
||||
*/
|
||||
int (*getUST)(int64_t * ust);
|
||||
|
||||
/**
|
||||
* Get the media stream counter (MSC) rate.
|
||||
*
|
||||
* Matching the definition in GLX_OML_sync_control, this function returns
|
||||
* the rate of the "media stream counter". In practical terms, this is
|
||||
* the frame refresh rate of the display.
|
||||
*/
|
||||
GLboolean (*getMSCRate)(__DRIdrawable *draw,
|
||||
int32_t * numerator, int32_t * denominator,
|
||||
void *loaderPrivate);
|
||||
};
|
||||
|
||||
/**
|
||||
* Damage reporting
|
||||
*/
|
||||
#define __DRI_DAMAGE "DRI_Damage"
|
||||
#define __DRI_DAMAGE_VERSION 1
|
||||
struct __DRIdamageExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* Reports areas of the given drawable which have been modified by the
|
||||
* driver.
|
||||
*
|
||||
* \param drawable which the drawing was done to.
|
||||
* \param rects rectangles affected, with the drawable origin as the
|
||||
* origin.
|
||||
* \param x X offset of the drawable within the screen (used in the
|
||||
* front_buffer case)
|
||||
* \param y Y offset of the drawable within the screen.
|
||||
* \param front_buffer boolean flag for whether the drawing to the
|
||||
* drawable was actually done directly to the front buffer (instead
|
||||
* of backing storage, for example)
|
||||
* \param loaderPrivate the data passed in at createNewDrawable time
|
||||
*/
|
||||
void (*reportDamage)(__DRIdrawable *draw,
|
||||
int x, int y,
|
||||
drm_clip_rect_t *rects, int num_rects,
|
||||
GLboolean front_buffer,
|
||||
void *loaderPrivate);
|
||||
};
|
||||
|
||||
/**
|
||||
* DRI2 Loader extension. This extension describes the basic
|
||||
* functionality the loader needs to provide for the DRI driver.
|
||||
*/
|
||||
#define __DRI_LOADER "DRI_Loader"
|
||||
#define __DRI_LOADER_VERSION 1
|
||||
struct __DRIloaderExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/**
|
||||
* Ping the windowing system to get it to reemit info for the
|
||||
* specified drawable in the DRI2 event buffer.
|
||||
*
|
||||
* \param draw the drawable for which to request info
|
||||
* \param tail the new event buffer tail pointer
|
||||
*/
|
||||
void (*reemitDrawableInfo)(__DRIdrawable *draw, unsigned int *tail,
|
||||
void *loaderPrivate);
|
||||
|
||||
void (*postDamage)(__DRIdrawable *draw, struct drm_clip_rect *rects,
|
||||
int num_rects, void *loaderPrivate);
|
||||
};
|
||||
|
||||
#define __DRI_SWRAST_IMAGE_OP_DRAW 1
|
||||
#define __DRI_SWRAST_IMAGE_OP_CLEAR 2
|
||||
#define __DRI_SWRAST_IMAGE_OP_SWAP 3
|
||||
|
||||
/**
|
||||
* SWRast Loader extension.
|
||||
*/
|
||||
#define __DRI_SWRAST_LOADER "DRI_SWRastLoader"
|
||||
#define __DRI_SWRAST_LOADER_VERSION 1
|
||||
struct __DRIswrastLoaderExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
/*
|
||||
* Drawable position and size
|
||||
*/
|
||||
void (*getDrawableInfo)(__DRIdrawable *drawable,
|
||||
int *x, int *y, int *width, int *height,
|
||||
void *loaderPrivate);
|
||||
|
||||
/**
|
||||
* Put image to drawable
|
||||
*/
|
||||
void (*putImage)(__DRIdrawable *drawable, int op,
|
||||
int x, int y, int width, int height, char *data,
|
||||
void *loaderPrivate);
|
||||
|
||||
/**
|
||||
* Get image from drawable
|
||||
*/
|
||||
void (*getImage)(__DRIdrawable *drawable,
|
||||
int x, int y, int width, int height, char *data,
|
||||
void *loaderPrivate);
|
||||
};
|
||||
|
||||
/**
|
||||
* The remaining extensions describe driver extensions, immediately
|
||||
* available interfaces provided by the driver. To start using the
|
||||
* driver, dlsym() for the __DRI_DRIVER_EXTENSIONS symbol and look for
|
||||
* the extension you need in the array.
|
||||
*/
|
||||
#define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions"
|
||||
|
||||
/**
|
||||
* Tokens for __DRIconfig attribs. A number of attributes defined by
|
||||
* GLX or EGL standards are not in the table, as they must be provided
|
||||
* by the loader. For example, FBConfig ID or visual ID, drawable type.
|
||||
*/
|
||||
|
||||
#define __DRI_ATTRIB_BUFFER_SIZE 1
|
||||
#define __DRI_ATTRIB_LEVEL 2
|
||||
#define __DRI_ATTRIB_RED_SIZE 3
|
||||
#define __DRI_ATTRIB_GREEN_SIZE 4
|
||||
#define __DRI_ATTRIB_BLUE_SIZE 5
|
||||
#define __DRI_ATTRIB_LUMINANCE_SIZE 6
|
||||
#define __DRI_ATTRIB_ALPHA_SIZE 7
|
||||
#define __DRI_ATTRIB_ALPHA_MASK_SIZE 8
|
||||
#define __DRI_ATTRIB_DEPTH_SIZE 9
|
||||
#define __DRI_ATTRIB_STENCIL_SIZE 10
|
||||
#define __DRI_ATTRIB_ACCUM_RED_SIZE 11
|
||||
#define __DRI_ATTRIB_ACCUM_GREEN_SIZE 12
|
||||
#define __DRI_ATTRIB_ACCUM_BLUE_SIZE 13
|
||||
#define __DRI_ATTRIB_ACCUM_ALPHA_SIZE 14
|
||||
#define __DRI_ATTRIB_SAMPLE_BUFFERS 15
|
||||
#define __DRI_ATTRIB_SAMPLES 16
|
||||
#define __DRI_ATTRIB_RENDER_TYPE 17
|
||||
#define __DRI_ATTRIB_CONFIG_CAVEAT 18
|
||||
#define __DRI_ATTRIB_CONFORMANT 19
|
||||
#define __DRI_ATTRIB_DOUBLE_BUFFER 20
|
||||
#define __DRI_ATTRIB_STEREO 21
|
||||
#define __DRI_ATTRIB_AUX_BUFFERS 22
|
||||
#define __DRI_ATTRIB_TRANSPARENT_TYPE 23
|
||||
#define __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE 24
|
||||
#define __DRI_ATTRIB_TRANSPARENT_RED_VALUE 25
|
||||
#define __DRI_ATTRIB_TRANSPARENT_GREEN_VALUE 26
|
||||
#define __DRI_ATTRIB_TRANSPARENT_BLUE_VALUE 27
|
||||
#define __DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE 28
|
||||
#define __DRI_ATTRIB_FLOAT_MODE 29
|
||||
#define __DRI_ATTRIB_RED_MASK 30
|
||||
#define __DRI_ATTRIB_GREEN_MASK 31
|
||||
#define __DRI_ATTRIB_BLUE_MASK 32
|
||||
#define __DRI_ATTRIB_ALPHA_MASK 33
|
||||
#define __DRI_ATTRIB_MAX_PBUFFER_WIDTH 34
|
||||
#define __DRI_ATTRIB_MAX_PBUFFER_HEIGHT 35
|
||||
#define __DRI_ATTRIB_MAX_PBUFFER_PIXELS 36
|
||||
#define __DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH 37
|
||||
#define __DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT 38
|
||||
#define __DRI_ATTRIB_VISUAL_SELECT_GROUP 39
|
||||
#define __DRI_ATTRIB_SWAP_METHOD 40
|
||||
#define __DRI_ATTRIB_MAX_SWAP_INTERVAL 41
|
||||
#define __DRI_ATTRIB_MIN_SWAP_INTERVAL 42
|
||||
#define __DRI_ATTRIB_BIND_TO_TEXTURE_RGB 43
|
||||
#define __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA 44
|
||||
#define __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE 45
|
||||
#define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS 46
|
||||
#define __DRI_ATTRIB_YINVERTED 47
|
||||
|
||||
/* __DRI_ATTRIB_RENDER_TYPE */
|
||||
#define __DRI_ATTRIB_RGBA_BIT 0x01
|
||||
#define __DRI_ATTRIB_COLOR_INDEX_BIT 0x02
|
||||
#define __DRI_ATTRIB_LUMINANCE_BIT 0x04
|
||||
|
||||
/* __DRI_ATTRIB_CONFIG_CAVEAT */
|
||||
#define __DRI_ATTRIB_SLOW_BIT 0x01
|
||||
#define __DRI_ATTRIB_NON_CONFORMANT_CONFIG 0x02
|
||||
|
||||
/* __DRI_ATTRIB_TRANSPARENT_TYPE */
|
||||
#define __DRI_ATTRIB_TRANSPARENT_RGB 0x00
|
||||
#define __DRI_ATTRIB_TRANSPARENT_INDEX 0x01
|
||||
|
||||
/* __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS */
|
||||
#define __DRI_ATTRIB_TEXTURE_1D_BIT 0x01
|
||||
#define __DRI_ATTRIB_TEXTURE_2D_BIT 0x02
|
||||
#define __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT 0x04
|
||||
|
||||
/**
|
||||
* This extension defines the core DRI functionality.
|
||||
*/
|
||||
#define __DRI_CORE "DRI_Core"
|
||||
#define __DRI_CORE_VERSION 1
|
||||
|
||||
struct __DRIcoreExtensionRec {
|
||||
__DRIextension base;
|
||||
|
||||
__DRIscreen *(*createNewScreen)(int screen, int fd,
|
||||
unsigned int sarea_handle,
|
||||
const __DRIextension **extensions,
|
||||
const __DRIconfig ***driverConfigs,
|
||||
void *loaderPrivate);
|
||||
|
||||
void (*destroyScreen)(__DRIscreen *screen);
|
||||
|
||||
const __DRIextension **(*getExtensions)(__DRIscreen *screen);
|
||||
|
||||
int (*getConfigAttrib)(const __DRIconfig *config,
|
||||
unsigned int attrib,
|
||||
unsigned int *value);
|
||||
|
||||
int (*indexConfigAttrib)(const __DRIconfig *config, int index,
|
||||
unsigned int *attrib, unsigned int *value);
|
||||
|
||||
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
unsigned int drawable_id,
|
||||
unsigned int head,
|
||||
void *loaderPrivate);
|
||||
|
||||
void (*destroyDrawable)(__DRIdrawable *drawable);
|
||||
|
||||
void (*swapBuffers)(__DRIdrawable *drawable);
|
||||
|
||||
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
__DRIcontext *shared,
|
||||
void *loaderPrivate);
|
||||
|
||||
int (*copyContext)(__DRIcontext *dest,
|
||||
__DRIcontext *src,
|
||||
unsigned long mask);
|
||||
|
||||
void (*destroyContext)(__DRIcontext *context);
|
||||
|
||||
int (*bindContext)(__DRIcontext *ctx,
|
||||
__DRIdrawable *pdraw,
|
||||
__DRIdrawable *pread);
|
||||
|
||||
int (*unbindContext)(__DRIcontext *ctx);
|
||||
};
|
||||
|
||||
/**
|
||||
* Stored version of some component (i.e., server-side DRI module, kernel-side
|
||||
@@ -549,6 +133,133 @@ struct __DRIversionRec {
|
||||
int patch; /**< Patch-level. */
|
||||
};
|
||||
|
||||
|
||||
typedef void (*__DRIfuncPtr)(void);
|
||||
|
||||
struct __DRIinterfaceMethodsRec {
|
||||
/**
|
||||
* Get pointer to named function.
|
||||
*/
|
||||
__DRIfuncPtr (*getProcAddress)( const char * proc_name );
|
||||
|
||||
/**
|
||||
* Create a list of \c __GLcontextModes structures.
|
||||
*/
|
||||
__GLcontextModes * (*createContextModes)(unsigned count,
|
||||
size_t minimum_bytes_per_struct);
|
||||
|
||||
/**
|
||||
* Destroy a list of \c __GLcontextModes structures.
|
||||
*
|
||||
* \todo
|
||||
* Determine if the drivers actually need to call this.
|
||||
*/
|
||||
void (*destroyContextModes)( __GLcontextModes * modes );
|
||||
|
||||
/**
|
||||
* Get the \c __DRIscreen for a given display and screen number.
|
||||
*/
|
||||
__DRIscreen *(*getScreen)(__DRInativeDisplay *dpy, int screenNum);
|
||||
|
||||
|
||||
/**
|
||||
* \name Client/server protocol functions.
|
||||
*
|
||||
* These functions implement the DRI client/server protocol for
|
||||
* context and drawable operations. Platforms that do not implement
|
||||
* the wire protocol (e.g., EGL) will implement glorified no-op functions.
|
||||
*/
|
||||
/*@{*/
|
||||
/**
|
||||
* Determine if the specified window ID still exists.
|
||||
*
|
||||
* \note
|
||||
* Implementations may assume that the driver will only pass an ID into
|
||||
* this function that actually corresponds to a window. On
|
||||
* implementations where windows can only be destroyed by the DRI driver
|
||||
* (e.g., EGL), this function is allowed to always return \c GL_TRUE.
|
||||
*/
|
||||
GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw);
|
||||
|
||||
/**
|
||||
* Create the server-side portion of the GL context.
|
||||
*/
|
||||
GLboolean (* createContext)( __DRInativeDisplay *dpy, int screenNum,
|
||||
int configID, void * contextID, drm_context_t * hw_context );
|
||||
|
||||
/**
|
||||
* Destroy the server-side portion of the GL context.
|
||||
*/
|
||||
GLboolean (* destroyContext)( __DRInativeDisplay *dpy, int screenNum,
|
||||
__DRIid context );
|
||||
|
||||
/**
|
||||
* Create the server-side portion of the drawable.
|
||||
*/
|
||||
GLboolean (*createDrawable)( __DRInativeDisplay * ndpy, int screen,
|
||||
__DRIid drawable, drm_drawable_t * hHWDrawable );
|
||||
|
||||
/**
|
||||
* Destroy the server-side portion of the drawable.
|
||||
*/
|
||||
GLboolean (*destroyDrawable)( __DRInativeDisplay * ndpy, int screen,
|
||||
__DRIid drawable );
|
||||
|
||||
/**
|
||||
* This function is used to get information about the position, size, and
|
||||
* clip rects of a drawable.
|
||||
*/
|
||||
GLboolean (* getDrawableInfo) ( __DRInativeDisplay *dpy, int scrn,
|
||||
__DRIid draw, unsigned int * index, unsigned int * stamp,
|
||||
int * x, int * y, int * width, int * height,
|
||||
int * numClipRects, drm_clip_rect_t ** pClipRects,
|
||||
int * backX, int * backY,
|
||||
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
|
||||
/*@}*/
|
||||
|
||||
|
||||
/**
|
||||
* \name Timing related functions.
|
||||
*/
|
||||
/*@{*/
|
||||
/**
|
||||
* Get the 64-bit unadjusted system time (UST).
|
||||
*/
|
||||
int (*getUST)(int64_t * ust);
|
||||
|
||||
/**
|
||||
* Get the media stream counter (MSC) rate.
|
||||
*
|
||||
* Matching the definition in GLX_OML_sync_control, this function returns
|
||||
* the rate of the "media stream counter". In practical terms, this is
|
||||
* the frame refresh rate of the display.
|
||||
*/
|
||||
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable,
|
||||
int32_t * numerator, int32_t * denominator);
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* Reports areas of the given drawable which have been modified by the
|
||||
* driver.
|
||||
*
|
||||
* \param drawable which the drawing was done to.
|
||||
* \param rects rectangles affected, with the drawable origin as the
|
||||
* origin.
|
||||
* \param x X offset of the drawable within the screen (used in the
|
||||
* front_buffer case)
|
||||
* \param y Y offset of the drawable within the screen.
|
||||
* \param front_buffer boolean flag for whether the drawing to the
|
||||
* drawable was actually done directly to the front buffer (instead
|
||||
* of backing storage, for example)
|
||||
*/
|
||||
void (*reportDamage)(__DRInativeDisplay * dpy, int screen,
|
||||
__DRIid drawable,
|
||||
int x, int y,
|
||||
drm_clip_rect_t *rects, int num_rects,
|
||||
int front_buffer);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Framebuffer information record. Used by libGL to communicate information
|
||||
* about the framebuffer to the driver's \c __driCreateNewScreen function.
|
||||
@@ -578,59 +289,229 @@ struct __DRIframebufferRec {
|
||||
|
||||
|
||||
/**
|
||||
* This extension provides alternative screen, drawable and context
|
||||
* constructors for legacy DRI functionality. This is used in
|
||||
* conjunction with the core extension.
|
||||
* Screen dependent methods. This structure is initialized during the
|
||||
* \c __DRIdisplayRec::createScreen call.
|
||||
*/
|
||||
#define __DRI_LEGACY "DRI_Legacy"
|
||||
#define __DRI_LEGACY_VERSION 1
|
||||
struct __DRIscreenRec {
|
||||
/**
|
||||
* Method to destroy the private DRI screen data.
|
||||
*/
|
||||
void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate);
|
||||
|
||||
struct __DRIlegacyExtensionRec {
|
||||
__DRIextension base;
|
||||
/**
|
||||
* Method to create the private DRI drawable data and initialize the
|
||||
* drawable dependent methods.
|
||||
*/
|
||||
void *(*createNewDrawable)(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
|
||||
__DRIid draw, __DRIdrawable *pdraw,
|
||||
int renderType, const int *attrs);
|
||||
|
||||
__DRIscreen *(*createNewScreen)(int screen,
|
||||
const __DRIversion *ddx_version,
|
||||
const __DRIversion *dri_version,
|
||||
const __DRIversion *drm_version,
|
||||
const __DRIframebuffer *frame_buffer,
|
||||
void *pSAREA, int fd,
|
||||
const __DRIextension **extensions,
|
||||
const __DRIconfig ***driver_configs,
|
||||
void *loaderPrivate);
|
||||
/**
|
||||
* Method to return a pointer to the DRI drawable data.
|
||||
*/
|
||||
__DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw,
|
||||
void *drawablePrivate);
|
||||
|
||||
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
drm_drawable_t hwDrawable,
|
||||
int renderType, const int *attrs,
|
||||
void *loaderPrivate);
|
||||
/**
|
||||
* Opaque pointer to private per screen direct rendering data. \c NULL
|
||||
* if direct rendering is not supported on this screen. Never
|
||||
* dereferenced in libGL.
|
||||
*/
|
||||
void *private;
|
||||
|
||||
__DRIcontext *(*createNewContext)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
int render_type,
|
||||
__DRIcontext *shared,
|
||||
drm_context_t hwContext,
|
||||
void *loaderPrivate);
|
||||
/**
|
||||
* Get the number of vertical refreshes since some point in time before
|
||||
* this function was first called (i.e., system start up).
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*getMSC)( void *screenPrivate, int64_t *msc );
|
||||
|
||||
/**
|
||||
* Opaque pointer that points back to the containing
|
||||
* \c __GLXscreenConfigs. This data structure is shared with DRI drivers
|
||||
* but \c __GLXscreenConfigs is not. However, they are needed by some GLX
|
||||
* functions called by DRI drivers.
|
||||
*
|
||||
* \since Internal API version 20030813.
|
||||
*/
|
||||
void *screenConfigs;
|
||||
|
||||
/**
|
||||
* Functions associated with MESA_allocate_memory.
|
||||
*
|
||||
* \since Internal API version 20030815.
|
||||
*/
|
||||
/*@{*/
|
||||
void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size,
|
||||
GLfloat readfreq, GLfloat writefreq,
|
||||
GLfloat priority);
|
||||
|
||||
void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer);
|
||||
|
||||
GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer);
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* Method to create the private DRI context data and initialize the
|
||||
* context dependent methods.
|
||||
*
|
||||
* \since Internal API version 20031201.
|
||||
*/
|
||||
void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
|
||||
int render_type,
|
||||
void *sharedPrivate, __DRIcontext *pctx);
|
||||
|
||||
/**
|
||||
* Method to override base texture image with a driver specific 'offset'.
|
||||
* The depth passed in allows e.g. to ignore the alpha channel of texture
|
||||
* images where the non-alpha components don't occupy a whole texel.
|
||||
*
|
||||
* For GLX_EXT_texture_from_pixmap with AIGLX.
|
||||
*
|
||||
* \since Internal API version 20070121.
|
||||
*/
|
||||
void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
|
||||
unsigned long long offset, GLint depth, GLuint pitch);
|
||||
};
|
||||
|
||||
/**
|
||||
* This extension provides alternative screen, drawable and context
|
||||
* constructors for swrast DRI functionality. This is used in
|
||||
* conjunction with the core extension.
|
||||
* Context dependent methods. This structure is initialized during the
|
||||
* \c __DRIscreenRec::createContext call.
|
||||
*/
|
||||
#define __DRI_SWRAST "DRI_SWRast"
|
||||
#define __DRI_SWRAST_VERSION 1
|
||||
struct __DRIcontextRec {
|
||||
/**
|
||||
* Method to destroy the private DRI context data.
|
||||
*/
|
||||
void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate);
|
||||
|
||||
struct __DRIswrastExtensionRec {
|
||||
__DRIextension base;
|
||||
/**
|
||||
* Opaque pointer to private per context direct rendering data.
|
||||
* \c NULL if direct rendering is not supported on the display or
|
||||
* screen used to create this context. Never dereferenced in libGL.
|
||||
*/
|
||||
void *private;
|
||||
|
||||
__DRIscreen *(*createNewScreen)(int screen,
|
||||
const __DRIextension **extensions,
|
||||
const __DRIconfig ***driver_configs,
|
||||
void *loaderPrivate);
|
||||
/**
|
||||
* Pointer to the mode used to create this context.
|
||||
*
|
||||
* \since Internal API version 20040317.
|
||||
*/
|
||||
const __GLcontextModes * mode;
|
||||
|
||||
__DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
|
||||
const __DRIconfig *config,
|
||||
void *loaderPrivate);
|
||||
/**
|
||||
* Method to bind a DRI drawable to a DRI graphics context.
|
||||
*
|
||||
* \since Internal API version 20050727.
|
||||
*/
|
||||
GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
|
||||
__DRIid read, __DRIcontext *ctx);
|
||||
|
||||
/**
|
||||
* Method to unbind a DRI drawable from a DRI graphics context.
|
||||
*
|
||||
* \since Internal API version 20050727.
|
||||
*/
|
||||
GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
|
||||
__DRIid read, __DRIcontext *ctx);
|
||||
};
|
||||
|
||||
/**
|
||||
* Drawable dependent methods. This structure is initialized during the
|
||||
* \c __DRIscreenRec::createDrawable call. \c createDrawable is not called
|
||||
* by libGL at this time. It's currently used via the dri_util.c utility code
|
||||
* instead.
|
||||
*/
|
||||
struct __DRIdrawableRec {
|
||||
/**
|
||||
* Method to destroy the private DRI drawable data.
|
||||
*/
|
||||
void (*destroyDrawable)(__DRInativeDisplay *dpy, void *drawablePrivate);
|
||||
|
||||
/**
|
||||
* Method to swap the front and back buffers.
|
||||
*/
|
||||
void (*swapBuffers)(__DRInativeDisplay *dpy, void *drawablePrivate);
|
||||
|
||||
/**
|
||||
* Opaque pointer to private per drawable direct rendering data.
|
||||
* \c NULL if direct rendering is not supported on the display or
|
||||
* screen used to create this drawable. Never dereferenced in libGL.
|
||||
*/
|
||||
void *private;
|
||||
|
||||
/**
|
||||
* Get the number of completed swap buffers for this drawable.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*getSBC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc );
|
||||
|
||||
/**
|
||||
* Wait for the SBC to be greater than or equal target_sbc.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*waitForSBC)( __DRInativeDisplay * dpy, void *drawablePriv,
|
||||
int64_t target_sbc,
|
||||
int64_t * msc, int64_t * sbc );
|
||||
|
||||
/**
|
||||
* Wait for the MSC to equal target_msc, or, if that has already passed,
|
||||
* the next time (MSC % divisor) is equal to remainder. If divisor is
|
||||
* zero, the function will return as soon as MSC is greater than or equal
|
||||
* to target_msc.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv,
|
||||
int64_t target_msc, int64_t divisor, int64_t remainder,
|
||||
int64_t * msc, int64_t * sbc );
|
||||
|
||||
/**
|
||||
* Like \c swapBuffers, but does NOT have an implicit \c glFlush. Once
|
||||
* rendering is complete, waits until MSC is equal to target_msc, or
|
||||
* if that has already passed, waits until (MSC % divisor) is equal
|
||||
* to remainder. If divisor is zero, the swap will happen as soon as
|
||||
* MSC is greater than or equal to target_msc.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate,
|
||||
int64_t target_msc,
|
||||
int64_t divisor, int64_t remainder);
|
||||
|
||||
/**
|
||||
* Enable or disable frame usage tracking.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, GLboolean enable);
|
||||
|
||||
/**
|
||||
* Retrieve frame usage information.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate,
|
||||
int64_t * sbc, int64_t * missedFrames,
|
||||
float * lastMissedUsage, float * usage );
|
||||
|
||||
/**
|
||||
* Used by drivers that implement the GLX_SGI_swap_control or
|
||||
* GLX_MESA_swap_control extension.
|
||||
*
|
||||
* \since Internal API version 20030317.
|
||||
*/
|
||||
unsigned swap_interval;
|
||||
|
||||
/**
|
||||
* Used by drivers that implement the GLX_MESA_copy_sub_buffer extension.
|
||||
*
|
||||
* \since Internal API version 20060314.
|
||||
*/
|
||||
void (*copySubBuffer)(__DRInativeDisplay *dpy, void *drawablePrivate,
|
||||
int x, int y, int w, int h);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Copyright 2007 Red Hat, 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
|
||||
* THE COPYRIGHT HOLDERS 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.
|
||||
*/
|
||||
|
||||
#ifndef DRI_SAREA_H
|
||||
#define DRI_SAREA_H
|
||||
|
||||
#include <drm.h>
|
||||
|
||||
/* The DRI2 SAREA holds a list of self-describing blocks. Each block
|
||||
* is 8 byte aligned and has a common 32-bit header word. The upper
|
||||
* 16 bits describe the type of the block and the lower 16 bits the
|
||||
* size. DRI2 only defines a couple of blocks and allows drivers to
|
||||
* define driver specific blocks using type codes from 0x8000 and up.
|
||||
* The type code 0x0000 defines the end of the sarea. */
|
||||
|
||||
#define DRI2_SAREA_BLOCK_HEADER(type, size) (((type) << 16) | (size))
|
||||
#define DRI2_SAREA_BLOCK_TYPE(b) ((b) >> 16)
|
||||
#define DRI2_SAREA_BLOCK_SIZE(b) ((b) & 0xffff)
|
||||
#define DRI2_SAREA_BLOCK_NEXT(p) \
|
||||
((void *) ((unsigned char *) (p) + \
|
||||
DRI2_SAREA_BLOCK_SIZE(*(unsigned int *) p)))
|
||||
|
||||
#define DRI2_SAREA_BLOCK_END 0x0000
|
||||
#define DRI2_SAREA_BLOCK_LOCK 0x0001
|
||||
#define DRI2_SAREA_BLOCK_EVENT_BUFFER 0x0002
|
||||
|
||||
/* Chipset specific blocks start at 0x8000, 0xffff is reserved. */
|
||||
|
||||
typedef struct __DRILock __DRILock;
|
||||
typedef struct __DRIEventBuffer __DRIEventBuffer;
|
||||
typedef struct __DRIDrawableBuffer __DRIDrawableBuffer;
|
||||
typedef struct __DRIDrawableConfigEvent __DRIDrawableConfigEvent;
|
||||
typedef struct __DRIBufferAttachEvent __DRIBufferAttachEvent;
|
||||
|
||||
struct __DRILock {
|
||||
unsigned int block_header;
|
||||
drm_hw_lock_t lock;
|
||||
|
||||
/* We use this with DRM_CAS to allocate lock IDs for the real lock.*/
|
||||
unsigned int next_id;
|
||||
};
|
||||
|
||||
struct __DRIEventBuffer {
|
||||
unsigned int block_header;
|
||||
unsigned int head; /* last valid event */
|
||||
unsigned int prealloc; /* event currently being written */
|
||||
unsigned int size; /* size of data */
|
||||
unsigned char data[0];
|
||||
};
|
||||
|
||||
enum {
|
||||
/* the four standard color buffers */
|
||||
DRI_DRAWABLE_BUFFER_FRONT_LEFT = 0,
|
||||
DRI_DRAWABLE_BUFFER_BACK_LEFT = 1,
|
||||
DRI_DRAWABLE_BUFFER_FRONT_RIGHT = 2,
|
||||
DRI_DRAWABLE_BUFFER_BACK_RIGHT = 3,
|
||||
/* optional aux buffer */
|
||||
DRI_DRAWABLE_BUFFER_AUX0 = 4,
|
||||
DRI_DRAWABLE_BUFFER_AUX1 = 5,
|
||||
DRI_DRAWABLE_BUFFER_AUX2 = 6,
|
||||
DRI_DRAWABLE_BUFFER_AUX3 = 7,
|
||||
DRI_DRAWABLE_BUFFER_DEPTH = 8,
|
||||
DRI_DRAWABLE_BUFFER_STENCIL = 9,
|
||||
DRI_DRAWABLE_BUFFER_ACCUM = 10,
|
||||
/* generic renderbuffers */
|
||||
DRI_DRAWABLE_BUFFER_COLOR0 = 11,
|
||||
DRI_DRAWABLE_BUFFER_COLOR1 = 12,
|
||||
DRI_DRAWABLE_BUFFER_COLOR2 = 13,
|
||||
DRI_DRAWABLE_BUFFER_COLOR3 = 14,
|
||||
DRI_DRAWABLE_BUFFER_COLOR4 = 15,
|
||||
DRI_DRAWABLE_BUFFER_COLOR5 = 16,
|
||||
DRI_DRAWABLE_BUFFER_COLOR6 = 17,
|
||||
DRI_DRAWABLE_BUFFER_COLOR7 = 18,
|
||||
DRI_DRAWABLE_BUFFER_COUNT = 19
|
||||
};
|
||||
|
||||
struct __DRIDrawableBuffer {
|
||||
unsigned int attachment;
|
||||
unsigned int handle;
|
||||
unsigned int pitch;
|
||||
unsigned short cpp;
|
||||
|
||||
/* Upper 8 bits are driver specific, lower 8 bits generic. The
|
||||
* bits can inidicate buffer properties such as tiled, swizzled etc. */
|
||||
unsigned short flags;
|
||||
};
|
||||
|
||||
#define DRI2_EVENT_HEADER(type, size) (((type) << 16) | (size))
|
||||
#define DRI2_EVENT_TYPE(b) ((b) >> 16)
|
||||
#define DRI2_EVENT_SIZE(b) ((b) & 0xffff)
|
||||
|
||||
#define DRI2_EVENT_PAD 0x0000
|
||||
#define DRI2_EVENT_DRAWABLE_CONFIG 0x0001
|
||||
#define DRI2_EVENT_BUFFER_ATTACH 0x0002
|
||||
|
||||
struct __DRIDrawableConfigEvent {
|
||||
unsigned int event_header;
|
||||
unsigned int drawable;
|
||||
short x;
|
||||
short y;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int num_rects;
|
||||
struct drm_clip_rect rects[0];
|
||||
};
|
||||
|
||||
struct __DRIBufferAttachEvent {
|
||||
unsigned int event_header;
|
||||
unsigned int drawable;
|
||||
__DRIDrawableBuffer buffer;
|
||||
};
|
||||
|
||||
#endif /* DRI_SAREA_H */
|
@@ -41,7 +41,6 @@
|
||||
#define GL_CORE_SGI 1
|
||||
#define GL_CORE_MESA 2
|
||||
#define GL_CORE_APPLE 4
|
||||
#define GL_CORE_WINDOWS 8
|
||||
|
||||
typedef struct __GLcontextRec __GLcontext;
|
||||
|
||||
|
@@ -1,79 +1,79 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Mesa bindings for SciTech MGL
|
||||
*
|
||||
* Copyright (C) 1996 SciTech Software.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Filename: mglmesa.h
|
||||
* Version: Revision: 1.1.1.1
|
||||
*
|
||||
* Language: ANSI C
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the Mesa/OpenGL interface bindings for the
|
||||
* SciTech MGL graphics library. Uses the MGL internal
|
||||
* device context structures to get direct access to the
|
||||
* high performance MGL rasterization functions for maximum
|
||||
* performance. Utilizes the VESA VBE/AF Accelerator Functions
|
||||
* via the MGL's accelerated device driver functions, as well
|
||||
* as basic DirectDraw accelerated functions provided by the
|
||||
* MGL.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __MGLMESA_H
|
||||
#define __MGLMESA_H
|
||||
|
||||
#include "mgraph.h"
|
||||
|
||||
/*------------------------- Function Prototypes ---------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" { /* Use "C" linkage when in C++ mode */
|
||||
#endif
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
#define GLAPIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
bool GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);
|
||||
#endif
|
||||
void GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);
|
||||
bool GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);
|
||||
bool GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);
|
||||
void GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);
|
||||
void GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);
|
||||
void GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);
|
||||
|
||||
/* Palette manipulation support. The reason we provide palette manipulation
|
||||
* routines is so that when rendering in double buffered modes with a
|
||||
* software backbuffer, the palette for the backbuffer is kept consistent
|
||||
* with the hardware front buffer.
|
||||
*/
|
||||
|
||||
void GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);
|
||||
void GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);
|
||||
void GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* End of "C" linkage for C++ */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __MGLMESA_H */
|
||||
/****************************************************************************
|
||||
*
|
||||
* Mesa bindings for SciTech MGL
|
||||
*
|
||||
* Copyright (C) 1996 SciTech Software.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Filename: mglmesa.h
|
||||
* Version: Revision: 1.1.1.1
|
||||
*
|
||||
* Language: ANSI C
|
||||
* Environment: Any
|
||||
*
|
||||
* Description: Header file for the Mesa/OpenGL interface bindings for the
|
||||
* SciTech MGL graphics library. Uses the MGL internal
|
||||
* device context structures to get direct access to the
|
||||
* high performance MGL rasterization functions for maximum
|
||||
* performance. Utilizes the VESA VBE/AF Accelerator Functions
|
||||
* via the MGL's accelerated device driver functions, as well
|
||||
* as basic DirectDraw accelerated functions provided by the
|
||||
* MGL.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __MGLMESA_H
|
||||
#define __MGLMESA_H
|
||||
|
||||
#include "mgraph.h"
|
||||
|
||||
/*------------------------- Function Prototypes ---------------------------*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" { /* Use "C" linkage when in C++ mode */
|
||||
#endif
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
#define GLAPIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
bool GLAPIENTRY MGLMesaInitDLL(MGLCallbacks *cb,char *version);
|
||||
#endif
|
||||
void GLAPIENTRY MGLMesaChooseVisual(MGLDC *dc,MGLVisual *visual);
|
||||
bool GLAPIENTRY MGLMesaSetVisual(MGLDC *dc,MGLVisual *visual);
|
||||
bool GLAPIENTRY MGLMesaCreateContext(MGLDC *dc,bool forceMemDC);
|
||||
void GLAPIENTRY MGLMesaDestroyContext(MGLDC *dc);
|
||||
void GLAPIENTRY MGLMesaMakeCurrent(MGLDC *dc);
|
||||
void GLAPIENTRY MGLMesaSwapBuffers(MGLDC *dc,bool waitVRT);
|
||||
|
||||
/* Palette manipulation support. The reason we provide palette manipulation
|
||||
* routines is so that when rendering in double buffered modes with a
|
||||
* software backbuffer, the palette for the backbuffer is kept consistent
|
||||
* with the hardware front buffer.
|
||||
*/
|
||||
|
||||
void GLAPIENTRY MGLMesaSetPaletteEntry(MGLDC *dc,int entry,uchar red,uchar green,uchar blue);
|
||||
void GLAPIENTRY MGLMesaSetPalette(MGLDC *dc,palette_t *pal,int numColors,int startIndex);
|
||||
void GLAPIENTRY MGLMesaRealizePalette(MGLDC *dc,int numColors,int startIndex,int waitVRT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* End of "C" linkage for C++ */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __MGLMESA_H */
|
||||
|
@@ -130,7 +130,7 @@ extern void WMesaPaletteChange(HPALETTE Pal);
|
||||
|
||||
extern void WMesaMove(void);
|
||||
|
||||
void WMesaShareLists(WMesaContext ctx_to_share, WMesaContext ctx);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* Mesa 3-D graphics library
|
||||
* Version: 7.1
|
||||
* Version: 4.1
|
||||
*
|
||||
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
* Copyright (C) 1999-2002 Brian Paul 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"),
|
||||
@@ -397,25 +397,6 @@ extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Texture from Pixmap
|
||||
* New in Mesa 7.1
|
||||
*/
|
||||
extern void
|
||||
XMesaBindTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer,
|
||||
const int *attrib_list);
|
||||
|
||||
extern void
|
||||
XMesaReleaseTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer);
|
||||
|
||||
|
||||
extern XMesaBuffer
|
||||
XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p,
|
||||
XMesaColormap cmap,
|
||||
int format, int target, int mipmap);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@@ -66,7 +66,6 @@ typedef XColor XMesaColor;
|
||||
#define XMesaDrawPoints XDrawPoints
|
||||
#define XMesaDrawLine XDrawLine
|
||||
#define XMesaFillRectangle XFillRectangle
|
||||
#define XMesaGetImage XGetImage
|
||||
#define XMesaPutImage XPutImage
|
||||
#define XMesaCopyArea XCopyArea
|
||||
|
||||
|
@@ -39,19 +39,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#ifndef _XMESA_XF86_H_
|
||||
#define _XMESA_XF86_H_
|
||||
|
||||
#include "GL/glxtokens.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "gcstruct.h"
|
||||
#include "servermd.h"
|
||||
|
||||
|
||||
typedef struct _XMesaImageRec {
|
||||
int width, height;
|
||||
char *data;
|
||||
int bytes_per_line; /* Padded to 32 bits */
|
||||
int bits_per_pixel;
|
||||
} XMesaImage;
|
||||
typedef struct _XMesaImageRec XMesaImage;
|
||||
|
||||
typedef ScreenRec XMesaDisplay;
|
||||
typedef PixmapPtr XMesaPixmap;
|
||||
@@ -128,26 +120,6 @@ do { \
|
||||
(*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \
|
||||
} while (0)
|
||||
|
||||
static _X_INLINE XMesaImage *XMesaGetImage(XMesaDisplay *dpy, PixmapPtr p, int x,
|
||||
int y, unsigned int width,
|
||||
unsigned int height,
|
||||
unsigned long plane_mask, int format)
|
||||
{
|
||||
XMesaImage *img = Xcalloc(sizeof(*img));
|
||||
|
||||
img->width = p->drawable.width;
|
||||
img->height = p->drawable.height;
|
||||
img->bits_per_pixel = p->drawable.bitsPerPixel;
|
||||
img->bytes_per_line = PixmapBytePad(width, p->drawable.depth);
|
||||
img->data = malloc(height * img->bytes_per_line);
|
||||
|
||||
/* Assumes: Images are always in ZPixmap format */
|
||||
(*p->drawable.pScreen->GetImage)(&p->drawable, x, y, width, height,
|
||||
plane_mask, ZPixmap, img->data);
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
|
||||
do { \
|
||||
/* Assumes: Images are always in ZPixmap format */ \
|
||||
@@ -169,13 +141,8 @@ do { \
|
||||
|
||||
|
||||
/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
|
||||
#ifdef CREATE_PIXMAP_USAGE_SCRATCH
|
||||
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
|
||||
(*__d->CreatePixmap)(__d, __w, __h, __depth, 0)
|
||||
#else
|
||||
#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
|
||||
(*__d->CreatePixmap)(__d, __w, __h, __depth)
|
||||
#endif
|
||||
|
||||
#define XMesaFreePixmap(__d,__b) \
|
||||
(*__d->DestroyPixmap)(__b)
|
||||
|
@@ -25,7 +25,7 @@ subdirs:
|
||||
install:
|
||||
|
||||
clean:
|
||||
-@for dir in $(SUBDIRS) tests ; do \
|
||||
@for dir in $(SUBDIRS) tests ; do \
|
||||
if [ -d $$dir ] ; then \
|
||||
(cd $$dir && $(MAKE) clean) ; \
|
||||
fi \
|
||||
|
@@ -19,8 +19,8 @@ INCLUDES = -I. -I- -I../../include
|
||||
default: demo sample GLInfo
|
||||
|
||||
clean:
|
||||
-rm -f demo sample GLInfo
|
||||
-rm -f *.o
|
||||
rm -f demo sample GLInfo
|
||||
rm -f *.o
|
||||
|
||||
demo: demo.o
|
||||
$(LD) demo.o $(LDFLAGS) $(LIBS) -o $@
|
||||
|
63
progs/demos/.gitignore
vendored
63
progs/demos/.gitignore
vendored
@@ -1,63 +0,0 @@
|
||||
.cvsignore
|
||||
arbfplight
|
||||
arbfslight
|
||||
arbocclude
|
||||
bounce
|
||||
clearspd
|
||||
copypix
|
||||
cubemap
|
||||
drawpix
|
||||
engine
|
||||
extfuncs.h
|
||||
fire
|
||||
fogcoord
|
||||
fplight
|
||||
fslight
|
||||
gamma
|
||||
gearbox
|
||||
gears
|
||||
geartrain
|
||||
glinfo
|
||||
gloss
|
||||
glslnoise
|
||||
gltestperf
|
||||
glutfx
|
||||
ipers
|
||||
isosurf
|
||||
lodbias
|
||||
morph3d
|
||||
multiarb
|
||||
occlude
|
||||
osdemo
|
||||
paltex
|
||||
pixeltex
|
||||
pointblast
|
||||
rain
|
||||
ray
|
||||
readpix
|
||||
readtex.c
|
||||
readtex.h
|
||||
reflect
|
||||
renormal
|
||||
shadowtex
|
||||
showbuffer.c
|
||||
showbuffer.h
|
||||
singlebuffer
|
||||
spectex
|
||||
spriteblast
|
||||
stex3d
|
||||
streaming_rect
|
||||
teapot
|
||||
terrain
|
||||
tessdemo
|
||||
texcyl
|
||||
texdown
|
||||
texenv
|
||||
texobj
|
||||
trackball.c
|
||||
trackball.h
|
||||
trispd
|
||||
tunnel
|
||||
tunnel2
|
||||
vao_demo
|
||||
winpos
|
@@ -11,11 +11,9 @@ OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
|
||||
|
||||
OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
|
||||
|
||||
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
|
||||
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
||||
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
|
||||
|
||||
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$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
|
||||
|
||||
PROGS = \
|
||||
arbfplight \
|
||||
@@ -23,11 +21,9 @@ PROGS = \
|
||||
arbocclude \
|
||||
bounce \
|
||||
clearspd \
|
||||
copypix \
|
||||
cubemap \
|
||||
drawpix \
|
||||
engine \
|
||||
fbo_firecube \
|
||||
fire \
|
||||
fogcoord \
|
||||
fplight \
|
||||
@@ -48,7 +44,6 @@ PROGS = \
|
||||
multiarb \
|
||||
paltex \
|
||||
pointblast \
|
||||
rain \
|
||||
ray \
|
||||
readpix \
|
||||
reflect \
|
||||
@@ -77,7 +72,7 @@ PROGS = \
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c
|
||||
.SUFFIXES: .cxx
|
||||
|
||||
|
||||
# make executable from .c file:
|
||||
.c: $(LIB_DEP) readtex.o
|
||||
@@ -125,51 +120,39 @@ extfuncs.h: $(TOP)/progs/util/extfuncs.h
|
||||
|
||||
|
||||
reflect: reflect.o showbuffer.o readtex.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) reflect.o showbuffer.o readtex.o $(LIBS) -o $@
|
||||
$(CC) $(LDFLAGS) reflect.o showbuffer.o readtex.o $(LIBS) -o $@
|
||||
|
||||
reflect.o: reflect.c showbuffer.h
|
||||
$(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
|
||||
|
||||
|
||||
shadowtex: shadowtex.o showbuffer.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) shadowtex.o showbuffer.o $(LIBS) -o $@
|
||||
$(CC) $(LDFLAGS) shadowtex.o showbuffer.o $(LIBS) -o $@
|
||||
|
||||
shadowtex.o: shadowtex.c showbuffer.h
|
||||
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
|
||||
|
||||
|
||||
gloss: gloss.o trackball.o readtex.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) gloss.o trackball.o readtex.o $(LIBS) -o $@
|
||||
$(CC) $(LDFLAGS) gloss.o trackball.o readtex.o $(LIBS) -o $@
|
||||
|
||||
gloss.o: gloss.c trackball.h
|
||||
$(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
|
||||
|
||||
|
||||
engine: engine.o trackball.o readtex.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) engine.o trackball.o readtex.o $(LIBS) -o $@
|
||||
$(CC) $(LDFLAGS) engine.o trackball.o readtex.o $(LIBS) -o $@
|
||||
|
||||
engine.o: engine.c trackball.h
|
||||
$(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
|
||||
|
||||
|
||||
fslight: fslight.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) fslight.o $(LIBS) -o $@
|
||||
$(CC) $(LDFLAGS) fslight.o $(LIBS) -o $@
|
||||
|
||||
fslight.o: fslight.c extfuncs.h
|
||||
$(CC) -c -I$(INCDIR) $(CFLAGS) fslight.c
|
||||
|
||||
rain: particles.o rain.o readtex.o
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
|
||||
|
||||
rain.o: rain.cxx readtex.h
|
||||
$(CXX) -c -I$(INCDIR) $(CXXFLAGS) $<
|
||||
|
||||
particles.o: particles.cxx
|
||||
$(CXX) -c -I$(INCDIR) $(CXXFLAGS) $<
|
||||
|
||||
|
||||
viewdds: viewdds.c
|
||||
$(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(LIBS) -L. -lgltc -o $@
|
||||
|
||||
|
||||
clean:
|
||||
|
@@ -1,248 +0,0 @@
|
||||
/**
|
||||
* glCopyPixels test
|
||||
*
|
||||
* Brian Paul
|
||||
* 14 Sep 2007
|
||||
*/
|
||||
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
#include "readtex.h"
|
||||
|
||||
#define IMAGE_FILE "../images/arch.rgb"
|
||||
|
||||
static int ImgWidth, ImgHeight;
|
||||
static GLenum ImgFormat;
|
||||
static GLubyte *Image = NULL;
|
||||
|
||||
static int WinWidth = 800, WinHeight = 800;
|
||||
static int Xpos, Ypos;
|
||||
static int Scissor = 0;
|
||||
static float Xzoom, Yzoom;
|
||||
static GLboolean DrawFront = GL_FALSE;
|
||||
static GLboolean Dither = GL_TRUE;
|
||||
|
||||
|
||||
static void Reset( void )
|
||||
{
|
||||
Xpos = Ypos = 20;
|
||||
Scissor = 0;
|
||||
Xzoom = Yzoom = 1.0;
|
||||
}
|
||||
|
||||
|
||||
static void Display( void )
|
||||
{
|
||||
const int dx = (WinWidth - ImgWidth) / 2;
|
||||
const int dy = (WinHeight - ImgHeight) / 2;
|
||||
|
||||
if (DrawFront) {
|
||||
glDrawBuffer(GL_FRONT);
|
||||
glReadBuffer(GL_FRONT);
|
||||
}
|
||||
else {
|
||||
glDrawBuffer(GL_BACK);
|
||||
glReadBuffer(GL_BACK);
|
||||
}
|
||||
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
/* draw original image */
|
||||
glWindowPos2iARB(dx, dy);
|
||||
glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
|
||||
|
||||
if (Scissor)
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
|
||||
/* draw copy */
|
||||
glPixelZoom(Xzoom, Yzoom);
|
||||
glWindowPos2iARB(Xpos, Ypos);
|
||||
glCopyPixels(dx, dy, ImgWidth, ImgHeight, GL_COLOR);
|
||||
glPixelZoom(1, 1);
|
||||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
|
||||
if (DrawFront)
|
||||
glFinish();
|
||||
else
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
static void Reshape( int width, int height )
|
||||
{
|
||||
WinWidth = width;
|
||||
WinHeight = height;
|
||||
|
||||
glViewport( 0, 0, width, height );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glOrtho( 0.0, width, 0.0, height, 0.0, 2.0 );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
|
||||
glScissor(width/4, height/4, width/2, height/2);
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case ' ':
|
||||
Reset();
|
||||
break;
|
||||
case 'd':
|
||||
Dither = !Dither;
|
||||
if (Dither)
|
||||
glEnable(GL_DITHER);
|
||||
else
|
||||
glDisable(GL_DITHER);
|
||||
break;
|
||||
case 's':
|
||||
Scissor = !Scissor;
|
||||
break;
|
||||
case 'x':
|
||||
Xzoom -= 0.1;
|
||||
break;
|
||||
case 'X':
|
||||
Xzoom += 0.1;
|
||||
break;
|
||||
case 'y':
|
||||
Yzoom -= 0.1;
|
||||
break;
|
||||
case 'Y':
|
||||
Yzoom += 0.1;
|
||||
break;
|
||||
case 'f':
|
||||
DrawFront = !DrawFront;
|
||||
printf("glDrawBuffer(%s)\n", DrawFront ? "GL_FRONT" : "GL_BACK");
|
||||
break;
|
||||
case 27:
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void SpecialKey( int key, int x, int y )
|
||||
{
|
||||
const int step = (glutGetModifiers() & GLUT_ACTIVE_SHIFT) ? 10 : 1;
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case GLUT_KEY_UP:
|
||||
Ypos += step;
|
||||
break;
|
||||
case GLUT_KEY_DOWN:
|
||||
Ypos -= step;
|
||||
break;
|
||||
case GLUT_KEY_LEFT:
|
||||
Xpos -= step;
|
||||
break;
|
||||
case GLUT_KEY_RIGHT:
|
||||
Xpos += step;
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void Init( GLboolean ciMode, const char *filename )
|
||||
{
|
||||
printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
|
||||
Image = LoadRGBImage( filename, &ImgWidth, &ImgHeight, &ImgFormat );
|
||||
if (!Image) {
|
||||
printf("Couldn't read %s\n", filename);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (ciMode) {
|
||||
/* Convert RGB image to grayscale */
|
||||
GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight );
|
||||
GLint i;
|
||||
for (i=0; i<ImgWidth*ImgHeight; i++) {
|
||||
int gray = Image[i*3] + Image[i*3+1] + Image[i*3+2];
|
||||
indexImage[i] = gray / 3;
|
||||
}
|
||||
free(Image);
|
||||
Image = indexImage;
|
||||
ImgFormat = GL_COLOR_INDEX;
|
||||
|
||||
for (i=0;i<255;i++) {
|
||||
float g = i / 255.0;
|
||||
glutSetColor(i, g, g, g);
|
||||
}
|
||||
}
|
||||
|
||||
printf("Loaded %d by %d image\n", ImgWidth, ImgHeight );
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, ImgWidth);
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
|
||||
static void Usage(void)
|
||||
{
|
||||
printf("Keys:\n");
|
||||
printf(" SPACE Reset Parameters\n");
|
||||
printf(" Up/Down Move image up/down (SHIFT for large step)\n");
|
||||
printf(" Left/Right Move image left/right (SHIFT for large step)\n");
|
||||
printf(" x Decrease X-axis PixelZoom\n");
|
||||
printf(" X Increase X-axis PixelZoom\n");
|
||||
printf(" y Decrease Y-axis PixelZoom\n");
|
||||
printf(" Y Increase Y-axis PixelZoom\n");
|
||||
printf(" s Toggle GL_SCISSOR_TEST\n");
|
||||
printf(" f Toggle front/back buffer drawing\n");
|
||||
printf(" ESC Exit\n");
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
GLboolean ciMode = GL_FALSE;
|
||||
const char *filename = IMAGE_FILE;
|
||||
int i = 1;
|
||||
|
||||
if (argc > i && strcmp(argv[i], "-ci")==0) {
|
||||
ciMode = GL_TRUE;
|
||||
i++;
|
||||
}
|
||||
if (argc > i) {
|
||||
filename = argv[i];
|
||||
}
|
||||
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( WinWidth, WinHeight );
|
||||
|
||||
if (ciMode)
|
||||
glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
|
||||
else
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
|
||||
|
||||
glutCreateWindow(argv[0]);
|
||||
|
||||
Init(ciMode, filename);
|
||||
Usage();
|
||||
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
glutDisplayFunc( Display );
|
||||
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
@@ -47,8 +47,6 @@ static GLfloat Xrot = 0, Yrot = 0;
|
||||
static GLfloat EyeDist = 10;
|
||||
static GLboolean use_vertex_arrays = GL_FALSE;
|
||||
static GLboolean anim = GL_TRUE;
|
||||
static GLboolean NoClear = GL_FALSE;
|
||||
static GLint FrameParity = 0;
|
||||
|
||||
#define eps1 0.99
|
||||
#define br 20.0 /* box radius */
|
||||
@@ -158,30 +156,7 @@ static void draw_skybox( void )
|
||||
|
||||
static void draw( void )
|
||||
{
|
||||
if (NoClear) {
|
||||
/* This demonstrates how we can avoid calling glClear.
|
||||
* This method only works if every pixel in the window is painted for
|
||||
* every frame.
|
||||
* We can simply skip clearing of the color buffer in this case.
|
||||
* For the depth buffer, we alternately use a different subrange of
|
||||
* the depth buffer for each frame. For the odd frame use the range
|
||||
* [0, 0.5] with GL_LESS. For the even frames, use the range [1, 0.5]
|
||||
* with GL_GREATER.
|
||||
*/
|
||||
FrameParity = 1 - FrameParity;
|
||||
if (FrameParity) {
|
||||
glDepthRange(0.0, 0.5);
|
||||
glDepthFunc(GL_LESS);
|
||||
}
|
||||
else {
|
||||
glDepthRange(1.0, 0.5);
|
||||
glDepthFunc(GL_GREATER);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* ordinary clearing */
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glPushMatrix(); /*MODELVIEW*/
|
||||
glTranslatef( 0.0, 0.0, -EyeDist );
|
||||
@@ -477,24 +452,6 @@ static void usage(void)
|
||||
}
|
||||
|
||||
|
||||
static void parse_args(int argc, char *argv[])
|
||||
{
|
||||
int initFlag = 0;
|
||||
int i;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "-i") == 0)
|
||||
initFlag = 1;
|
||||
else if (strcmp(argv[i], "--noclear") == 0)
|
||||
NoClear = GL_TRUE;
|
||||
else {
|
||||
fprintf(stderr, "Bad option: %s\n", argv[i]);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
init (initFlag);
|
||||
}
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit(&argc, argv);
|
||||
@@ -502,13 +459,17 @@ int main( int argc, char *argv[] )
|
||||
glutInitWindowSize(600, 500);
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
|
||||
glutCreateWindow("Texture Cube Mapping");
|
||||
|
||||
if (argc > 1 && strcmp(argv[1] , "-i") == 0)
|
||||
init( 1 );
|
||||
else
|
||||
init( 0 );
|
||||
glutReshapeFunc( reshape );
|
||||
glutKeyboardFunc( key );
|
||||
glutSpecialFunc( specialkey );
|
||||
glutDisplayFunc( draw );
|
||||
if (anim)
|
||||
glutIdleFunc(idle);
|
||||
parse_args(argc, argv);
|
||||
usage();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Makefile for GLUT-based demo programs for VMS
|
||||
# contributed by Jouk Jansen joukj@hrem.nano.tudelft.nl
|
||||
# Last update : 30 November 2007
|
||||
# contributed by Jouk Jansen joukj@hrem.stm.tudelft.nl
|
||||
# Last update : 20 May 2005
|
||||
|
||||
.first
|
||||
define gl [--.include.gl]
|
||||
@@ -21,10 +21,10 @@ LIB_DEP = [--.lib]$(GL_LIB) [--.lib]$(GLU_LIB) [--.lib]$(GLUT_LIB)
|
||||
.endif
|
||||
|
||||
|
||||
PROGS = bounce.exe,clearspd.exe,drawpix.exe,gamma.exe,gears.exe,\
|
||||
glinfo.exe,glutfx.exe,isosurf.exe,morph3d.exe,\
|
||||
paltex.exe,pointblast.exe,reflect.exe,spectex.exe,stex3d.exe,\
|
||||
tessdemo.exe,texcyl.exe,texobj.exe,trispd.exe,winpos.exe
|
||||
PROGS = bounce.exe;,clearspd.exe;,drawpix.exe;,gamma.exe;,gears.exe;,\
|
||||
glinfo.exe;,glutfx.exe;,isosurf.exe;,morph3d.exe;,\
|
||||
paltex.exe;,pointblast.exe;,reflect.exe;,spectex.exe;,stex3d.exe;,\
|
||||
tessdemo.exe;,texcyl.exe;,texobj.exe;,trispd.exe;,winpos.exe;
|
||||
|
||||
|
||||
##### RULES #####
|
||||
@@ -39,33 +39,33 @@ clean :
|
||||
delete *.obj;*
|
||||
|
||||
realclean :
|
||||
delete *.exe;*
|
||||
delete $(PROGS)
|
||||
delete *.obj;*
|
||||
|
||||
bounce.exe : bounce.obj $(LIB_DEP)
|
||||
clearspd.exe : clearspd.obj $(LIB_DEP)
|
||||
drawpix.exe : drawpix.obj $(LIB_DEP) [-.util]readtex.obj
|
||||
bounce.exe; : bounce.obj $(LIB_DEP)
|
||||
clearspd.exe; : clearspd.obj $(LIB_DEP)
|
||||
drawpix.exe; : drawpix.obj $(LIB_DEP) [-.util]readtex.obj
|
||||
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
|
||||
gamma.exe : gamma.obj $(LIB_DEP)
|
||||
gears.exe : gears.obj $(LIB_DEP)
|
||||
glinfo.exe : glinfo.obj $(LIB_DEP)
|
||||
glutfx.exe : glutfx.obj $(LIB_DEP)
|
||||
isosurf.exe : isosurf.obj $(LIB_DEP) [-.util]readtex.obj
|
||||
gamma.exe; : gamma.obj $(LIB_DEP)
|
||||
gears.exe; : gears.obj $(LIB_DEP)
|
||||
glinfo.exe; : glinfo.obj $(LIB_DEP)
|
||||
glutfx.exe; : glutfx.obj $(LIB_DEP)
|
||||
isosurf.exe; : isosurf.obj $(LIB_DEP) [-.util]readtex.obj
|
||||
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
|
||||
morph3d.exe : morph3d.obj $(LIB_DEP)
|
||||
paltex.exe : paltex.obj $(LIB_DEP)
|
||||
pointblast.exe : pointblast.obj $(LIB_DEP)
|
||||
reflect.exe : reflect.obj [-.util]readtex.obj [-.util]showbuffer.obj\
|
||||
morph3d.exe; : morph3d.obj $(LIB_DEP)
|
||||
paltex.exe; : paltex.obj $(LIB_DEP)
|
||||
pointblast.exe; : pointblast.obj $(LIB_DEP)
|
||||
reflect.exe; : reflect.obj [-.util]readtex.obj [-.util]showbuffer.obj\
|
||||
$(LIB_DEP)
|
||||
cxxlink $(MMS$TARGET_NAME),[-.util]readtex,showbuffer,$(GL_LIBS)
|
||||
spectex.exe : spectex.obj $(LIB_DEP)
|
||||
stex3d.exe : stex3d.obj $(LIB_DEP)
|
||||
tessdemo.exe : tessdemo.obj $(LIB_DEP)
|
||||
texcyl.exe : texcyl.obj [-.util]readtex.obj $(LIB_DEP)
|
||||
spectex.exe; : spectex.obj $(LIB_DEP)
|
||||
stex3d.exe; : stex3d.obj $(LIB_DEP)
|
||||
tessdemo.exe; : tessdemo.obj $(LIB_DEP)
|
||||
texcyl.exe; : texcyl.obj [-.util]readtex.obj $(LIB_DEP)
|
||||
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
|
||||
texobj.exe : texobj.obj $(LIB_DEP)
|
||||
trispd.exe : trispd.obj $(LIB_DEP)
|
||||
winpos.exe : winpos.obj [-.util]readtex.obj $(LIB_DEP)
|
||||
texobj.exe; : texobj.obj $(LIB_DEP)
|
||||
trispd.exe; : trispd.obj $(LIB_DEP)
|
||||
winpos.exe; : winpos.obj [-.util]readtex.obj $(LIB_DEP)
|
||||
cxxlink $(MMS$TARGET_NAME),[-.util]readtex.obj,$(GL_LIBS)
|
||||
|
||||
|
||||
|
@@ -445,8 +445,8 @@ DrawConnector(float length, float thickness,
|
||||
for (i = 0; i <= 36; i++) {
|
||||
const int j = i % 36;
|
||||
glNormal3f(normals[j][0], normals[j][1], 0);
|
||||
glVertex3f(points[j][0], points[j][1], z1);
|
||||
glVertex3f(points[j][0], points[j][1], z0);
|
||||
glVertex3f(points[j][0], points[j][1], z1);
|
||||
}
|
||||
glEnd();
|
||||
}
|
||||
@@ -745,7 +745,7 @@ DrawEngine(const Engine *eng, float crankAngle)
|
||||
glTranslatef(0, 0, -0.5 * crankLen);
|
||||
|
||||
/* crankshaft */
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, CrankshaftColor);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, CrankshaftColor);
|
||||
glColor4fv(CrankshaftColor);
|
||||
DrawPositionedCrankshaft(eng, crankAngle);
|
||||
|
||||
@@ -764,12 +764,12 @@ DrawEngine(const Engine *eng, float crankAngle)
|
||||
rot += k * eng->V_Angle;
|
||||
|
||||
/* piston */
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, PistonColor);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, PistonColor);
|
||||
glColor4fv(PistonColor);
|
||||
DrawPositionedPiston(eng, rot);
|
||||
|
||||
/* connecting rod */
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, ConnRodColor);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, ConnRodColor);
|
||||
glColor4fv(ConnRodColor);
|
||||
DrawPositionedConnectingRod(eng, rot);
|
||||
glPopMatrix();
|
||||
@@ -784,7 +784,7 @@ DrawEngine(const Engine *eng, float crankAngle)
|
||||
}
|
||||
glEnable(GL_CULL_FACE);
|
||||
|
||||
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, BlockColor);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, BlockColor);
|
||||
glColor4fv(BlockColor);
|
||||
if (eng->CrankList)
|
||||
glCallList(eng->BlockList);
|
||||
@@ -1254,7 +1254,6 @@ Init(void)
|
||||
{
|
||||
const GLfloat lightColor[4] = { 0.7, 0.7, 0.7, 1.0 };
|
||||
const GLfloat specular[4] = { 0.8, 0.8, 0.8, 1.0 };
|
||||
const GLfloat backColor[4] = { 1, 1, 0, 0 };
|
||||
|
||||
Q = gluNewQuadric();
|
||||
gluQuadricNormals(Q, GLU_SMOOTH);
|
||||
@@ -1266,14 +1265,10 @@ Init(void)
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_LIGHT0);
|
||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, lightColor);
|
||||
glMaterialf(GL_FRONT, GL_SHININESS, 40);
|
||||
glMaterialfv(GL_FRONT, GL_SPECULAR, specular);
|
||||
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 40);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
|
||||
glEnable(GL_NORMALIZE);
|
||||
|
||||
glMaterialfv(GL_BACK, GL_DIFFUSE, backColor);
|
||||
#if 0
|
||||
glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1);
|
||||
#endif
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
InitViewInfo(&View);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -264,44 +264,38 @@ draw(void)
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0, 0.0, -40.0);
|
||||
|
||||
/* clear whole depth buffer */
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
|
||||
/* clear upper-left corner of color buffer (unused space) */
|
||||
glScissor(0, TexHeight, TexWidth, WinHeight - TexHeight);
|
||||
glClearColor(0.0, 0.0, 0.0, 0.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
/* clear lower-left corner of color buffer */
|
||||
/* draw gears */
|
||||
glViewport(0, 0, TexWidth, TexHeight);
|
||||
glScissor(0, 0, TexWidth, TexHeight);
|
||||
glClearColor(0.5, 0.5, 0.8, 0.0);
|
||||
glClearColor(1, 1, 1, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
/* draw gears in lower-left corner */
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 60.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
DrawGears();
|
||||
|
||||
/* copy color buffer to texture */
|
||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, TexWidth, TexHeight);
|
||||
|
||||
/* clear right half of color buffer */
|
||||
/* draw textured cube */
|
||||
glViewport(TexWidth, 0, WinWidth - TexWidth, WinHeight);
|
||||
glScissor(TexWidth, 0, WinWidth - TexWidth, WinHeight);
|
||||
glClearColor(0.5, 0.5, 0.8, 0.0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
/* draw textured cube in right half of window */
|
||||
ar = (float) (WinWidth - TexWidth) / WinHeight;
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glFrustum(-ar, ar, -1.0, 1.0, 5.0, 60.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
DrawCube();
|
||||
|
||||
/* finish up */
|
||||
|
@@ -27,9 +27,6 @@ static GLint T0 = 0;
|
||||
static GLint Frames = 0;
|
||||
static GLint autoexit = 0;
|
||||
static GLint win = 0;
|
||||
static GLboolean Visible = GL_TRUE;
|
||||
static GLboolean Animate = GL_TRUE;
|
||||
static GLfloat viewDist = 40.0;
|
||||
|
||||
|
||||
/**
|
||||
@@ -182,9 +179,6 @@ draw(void)
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
glTranslatef(0.0, 0.0, -viewDist);
|
||||
|
||||
glRotatef(view_rotx, 1.0, 0.0, 0.0);
|
||||
glRotatef(view_roty, 0.0, 1.0, 0.0);
|
||||
glRotatef(view_rotz, 0.0, 0.0, 1.0);
|
||||
@@ -246,15 +240,6 @@ idle(void)
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
static void
|
||||
update_idle_func(void)
|
||||
{
|
||||
if (Visible && Animate)
|
||||
glutIdleFunc(idle);
|
||||
else
|
||||
glutIdleFunc(NULL);
|
||||
}
|
||||
|
||||
/* change view angle, exit upon ESC */
|
||||
/* ARGSUSED1 */
|
||||
static void
|
||||
@@ -267,16 +252,6 @@ key(unsigned char k, int x, int y)
|
||||
case 'Z':
|
||||
view_rotz -= 5.0;
|
||||
break;
|
||||
case 'd':
|
||||
viewDist += 1.0;
|
||||
break;
|
||||
case 'D':
|
||||
viewDist -= 1.0;
|
||||
break;
|
||||
case 'a':
|
||||
Animate = !Animate;
|
||||
update_idle_func();
|
||||
break;
|
||||
case 27: /* Escape */
|
||||
cleanup();
|
||||
exit(0);
|
||||
@@ -320,8 +295,10 @@ reshape(int width, int height)
|
||||
glViewport(0, 0, (GLint) width, (GLint) height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glFrustum(-1.0, 1.0, -h, h, 5.0, 200.0);
|
||||
glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0, 0.0, -40.0);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -374,12 +351,13 @@ init(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
visible(int vis)
|
||||
{
|
||||
Visible = vis;
|
||||
update_idle_func();
|
||||
if (vis == GLUT_VISIBLE)
|
||||
glutIdleFunc(idle);
|
||||
else
|
||||
glutIdleFunc(NULL);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -397,7 +375,6 @@ int main(int argc, char *argv[])
|
||||
glutKeyboardFunc(key);
|
||||
glutSpecialFunc(special);
|
||||
glutVisibilityFunc(visible);
|
||||
update_idle_func();
|
||||
|
||||
glutMainLoop();
|
||||
return 0; /* ANSI C requires main to return int. */
|
||||
|
@@ -1,119 +1,119 @@
|
||||
BACKGROUND = 0.000 0.500 0.700
|
||||
|
||||
ANAME = AXLE1
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = -7.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 6.000
|
||||
AMOTORED = 1
|
||||
AANGULARVELOCITY = 90.000
|
||||
ADIRECTION = 1
|
||||
|
||||
ANAME = AXLE2
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = -3.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 12.000
|
||||
AMOTORED = 0
|
||||
|
||||
ANAME = AXLE3
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = 1.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 6.000
|
||||
AMOTORED = 0
|
||||
|
||||
ANAME = AXLE4
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = 8.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 18.000
|
||||
AMOTORED = 0
|
||||
|
||||
ANAME = AXLE5
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 1
|
||||
APOSITION = 8.000 -8.200 -7.400
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 12.000
|
||||
AMOTORED = 0
|
||||
|
||||
GNAME = GEAR1
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 2.200
|
||||
GWIDTH = 3.000
|
||||
GTEETH = 40
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE1
|
||||
GPOSITION = 0.000
|
||||
|
||||
GNAME = GEAR2
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 2.200
|
||||
GWIDTH = 3.000
|
||||
GTEETH = 30
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE2
|
||||
GPOSITION = 0.000
|
||||
|
||||
GNAME = GEAR3
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 2.200
|
||||
GWIDTH = 3.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE3
|
||||
GPOSITION = 0.000
|
||||
|
||||
GNAME = GEAR4
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 1.700
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE2
|
||||
GPOSITION = 5.000
|
||||
|
||||
GNAME = GEAR5
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 3.000
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE4
|
||||
GPOSITION = 5.000
|
||||
|
||||
GNAME = GEAR6
|
||||
GTYPE = BEVEL
|
||||
GFACE = 0
|
||||
GRADIUS = 4.000
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 1.700
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE4
|
||||
GPOSITION = -4.000
|
||||
|
||||
GNAME = GEAR7
|
||||
GTYPE = BEVEL
|
||||
GFACE = 0
|
||||
GRADIUS = 4.000
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 1.700
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE5
|
||||
GPOSITION = 5.000
|
||||
|
||||
BELTNAME = BELT1
|
||||
GEAR1NAME = GEAR5
|
||||
GEAR2NAME = GEAR4
|
||||
BACKGROUND = 0.000 0.500 0.700
|
||||
|
||||
ANAME = AXLE1
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = -7.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 6.000
|
||||
AMOTORED = 1
|
||||
AANGULARVELOCITY = 90.000
|
||||
ADIRECTION = 1
|
||||
|
||||
ANAME = AXLE2
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = -3.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 12.000
|
||||
AMOTORED = 0
|
||||
|
||||
ANAME = AXLE3
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = 1.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 6.000
|
||||
AMOTORED = 0
|
||||
|
||||
ANAME = AXLE4
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 2
|
||||
APOSITION = 8.000 0.000 0.000
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 18.000
|
||||
AMOTORED = 0
|
||||
|
||||
ANAME = AXLE5
|
||||
ARADIUS = 1.000
|
||||
AAXIS = 1
|
||||
APOSITION = 8.000 -8.200 -7.400
|
||||
ACOLOR = 0.800 0.500 0.200
|
||||
ALENGTH = 12.000
|
||||
AMOTORED = 0
|
||||
|
||||
GNAME = GEAR1
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 2.200
|
||||
GWIDTH = 3.000
|
||||
GTEETH = 40
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE1
|
||||
GPOSITION = 0.000
|
||||
|
||||
GNAME = GEAR2
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 2.200
|
||||
GWIDTH = 3.000
|
||||
GTEETH = 30
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE2
|
||||
GPOSITION = 0.000
|
||||
|
||||
GNAME = GEAR3
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 2.200
|
||||
GWIDTH = 3.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE3
|
||||
GPOSITION = 0.000
|
||||
|
||||
GNAME = GEAR4
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 1.700
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE2
|
||||
GPOSITION = 5.000
|
||||
|
||||
GNAME = GEAR5
|
||||
GTYPE = NORMAL
|
||||
GRADIUS = 3.000
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 0.500
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE4
|
||||
GPOSITION = 5.000
|
||||
|
||||
GNAME = GEAR6
|
||||
GTYPE = BEVEL
|
||||
GFACE = 0
|
||||
GRADIUS = 4.000
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 1.700
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE4
|
||||
GPOSITION = -4.000
|
||||
|
||||
GNAME = GEAR7
|
||||
GTYPE = BEVEL
|
||||
GFACE = 0
|
||||
GRADIUS = 4.000
|
||||
GWIDTH = 1.000
|
||||
GTEETH = 20
|
||||
GTOOTHDEPTH = 1.700
|
||||
GCOLOR = 0.500 0.500 0.500
|
||||
GAXLE = AXLE5
|
||||
GPOSITION = 5.000
|
||||
|
||||
BELTNAME = BELT1
|
||||
GEAR1NAME = GEAR5
|
||||
GEAR2NAME = GEAR4
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user