Compare commits
237 Commits
mesa-6_5-2
...
texman_0_1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af6a480117 | ||
|
|
14e9700621 | ||
|
|
7fb177c367 | ||
|
|
d65cda4ce3 | ||
|
|
460a375d85 | ||
|
|
c3c5652602 | ||
|
|
e1998baef8 | ||
|
|
3e980901b0 | ||
|
|
14fe63a12b | ||
|
|
fbd147c0b5 | ||
|
|
7b7c54e94c | ||
|
|
84dd9c8112 | ||
|
|
bba85343e7 | ||
|
|
6484b373c3 | ||
|
|
245a3c54c7 | ||
|
|
1266e633cc | ||
|
|
86042f53f2 | ||
|
|
068062f997 | ||
|
|
c62af8e3b7 | ||
|
|
8e5650d7f4 | ||
|
|
65f1cf2cbf | ||
|
|
f04f5e990a | ||
|
|
1854ebe77e | ||
|
|
3500f2e3c4 | ||
|
|
cfeefc9b81 | ||
|
|
3ad6adfb57 | ||
|
|
8a126f1166 | ||
|
|
6315aabcf2 | ||
|
|
a8c2344364 | ||
|
|
2929b2569b | ||
|
|
f14790d7b0 | ||
|
|
8fb2e61801 | ||
|
|
b3c94f9d9d | ||
|
|
5b889f7f2d | ||
|
|
0f531b5b48 | ||
|
|
c6482c0d41 | ||
|
|
b71748efd1 | ||
|
|
1c4b9edc41 | ||
|
|
2b464d93d1 | ||
|
|
497f80ac34 | ||
|
|
2be748769b | ||
|
|
45a1083ee7 | ||
|
|
3a45baa70d | ||
|
|
0bc3a7ac2e | ||
|
|
08f0579176 | ||
|
|
d689cd0715 | ||
|
|
e957f39f67 | ||
|
|
416f09d3e6 | ||
|
|
40cc5d36fd | ||
|
|
62f9613dbc | ||
|
|
7f31255eb2 | ||
|
|
78382b4bbe | ||
|
|
bd8e90857c | ||
|
|
b7cc448ff8 | ||
|
|
0ea582acbe | ||
|
|
05c824db87 | ||
|
|
829f6909bd | ||
|
|
34f1ebc72f | ||
|
|
c6e586ee0c | ||
|
|
9180d932c6 | ||
|
|
95df1b67a2 | ||
|
|
bc400c3f30 | ||
|
|
3a3db0e9ec | ||
|
|
613e395ab8 | ||
|
|
86c5de8b85 | ||
|
|
44c8c42ab9 | ||
|
|
31a82a663c | ||
|
|
dafdf6512e | ||
|
|
9caacb015a | ||
|
|
2887770534 | ||
|
|
fb440c9f82 | ||
|
|
576c9c310f | ||
|
|
ec1db9db1f | ||
|
|
e1f70cf5e2 | ||
|
|
a7cdbf5c38 | ||
|
|
fe37adfde3 | ||
|
|
315396ac6c | ||
|
|
a7252f42ae | ||
|
|
bffc66109e | ||
|
|
0089c7f4ee | ||
|
|
54f435340b | ||
|
|
66d887d605 | ||
|
|
c6dc5cc8ab | ||
|
|
e0412bb726 | ||
|
|
cc5cbd1bca | ||
|
|
93fbfa5781 | ||
|
|
30709caad6 | ||
|
|
a647198f65 | ||
|
|
7ad6ea6ff2 | ||
|
|
ceee2c45cd | ||
|
|
26dc161fde | ||
|
|
b176ef05f2 | ||
|
|
6d6e7a08c7 | ||
|
|
eb75ec2349 | ||
|
|
2a8bd4e329 | ||
|
|
c247268499 | ||
|
|
b2cb8920c2 | ||
|
|
af4d93f256 | ||
|
|
c8dd839acb | ||
|
|
e43c3c38fb | ||
|
|
9194782fdc | ||
|
|
ec36d5b537 | ||
|
|
6e5da1a860 | ||
|
|
21f6e8a2d0 | ||
|
|
18772c9e88 | ||
|
|
5df4283b53 | ||
|
|
6734bab3b2 | ||
|
|
0a5fea5f96 | ||
|
|
9b2762d7b9 | ||
|
|
571bf7a71b | ||
|
|
4ab3b9aa76 | ||
|
|
88c018ee47 | ||
|
|
cead52ef68 | ||
|
|
9cf0ed6059 | ||
|
|
2c1c8dccf7 | ||
|
|
b87f9f6056 | ||
|
|
427bf0171d | ||
|
|
98c5445c75 | ||
|
|
15ffb3bbab | ||
|
|
97b570b999 | ||
|
|
e8e6374a16 | ||
|
|
d9f31f16c0 | ||
|
|
1173198f51 | ||
|
|
01a56d23e6 | ||
|
|
bf050799ac | ||
|
|
3697eca493 | ||
|
|
de2b3506ea | ||
|
|
bfbe2eb6e9 | ||
|
|
8bd395f601 | ||
|
|
735925d15b | ||
|
|
448a3456a9 | ||
|
|
e176b11b74 | ||
|
|
cdc8771893 | ||
|
|
789399d3f4 | ||
|
|
dfa8624e83 | ||
|
|
36b64bbd4f | ||
|
|
651985f813 | ||
|
|
9f2b49a7b3 | ||
|
|
05c6361b0b | ||
|
|
9621817253 | ||
|
|
7e2e4a6b1a | ||
|
|
656c71ca3f | ||
|
|
6ce7055dcc | ||
|
|
c848a65b5e | ||
|
|
1ff99fcd50 | ||
|
|
67342052d2 | ||
|
|
ccf52b6784 | ||
|
|
78aa58c914 | ||
|
|
4291f24abd | ||
|
|
f4211722f1 | ||
|
|
71380a1325 | ||
|
|
33e55c6a7d | ||
|
|
cd32164cc6 | ||
|
|
7c1348ac8f | ||
|
|
2560061cfe | ||
|
|
0c047b8847 | ||
|
|
c64a08c286 | ||
|
|
bb409e88d8 | ||
|
|
af69eefcba | ||
|
|
d9c071adec | ||
|
|
833d19c21d | ||
|
|
7245757174 | ||
|
|
3d96cb7d48 | ||
|
|
f565ab2dd5 | ||
|
|
7ad0c51f48 | ||
|
|
fea684c533 | ||
|
|
4e8845fc0c | ||
|
|
ffcc1cdb41 | ||
|
|
afc90075ba | ||
|
|
79acea2708 | ||
|
|
a12063a540 | ||
|
|
9826d83439 | ||
|
|
84f7ded925 | ||
|
|
59dd8ad752 | ||
|
|
4afd26982e | ||
|
|
17e4a7ea17 | ||
|
|
3d67655cce | ||
|
|
b5d7c69884 | ||
|
|
b6759e2be7 | ||
|
|
af853b0da7 | ||
|
|
8d349798da | ||
|
|
4aea628194 | ||
|
|
008ddf628a | ||
|
|
716496f263 | ||
|
|
b3b325e560 | ||
|
|
382ce985ac | ||
|
|
54b7eca7a0 | ||
|
|
f74e06bf11 | ||
|
|
9c02649d18 | ||
|
|
2c34704e41 | ||
|
|
85d0041ff0 | ||
|
|
67ff8b354e | ||
|
|
08e7957571 | ||
|
|
9c1f7089d8 | ||
|
|
5381ac5f11 | ||
|
|
a6f78d4eee | ||
|
|
ae695e3566 | ||
|
|
c82c3335e1 | ||
|
|
f8246f504b | ||
|
|
499458bcdb | ||
|
|
37a53fd6a0 | ||
|
|
5ec38fb2ea | ||
|
|
11c0215bf8 | ||
|
|
6a13b6c346 | ||
|
|
a103097ee5 | ||
|
|
7efad0d84c | ||
|
|
42c88cd072 | ||
|
|
2541c54e79 | ||
|
|
33529e3d8e | ||
|
|
84c1b82081 | ||
|
|
a97a1439ae | ||
|
|
2fd2910010 | ||
|
|
fbbda155e0 | ||
|
|
a49c3c0fae | ||
|
|
baf5998d59 | ||
|
|
4c5acef241 | ||
|
|
9839e272cf | ||
|
|
b57e79ff14 | ||
|
|
43824acb4e | ||
|
|
d8f509e749 | ||
|
|
eb91c93c2e | ||
|
|
79de983b6f | ||
|
|
fdb3acf016 | ||
|
|
2807d1f58a | ||
|
|
93f913926e | ||
|
|
33ca04f379 | ||
|
|
398cb30c72 | ||
|
|
f67bb30314 | ||
|
|
4578d7b9f0 | ||
|
|
dcdfc154c3 | ||
|
|
696ba32779 | ||
|
|
dcfe55539f | ||
|
|
ff84b1f1b2 | ||
|
|
3bca9c47f4 | ||
|
|
d4d7fdb43b | ||
|
|
d65dab5777 | ||
|
|
638ca019ef |
32
Makefile
32
Makefile
@@ -33,9 +33,8 @@ realclean:
|
|||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@for dir in $(SUBDIRS) ; do \
|
@echo "Installing"
|
||||||
(cd $$dir ; $(MAKE) install) || exit 1 ; \
|
$(TOP)/bin/installmesa $(DESTDIR)
|
||||||
done
|
|
||||||
|
|
||||||
# DirectFBGL module installation
|
# DirectFBGL module installation
|
||||||
linux-directfb-install:
|
linux-directfb-install:
|
||||||
@@ -56,14 +55,11 @@ $(TOP)/configs/current:
|
|||||||
# Rules to set/install a specific build configuration
|
# Rules to set/install a specific build configuration
|
||||||
aix \
|
aix \
|
||||||
aix-64 \
|
aix-64 \
|
||||||
aix-64-static \
|
|
||||||
aix-gcc \
|
aix-gcc \
|
||||||
aix-static \
|
aix-static \
|
||||||
beos \
|
beos \
|
||||||
darwin \
|
darwin \
|
||||||
darwin-static \
|
darwin-static \
|
||||||
darwin-static-x86ppc \
|
|
||||||
darwin-x86ppc \
|
|
||||||
freebsd \
|
freebsd \
|
||||||
freebsd-dri \
|
freebsd-dri \
|
||||||
freebsd-dri-amd64 \
|
freebsd-dri-amd64 \
|
||||||
@@ -76,8 +72,6 @@ hpux11-32-static \
|
|||||||
hpux11-32-static-nothreads \
|
hpux11-32-static-nothreads \
|
||||||
hpux11-64 \
|
hpux11-64 \
|
||||||
hpux11-64-static \
|
hpux11-64-static \
|
||||||
hpux11-ia64 \
|
|
||||||
hpux11-ia64-static \
|
|
||||||
hpux9 \
|
hpux9 \
|
||||||
hpux9-gcc \
|
hpux9-gcc \
|
||||||
irix6-64 \
|
irix6-64 \
|
||||||
@@ -95,15 +89,11 @@ linux-dri \
|
|||||||
linux-dri-x86 \
|
linux-dri-x86 \
|
||||||
linux-dri-x86-64 \
|
linux-dri-x86-64 \
|
||||||
linux-dri-ppc \
|
linux-dri-ppc \
|
||||||
linux-dri-xcb \
|
|
||||||
linux-indirect \
|
linux-indirect \
|
||||||
linux-fbdev \
|
linux-fbdev \
|
||||||
linux-glide \
|
linux-glide \
|
||||||
linux-ia64-icc \
|
|
||||||
linux-ia64-icc-static \
|
|
||||||
linux-icc \
|
linux-icc \
|
||||||
linux-icc-static \
|
linux-icc-static \
|
||||||
linux-osmesa \
|
|
||||||
linux-osmesa16 \
|
linux-osmesa16 \
|
||||||
linux-osmesa16-static \
|
linux-osmesa16-static \
|
||||||
linux-osmesa32 \
|
linux-osmesa32 \
|
||||||
@@ -123,26 +113,20 @@ linux-x86-32 \
|
|||||||
linux-x86-64 \
|
linux-x86-64 \
|
||||||
linux-x86-64-debug \
|
linux-x86-64-debug \
|
||||||
linux-x86-64-static \
|
linux-x86-64-static \
|
||||||
|
linux-x86-xcb \
|
||||||
linux-x86-glide \
|
linux-x86-glide \
|
||||||
linux-x86-static \
|
linux-x86-static \
|
||||||
netbsd \
|
netbsd \
|
||||||
openbsd \
|
openbsd \
|
||||||
osf1 \
|
osf1 \
|
||||||
osf1-static \
|
|
||||||
solaris-x86 \
|
solaris-x86 \
|
||||||
solaris-x86-gcc \
|
solaris-x86-gcc \
|
||||||
solaris-x86-gcc-static \
|
|
||||||
sunos4 \
|
sunos4 \
|
||||||
sunos4-gcc \
|
sunos4-gcc \
|
||||||
sunos4-static \
|
sunos4-static \
|
||||||
sunos5 \
|
sunos5 \
|
||||||
sunos5-gcc \
|
sunos5-gcc \
|
||||||
sunos5-64-gcc \
|
|
||||||
sunos5-smp \
|
sunos5-smp \
|
||||||
sunos5-v8 \
|
|
||||||
sunos5-v8-static \
|
|
||||||
sunos5-v9 \
|
|
||||||
sunos5-v9-static \
|
|
||||||
ultrix-gcc:
|
ultrix-gcc:
|
||||||
(cd configs && rm -f current && ln -s $@ current)
|
(cd configs && rm -f current && ln -s $@ current)
|
||||||
$(MAKE) default
|
$(MAKE) default
|
||||||
@@ -150,10 +134,10 @@ ultrix-gcc:
|
|||||||
|
|
||||||
# Rules for making release tarballs
|
# Rules for making release tarballs
|
||||||
|
|
||||||
DIRECTORY = Mesa-6.5.1
|
DIRECTORY = Mesa-6.5
|
||||||
LIB_NAME = MesaLib-6.5.1
|
LIB_NAME = MesaLib-6.5
|
||||||
DEMO_NAME = MesaDemos-6.5.1
|
DEMO_NAME = MesaDemos-6.5
|
||||||
GLUT_NAME = MesaGLUT-6.5.1
|
GLUT_NAME = MesaGLUT-6.5
|
||||||
|
|
||||||
MAIN_FILES = \
|
MAIN_FILES = \
|
||||||
$(DIRECTORY)/Makefile* \
|
$(DIRECTORY)/Makefile* \
|
||||||
@@ -182,7 +166,6 @@ MAIN_FILES = \
|
|||||||
$(DIRECTORY)/include/GL/glx.h \
|
$(DIRECTORY)/include/GL/glx.h \
|
||||||
$(DIRECTORY)/include/GL/glxext.h \
|
$(DIRECTORY)/include/GL/glxext.h \
|
||||||
$(DIRECTORY)/include/GL/glx_mangle.h \
|
$(DIRECTORY)/include/GL/glx_mangle.h \
|
||||||
$(DIRECTORY)/include/GL/glfbdev.h \
|
|
||||||
$(DIRECTORY)/include/GL/mesa_wgl.h \
|
$(DIRECTORY)/include/GL/mesa_wgl.h \
|
||||||
$(DIRECTORY)/include/GL/mglmesa.h \
|
$(DIRECTORY)/include/GL/mglmesa.h \
|
||||||
$(DIRECTORY)/include/GL/osmesa.h \
|
$(DIRECTORY)/include/GL/osmesa.h \
|
||||||
@@ -381,7 +364,6 @@ GLUT_FILES = \
|
|||||||
|
|
||||||
DEPEND_FILES = \
|
DEPEND_FILES = \
|
||||||
$(TOP)/src/mesa/depend \
|
$(TOP)/src/mesa/depend \
|
||||||
$(TOP)/src/glx/x11/depend \
|
|
||||||
$(TOP)/src/glw/depend \
|
$(TOP)/src/glw/depend \
|
||||||
$(TOP)/src/glut/glx/depend \
|
$(TOP)/src/glut/glx/depend \
|
||||||
$(TOP)/src/glu/sgi/depend
|
$(TOP)/src/glu/sgi/depend
|
||||||
|
|||||||
11
Makefile.DJ
11
Makefile.DJ
@@ -20,9 +20,9 @@
|
|||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 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.
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
# DOS/DJGPP makefile for Mesa
|
# DOS/DJGPP makefile v1.6 for Mesa
|
||||||
#
|
#
|
||||||
# Author: Daniel Borca
|
# Copyright (C) 2002 - Daniel Borca
|
||||||
# Email : dborca@users.sourceforge.net
|
# Email : dborca@users.sourceforge.net
|
||||||
# Web : http://www.geocities.com/dborca
|
# Web : http://www.geocities.com/dborca
|
||||||
|
|
||||||
@@ -31,6 +31,9 @@
|
|||||||
# Available options:
|
# Available options:
|
||||||
#
|
#
|
||||||
# Environment variables:
|
# Environment variables:
|
||||||
|
# GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++)
|
||||||
|
# or `mesa'.
|
||||||
|
# default = mesa
|
||||||
# GLIDE path to Glide3 SDK; used with FX.
|
# GLIDE path to Glide3 SDK; used with FX.
|
||||||
# default = $(TOP)/glide3
|
# default = $(TOP)/glide3
|
||||||
# FX=1 build for 3dfx Glide3. Note that this disables
|
# FX=1 build for 3dfx Glide3. Note that this disables
|
||||||
@@ -54,6 +57,8 @@
|
|||||||
|
|
||||||
.PHONY : all libgl libglu libglut clean realclean
|
.PHONY : all libgl libglu libglut clean realclean
|
||||||
|
|
||||||
|
GLU ?= mesa
|
||||||
|
|
||||||
CFLAGS = -Wall -W -pedantic
|
CFLAGS = -Wall -W -pedantic
|
||||||
CFLAGS += -O2 -ffast-math
|
CFLAGS += -O2 -ffast-math
|
||||||
|
|
||||||
@@ -70,7 +75,7 @@ all: libgl libglu libglut
|
|||||||
libgl: lib
|
libgl: lib
|
||||||
$(MAKE) -f Makefile.DJ -C src/mesa
|
$(MAKE) -f Makefile.DJ -C src/mesa
|
||||||
libglu: lib
|
libglu: lib
|
||||||
$(MAKE) -f Makefile.DJ -C src/glu/sgi
|
$(MAKE) -f Makefile.DJ -C src/glu/$(GLU)
|
||||||
libglut: lib
|
libglut: lib
|
||||||
$(MAKE) -f Makefile.DJ -C src/glut/dos
|
$(MAKE) -f Makefile.DJ -C src/glut/dos
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ if [ `uname` = "FreeBSD" ] ; then
|
|||||||
CP_FLAGS="-f"
|
CP_FLAGS="-f"
|
||||||
elif [ `uname` = "Darwin" ] ; then
|
elif [ `uname` = "Darwin" ] ; then
|
||||||
CP_FLAGS="-f"
|
CP_FLAGS="-f"
|
||||||
elif [ `uname` = "AIX" ] ; then
|
|
||||||
CP_FLAGS="-fh"
|
|
||||||
else
|
else
|
||||||
CP_FLAGS="-fd"
|
CP_FLAGS="-fd"
|
||||||
fi
|
fi
|
||||||
@@ -64,7 +62,7 @@ set -v
|
|||||||
|
|
||||||
mkdir ${INCLUDE_DIR}
|
mkdir ${INCLUDE_DIR}
|
||||||
mkdir ${INCLUDE_DIR}/GL
|
mkdir ${INCLUDE_DIR}/GL
|
||||||
# NOT YET: mkdir ${INCLUDE_DIR}/GLES
|
mkdir ${INCLUDE_DIR}/GLES
|
||||||
mkdir ${LIB_DIR}
|
mkdir ${LIB_DIR}
|
||||||
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
|
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
|
||||||
cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL
|
cp -f ${TOP}/src/glw/*.h ${INCLUDE_DIR}/GL
|
||||||
|
|||||||
182
bin/mklib
182
bin/mklib
@@ -5,7 +5,7 @@
|
|||||||
# Improvements/fixes are welcome.
|
# Improvements/fixes are welcome.
|
||||||
|
|
||||||
|
|
||||||
# Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
# Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
# copy of this software and associated documentation files (the "Software"),
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -36,7 +36,6 @@ DEPS=""
|
|||||||
LINK=""
|
LINK=""
|
||||||
CPLUSPLUS=0
|
CPLUSPLUS=0
|
||||||
STATIC=0
|
STATIC=0
|
||||||
DLOPEN=0
|
|
||||||
INSTALLDIR="."
|
INSTALLDIR="."
|
||||||
ARCH="auto"
|
ARCH="auto"
|
||||||
ARCHOPT=""
|
ARCHOPT=""
|
||||||
@@ -65,7 +64,6 @@ do
|
|||||||
echo ' Not observed on all systems at this time.'
|
echo ' Not observed on all systems at this time.'
|
||||||
echo ' -cplusplus link with C++ runtime'
|
echo ' -cplusplus link with C++ runtime'
|
||||||
echo ' -static make a static library (default is dynamic/shared)'
|
echo ' -static make a static library (default is dynamic/shared)'
|
||||||
echo ' -dlopen make a shared library suitable for dynamic loading'
|
|
||||||
echo ' -install DIR put resulting library file(s) in DIR'
|
echo ' -install DIR put resulting library file(s) in DIR'
|
||||||
echo ' -arch ARCH override using `uname` to determine host system'
|
echo ' -arch ARCH override using `uname` to determine host system'
|
||||||
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
||||||
@@ -106,9 +104,6 @@ do
|
|||||||
'-static')
|
'-static')
|
||||||
STATIC=1
|
STATIC=1
|
||||||
;;
|
;;
|
||||||
'-dlopen')
|
|
||||||
DLOPEN=1
|
|
||||||
;;
|
|
||||||
'-install')
|
'-install')
|
||||||
shift 1;
|
shift 1;
|
||||||
INSTALLDIR=$1
|
INSTALLDIR=$1
|
||||||
@@ -180,7 +175,7 @@ fi
|
|||||||
#
|
#
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
|
|
||||||
'Linux' | 'OpenBSD' | 'GNU' | GNU/*)
|
'Linux' | 'OpenBSD')
|
||||||
# we assume gcc
|
# we assume gcc
|
||||||
|
|
||||||
if [ "x$LINK" = "x" ] ; then
|
if [ "x$LINK" = "x" ] ; then
|
||||||
@@ -214,22 +209,18 @@ case $ARCH in
|
|||||||
elif [ $STATIC = 1 ] ; then
|
elif [ $STATIC = 1 ] ; then
|
||||||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||||
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
|
echo "mklib: Making" $ARCH "static library: " ${LIBNAME}.a
|
||||||
LINK="ar"
|
rm -f ${LIBNAME}.a
|
||||||
OPTS="-ru"
|
ar -ru ${LIBNAME}.a ${OBJECTS}
|
||||||
# make lib
|
|
||||||
${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
|
|
||||||
ranlib ${LIBNAME}.a
|
ranlib ${LIBNAME}.a
|
||||||
# finish up
|
# finish up
|
||||||
FINAL_LIBS=${LIBNAME}.a
|
FINAL_LIBS=${LIBNAME}.a
|
||||||
else
|
else
|
||||||
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
LIBNAME="lib${LIBNAME}" # prefix with "lib"
|
||||||
case $ARCH in 'Linux' | 'GNU' | GNU/*)
|
if [ $ARCH = 'Linux' ] ; then
|
||||||
OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
|
OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
|
||||||
;;
|
else
|
||||||
*)
|
|
||||||
OPTS="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
|
OPTS="-shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
if [ $EXPORTS ] ; then
|
if [ $EXPORTS ] ; then
|
||||||
#OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
|
#OPTS="${OPTS} -Xlinker --retain-symbols-file ${EXPORTS}"
|
||||||
# Make the 'exptmp' file for --version-script option
|
# Make the 'exptmp' file for --version-script option
|
||||||
@@ -285,7 +276,9 @@ case $ARCH in
|
|||||||
else
|
else
|
||||||
LIBNAME="lib${LIBNAME}.so"
|
LIBNAME="lib${LIBNAME}.so"
|
||||||
echo "mklib: Making SunOS shared library: " ${LIBNAME}
|
echo "mklib: Making SunOS shared library: " ${LIBNAME}
|
||||||
|
# XXX OPTS for gcc should be -shared, but that doesn't work.
|
||||||
|
# Using -G does work though.
|
||||||
|
OPTS="-G"
|
||||||
if [ "x$LINK" = "x" ] ; then
|
if [ "x$LINK" = "x" ] ; then
|
||||||
# -linker was not specified, choose default linker now
|
# -linker was not specified, choose default linker now
|
||||||
if [ $CPLUSPLUS = 1 ] ; then
|
if [ $CPLUSPLUS = 1 ] ; then
|
||||||
@@ -305,34 +298,7 @@ case $ARCH in
|
|||||||
LINK="ld"
|
LINK="ld"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
echo "mklib: linker is" ${LINK} ${OPTS}
|
||||||
# linker options
|
|
||||||
if [ ${LINK} = "ld" -o ${LINK} = "cc" -o ${LINK} = "CC" ] ; then
|
|
||||||
# SunOS tools, -G to make shared libs
|
|
||||||
OPTS="-G"
|
|
||||||
else
|
|
||||||
# gcc linker
|
|
||||||
# Check if objects are 32-bit and we're running in 64-bit
|
|
||||||
# environment. If so, pass -m32 flag to linker.
|
|
||||||
set ${OBJECTS}
|
|
||||||
ABI32=`file $1 | grep 32-bit`
|
|
||||||
if [ "${ABI32}" ] ; then
|
|
||||||
OPTS="-m32 -shared -Wl,-Bdynamic"
|
|
||||||
else
|
|
||||||
OPTS="-m64 -shared -Wl,-Bdynamic"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if objects are SPARC v9
|
|
||||||
# file says: ELF 64-bit MSB relocatable SPARCV9 Version 1
|
|
||||||
set ${OBJECTS}
|
|
||||||
SPARCV9=`file $1 | grep SPARCV9`
|
|
||||||
if [ "${SPARCV9}" ] ; then
|
|
||||||
OPTS="${OPTS} -xarch=v9"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# for debug:
|
|
||||||
#echo "mklib: linker is" ${LINK} ${OPTS}
|
|
||||||
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||||
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
|
||||||
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
|
||||||
@@ -402,33 +368,26 @@ case $ARCH in
|
|||||||
FINAL_LIBS=${LIBNAME}
|
FINAL_LIBS=${LIBNAME}
|
||||||
else
|
else
|
||||||
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
LIBNAME="lib${LIBNAME}.so" # prefix with "lib", suffix with ".so"
|
||||||
|
# XXX we should run 'file' on the first object file to determine
|
||||||
# examine first object to determine ABI
|
# if it's o32, n32 or 64 format, as we do for Linux above.
|
||||||
set ${OBJECTS}
|
if [ $ARCHOPT = "64" ] ; then
|
||||||
ABI_O32=`file $1 | grep 'ELF 32-bit'`
|
# 64-bit ABI
|
||||||
ABI_N32=`file $1 | grep 'ELF N32'`
|
|
||||||
ABI_N64=`file $1 | grep 'ELF 64-bit'`
|
|
||||||
if [ "${ABI_O32}" ] ; then
|
|
||||||
OPTS="-32 -shared -all"
|
|
||||||
ABI="o32-bit"
|
|
||||||
elif [ "${ABI_N32}" ] ; then
|
|
||||||
OPTS="-n32 -shared -all"
|
|
||||||
ABI="n32-bit"
|
|
||||||
elif [ "${ABI_N64}" ] ; then
|
|
||||||
OPTS="-64 -shared -all"
|
OPTS="-64 -shared -all"
|
||||||
ABI="64-bit"
|
echo "mklib: Making IRIX 64-bit shared library: " ${LIBNAME}
|
||||||
|
elif [ $ARCHOPT = "o32" ] ; then
|
||||||
|
# old 32-bit ABI
|
||||||
|
OPTS="-32 -shared -all"
|
||||||
|
echo "mklib: Making IRIX o32-bit shared library: " ${LIBNAME}
|
||||||
else
|
else
|
||||||
echo "Error: Unexpected IRIX ABI!"
|
# new 32-bit ABI
|
||||||
exit 1
|
OPTS="-n32 -shared -all"
|
||||||
|
echo "mklib: Making IRIX n32-bit shared library: " ${LIBNAME}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $CPLUSPLUS = 1 ] ; then
|
if [ $CPLUSPLUS = 1 ] ; then
|
||||||
LINK="CC"
|
LINK="CC"
|
||||||
else
|
else
|
||||||
LINK="ld"
|
LINK="ld"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
|
|
||||||
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||||
FINAL_LIBS=${LIBNAME}
|
FINAL_LIBS=${LIBNAME}
|
||||||
fi
|
fi
|
||||||
@@ -450,10 +409,6 @@ case $ARCH in
|
|||||||
ar -ruv ${LIBNAME} ${OBJECTS}
|
ar -ruv ${LIBNAME} ${OBJECTS}
|
||||||
FINAL_LIBS=${LIBNAME}
|
FINAL_LIBS=${LIBNAME}
|
||||||
else
|
else
|
||||||
# HP uses a .2 for their current GL/GLU libraries
|
|
||||||
if [ ${LIBNAME} = "GL" -o ${LIBNAME} = "GLU" ] ; then
|
|
||||||
MAJOR=2
|
|
||||||
fi
|
|
||||||
RUNLIB="lib${LIBNAME}.${MAJOR}"
|
RUNLIB="lib${LIBNAME}.${MAJOR}"
|
||||||
DEVLIB="lib${LIBNAME}.sl"
|
DEVLIB="lib${LIBNAME}.sl"
|
||||||
echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB}
|
echo "mklib: Making HP-UX shared library: " ${RUNLIB} ${DEVLIB}
|
||||||
@@ -463,27 +418,26 @@ case $ARCH in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'AIX' )
|
'AIX' | 'AIX64')
|
||||||
# examine first object to determine ABI
|
if [ $ARCH = "AIX64" ] ; then
|
||||||
set ${OBJECTS}
|
|
||||||
ABI_64=`file $1 | grep '64-bit'`
|
|
||||||
if [ "${ABI_64}" ] ; then
|
|
||||||
X64="-X64"
|
X64="-X64"
|
||||||
Q64="-q64"
|
|
||||||
OFILE=shr_64.o
|
|
||||||
else
|
|
||||||
OFILE=shr.o #Want to be consistent with the IBM libGL.a
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $STATIC = 1 ] ; then
|
if [ $STATIC = 1 ] ; then
|
||||||
LIBNAME="lib${LIBNAME}.a"
|
LIBNAME="lib${LIBNAME}.a"
|
||||||
echo "mklib: Making AIX static library: " ${LIBNAME}
|
echo "mklib: Making AIX static library: " ${LIBNAME}
|
||||||
ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
|
rm -f ${LIBNAME}
|
||||||
FINAL_LIBS=${LIBNAME}
|
ar -ruv ${X64} ${LIBNAME} ${OBJECTS}
|
||||||
else
|
FINAL_LIBS=${LIBNAME}
|
||||||
|
else
|
||||||
EXPFILE="lib${LIBNAME}.exp"
|
EXPFILE="lib${LIBNAME}.exp"
|
||||||
|
OFILE=shr.o #Want to be consistent with the IBM libGL.a
|
||||||
LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
|
LIBNAME="lib${LIBNAME}.a" # shared objects are still stored in the .a libraries
|
||||||
OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry ${Q64}"
|
if [ $ARCH = "AIX64" ] ; then
|
||||||
|
OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry -q64"
|
||||||
|
else
|
||||||
|
OPTS="-bE:${EXPFILE} -bM:SRE -bnoentry"
|
||||||
|
fi
|
||||||
rm -f ${EXPFILE} ${OFILE}
|
rm -f ${EXPFILE} ${OFILE}
|
||||||
NM="/bin/nm -eC ${X64}"
|
NM="/bin/nm -eC ${X64}"
|
||||||
echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
|
echo "#! /usr/lib/${LIBNAME}" > ${EXPFILE}
|
||||||
@@ -501,16 +455,8 @@ case $ARCH in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}' | sort -u >> ${EXPFILE}
|
}' | sort -u >> ${EXPFILE}
|
||||||
|
cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
|
||||||
# On AIX a shared library is linked differently when
|
ar ${X64} -r ${LIBNAME} ${OFILE}
|
||||||
# you want to dlopen the file
|
|
||||||
if [ $DLOPEN = "1" ] ; then
|
|
||||||
cc -G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
|
||||||
else
|
|
||||||
cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
|
|
||||||
ar ${X64} -r ${LIBNAME} ${OFILE}
|
|
||||||
fi
|
|
||||||
|
|
||||||
FINAL_LIBS="${LIBNAME}"
|
FINAL_LIBS="${LIBNAME}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@@ -552,46 +498,20 @@ case $ARCH in
|
|||||||
LIBNAME="lib${LIBNAME}.a"
|
LIBNAME="lib${LIBNAME}.a"
|
||||||
echo "mklib: Making Darwin static library: " ${LIBNAME}
|
echo "mklib: Making Darwin static library: " ${LIBNAME}
|
||||||
LINK="ar"
|
LINK="ar"
|
||||||
OPTS="-ruvs"
|
OPTS="-ruv"
|
||||||
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
|
||||||
FINAL_LIBS=${LIBNAME}
|
FINAL_LIBS=${LIBNAME}
|
||||||
else
|
else
|
||||||
# On Darwin a .bundle is used for a library that you want to dlopen
|
LIBNAME="lib${LIBNAME}.dylib"
|
||||||
if [ $DLOPEN = "1" ] ; then
|
echo "mklib: Making Darwin shared library: " ${LIBNAME}
|
||||||
LIBSUFFIX="bundle"
|
FLAGS="-dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0"
|
||||||
OPTS="${ARCHOPT} -bundle -multiply_defined suppress"
|
|
||||||
else
|
|
||||||
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
|
|
||||||
LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
|
|
||||||
LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
|
|
||||||
|
|
||||||
# examine first object to determine ABI
|
|
||||||
set ${OBJECTS}
|
|
||||||
ABI_PPC=`file $1 | grep 'object ppc'`
|
|
||||||
ABI_I386=`file $1 | grep 'object i386'`
|
|
||||||
if [ "${ABI_PPC}" ] ; then
|
|
||||||
OPTS="${OPTS} -arch ppc"
|
|
||||||
fi
|
|
||||||
if [ "${ABI_I386}" ] ; then
|
|
||||||
OPTS="${OPTS} -arch i386"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# XXX can we always add -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
|
||||||
# to OPTS here?
|
|
||||||
|
|
||||||
# determine linker
|
|
||||||
if [ $CPLUSPLUS = 1 ] ; then
|
if [ $CPLUSPLUS = 1 ] ; then
|
||||||
LINK="g++"
|
LINK="g++"
|
||||||
else
|
else
|
||||||
LINK="cc"
|
LINK="cc"
|
||||||
fi
|
fi
|
||||||
|
${LINK} ${FLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||||
echo "mklib: Making Darwin shared library: " ${LIBNAME}
|
FINAL_LIBS=${LIBNAME}
|
||||||
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
|
||||||
ln -s ${LIBNAME} ${LINKNAME}
|
|
||||||
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
|
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -633,7 +553,7 @@ case $ARCH in
|
|||||||
FINAL_LIBS="${LIBNAME}"
|
FINAL_LIBS="${LIBNAME}"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
'icc' | 'icc-istatic')
|
'icc')
|
||||||
# Intel C compiler
|
# Intel C compiler
|
||||||
# This should get merged into the Linux code, above, since this isn't
|
# This should get merged into the Linux code, above, since this isn't
|
||||||
# really a different architecture.
|
# really a different architecture.
|
||||||
@@ -648,16 +568,12 @@ case $ARCH in
|
|||||||
# finish up
|
# finish up
|
||||||
FINAL_LIBS="${LIBNAME}.a"
|
FINAL_LIBS="${LIBNAME}.a"
|
||||||
else
|
else
|
||||||
if [ $ARCH = icc-istatic ] ; then
|
OPTS="-shared"
|
||||||
OPTS="-shared -i-static -cxxlib-icc"
|
|
||||||
else
|
|
||||||
OPTS="-shared"
|
|
||||||
fi
|
|
||||||
VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
VERSION="${MAJOR}.${MINOR}.${PATCH}"
|
||||||
echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION}
|
echo "mklib: Making Intel ICC shared library: " ${LIBNAME}.so.${VERSION}
|
||||||
|
|
||||||
if [ $CPLUSPLUS = 1 ] ; then
|
if [ $CPLUSPLUS = 1 ] ; then
|
||||||
LINK="icpc"
|
LINK="icc"
|
||||||
else
|
else
|
||||||
LINK="icc"
|
LINK="icc"
|
||||||
fi
|
fi
|
||||||
|
|||||||
13
configs/aix
13
configs/aix
@@ -8,12 +8,9 @@ CONFIG_NAME = aix
|
|||||||
CC = cc
|
CC = cc
|
||||||
CXX = xlC
|
CXX = xlC
|
||||||
|
|
||||||
CFLAGS = -O -DAIXV3 -DPTHREADS
|
CFLAGS = -O -DAIXV3
|
||||||
CXXFLAGS = -O -DAIXV3 -DPTHREADS
|
CXXFLAGS = -O -DAIXV3
|
||||||
|
|
||||||
# Misc tools and flags
|
|
||||||
MKLIB_OPTIONS =
|
MKLIB_OPTIONS =
|
||||||
COPY_LIBS = cp -f -h
|
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
GL_LIB_NAME = libGL.a
|
GL_LIB_NAME = libGL.a
|
||||||
@@ -22,10 +19,10 @@ GLUT_LIB_NAME = libglut.a
|
|||||||
GLW_LIB_NAME = libGLw.a
|
GLW_LIB_NAME = libGLw.a
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
GL_LIB_DEPS = -lX11 -lXext -lpthread -lm
|
GL_LIB_DEPS = -lX11 -lXext -lm
|
||||||
GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC
|
GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC
|
||||||
GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
|
GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
|
||||||
GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXm -lXt -lX11
|
GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11
|
||||||
OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB)
|
OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB)
|
||||||
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
|
APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ CONFIG_NAME = aix-64
|
|||||||
CC = xlc
|
CC = xlc
|
||||||
CXX = xlC
|
CXX = xlC
|
||||||
|
|
||||||
CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -DPTHREADS
|
CFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3
|
||||||
CXXFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3 -DPTHREADS
|
CXXFLAGS = -q64 -qmaxmem=16384 -O -DAIXV3
|
||||||
LIB_DIR=$(TOP)/lib64
|
MKLIB_OPTIONS = -arch AIX64
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
GL_LIB_NAME = libGL.a
|
GL_LIB_NAME = libGL.a
|
||||||
@@ -19,9 +19,10 @@ GLUT_LIB_NAME = libglut.a
|
|||||||
GLW_LIB_NAME = libGLw.a
|
GLW_LIB_NAME = libGLw.a
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
|
GL_LIB_DEPS = -lX11 -lXext -lm
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lC
|
GLU_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lm -lC
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
|
GLUT_LIB_DEPS = -L$(TOP)/lib -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu -lX11 -lm
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lXm -lXt -lX11
|
GLW_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB) -lXt -lX11
|
||||||
APP_LIB_DEPS = -L$(TOP)/lib64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lpthread -lC
|
OSMESA_LIB_DEPS = -L$(TOP)/lib -l$(GL_LIB)
|
||||||
|
APP_LIB_DEPS = -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Configuration for AIX, static libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = aix-64-static
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = xlC
|
|
||||||
|
|
||||||
CFLAGS = -q64 -O -DAIXV3 -DPTHREADS
|
|
||||||
CXXFLAGS = -q64 -O -DAIXV3 -DPTHREADS
|
|
||||||
MKLIB_OPTIONS = -static
|
|
||||||
LIB_DIR=$(TOP)/lib64
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
APP_LIB_DEPS = -q64 -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
|
|
||||||
-lX11 -lXext -lXmu -lXi -lm -lpthread -lC
|
|
||||||
|
|
||||||
@@ -14,6 +14,6 @@ CXXFLAGS = -O2 -DAIXV3
|
|||||||
MKLIB_OPTIONS = -arch aix-gcc
|
MKLIB_OPTIONS = -arch aix-gcc
|
||||||
GL_LIB_DEPS = -lX11 -lXext -lm
|
GL_LIB_DEPS = -lX11 -lXext -lm
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu
|
GLUT_LIB_DEPS = -L$(LIB_DIR -l$(GLU_LIB) -l$(GL_LIB) -lXi -lXmu
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi
|
APP_LIB_DEPS = -L$(LIB_DIR) -Wl,-brtl -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXmu -lXi
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ CONFIG_NAME = aix-static
|
|||||||
CC = cc
|
CC = cc
|
||||||
CXX = xlC
|
CXX = xlC
|
||||||
|
|
||||||
CFLAGS = -O -DAIXV3 -DPTHREADS
|
CFLAGS = -O -DAIXV3
|
||||||
CXXFLAGS = -O -DAIXV3 -DPTHREADS
|
CXXFLAGS = -O -DAIXV3
|
||||||
MKLIB_OPTIONS = -static
|
MKLIB_OPTIONS = -static
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
@@ -19,7 +19,5 @@ GLUT_LIB_NAME = libglut.a
|
|||||||
GLW_LIB_NAME = libGLw.a
|
GLW_LIB_NAME = libGLw.a
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
|
APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -lXext -lXmu -lXi -lm
|
||||||
-lX11 -lXext -lXmu -lXi -lm -lpthread -lC
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,13 @@ include $(TOP)/configs/default
|
|||||||
CONFIG_NAME = darwin
|
CONFIG_NAME = darwin
|
||||||
|
|
||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = c++
|
||||||
CXX = cc
|
CXX = c++
|
||||||
CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||||
CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
||||||
|
|
||||||
|
MKLIB_OPTIONS = -cplusplus
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
GL_LIB_NAME = libGL.dylib
|
GL_LIB_NAME = libGL.dylib
|
||||||
GLU_LIB_NAME = libGLU.dylib
|
GLU_LIB_NAME = libGLU.dylib
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ GLUT_LIB_NAME = libglut.a
|
|||||||
GLW_LIB_NAME = libGLw.a
|
GLW_LIB_NAME = libGLw.a
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
GL_LIB_DEPS =
|
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||||
OSMESA_LIB_DEPS =
|
OSMESA_LIB_DEPS =
|
||||||
GLU_LIB_DEPS =
|
GLU_LIB_DEPS =
|
||||||
GLUT_LIB_DEPS =
|
GLUT_LIB_DEPS =
|
||||||
GLW_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
|
APP_LIB_DEPS = -L$(TOP)/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
# 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"
|
|
||||||
|
|
||||||
# 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
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# Configuration for Darwin / MacOS X, making dynamic libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = darwin
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = cc
|
|
||||||
CFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
|
|
||||||
-I/usr/X11R6/include -O3 -fPIC -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 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
|
|
||||||
|
|
||||||
MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
|
|
||||||
|
|
||||||
# Library names (actual file names)
|
|
||||||
GL_LIB_NAME = libGL.dylib
|
|
||||||
GLU_LIB_NAME = libGLU.dylib
|
|
||||||
GLUT_LIB_NAME = libglut.dylib
|
|
||||||
GLW_LIB_NAME = libGLw.dylib
|
|
||||||
OSMESA_LIB_NAME = libOSMesa.dylib
|
|
||||||
|
|
||||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
|
||||||
OSMESA_LIB_DEPS = -L$(LIB_DIR) -lGL
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -lGL
|
|
||||||
GLUT_LIB_DEPS = -L$(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/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
|
||||||
|
|
||||||
# omit glw lib for now:
|
|
||||||
SRC_DIRS = mesa glu glut/glx
|
|
||||||
|
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
# This is included by other config files which may override some
|
# This is included by other config files which may override some
|
||||||
# of these variables.
|
# of these variables.
|
||||||
# Think of this as a base class from which configs are derived.
|
|
||||||
|
|
||||||
|
|
||||||
CONFIG_NAME = default
|
CONFIG_NAME = default
|
||||||
|
|
||||||
@@ -12,9 +10,6 @@ MESA_MAJOR=6
|
|||||||
MESA_MINOR=5
|
MESA_MINOR=5
|
||||||
MESA_TINY=0
|
MESA_TINY=0
|
||||||
|
|
||||||
# external projects. This should be useless now that we use libdrm.
|
|
||||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
|
||||||
|
|
||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = cc
|
||||||
CXX = CC
|
CXX = CC
|
||||||
@@ -27,8 +22,6 @@ MKLIB_OPTIONS =
|
|||||||
MKDEP = makedepend
|
MKDEP = makedepend
|
||||||
MKDEP_OPTIONS = -fdepend
|
MKDEP_OPTIONS = -fdepend
|
||||||
MAKE = make
|
MAKE = make
|
||||||
INSTALL = install
|
|
||||||
COPY_LIBS = cp -f -d
|
|
||||||
|
|
||||||
# Python and flags (generally only needed by the developers)
|
# Python and flags (generally only needed by the developers)
|
||||||
PYTHON2 = python
|
PYTHON2 = python
|
||||||
@@ -58,8 +51,9 @@ ASM_SOURCES =
|
|||||||
GLW_SOURCES = GLwDrawA.c
|
GLW_SOURCES = GLwDrawA.c
|
||||||
|
|
||||||
|
|
||||||
# Directories to build
|
# Directories
|
||||||
LIB_DIR = $(TOP)/lib
|
LIB_DIR = $(TOP)/lib
|
||||||
|
INSTALL_PREFIX = /usr/local
|
||||||
SRC_DIRS = mesa glu glut/glx glw
|
SRC_DIRS = mesa glu glut/glx glw
|
||||||
GLU_DIRS = sgi
|
GLU_DIRS = sgi
|
||||||
DRIVER_DIRS = x11 osmesa
|
DRIVER_DIRS = x11 osmesa
|
||||||
@@ -75,9 +69,3 @@ GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
|||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
|
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
|
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Installation directories (for make install)
|
|
||||||
INSTALL_DIR = /usr/local
|
|
||||||
DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri
|
|
||||||
|
|||||||
@@ -5,25 +5,13 @@ include $(TOP)/configs/default
|
|||||||
CONFIG_NAME = FreeBSD
|
CONFIG_NAME = FreeBSD
|
||||||
|
|
||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = gcc
|
||||||
CXX = c++
|
CXX = g++
|
||||||
MAKE = gmake
|
MAKE = gmake
|
||||||
|
|
||||||
# cp -d not supported on FreeBSD (see bug 4435)
|
CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100 \
|
||||||
COPY_LIBS = cp -f
|
$(ASM_FLAGS)
|
||||||
|
CXXFLAGS = -O2 -fPIC -pedantic
|
||||||
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/X11R6/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
|
GLUT_CFLAGS = -fexceptions
|
||||||
|
|
||||||
EXTRA_LIB_PATH = -L/usr/X11R6/lib
|
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
|
|
||||||
|
|||||||
@@ -15,16 +15,14 @@ EXPAT_INCLUDES = -I/usr/local/include
|
|||||||
X11_INCLUDES = -I/usr/X11R6/include
|
X11_INCLUDES = -I/usr/X11R6/include
|
||||||
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
||||||
|
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \
|
||||||
CFLAGS = -Wmissing-prototypes -g -std=c99 -Wundef -fPIC -ffast-math \
|
-ffast-math $(ASM_FLAGS) $(X11_INCLUDES)
|
||||||
$(ASM_FLAGS) $(X11_INCLUDES) $(DEFINES)
|
|
||||||
|
|
||||||
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
|
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
|
||||||
|
|
||||||
ASM_SOURCES =
|
ASM_SOURCES =
|
||||||
|
|
||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
|
||||||
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
|
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
|
||||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB)
|
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lm -lpthread $(LIBDRM_LIB)
|
||||||
|
|
||||||
@@ -42,6 +40,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
|
|||||||
|
|
||||||
# ffb and gamma are missing because they have not been converted to use the new
|
# ffb and gamma are missing because they have not been converted to use the new
|
||||||
# interface.
|
# interface.
|
||||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon tdfx \
|
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
|
||||||
unichrome savage sis
|
unichrome savage sis
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ CXX = aCC
|
|||||||
|
|
||||||
CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
CFLAGS = +z -Ae +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||||
|
|
||||||
CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
CXXFLAGS = +z -Aa +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
|
||||||
|
|
||||||
MKLIB_OPTIONS =
|
MKLIB_OPTIONS =
|
||||||
|
|
||||||
@@ -23,8 +23,4 @@ GLW_LIB_NAME = libGLw.a
|
|||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
|
APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
||||||
GL_LIB_DEPS = -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXt -lXi -lX11 -lm -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
|
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
|
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
|
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ CONFIG_NAME = hpux11-32-static
|
|||||||
CC = cc
|
CC = cc
|
||||||
CXX = aCC
|
CXX = aCC
|
||||||
|
|
||||||
CFLAGS = +O3 +DA2.0 -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
CFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||||
|
|
||||||
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
CXXFLAGS = +O3 +DA2.0 -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
|
||||||
|
|
||||||
MKLIB_OPTIONS = -static
|
MKLIB_OPTIONS = -static
|
||||||
|
|
||||||
@@ -23,5 +23,4 @@ GLW_LIB_NAME = libGLw.a
|
|||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl
|
APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ CXX = aCC
|
|||||||
|
|
||||||
CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
CFLAGS = +z -Ae +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||||
|
|
||||||
CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
CXXFLAGS = +z -Aa +DD64 +O2 +Onolimit +Oaggressive -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
|
||||||
|
|
||||||
MKLIB_OPTIONS =
|
MKLIB_OPTIONS =
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
LIBDIR = $(TOP)/lib64
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
GL_LIB_NAME = libGL.a
|
GL_LIB_NAME = libGL.a
|
||||||
@@ -24,8 +24,4 @@ GLW_LIB_NAME = libGLw.a
|
|||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
|
APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
||||||
GL_LIB_DEPS = -L/usr/lib/X11R6/pa20_64 -L/usr/contrib/X11R6/lib/pa20_64 -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
|
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
|
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
|
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ CONFIG_NAME = hpux11-64-static
|
|||||||
CC = cc
|
CC = cc
|
||||||
CXX = aCC
|
CXX = aCC
|
||||||
|
|
||||||
CFLAGS = +O3 +DA2.0W -Ae -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
CFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
||||||
|
|
||||||
CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
CXXFLAGS = +O3 +DA2.0W -Aa -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include
|
||||||
|
|
||||||
MKLIB_OPTIONS = -static
|
MKLIB_OPTIONS = -static
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
LIBDIR = $(TOP)/lib64
|
||||||
|
|
||||||
# Library names (actual file names)
|
# Library names (actual file names)
|
||||||
GL_LIB_NAME = libGL.a
|
GL_LIB_NAME = libGL.a
|
||||||
@@ -24,4 +24,4 @@ GLW_LIB_NAME = libGLw.a
|
|||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6/pa20_64 -L/usr/contrib/X11R6/lib/pa20_64 -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread -lCsup -lcl
|
APP_LIB_DEPS = -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
# Configuration for HPUX IA64 v11, 64-bit
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = hpux11-ia64
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = aCC
|
|
||||||
|
|
||||||
CFLAGS = +z -Ae +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
|
||||||
|
|
||||||
CXXFLAGS = +z -Aa +DD64 +O3 +DSmckinley -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
|
||||||
|
|
||||||
MKLIB_OPTIONS =
|
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
|
||||||
|
|
||||||
# Library names (actual file names)
|
|
||||||
GL_LIB_NAME = libGL.so
|
|
||||||
GLU_LIB_NAME = libGLU.so
|
|
||||||
GLUT_LIB_NAME = libglut.so
|
|
||||||
GLW_LIB_NAME = libGLw.so
|
|
||||||
OSMESA_LIB_NAME = libOSMesa.so
|
|
||||||
|
|
||||||
# Library/program dependencies
|
|
||||||
GL_LIB_DEPS = -L/usr/lib/X11R6/ -L/usr/contrib/X11R6/lib/ -lXext -lXmu -lXt -lXi -lX11 -lm -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCsup -lcl
|
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(GL_LIB_DEPS)
|
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Configuration for HPUX v11, 64-bit, static libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = hpux11-ia64-static
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = aCC
|
|
||||||
|
|
||||||
CFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DUSE_XSHM -DPTHREADS
|
|
||||||
|
|
||||||
CXXFLAGS = +O3 +DD64 -Aa -D_HPUX_SOURCE +DSmckinley -I/usr/include/X11R6 -I/usr/contrib/X11R6/include -DPTHREADS
|
|
||||||
|
|
||||||
MKLIB_OPTIONS = -static
|
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
|
||||||
|
|
||||||
# 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
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lXt -lX11 -lpthread -lm -lCsup -lcl
|
|
||||||
@@ -7,11 +7,12 @@ CONFIG_NAME = irix6-64
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = cc
|
||||||
CXX = CC
|
CXX = CC
|
||||||
CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM -DPTHREADS
|
CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM
|
||||||
CXXFLAGS = -64 -O3 -ansi -woff 1174 -DPTHREADS
|
CXXFLAGS = -64 -O3 -ansi -woff 1174
|
||||||
|
MKLIB_OPTIONS = -archopt 64
|
||||||
|
|
||||||
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
LIB_DIR = $(TOP)/lib64
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lpthread -lm
|
APP_LIB_DEPS = -L$(LIB_DIR) -64 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lm
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ CONFIG_NAME = irix6-64-static
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = cc
|
||||||
CXX = CC
|
CXX = CC
|
||||||
CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM -DPTHREADS
|
CFLAGS = -64 -O3 -ansi -woff 1068,1069,1174,1185,1209,1474,1552 -DUSE_XSHM
|
||||||
CXXFLAGS = -64 -O3 -ansi -woff 1174 -DPTHREADS
|
CXXFLAGS = -64 -O3 -ansi -woff 1174
|
||||||
MKLIB_OPTIONS = -static
|
MKLIB_OPTIONS = -archopt 64 -static
|
||||||
|
|
||||||
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
LIB_DIR = $(TOP)/lib64
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
|
APP_LIB_DEPS = -L$(LIB_DIR) -64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
|
||||||
|
|
||||||
GL_LIB_NAME = libGL.a
|
GL_LIB_NAME = libGL.a
|
||||||
GLU_LIB_NAME = libGLU.a
|
GLU_LIB_NAME = libGLU.a
|
||||||
@@ -23,4 +23,3 @@ GLUT_LIB_NAME = libglut.a
|
|||||||
GLW_LIB_NAME = libGLw.a
|
GLW_LIB_NAME = libGLw.a
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,12 @@ CONFIG_NAME = irix6-n32
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = cc
|
||||||
CXX = CC
|
CXX = CC
|
||||||
CFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1521,1552 -DUSE_XSHM -DPTHREADS
|
CFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1521,1552 -DUSE_XSHM
|
||||||
CXXFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1552 -DPTHREADS
|
CXXFLAGS = -n32 -mips3 -O3 -ansi -woff 1174,1552
|
||||||
|
MKLIB_OPTIONS = -archopt n32
|
||||||
|
|
||||||
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib32
|
LIB_DIR = $(TOP)/lib32
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lpthread -lm
|
APP_LIB_DEPS = -L$(LIB_DIR) -n32 -rpath $(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXi -lfpe -lm
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ CONFIG_NAME = irix6-n32-static
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = cc
|
||||||
CXX = CC
|
CXX = CC
|
||||||
CFLAGS = -n32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM -DPTHREADS
|
CFLAGS = -n32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
|
||||||
CXXFLAGS = -n32 -mips2 -O2 -ansi -woff 3262,3666 -DPTHREADS
|
CXXFLAGS = -n32 -mips2 -O2 -ansi -woff 3262,3666
|
||||||
MKLIB_OPTIONS = -static
|
MKLIB_OPTIONS = -archopt n32 -static
|
||||||
|
|
||||||
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib32
|
LIB_DIR = $(TOP)/lib32
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm -lC
|
APP_LIB_DEPS = -L$(LIB_DIR) -n32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
|
||||||
|
|
||||||
GL_LIB_NAME = libGL.a
|
GL_LIB_NAME = libGL.a
|
||||||
GLU_LIB_NAME = libGLU.a
|
GLU_LIB_NAME = libGLU.a
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ CC = cc
|
|||||||
CXX = CC
|
CXX = CC
|
||||||
CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
|
CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
|
||||||
CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
|
CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
|
||||||
|
MKLIB_OPTIONS = -archopt o32
|
||||||
|
|
||||||
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
||||||
|
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ CC = cc
|
|||||||
CXX = CC
|
CXX = CC
|
||||||
CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
|
CFLAGS = -32 -mips2 -O2 -ansi -woff 1521,1552 -DUSE_XSHM
|
||||||
CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
|
CXXFLAGS = -32 -mips2 -O2 -ansi -woff 3262,3666
|
||||||
MKLIB_OPTIONS = -static
|
MKLIB_OPTIONS = -archopt o32 -static
|
||||||
|
|
||||||
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
GLW_SOURCES = GLwDrawA.c GLwMDrawA.c
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib32
|
LIB_DIR = $(TOP)/lib32
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm -lC
|
APP_LIB_DEPS = -L$(LIB_DIR) -32 -glut -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
|
||||||
|
|
||||||
GL_LIB_NAME = libGL.a
|
GL_LIB_NAME = libGL.a
|
||||||
GLU_LIB_NAME = libGLU.a
|
GLU_LIB_NAME = libGLU.a
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ include $(TOP)/configs/linux
|
|||||||
|
|
||||||
CONFIG_NAME = linux-debug
|
CONFIG_NAME = linux-debug
|
||||||
|
|
||||||
OPT_FLAGS = -g -ansi -pedantic
|
OPT_FLAGS = -g
|
||||||
DEFINES += -DDEBUG -DDEBUG_MATH
|
DEFINES += -DDEBUG -DDEBUG_MATH
|
||||||
|
|||||||
@@ -22,13 +22,9 @@ ifeq ($(HAVE_X86), yes)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
SRC_DIRS = mesa glu glut/directfb
|
SRC_DIRS = mesa glu
|
||||||
GLU_DIRS = sgi
|
|
||||||
DRIVER_DIRS = directfb
|
DRIVER_DIRS = directfb
|
||||||
PROGRAM_DIRS = demos directfb
|
PROGRAM_DIRS = # disabled
|
||||||
|
|
||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
GL_LIB_DEPS = -lm -lpthread
|
GL_LIB_DEPS = -lm -lpthread
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB)
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -l$(GLU_LIB) -l$(GLUT_LIB)
|
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ CXX = g++
|
|||||||
#MKDEP = gcc -M
|
#MKDEP = gcc -M
|
||||||
#MKDEP_OPTIONS = -MF depend
|
#MKDEP_OPTIONS = -MF depend
|
||||||
|
|
||||||
OPT_FLAGS = -O -g
|
OPT_FLAGS = -g -march=pentium4 -fprefetch-loop-arrays
|
||||||
PIC_FLAGS = -fPIC
|
PIC_FLAGS = -fPIC
|
||||||
|
|
||||||
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
|
# Add '-DGLX_USE_TLS' to ARCH_FLAGS to enable TLS support.
|
||||||
@@ -22,12 +22,13 @@ ARCH_FLAGS ?=
|
|||||||
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
DEFINES = -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE \
|
||||||
-D_BSD_SOURCE -D_GNU_SOURCE \
|
-D_BSD_SOURCE -D_GNU_SOURCE \
|
||||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||||
|
-DDEBUG \
|
||||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
||||||
|
|
||||||
X11_INCLUDES = -I/usr/X11R6/include
|
X11_INCLUDES = -I/usr/X11R6/include
|
||||||
|
|
||||||
CFLAGS = -Wall -Wmissing-prototypes -std=c99 -ffast-math \
|
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
||||||
$(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS)
|
$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
|
||||||
|
|
||||||
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ ASM_SOURCES =
|
|||||||
# Library/program dependencies
|
# Library/program dependencies
|
||||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||||
|
|
||||||
LIBDRM_LIB = `pkg-config --libs libdrm`
|
LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
|
||||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
|
||||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
|
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl \
|
||||||
$(LIBDRM_LIB)
|
$(LIBDRM_LIB)
|
||||||
@@ -63,5 +64,7 @@ WINDOW_SYSTEM=dri
|
|||||||
|
|
||||||
# gamma are missing because they have not been converted to use the new
|
# gamma are missing because they have not been converted to use the new
|
||||||
# interface.
|
# interface.
|
||||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 r300 radeon s3v \
|
DRI_DIRS = i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||||
savage sis tdfx trident unichrome ffb
|
savage sis tdfx trident unichrome ffb
|
||||||
|
|
||||||
|
DRI_DIRS = i915
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ LIB_DIR = $(TOP)/lib64
|
|||||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
|
EXTRA_LIB_PATH=-L/usr/X11R6/lib64
|
||||||
|
|
||||||
# ffb, gamma, and sis are missing because they have not be converted to use
|
# ffb, gamma, and sis are missing because they have not be converted to use
|
||||||
# the new interface. i810 are missing because there is no x86-64
|
# the new interface. i810 and i830 are missing because there is no x86-64
|
||||||
# system where they could *ever* be used.
|
# system where they could *ever* be used.
|
||||||
#
|
#
|
||||||
DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300
|
DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
# -*-makefile-*-
|
|
||||||
# Configuration for linux-dri: Linux DRI hardware drivers for XFree86 & others
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = linux-dri-xcb
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = gcc
|
|
||||||
CXX = g++
|
|
||||||
|
|
||||||
#MKDEP = /usr/X11R6/bin/makedepend
|
|
||||||
#MKDEP = gcc -M
|
|
||||||
#MKDEP_OPTIONS = -MF depend
|
|
||||||
|
|
||||||
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 \
|
|
||||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
|
||||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS -DUSE_XCB
|
|
||||||
|
|
||||||
X11_INCLUDES = `pkg-config --cflags-only-I x11` `pkg-config --cflags-only-I xcb` `pkg-config --cflags-only-I xcb-glx`
|
|
||||||
|
|
||||||
CFLAGS = -Wall -Wmissing-prototypes $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) \
|
|
||||||
$(DEFINES) $(ASM_FLAGS) -std=c99 -ffast-math
|
|
||||||
|
|
||||||
CXXFLAGS = -Wall $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
|
||||||
|
|
||||||
|
|
||||||
ASM_SOURCES =
|
|
||||||
|
|
||||||
# Library/program dependencies
|
|
||||||
EXTRA_LIB_PATH=`pkg-config --libs-only-L x11`
|
|
||||||
|
|
||||||
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 -lm -lpthread -ldl \
|
|
||||||
$(LIBDRM_LIB) `pkg-config --libs xcb` `pkg-config --libs xcb-glx`
|
|
||||||
|
|
||||||
|
|
||||||
# This is now 0 by default since it seems to confuse the hell out of people
|
|
||||||
# and generate a lot of extra noise on bugzilla. If you need to build with
|
|
||||||
# EGL, do 'make linux-dri USING_EGL=1'
|
|
||||||
|
|
||||||
USING_EGL=0
|
|
||||||
|
|
||||||
# Directories
|
|
||||||
ifeq ($(USING_EGL), 1)
|
|
||||||
SRC_DIRS = egl glx/x11 mesa glu glut/glx glw
|
|
||||||
PROGRAM_DIRS = egl
|
|
||||||
else
|
|
||||||
SRC_DIRS = glx/x11 mesa glu glut/glx glw
|
|
||||||
PROGRAM_DIRS =
|
|
||||||
endif
|
|
||||||
|
|
||||||
DRIVER_DIRS = dri
|
|
||||||
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
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# Configuration for Linux with Intel C compiler
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = linux-icc
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = icc
|
|
||||||
CXX = icpc
|
|
||||||
CFLAGS = -O3 -ansi -KPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
|
|
||||||
CXXFLAGS = -O3 -ansi -KPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
|
|
||||||
GLUT_CFLAGS = -fexceptions
|
|
||||||
MKLIB_OPTIONS = -arch icc-istatic
|
|
||||||
|
|
||||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
|
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi
|
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) $(GL_LIB_DEPS)
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
# Configuration for Linux with Intel C compiler, static libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = linux-icc-static
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = icc
|
|
||||||
CXX = icpc
|
|
||||||
CFLAGS = -O3 -ansi -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
|
|
||||||
CXXFLAGS = -O3 -ansi -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include
|
|
||||||
GLUT_CFLAGS = -fexceptions
|
|
||||||
MKLIB_OPTIONS = -static -arch icc-istatic
|
|
||||||
|
|
||||||
# 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 =
|
|
||||||
GLU_LIB_DEPS =
|
|
||||||
GLUT_LIB_DEPS =
|
|
||||||
GLW_LIB_DEPS =
|
|
||||||
APP_LIB_DEPS = -i-static -cxxlib-icc -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lpthread -lm -lcxa -lunwind
|
|
||||||
|
|
||||||
@@ -6,9 +6,9 @@ CONFIG_NAME = linux-icc-static
|
|||||||
|
|
||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = icc
|
CC = icc
|
||||||
CXX = icpc
|
CXX = g++
|
||||||
CFLAGS = -O3 -tpp6 -axK -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
|
CFLAGS = -O3 -tpp6 -axK -D_GCC_LIMITS_H_ -D__GNUC__ -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -I/usr/X11R6/include
|
||||||
CXXFLAGS = -O3 -tpp6 -axK -DPTHREADS
|
CXXFLAGS = -O3
|
||||||
GLUT_CFLAGS = -fexceptions
|
GLUT_CFLAGS = -fexceptions
|
||||||
MKLIB_OPTIONS = -static -arch icc
|
MKLIB_OPTIONS = -static -arch icc
|
||||||
|
|
||||||
@@ -19,9 +19,12 @@ GLUT_LIB_NAME = libglut.a
|
|||||||
GLW_LIB_NAME = libGLw.a
|
GLW_LIB_NAME = libGLw.a
|
||||||
OSMESA_LIB_NAME = libOSMesa.a
|
OSMESA_LIB_NAME = libOSMesa.a
|
||||||
|
|
||||||
GL_LIB_DEPS =
|
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||||
GLUT_LIB_DEPS =
|
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm -lpthread -lcxa -lunwind
|
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm
|
||||||
|
MKLIB_OPTIONS = -arch icc
|
||||||
|
|
||||||
ASM_SOURCES = $(X86_SOURCES)
|
ASM_SOURCES = $(X86_SOURCES)
|
||||||
ASM_API = $(X86_API)
|
ASM_API = $(X86_API)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ CONFIG_NAME = linux-dri
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
|
|
||||||
#MKDEP = /usr/X11R6/bin/makedepend
|
MKDEP = /usr/X11R6/bin/makedepend
|
||||||
#MKDEP = gcc -M
|
#MKDEP = gcc -M
|
||||||
#MKDEP_OPTIONS = -MF depend
|
#MKDEP_OPTIONS = -MF depend
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
# Configuration for building only libOSMesa on Linux, no Xlib driver
|
|
||||||
# This doesn't really have any Linux dependencies, so it should be usable
|
|
||||||
# on other (gcc-based) systems.
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
# Directories
|
|
||||||
SRC_DIRS = mesa glu
|
|
||||||
DRIVER_DIRS = osmesa
|
|
||||||
PROGRAM_DIRS = osdemos
|
|
||||||
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
OSMESA_LIB_DEPS = -lm -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(OSMESA_LIB)
|
|
||||||
APP_LIB_DEPS = -lOSMesa -lGLU
|
|
||||||
@@ -24,5 +24,4 @@ PROGRAM_DIRS =
|
|||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
OSMESA_LIB_DEPS = -lm -lpthread
|
OSMESA_LIB_DEPS = -lm -lpthread
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(OSMESA_LIB)
|
|
||||||
APP_LIB_DEPS = -lOSMesa16
|
APP_LIB_DEPS = -lOSMesa16
|
||||||
|
|||||||
@@ -24,5 +24,4 @@ PROGRAM_DIRS =
|
|||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
OSMESA_LIB_DEPS = -lm -lpthread
|
OSMESA_LIB_DEPS = -lm -lpthread
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(OSMESA_LIB)
|
|
||||||
APP_LIB_DEPS = -lOSMesa32
|
APP_LIB_DEPS = -lOSMesa32
|
||||||
|
|||||||
@@ -40,4 +40,4 @@ DRIVER_DIRS = dri
|
|||||||
PROGRAM_DIRS = miniglx
|
PROGRAM_DIRS = miniglx
|
||||||
|
|
||||||
#DRI_DIRS = ffb gamma sis savage
|
#DRI_DIRS = ffb gamma sis savage
|
||||||
DRI_DIRS = i810 i915 mach64 mga r128 r200 radeon tdfx unichrome fb
|
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome fb
|
||||||
|
|||||||
@@ -19,5 +19,3 @@ OSMESA_LIB_DEPS =
|
|||||||
GLU_LIB_DEPS =
|
GLU_LIB_DEPS =
|
||||||
GLUT_LIB_DEPS =
|
GLUT_LIB_DEPS =
|
||||||
GLW_LIB_DEPS =
|
GLW_LIB_DEPS =
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
|
|
||||||
$(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
|
|
||||||
|
|||||||
@@ -19,5 +19,3 @@ OSMESA_LIB_DEPS =
|
|||||||
GLU_LIB_DEPS =
|
GLU_LIB_DEPS =
|
||||||
GLUT_LIB_DEPS =
|
GLUT_LIB_DEPS =
|
||||||
GLW_LIB_DEPS =
|
GLW_LIB_DEPS =
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
|
|
||||||
$(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
|
|
||||||
|
|||||||
25
configs/linux-x86-xcb
Normal file
25
configs/linux-x86-xcb
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Configuration for Linux with x86 optimizations
|
||||||
|
|
||||||
|
include $(TOP)/configs/default
|
||||||
|
|
||||||
|
CONFIG_NAME = linux-x86-xcb
|
||||||
|
|
||||||
|
# Compiler and flags
|
||||||
|
CC = gcc
|
||||||
|
CXX = g++
|
||||||
|
|
||||||
|
CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DPTHREADS -DUSE_XCB -I/usr/X11R6/include
|
||||||
|
|
||||||
|
CXXFLAGS = -Wall -O3 -ansi -pedantic -fPIC -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XCB
|
||||||
|
|
||||||
|
GLUT_CFLAGS = -fexceptions
|
||||||
|
|
||||||
|
|
||||||
|
ASM_SOURCES = $(X86_SOURCES)
|
||||||
|
ASM_API = $(X86_API)
|
||||||
|
|
||||||
|
# Library/program dependencies
|
||||||
|
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lXCB
|
||||||
|
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) -L/usr/X11R6/lib -lXt -lX11
|
||||||
|
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||||
@@ -7,10 +7,10 @@ CONFIG_NAME = osf1
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = cc
|
CC = cc
|
||||||
CXX = cxx
|
CXX = cxx
|
||||||
CFLAGS = -O0 -std1 -ieee_with_no_inexact -DUSE_XSHM -DPTHREADS -D_REENTRANT
|
CFLAGS = -O0 -std1 -ieee_with_no_inexact -DUSE_XSHM
|
||||||
CXXFLAGS = -O2 -std ansi -ieee -DPTHREADS -D_REENTRANT
|
CXXFLAGS = -O2 -std ansi -ieee
|
||||||
|
|
||||||
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
|
GL_LIB_DEPS = -lX11 -lXext -lm -lpthread
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
|
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXmu -lXt -lXi -lm
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lpthread -lm
|
APP_LIB_DEPS = -L$(LIB_DIR) -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lXmu -lXi -lm
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
# Configuration for OSF/1
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = osf1
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = cxx
|
|
||||||
CFLAGS = -O2 -std1 -ieee_with_no_inexact -DUSE_XSHM -DPTHREADS -D_REENTRANT
|
|
||||||
CXXFLAGS = -O2 -std ansi -ieee -DPTHREADS -D_REENTRANT
|
|
||||||
MKLIB_OPTIONS = -static
|
|
||||||
|
|
||||||
GL_LIB_DEPS =
|
|
||||||
GLU_LIB_DEPS =
|
|
||||||
GLUT_LIB_DEPS =
|
|
||||||
APP_LIB_DEPS = -noso -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -so_archive -lX11 -lXext -lXmu -lXi -lpthread -lm -lcxx
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Configuration for Solaris on x86 with gcc, dynamic libs
|
# Configuration for Solaris on x86 with gcc, static libs
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
include $(TOP)/configs/default
|
||||||
|
|
||||||
@@ -7,11 +7,18 @@ CONFIG_NAME = solaris-x86-gcc
|
|||||||
# Compiler and flags
|
# Compiler and flags
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
CFLAGS = -O3 -march=i486 -fPIC -I/usr/openwin/include -DUSE_XSHM
|
CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
|
||||||
CXXFLAGS = -O3 -march=i486 -fPIC
|
CXXFLAGS = -O3 -m486 -fPIC
|
||||||
GLUT_CFLAGS = -fexceptions
|
GLUT_CFLAGS = -fexceptions
|
||||||
|
MKLIB_OPTIONS = -static
|
||||||
|
|
||||||
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
|
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
|
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXi -lXmu
|
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
# Configuration for Solaris on x86 with gcc, static libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = solaris-x86-gcc
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = gcc
|
|
||||||
CXX = g++
|
|
||||||
CFLAGS = -O3 -march=i486 -fPIC -I/usr/openwin/include -DUSE_XSHM
|
|
||||||
CXXFLAGS = -O3 -march=i486 -fPIC
|
|
||||||
GLUT_CFLAGS = -fexceptions
|
|
||||||
MKLIB_OPTIONS = -static
|
|
||||||
|
|
||||||
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext -lXi -lXmu
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
# Configuration for 64-bit SunOS 5, with gcc
|
|
||||||
|
|
||||||
include $(TOP)/configs/sunos5-gcc
|
|
||||||
|
|
||||||
CONFIG_NAME = sunos5-64-gcc
|
|
||||||
|
|
||||||
# only set vars that differ from sunos5-gcc config
|
|
||||||
|
|
||||||
OPT_FLAGS = -O3 -m64 -mcpu=ultrasparc -mv8plus -mvis -g -fomit-frame-pointer -pipe
|
|
||||||
|
|
||||||
ARCH_FLAGS = -m64
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Configuration for SunOS 5
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = sunos5-v8
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = CC
|
|
||||||
CFLAGS = -xarch=v8 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS
|
|
||||||
CXXFLAGS = -xarch=v8 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
|
|
||||||
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
|
|
||||||
|
|
||||||
GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCstd -lCrun
|
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
# Configuration for SunOS 5
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = sunos5-v8-static
|
|
||||||
|
|
||||||
MKLIB_OPTIONS = -static
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = CC
|
|
||||||
CFLAGS = -xarch=v8 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS
|
|
||||||
CXXFLAGS = -xarch=v8 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
|
|
||||||
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
|
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -lXext -lXmu -lXi -lpthread -lm -lCstd -lCrun
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
# Configuration for SunOS 5, SPARC V9
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = sunos5-v9
|
|
||||||
|
|
||||||
MKLIB_OPTIONS = -cplusplus
|
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = CC
|
|
||||||
CFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS
|
|
||||||
CXXFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
|
|
||||||
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
|
|
||||||
|
|
||||||
GL_LIB_DEPS = -L/usr/openwin/lib -L/usr/dt/lib -lX11 -lXext -lXmu -lXi -lm -lpthread
|
|
||||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm -lCstd -lCrun
|
|
||||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
|
||||||
GLW_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -lX11 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
|
||||||
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
# Configuration for SunOS 5, SPARC V9, static libs
|
|
||||||
|
|
||||||
include $(TOP)/configs/default
|
|
||||||
|
|
||||||
CONFIG_NAME = sunos5-v9-static
|
|
||||||
|
|
||||||
MKLIB_OPTIONS = -static -cplusplus
|
|
||||||
|
|
||||||
LIB_DIR = $(TOP)/lib64
|
|
||||||
|
|
||||||
# Compiler and flags
|
|
||||||
CC = cc
|
|
||||||
CXX = CC
|
|
||||||
CFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS
|
|
||||||
CXXFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
|
|
||||||
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
|
|
||||||
|
|
||||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lXt -lX11 -lXext -lXmu -lXi -lpthread -lm -lCstd -lCrun
|
|
||||||
@@ -1,194 +0,0 @@
|
|||||||
Name
|
|
||||||
|
|
||||||
MESA_shader_debug
|
|
||||||
|
|
||||||
Name Strings
|
|
||||||
|
|
||||||
GL_MESA_shader_debug
|
|
||||||
|
|
||||||
Contact
|
|
||||||
|
|
||||||
Brian Paul (brian.paul 'at' tungstengraphics.com)
|
|
||||||
Michal Krol (mjkrol 'at' gmail.com)
|
|
||||||
|
|
||||||
Status
|
|
||||||
|
|
||||||
XXX - Not complete yet!!!
|
|
||||||
|
|
||||||
Version
|
|
||||||
|
|
||||||
Last Modified Date: May 29, 2006
|
|
||||||
Author Revision: 0.1
|
|
||||||
$Date: 2006/05/30 09:35:36 $ $Revision: 1.1 $
|
|
||||||
|
|
||||||
Number
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
Dependencies
|
|
||||||
|
|
||||||
OpenGL 1.5 is required.
|
|
||||||
The extension is written against the OpenGL 1.5 specification.
|
|
||||||
ARB_shading_language_100 is required.
|
|
||||||
ARB_shader_objects is required.
|
|
||||||
The extension is written against the OpenGL Shading Language
|
|
||||||
1.10 Specification.
|
|
||||||
|
|
||||||
Overview
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
IP Status
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Issues
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
New Procedures and Functions
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
New Types
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
New Tokens
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
Additions to Chapter 2 of the OpenGL 1.5 Specification
|
|
||||||
(OpenGL Operation)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 3 of the OpenGL 1.5 Specification (Rasterization)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 4 of the OpenGL 1.5 Specification (Per-Fragment
|
|
||||||
Operations and the Frame Buffer)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 5 of the OpenGL 1.5 Specification
|
|
||||||
(Special Functions)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 6 of the OpenGL 1.5 Specification (State and State
|
|
||||||
Requests)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Appendix A of the OpenGL 1.5 Specification (Invariance)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 1 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Introduction)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 2 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Overview of OpenGL Shading)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 3 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Basics)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 4 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Variables and Types)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 5 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Operators and Expressions)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 6 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Statements and Structure)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 7 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Built-in Variables)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 8 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Built-in Functions)
|
|
||||||
|
|
||||||
Add a new section 8.10 "Debug Functions":
|
|
||||||
|
|
||||||
Debug functions are available to both fragment and vertex shaders.
|
|
||||||
They are used to track the execution of a shader by logging
|
|
||||||
passed-in arguments to the shader's info log. That values can be
|
|
||||||
retrieved and validated by the application after shader execution
|
|
||||||
is complete.
|
|
||||||
|
|
||||||
void printMESA(const float value);
|
|
||||||
void printMESA(const int value);
|
|
||||||
void printMESA(const bool value);
|
|
||||||
void printMESA(const vec2 value);
|
|
||||||
void printMESA(const vec3 value);
|
|
||||||
void printMESA(const vec4 value);
|
|
||||||
void printMESA(const ivec2 value);
|
|
||||||
void printMESA(const ivec3 value);
|
|
||||||
void printMESA(const ivec4 value);
|
|
||||||
void printMESA(const bvec2 value);
|
|
||||||
void printMESA(const bvec3 value);
|
|
||||||
void printMESA(const bvec4 value);
|
|
||||||
void printMESA(const mat2 value);
|
|
||||||
void printMESA(const mat3 value);
|
|
||||||
void printMESA(const mat4 value);
|
|
||||||
void printMESA(const sampler1D value);
|
|
||||||
void printMESA(const sampler2D value);
|
|
||||||
void printMESA(const sampler3D value);
|
|
||||||
void printMESA(const samplerCube value);
|
|
||||||
void printMESA(const sampler1DShadow value);
|
|
||||||
void printMESA(const sampler2DShadow value);
|
|
||||||
|
|
||||||
Additions to Chapter 9 of the OpenGL Shading Language 1.10 Specification
|
|
||||||
(Shading Language Grammar)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to Chapter 10 of the OpenGL Shading Language 1.10
|
|
||||||
Specification (Issues)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Additions to the AGL/EGL/GLX/WGL Specifications
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
GLX Protocol
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
Errors
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
New State
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
New Implementation Dependent State
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
Sample Code
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
Revision History
|
|
||||||
|
|
||||||
29 May 2006
|
|
||||||
Initial draft. (Michal Krol)
|
|
||||||
@@ -32,7 +32,7 @@ Dependencies
|
|||||||
|
|
||||||
Overview
|
Overview
|
||||||
|
|
||||||
This extension allows an application to determine what portion of the
|
This extension allows an application to deterine what portion of the
|
||||||
swap period has elapsed since the last swap operation completed. The
|
swap period has elapsed since the last swap operation completed. The
|
||||||
"usage" value is a floating point value on the range [0,max] which is
|
"usage" value is a floating point value on the range [0,max] which is
|
||||||
calculated as follows:
|
calculated as follows:
|
||||||
@@ -59,7 +59,7 @@ Overview
|
|||||||
is taken from the completion of one swap to the issuance of the next.
|
is taken from the completion of one swap to the issuance of the next.
|
||||||
This representation may not be as useful as measuring between
|
This representation may not be as useful as measuring between
|
||||||
completions, as a significant amount of time may pass between the
|
completions, as a significant amount of time may pass between the
|
||||||
issuance of a swap and the swap actually occurring.
|
issuance of a swap and the swap actually occuring.
|
||||||
|
|
||||||
There is also a mechanism to determine whether a frame swap was
|
There is also a mechanism to determine whether a frame swap was
|
||||||
missed.
|
missed.
|
||||||
@@ -110,7 +110,7 @@ Additions to Chapter 6 of the 1.4 GL Specification (State and State Requests)
|
|||||||
Additions to the GLX 1.3 Specification
|
Additions to the GLX 1.3 Specification
|
||||||
|
|
||||||
The frame usage is measured as the percentage of the swap period elapsed
|
The frame usage is measured as the percentage of the swap period elapsed
|
||||||
between two buffer-swap operations being committed. In unextended GLX the
|
between two buffer-swap operations being commited. In unextened GLX the
|
||||||
swap period is the vertical refresh time. If SGI_swap_control or
|
swap period is the vertical refresh time. If SGI_swap_control or
|
||||||
MESA_swap_control are supported, the swap period is the vertical refresh
|
MESA_swap_control are supported, the swap period is the vertical refresh
|
||||||
time multiplied by the swap interval (or one if the swap interval is set
|
time multiplied by the swap interval (or one if the swap interval is set
|
||||||
@@ -119,7 +119,7 @@ Additions to the GLX 1.3 Specification
|
|||||||
If OML_sync_control is supported, the swap period is the vertical
|
If OML_sync_control is supported, the swap period is the vertical
|
||||||
refresh time multiplied by the divisor parameter to
|
refresh time multiplied by the divisor parameter to
|
||||||
glXSwapBuffersMscOML. The frame usage in this case is less than 1.0 if
|
glXSwapBuffersMscOML. The frame usage in this case is less than 1.0 if
|
||||||
the swap is committed before target_msc, and is greater than or equal to
|
the swap is commited before target_msc, and is greater than or equal to
|
||||||
1.0 otherwise. The actual usage value is based on the divisor and is
|
1.0 otherwise. The actual usage value is based on the divisor and is
|
||||||
never less than 0.0.
|
never less than 0.0.
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ Additions to the GLX 1.3 Specification
|
|||||||
|
|
||||||
The current missed frame count and total number of swaps since
|
The current missed frame count and total number of swaps since
|
||||||
the last call to glXBeginFrameTrackingMESA can be obtained by
|
the last call to glXBeginFrameTrackingMESA can be obtained by
|
||||||
calling the following function:
|
callling the following function:
|
||||||
|
|
||||||
int glXQueryFrameTrackingMESA(Display *dpy,
|
int glXQueryFrameTrackingMESA(Display *dpy,
|
||||||
GLXDrawable drawable,
|
GLXDrawable drawable,
|
||||||
@@ -152,7 +152,7 @@ Additions to the GLX 1.3 Specification
|
|||||||
float *lastMissedUsage)
|
float *lastMissedUsage)
|
||||||
|
|
||||||
The location pointed to by <swapCount> will be updated with the
|
The location pointed to by <swapCount> will be updated with the
|
||||||
number of swaps that have been committed. This value may not match the
|
number of swaps that have been commited. This value may not match the
|
||||||
number of swaps that have been requested since swaps may be
|
number of swaps that have been requested since swaps may be
|
||||||
queued by the implementation. This function can be called at any
|
queued by the implementation. This function can be called at any
|
||||||
time and does not synchronize to vertical blank.
|
time and does not synchronize to vertical blank.
|
||||||
@@ -171,7 +171,7 @@ Additions to the GLX 1.3 Specification
|
|||||||
application can call glXQueryFrameTrackingMESA for a final swap and
|
application can call glXQueryFrameTrackingMESA for a final swap and
|
||||||
missed frame count.
|
missed frame count.
|
||||||
|
|
||||||
If these functions are successful, zero is returned. If the context
|
If these functions are succesful, zero is returned. If the context
|
||||||
associated with dpy and drawable is not a direct context,
|
associated with dpy and drawable is not a direct context,
|
||||||
GLX_BAD_CONTEXT is returned.
|
GLX_BAD_CONTEXT is returned.
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Mesa 6.5 DOS/DJGPP Port v1.8
|
Mesa 6.3 DOS/DJGPP Port v1.7
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
||||||
@@ -6,16 +6,17 @@
|
|||||||
Description:
|
Description:
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
Well, guess what... this is the DOS port of Mesa 6.5, for DJGPP fans... Whoa!
|
Well, guess what... this is the DOS port of Mesa 6.3, for DJGPP fans... Whoa!
|
||||||
The driver uses OSMesa to draw off screen, and then blits the buffer. This is
|
The driver has its origins in ddsample.c, written by Brian Paul and found by me
|
||||||
not terribly efficient, and has some drawbacks, but saves maintenance costs.
|
in Mesa 3.4.2.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Legal:
|
Legal:
|
||||||
~~~~~~
|
~~~~~~
|
||||||
|
|
||||||
Mesa copyright applies.
|
Mesa copyright applies, provided this package is used within Mesa. For anything
|
||||||
|
else, see GPL.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -31,6 +32,9 @@ Available options:
|
|||||||
Environment variables:
|
Environment variables:
|
||||||
CPU optimize for the given processor.
|
CPU optimize for the given processor.
|
||||||
default = pentium
|
default = pentium
|
||||||
|
GLU=[mesa|sgi] specify GLU directory; can be `sgi' (requires GNU/C++)
|
||||||
|
or `mesa'.
|
||||||
|
default = mesa
|
||||||
GLIDE path to Glide3 SDK; used with FX.
|
GLIDE path to Glide3 SDK; used with FX.
|
||||||
default = $(TOP)/glide3
|
default = $(TOP)/glide3
|
||||||
FX=1 build for 3dfx Glide3. Note that this disables
|
FX=1 build for 3dfx Glide3. Note that this disables
|
||||||
@@ -52,9 +56,11 @@ Available options:
|
|||||||
|
|
||||||
|
|
||||||
Tested on:
|
Tested on:
|
||||||
Video card: Radeon 9500
|
CPU: AMD Athlon XP 1800+
|
||||||
DJGPP: djdev 2.04 + gcc v4.1.0 + make v3.80
|
Mainboard: GA-7VTXE w/ 512 MB DDRAM
|
||||||
OS: DOS, Win98SE, WinXP (using Videoport driver)
|
Video card: Voodoo5 6000 AGP w/ 128 MB SDRAM
|
||||||
|
DJGPP: djdev 2.04 + gcc v3.4.3 + make v3.80
|
||||||
|
OS: DOS and Win98SE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +98,7 @@ FAQ:
|
|||||||
Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
|
Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much better...
|
||||||
A) Is that a question? If you have a 3dfx Voodoo (any model), you're
|
A) Is that a question? If you have a 3dfx Voodoo (any model), you're
|
||||||
lucky (check http://sourceforge.net/projects/glide for the DJGPP port).
|
lucky (check http://sourceforge.net/projects/glide for the DJGPP port).
|
||||||
If you haven't, sorry; everything is done in software.
|
If you haven't, sorry; everything is done in software. Suggestions?
|
||||||
|
|
||||||
Q) I tried to set refresh rate w/ DMesa, but without success.
|
Q) I tried to set refresh rate w/ DMesa, but without success.
|
||||||
A) Refresh rate control works only for VESA 3.0 and the 3dfx driver (in
|
A) Refresh rate control works only for VESA 3.0 and the 3dfx driver (in
|
||||||
@@ -101,8 +107,7 @@ FAQ:
|
|||||||
|
|
||||||
Q) I made a simple application and it does nothing. It exits right away. Not
|
Q) I made a simple application and it does nothing. It exits right away. Not
|
||||||
even a blank screen.
|
even a blank screen.
|
||||||
A) Software drivers (VESA/VGA/NUL) must to be constructed as single-buffered
|
A) Pure software drivers (VESA/VGA/NUL) support only double-buffered modes.
|
||||||
visuals. However, DMesaSwapBuffers must be called to get any output.
|
|
||||||
A) Another weird "feature" is that buffer width must be multiple of 8 (I'm a
|
A) Another weird "feature" is that buffer width must be multiple of 8 (I'm a
|
||||||
lazy programmer and I found that the easiest way to keep buffer handling
|
lazy programmer and I found that the easiest way to keep buffer handling
|
||||||
at peak performance ;-).
|
at peak performance ;-).
|
||||||
@@ -260,11 +265,6 @@ v1.7 (???-2005)
|
|||||||
* no more GLX sources in DOS GLUT
|
* no more GLX sources in DOS GLUT
|
||||||
* made GLUT timer callbacks less accurate but safer
|
* made GLUT timer callbacks less accurate but safer
|
||||||
|
|
||||||
v1.8 (apr-2006)
|
|
||||||
* killed lots of code, the driver is now a front-end to OSMesa
|
|
||||||
* fixed problem with WinNT (http://www.volny.cz/martin.sulak/)
|
|
||||||
- removed 3dfx Glide3 support (temporarily?)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Contact:
|
Contact:
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
File: docs/README.WIN32
|
File: docs/README.WIN32
|
||||||
|
|
||||||
Last updated: Mar 31, 2006 - Karl Schultz - kschultz@users.sourceforge.net
|
Last updated: Jul 01, 2005 - Karl Schultz - kschultz@users.sourceforge.net
|
||||||
|
|
||||||
Quick Start
|
Quick Start
|
||||||
----- -----
|
----- -----
|
||||||
|
|
||||||
Unzip the MesaLib, MesaGLUT, and MesaDemos ZIP files into the same
|
Unzip both ZIP files (MesaLib and MesaDemos) into the same directory.
|
||||||
directory. The libs and demos build separately, so if you do not care
|
The libs and demos build separately, so if you do not care about the
|
||||||
about the demos or GLUT, you only need to unzip MesaLib. If you unzip
|
demos, you do not have to unzip that zip file. But if you do, it does
|
||||||
more than one ZIP file, they all need to be unzipped into the same
|
need to be unzipped into the same directory as the lib zip file
|
||||||
directory. Don't worry, you will not overwrite anything.
|
because the demos depend on the libs.
|
||||||
|
|
||||||
The Windows build system uses Microsoft Visual Studio. Project files
|
The Windows build system uses Microsoft Visual Studio. Project files
|
||||||
for a specific version of Visual Studio are in their own directory in
|
for a specific version of Visual Studio are in their own directory in
|
||||||
@@ -22,10 +22,6 @@ of Version 8 and it runs on 64-bit Windows. If you want to try this,
|
|||||||
start by importing the VC7 files and create the 64-bit targets in the
|
start by importing the VC7 files and create the 64-bit targets in the
|
||||||
configuration manager.
|
configuration manager.
|
||||||
|
|
||||||
It is likely that the new and free Visual Studio Express can be used
|
|
||||||
to build Mesa, but it hasn't been tried yet. Start with the VC7
|
|
||||||
project files.
|
|
||||||
|
|
||||||
The project files to build the core Mesa library, Windows Mesa
|
The project files to build the core Mesa library, Windows Mesa
|
||||||
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
drivers, OSMesa, and GLU are in the mesa directory. The project files
|
||||||
to build GLUT and some demo programs are in the progs directory.
|
to build GLUT and some demo programs are in the progs directory.
|
||||||
@@ -37,11 +33,10 @@ from the projects using Visual Studio.
|
|||||||
Windows Drivers
|
Windows Drivers
|
||||||
------- -------
|
------- -------
|
||||||
|
|
||||||
At this time, only the GDI driver is known to work. Most of the demos
|
At this time, only the GDI driver is known to work, as it has been
|
||||||
in progs/demos should work with this driver.
|
ported and rewritten to the latest Mesa DD interfaces. Source code
|
||||||
|
also exists in the tree for other drivers in src/mesa/drivers/windows,
|
||||||
Source code also exists in the tree for other drivers in
|
but the status of this code is unknown.
|
||||||
src/mesa/drivers/windows, but the status of this code is unknown.
|
|
||||||
|
|
||||||
The GDI driver operates basically by writing pixel spans into a DIB
|
The GDI driver operates basically by writing pixel spans into a DIB
|
||||||
section and then blitting the DIB to the window. The driver was
|
section and then blitting the DIB to the window. The driver was
|
||||||
@@ -91,14 +86,6 @@ simply run the demo executables from the demo directory.
|
|||||||
If you want to run the demos from the Visual Studio, you may have to
|
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.
|
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
|
Build System Notes
|
||||||
----- ------ -----
|
----- ------ -----
|
||||||
@@ -111,9 +98,6 @@ language files, without a lot of unnatural tweaking. So, the VC6
|
|||||||
build process uses custom build steps to compile these files in the
|
build process uses custom build steps to compile these files in the
|
||||||
GLU library.
|
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
|
VC7
|
||||||
---
|
---
|
||||||
|
|||||||
314
docs/README.X11
Normal file
314
docs/README.X11
Normal file
@@ -0,0 +1,314 @@
|
|||||||
|
|
||||||
|
Mesa Unix/X11 Information
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
There are two ways to compile Mesa on Unix/X11 systems:
|
||||||
|
|
||||||
|
1. The old way:
|
||||||
|
First type 'make' alone to see the list of system
|
||||||
|
configurations currently supported. If you see your configuration on the
|
||||||
|
list, type 'make <config>'. Most popular Unix/X workstations are currently
|
||||||
|
supported.
|
||||||
|
|
||||||
|
If your system configuration is not listed by 'make', you'll have to modify
|
||||||
|
the top-level Makefile and Make-config files. There are instructions in
|
||||||
|
each file.
|
||||||
|
|
||||||
|
When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory.
|
||||||
|
|
||||||
|
|
||||||
|
2. The new way:
|
||||||
|
Type './configure' and then 'make'. This uses GNU autoconfig.
|
||||||
|
Run 'make check' to build the demos.
|
||||||
|
See docs/INSTALL for more details.
|
||||||
|
When finished, the Mesa libraries will be in the Mesa-x.y/src/.libs/,
|
||||||
|
Mesa-x.y/si-glu/.libs, etc directories.
|
||||||
|
|
||||||
|
|
||||||
|
Notes on assembly language optimizations:
|
||||||
|
|
||||||
|
When using the old-style Makefiles, you can specify a configuration
|
||||||
|
that uses X86 assembly language optimizations (linux-3dnow for example).
|
||||||
|
|
||||||
|
The detection of MMX, 3DNow!, PIII/SSE, etc capability is done at
|
||||||
|
runtime. That means you can compile Mesa for 3DNow! optimizations
|
||||||
|
even if you don't have an AMD CPU.
|
||||||
|
|
||||||
|
However, your Linux binutils and assembler must understand the
|
||||||
|
special instructions in order to compile them. If you have
|
||||||
|
compilation problems, try upgrading your binutils.
|
||||||
|
|
||||||
|
|
||||||
|
Header and library files:
|
||||||
|
After you've compiled Mesa and tried the demos I recommend the following
|
||||||
|
procedure for "installing" Mesa.
|
||||||
|
|
||||||
|
Copy the Mesa include/GL directory to /usr/local/include:
|
||||||
|
cp -r include/GL /usr/local/include
|
||||||
|
|
||||||
|
Copy the Mesa library files to /usr/local/lib:
|
||||||
|
cp lib/* /usr/local/lib
|
||||||
|
|
||||||
|
(actually, use "cp -d" on Linux to preserve symbolic links)
|
||||||
|
|
||||||
|
|
||||||
|
Xt/Motif widgets:
|
||||||
|
If you want to use Mesa or OpenGL in your Xt/Motif program you can build
|
||||||
|
the widgets found in either the widgets-mesa or widgets-sgi directories.
|
||||||
|
The former were written for Mesa and the later are the original SGI
|
||||||
|
widgets. Look in those directories for more information.
|
||||||
|
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
HP users: a Mesa user reports that the HP-UX 10.01 C compiler has
|
||||||
|
a bug which effects glReadPixels. A patch for the compiler (PHSS_5743) is
|
||||||
|
available. Otherwise be sure your compiler is version 10.13 or later.
|
||||||
|
|
||||||
|
QNX users: if you have problems running the demos try setting the
|
||||||
|
stack size to 200K or larger with -N200K, for example.
|
||||||
|
|
||||||
|
SunOS 5.x users: The X shared memory extension may not work
|
||||||
|
correctly. If Mesa prints an error message to the effect of "Shared memory
|
||||||
|
error" then you'll have to append the following three lines to the end of
|
||||||
|
your /etc/system file then reboot:
|
||||||
|
set shmsys:shminfo_shmmax = 0x2000000
|
||||||
|
set shmsys:shminfo_shmmni = 0x1000
|
||||||
|
set shmsys:shminfo_shmseg = 0x100
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Using the library
|
||||||
|
=================
|
||||||
|
|
||||||
|
Configuration options:
|
||||||
|
The file src/mesa/main/config.h has many parameters which you can adjust
|
||||||
|
such as maximum number of lights, clipping planes, maximum texture size,
|
||||||
|
etc. In particular, you may want to change DEPTH_BITS from 16 to 32
|
||||||
|
if a 16-bit depth buffer isn't precise enough for your application.
|
||||||
|
|
||||||
|
|
||||||
|
Shared libraries:
|
||||||
|
If you compile shared libraries you may have to set an environment
|
||||||
|
variable to specify where the Mesa libraries are located. On Linux and
|
||||||
|
Sun systems for example, set the LD_LIBRARY_PATH variable to include
|
||||||
|
/your-dir/Mesa-2.6/lib. Otherwise, when you try to run a demo it
|
||||||
|
may fail with a message saying that one or more libraries couldn't be
|
||||||
|
found.
|
||||||
|
|
||||||
|
|
||||||
|
Remote display of OpenGL/GLX programs:
|
||||||
|
As of version 1.2.3, Mesa's header files use the same GLenum and GLUenum
|
||||||
|
values as SGI's (and most/all other vendor's) OpenGL headers. This means
|
||||||
|
you can freely mix object files compiled with OpenGL or Mesa headers.
|
||||||
|
In fact, on systems with dynamic runtime linkers it's possible to dynam-
|
||||||
|
ically link with Mesa or OpenGL shared libraries at runtime, without
|
||||||
|
recompiling or relinking anything!
|
||||||
|
|
||||||
|
Using IRIX 5.x as an example, you can run SGI's OpenGL demos with the
|
||||||
|
Mesa shared libraries as follows. Let's assume you're installing Mesa
|
||||||
|
in /usr/local/Mesa and using the C-shell:
|
||||||
|
% cd /usr/local/Mesa
|
||||||
|
% make irix5-dso
|
||||||
|
% setenv _RLD_LIST "/usr/local/Mesa/lib/libGL.so:DEFAULT"
|
||||||
|
% /usr/demos/bin/ideas_ogl // this is a test
|
||||||
|
|
||||||
|
You can now run OpenGL executables on almost any X display! There may
|
||||||
|
be some problems from the fact that Mesa supports many X visual types
|
||||||
|
that an OpenGL client may not expect (grayscale for example). In this
|
||||||
|
case the application may abort, print error messages, or just behave
|
||||||
|
strangely. You may have to experiment with the MESA_RGB_VISUAL envi-
|
||||||
|
ronment variable.
|
||||||
|
|
||||||
|
|
||||||
|
Xt/Motif Widgets:
|
||||||
|
Two versions of the Xt/Motif OpenGL drawing area widgets are included:
|
||||||
|
|
||||||
|
widgets-sgi/ SGI's stock widgets
|
||||||
|
widgets-mesa/ Mesa-tuned widgets
|
||||||
|
|
||||||
|
Look in those directories for details
|
||||||
|
|
||||||
|
|
||||||
|
Togl:
|
||||||
|
Togl is an OpenGL/Mesa widget for Tcl/Tk.
|
||||||
|
See http://togl.sourceforge.net for more information.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
X Display Modes:
|
||||||
|
Mesa supports RGB(A) rendering into almost any X visual type and depth.
|
||||||
|
|
||||||
|
The glXChooseVisual function tries its best to pick an appropriate visual
|
||||||
|
for the given attribute list. However, if this doesn't suit your needs
|
||||||
|
you can force Mesa to use any X visual you want (any supported by your
|
||||||
|
X server that is) by setting the MESA_RGB_VISUAL and MESA_CI_VISUAL
|
||||||
|
environment variables. When an RGB visual is requested, glXChooseVisual
|
||||||
|
will first look if the MESA_RGB_VISUAL variable is defined. If so, it
|
||||||
|
will try to use the specified visual. Similarly, when a color index
|
||||||
|
visual is requested, glXChooseVisual will look for the MESA_CI_VISUAL
|
||||||
|
variable.
|
||||||
|
|
||||||
|
The format of accepted values is: <visual-class> <depth>
|
||||||
|
Here are some examples:
|
||||||
|
|
||||||
|
using the C-shell:
|
||||||
|
% setenv MESA_RGB_VISUAL "TrueColor 8" // 8-bit TrueColor
|
||||||
|
% setenv MESA_CI_VISUAL "PseudoColor 12" // 12-bit PseudoColor
|
||||||
|
% setenv MESA_RGB_VISUAL "PseudoColor 8" // 8-bit PseudoColor
|
||||||
|
|
||||||
|
using the KornShell:
|
||||||
|
$ export MESA_RGB_VISUAL="TrueColor 8"
|
||||||
|
$ export MESA_CI_VISUAL="PseudoColor 12"
|
||||||
|
$ export MESA_RGB_VISUAL="PseudoColor 8"
|
||||||
|
|
||||||
|
|
||||||
|
Double buffering:
|
||||||
|
Mesa can use either an X Pixmap or XImage as the backbuffer when in
|
||||||
|
double buffer mode. Using GLX, the default is to use an XImage. The
|
||||||
|
MESA_BACK_BUFFER environment variable can override this. The valid
|
||||||
|
values for MESA_BACK_BUFFER are: Pixmap and XImage (only the first
|
||||||
|
letter is checked, case doesn't matter).
|
||||||
|
|
||||||
|
A pixmap is faster when drawing simple lines and polygons while an
|
||||||
|
XImage is faster when Mesa has to do pixel-by-pixel rendering. If you
|
||||||
|
need depth buffering the XImage will almost surely be faster. Exper-
|
||||||
|
iment with the MESA_BACK_BUFFER variable to see which is faster for
|
||||||
|
your application.
|
||||||
|
|
||||||
|
|
||||||
|
Colormaps:
|
||||||
|
When using Mesa directly or with GLX, it's up to the application writer
|
||||||
|
to create a window with an appropriate colormap. The aux, tk, and GLUT
|
||||||
|
toolkits try to minimize colormap "flashing" by sharing colormaps when
|
||||||
|
possible. Specifically, if the visual and depth of the window matches
|
||||||
|
that of the root window, the root window's colormap will be shared by
|
||||||
|
the Mesa window. Otherwise, a new, private colormap will be allocated.
|
||||||
|
|
||||||
|
When sharing the root colormap, Mesa may be unable to allocate the colors
|
||||||
|
it needs, resulting in poor color quality. This can happen when a
|
||||||
|
large number of colorcells in the root colormap are already allocated.
|
||||||
|
To prevent colormap sharing in aux, tk and GLUT, define the environment
|
||||||
|
variable MESA_PRIVATE_CMAP. The value isn't significant.
|
||||||
|
|
||||||
|
|
||||||
|
Gamma correction:
|
||||||
|
To compensate for the nonlinear relationship between pixel values
|
||||||
|
and displayed intensities, there is a gamma correction feature in
|
||||||
|
Mesa. Some systems, such as Silicon Graphics, support gamma
|
||||||
|
correction in hardware (man gamma) so you won't need to use Mesa's
|
||||||
|
gamma facility. Other systems, however, may need gamma adjustment
|
||||||
|
to produce images which look correct. If in the past you thought
|
||||||
|
Mesa's images were too dim, read on.
|
||||||
|
|
||||||
|
Gamma correction is controlled with the MESA_GAMMA environment
|
||||||
|
variable. Its value is of the form "Gr Gg Gb" or just "G" where
|
||||||
|
Gr is the red gamma value, Gg is the green gamma value, Gb is the
|
||||||
|
blue gamma value and G is one gamma value to use for all three
|
||||||
|
channels. Each value is a positive real number typically in the
|
||||||
|
range 1.0 to 2.5. The defaults are all 1.0, effectively disabling
|
||||||
|
gamma correction. Examples using csh:
|
||||||
|
|
||||||
|
% setenv MESA_GAMMA "2.3 2.2 2.4" // separate R,G,B values
|
||||||
|
% setenv MESA_GAMMA "2.0" // same gamma for R,G,B
|
||||||
|
|
||||||
|
The demos/gamma.c program may help you to determine reasonable gamma
|
||||||
|
value for your display. With correct gamma values, the color intensities
|
||||||
|
displayed in the top row (drawn by dithering) should nearly match those
|
||||||
|
in the bottom row (drawn as grays).
|
||||||
|
|
||||||
|
Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well
|
||||||
|
on HP displays using the HP-ColorRecovery technology.
|
||||||
|
|
||||||
|
Mesa implements gamma correction with a lookup table which translates
|
||||||
|
a "linear" pixel value to a gamma-corrected pixel value. There is a
|
||||||
|
small performance penalty. Gamma correction only works in RGB mode.
|
||||||
|
Also be aware that pixel values read back from the frame buffer will
|
||||||
|
not be "un-corrected" so glReadPixels may not return the same data
|
||||||
|
drawn with glDrawPixels.
|
||||||
|
|
||||||
|
For more information about gamma correction see:
|
||||||
|
http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html
|
||||||
|
|
||||||
|
|
||||||
|
Overlay Planes
|
||||||
|
|
||||||
|
Overlay planes in the frame buffer are supported by Mesa but require
|
||||||
|
hardware and X server support. To determine if your X server has
|
||||||
|
overlay support you can test for the SERVER_OVERLAY_VISUALS property:
|
||||||
|
|
||||||
|
xprop -root | grep SERVER_OVERLAY_VISUALS
|
||||||
|
|
||||||
|
|
||||||
|
HPCR glClear(GL_COLOR_BUFFER_BIT) dithering
|
||||||
|
|
||||||
|
If you set the MESA_HPCR_CLEAR environment variable then dithering
|
||||||
|
will be used when clearing the color buffer. This is only applicable
|
||||||
|
to HP systems with the HPCR (Color Recovery) system.
|
||||||
|
|
||||||
|
|
||||||
|
Extensions
|
||||||
|
==========
|
||||||
|
There are three Mesa-specific GLX extensions at this time.
|
||||||
|
|
||||||
|
GLX_MESA_pixmap_colormap
|
||||||
|
|
||||||
|
This extension adds the GLX function:
|
||||||
|
|
||||||
|
GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
|
||||||
|
Pixmap pixmap, Colormap cmap )
|
||||||
|
|
||||||
|
It is an alternative to the standard glXCreateGLXPixmap() function.
|
||||||
|
Since Mesa supports RGB rendering into any X visual, not just True-
|
||||||
|
Color or DirectColor, Mesa needs colormap information to convert RGB
|
||||||
|
values into pixel values. An X window carries this information but a
|
||||||
|
pixmap does not. This function associates a colormap to a GLX pixmap.
|
||||||
|
See the xdemos/glxpixmap.c file for an example of how to use this
|
||||||
|
extension.
|
||||||
|
|
||||||
|
GLX_MESA_release_buffers
|
||||||
|
|
||||||
|
Mesa associates a set of ancillary (depth, accumulation, stencil and
|
||||||
|
alpha) buffers with each X window it draws into. These ancillary
|
||||||
|
buffers are allocated for each X window the first time the X window
|
||||||
|
is passed to glXMakeCurrent(). Mesa, however, can't detect when an
|
||||||
|
X window has been destroyed in order to free the ancillary buffers.
|
||||||
|
|
||||||
|
The best it can do is to check for recently destroyed windows whenever
|
||||||
|
the client calls the glXCreateContext() or glXDestroyContext()
|
||||||
|
functions. This may not be sufficient in all situations though.
|
||||||
|
|
||||||
|
The GLX_MESA_release_buffers extension allows a client to explicitly
|
||||||
|
deallocate the ancillary buffers by calling glxReleaseBuffersMESA()
|
||||||
|
just before an X window is destroyed. For example:
|
||||||
|
|
||||||
|
#ifdef GLX_MESA_release_buffers
|
||||||
|
glXReleaseBuffersMESA( dpy, window );
|
||||||
|
#endif
|
||||||
|
XDestroyWindow( dpy, window );
|
||||||
|
|
||||||
|
This extension is new in Mesa 2.0.
|
||||||
|
|
||||||
|
GLX_MESA_copy_sub_buffer
|
||||||
|
|
||||||
|
This extension adds the glXCopySubBufferMESA() function. It works
|
||||||
|
like glXSwapBuffers() but only copies a sub-region of the window
|
||||||
|
instead of the whole window.
|
||||||
|
|
||||||
|
This extension is new in Mesa version 2.6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Summary of X-related environment variables:
|
||||||
|
MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
|
||||||
|
MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
|
||||||
|
MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
|
||||||
|
MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
|
||||||
|
MESA_GAMMA - gamma correction coefficients (X only)
|
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
$Id: README.X11,v 3.11 2003/12/17 15:14:31 brianp Exp $
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
|
|
||||||
Mesa 6.4.1 Release Notes
|
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
|
||||||
------------
|
|
||||||
|
|
||||||
Mesa uses an even/odd version number scheme like the Linux kernel.
|
|
||||||
Odd numbered versions (such as 6.3) designate new developmental releases.
|
|
||||||
Even numbered versions (such as 6.4) designate stable releases.
|
|
||||||
|
|
||||||
|
|
||||||
6.4.1 is a bug-fix release. See the VERSIONS file for details.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GLUT tarball
|
|
||||||
------------
|
|
||||||
|
|
||||||
Starting with 6.4, the GLUT library sources are distributed in a separate
|
|
||||||
tarball. This was done at the request of Linux distro vendors who prefer
|
|
||||||
to use freeglut.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Driver Status
|
|
||||||
---------------------- ----------------------
|
|
||||||
DRI drivers varies with the driver
|
|
||||||
XMesa (Xlib) implements OpenGL 1.5
|
|
||||||
OSMesa (off-screen) implements OpenGL 1.5
|
|
||||||
Windows/Win32 implements OpenGL 1.5
|
|
||||||
Glide (3dfx Voodoo1/2) requires updates
|
|
||||||
SVGA requires updates
|
|
||||||
DJGPP requires updates
|
|
||||||
GGI requires updates
|
|
||||||
BeOS requires updates
|
|
||||||
Allegro requires updates
|
|
||||||
D3D requires updates
|
|
||||||
|
|
||||||
The drivers which require updates mostly need to be updated to work
|
|
||||||
with the new gl_renderbuffer / gl_framebuffer infrastructure introduced
|
|
||||||
in Mesa 6.3.
|
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
$Id: RELNOTES-6.4.1,v 3.1 2006/02/03 17:21:54 brianp Exp $
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
|
|
||||||
Mesa 6.4.2 Release Notes
|
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
|
||||||
------------
|
|
||||||
|
|
||||||
Mesa uses an even/odd version number scheme like the Linux kernel.
|
|
||||||
Odd numbered versions (such as 6.3) designate new developmental releases.
|
|
||||||
Even numbered versions (such as 6.4) designate stable releases.
|
|
||||||
|
|
||||||
|
|
||||||
6.4.2 is a minor bug-fix release. See the VERSIONS file for details.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GLUT tarball
|
|
||||||
------------
|
|
||||||
|
|
||||||
Starting with 6.4, the GLUT library sources are distributed in a separate
|
|
||||||
tarball. This was done at the request of Linux distro vendors who prefer
|
|
||||||
to use freeglut.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Driver Status
|
|
||||||
---------------------- ----------------------
|
|
||||||
DRI drivers varies with the driver
|
|
||||||
XMesa (Xlib) implements OpenGL 1.5
|
|
||||||
OSMesa (off-screen) implements OpenGL 1.5
|
|
||||||
Windows/Win32 implements OpenGL 1.5
|
|
||||||
Glide (3dfx Voodoo1/2) requires updates
|
|
||||||
SVGA requires updates
|
|
||||||
DJGPP requires updates
|
|
||||||
GGI requires updates
|
|
||||||
BeOS requires updates
|
|
||||||
Allegro requires updates
|
|
||||||
D3D requires updates
|
|
||||||
|
|
||||||
The drivers which require updates mostly need to be updated to work
|
|
||||||
with the new gl_renderbuffer / gl_framebuffer infrastructure introduced
|
|
||||||
in Mesa 6.3.
|
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
$Id: RELNOTES-6.4.2,v 3.1 2006/02/03 17:21:54 brianp Exp $
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
Mesa 6.5 Release Notes
|
Mesa 6.5 Release Notes
|
||||||
|
|
||||||
|
month, day, 2005
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -15,29 +17,23 @@ Even numbered versions (such as 6.4) designate stable releases.
|
|||||||
New Features
|
New Features
|
||||||
------------
|
------------
|
||||||
|
|
||||||
OpenGL Shading language support
|
GL_EXT_timer_query - used to get elapsed time information from the renderer.
|
||||||
This includes the GL_ARB_shader_objects, GL_ARB_shading_language_100,
|
|
||||||
GL_ARB_vertex_shader and GL_ARB_fragment_shader extensions. Most of
|
|
||||||
the work was done by Michal Krol.
|
|
||||||
There's probably a fair number of bugs since this is a pretty large,
|
|
||||||
complicated body of code.
|
|
||||||
|
|
||||||
The OpenGL 2.0 interface to these features will be implemented in a
|
|
||||||
future version of Mesa,
|
|
||||||
|
|
||||||
GL_EXT_timer_query
|
|
||||||
Used to measure the time of OpenGL operations at high precision.
|
|
||||||
Only supported in the software/Xlib driver at this time.
|
|
||||||
|
|
||||||
GL_EXT_packed_depth_stencil
|
Driver Interface Changes
|
||||||
Defines a new GL_DEPTH_STENCIL_EXT pixel format.
|
------------------------
|
||||||
|
|
||||||
GL_EXT_framebuffer_blit
|
Stencil: The Driver.StencilOp/Func/Mask() functions have been replaced by
|
||||||
A simplified glCopyPixels-like feature for copying pixel rectangles.
|
the two-sided versions: Driver.Stencil*Separate().
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
To Do
|
||||||
|
-----
|
||||||
|
Fix linux-glide target/driver.
|
||||||
|
Fix lambda calculation for frag progs.
|
||||||
|
|
||||||
GL_ARB_half_float_pixel
|
|
||||||
Adds a new half-precision floating point format for image transfers,
|
|
||||||
such as for glDrawPixels, glReadPixels, glTexImage, etc.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -50,37 +46,18 @@ The following extensions have been removed:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Known Issues
|
|
||||||
------------
|
|
||||||
|
|
||||||
Rendering to depth textures will not work. Rendering to GL_DEPTH_STENCIL
|
|
||||||
textures should work.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Driver Interface Changes
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
Stencil: The Driver.StencilOp/Func/Mask() functions have been replaced by
|
|
||||||
the two-sided versions: Driver.Stencil*Separate().
|
|
||||||
|
|
||||||
Render-to-texture: The functions for rendering to textures have changed.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
To Do (someday) items
|
To Do (someday) items
|
||||||
---------------------
|
---------------------
|
||||||
Switch to freeglut
|
Switch to freeglut
|
||||||
Increase MAX_DRAWBUFFERS
|
Increase MAX_DRAWBUFFERS
|
||||||
Fix linux-glide target/driver.
|
|
||||||
Fix lambda calculation for frag progs.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Driver Status
|
Driver Status
|
||||||
---------------------- ----------------------
|
---------------------- ----------------------
|
||||||
DRI drivers varies with the driver
|
DRI drivers varies with the driver
|
||||||
XMesa/GLX (on Xlib) implements OpenGL 1.5
|
XMesa (Xlib) implements OpenGL 1.5
|
||||||
OSMesa (off-screen) implements OpenGL 1.5
|
OSMesa (off-screen) implements OpenGL 1.5
|
||||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||||
SVGA implements OpenGL 1.3
|
SVGA implements OpenGL 1.3
|
||||||
@@ -94,4 +71,4 @@ D3D needs updating
|
|||||||
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
$Id: RELNOTES-6.5,v 3.4 2006/03/29 04:53:02 brianp Exp $
|
$Id: RELNOTES-6.5,v 3.1 2005/09/14 14:34:54 brianp Exp $
|
||||||
|
|||||||
@@ -1407,42 +1407,10 @@ Mesa Version History
|
|||||||
- fragment programs that wrote result.depth.z didn't work
|
- fragment programs that wrote result.depth.z didn't work
|
||||||
|
|
||||||
|
|
||||||
6.4.1 November 30, 2005
|
6.5 month, day, 2005
|
||||||
Bug fixes:
|
|
||||||
- redefining a vertex program string didn't take effect in TNL module
|
|
||||||
- fixed occasional segfault upon vertex/fragment parsing error
|
|
||||||
- vertex program LIT instruction didn't handle 0^0=1 correctly
|
|
||||||
- fragment program fog option didn't work with glDrawPixels, glBitmap
|
|
||||||
- USE_MGL_NAMESPACE didn't work for x86-64
|
|
||||||
- OSMesa demos were missing from previous release tarballs
|
|
||||||
- fixed problem with float->ushort conversion in glClear (bug 4992)
|
|
||||||
- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
|
|
||||||
- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
|
|
||||||
- fixed occasional triangle color interpolation problem on VMS
|
|
||||||
- work around invalid free() call (bug 5131)
|
|
||||||
- fixed BSD X server compilation problem by including stdint.h
|
|
||||||
|
|
||||||
|
|
||||||
6.4.2 February 2, 2006
|
|
||||||
New:
|
New:
|
||||||
- added OSMesaColorClamp() function/feature
|
|
||||||
- added wglGetExtensionStringARB() function
|
|
||||||
Bug fixes:
|
|
||||||
- fixed some problems when building on Windows
|
|
||||||
- GLw header files weren't installed by installmesa script (bug 5396)
|
|
||||||
- GL/glfbdev.h file was missing from tarballs
|
|
||||||
- fixed TNL initialization bug which could lead to crash (bug 5791)
|
|
||||||
|
|
||||||
|
|
||||||
6.5 March 31, 2006
|
|
||||||
New:
|
|
||||||
- OpenGL Shading Language support through GL_ARB_shader_objects,
|
|
||||||
GL_ARB_shading_language_100, GL_ARB_vertex_shader and
|
|
||||||
GL_ARB_fragment_shader (done by Michal Krol)
|
|
||||||
- GL_EXT_packed_depth_stencil extension
|
- GL_EXT_packed_depth_stencil extension
|
||||||
- GL_EXT_timer_query extension
|
- GL_EXT_timer_query extension
|
||||||
- GL_EXT_framebuffer_blit extension
|
|
||||||
- GL_ARB_half_float_pixel
|
|
||||||
- reflect demo improved to support multiple windows
|
- reflect demo improved to support multiple windows
|
||||||
- singlebuffer demo (shows no/little-flicker single-buffered rendering)
|
- singlebuffer demo (shows no/little-flicker single-buffered rendering)
|
||||||
- r200: enable GL_ARB_texture_env_crossbar, separate the texture
|
- r200: enable GL_ARB_texture_env_crossbar, separate the texture
|
||||||
@@ -1452,46 +1420,8 @@ Mesa Version History
|
|||||||
- radeon: add support for all 3 tmus, GL_ARB_texture_cube_map
|
- radeon: add support for all 3 tmus, GL_ARB_texture_cube_map
|
||||||
and GL_EXT_fog_coord
|
and GL_EXT_fog_coord
|
||||||
- MESA_GLX_ALPHA_BITS env var for xlib driver
|
- MESA_GLX_ALPHA_BITS env var for xlib driver
|
||||||
- many DRI driver updates (including screen rotation support
|
|
||||||
for the Intel DRI driver)
|
|
||||||
Changes:
|
Changes:
|
||||||
- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
|
- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
|
||||||
- removed GL_SGIX/SGIS_pixel_texture extensions
|
- removed GL_SGIX/SGIS_pixel_texture extensions
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
- fixed glxcontextmodes.c datatype problem (bug 5835)
|
|
||||||
- fixed aix-gcc build/install bugs (bug 5874)
|
|
||||||
- fixed some bugs in texture env program generation
|
|
||||||
- glXCopyContext() didn't handle texture object bindings properly
|
|
||||||
- glXCopyContext() didn't copy all lighting state
|
|
||||||
- fixed FreeBSD config (Pedro Giffuni)
|
|
||||||
- fixed some minor framebuffer object bugs
|
|
||||||
- replaced dprintf() with _glu_printf() in GLU (bug 6244)
|
|
||||||
- fixed a number of thread safety bugs/regressions
|
|
||||||
- fixed a number of GLU tesselator bugs (John Shell, bug 6339)
|
|
||||||
- paletted texturing was broken w/ floating point palettes (K. Schultz)
|
|
||||||
- lots of assorted framebuffer object bug fixes
|
|
||||||
|
|
||||||
6.5.1 month, day, 2006
|
|
||||||
New:
|
|
||||||
- GL_APPLE_vertex_array_object extension (Ian Romanick)
|
|
||||||
Changes:
|
|
||||||
- The glVertexAttribARB functions no longer alias the conventional
|
|
||||||
vertex attributes.
|
|
||||||
- glxinfo program prints more info with -l option
|
|
||||||
Bug fixes:
|
|
||||||
- fixed broken texture border handling for depth textures (bug 6498)
|
|
||||||
- removed the test for duplicated framebuffer attachments, per
|
|
||||||
version 117 of the GL_EXT_framebuffer_object specification
|
|
||||||
- fixed a few render-to-texture bugs, including render to depth texture
|
|
||||||
- clipping of lines against user-defined clip planes was broken (6512)
|
|
||||||
- assembly language dispatch for SPARC was broken (bug 6484)
|
|
||||||
- assorted compilation fixes on various Unix platforms (Dan Schikore)
|
|
||||||
- glPopAttrib could restore an invalid value for GL_DRAW_BUFFER
|
|
||||||
- assorted minor fixes for 16 and 32 bit/channel modes
|
|
||||||
- fixed assorted bugs in texture compression paths
|
|
||||||
- fixed indirect rendering vertex array crashes (bug 6863)
|
|
||||||
- glDrawPixels GL_INDEX_OFFSET didn't always work
|
|
||||||
- fixed convolution memory leak (bug 7077)
|
|
||||||
- rectangular depth textures didn't work
|
|
||||||
- invalid mode to glBegin didn't generate an error (bug 7142)
|
|
||||||
- 'normalized' parameter to glVertexAttribPointerARB didn't work
|
|
||||||
|
|||||||
@@ -40,14 +40,14 @@ Here are the basic instructions for Unix systems:
|
|||||||
Version 1.9.28 is known to work.
|
Version 1.9.28 is known to work.
|
||||||
<li>Login as an anonymous user:
|
<li>Login as an anonymous user:
|
||||||
<pre>
|
<pre>
|
||||||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa login
|
cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa login
|
||||||
</pre>
|
</pre>
|
||||||
Just press Enter/Return when prompted for a password.
|
Just press Enter/Return when prompted for a password.
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<li>Check out the code:
|
<li>Check out the code:
|
||||||
<pre>
|
<pre>
|
||||||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa co Mesa
|
cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa co Mesa
|
||||||
</pre>
|
</pre>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ Here are the basic instructions for Unix systems:
|
|||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
<li><code>cd Mesa</code>
|
<li><code>cd Mesa</code>
|
||||||
<li><code>cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/mesa update</code>
|
<li><code>cvs -z3 -d:pserver:anonymous@pdx.freedesktop.org:/cvs/mesa update</code>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ with:
|
|||||||
</pre>
|
</pre>
|
||||||
followed by:
|
followed by:
|
||||||
<pre>
|
<pre>
|
||||||
cvs -d:ext:yourusername@cvs.freedesktop.org:/cvs/mesa co Mesa
|
cvs -d:ext:yourusername@pdx.freedesktop.org:/cvs/mesa co Mesa
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ Brace example:
|
|||||||
Here's the GNU indent command which will best approximate my preferred style:
|
Here's the GNU indent command which will best approximate my preferred style:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
|
indent -br -i3 -npcs infile.c -o outfile.c
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ DEMO_NAME are correct.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Update the docs/news.html file and docs/download.html files.
|
Update the docs/news.html file and docs/contents.html files.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
<H1>Downloading</H1>
|
<H1>Downloading</H1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Last development release: <b>6.5</b>
|
Last development release: <b>6.3.2</b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Last stable release: <b>6.4.2</b>
|
Last stable release: <b>6.2.1</b>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -32,10 +32,10 @@ Mesa is distributed in several parts:
|
|||||||
</li>
|
</li>
|
||||||
<li><b>MesaDemos-x.y.z</b> - OpenGL demonstration and test programs.
|
<li><b>MesaDemos-x.y.z</b> - OpenGL demonstration and test programs.
|
||||||
Most of the programs require GLUT (either the
|
Most of the programs require GLUT (either the
|
||||||
<a href="http://www.opengl.org/resources/libraries/glut"
|
<a href="http://www.opengl.org/resources/libraries/glut.html"
|
||||||
target="_parent">original GLUT by Mark Kilgard</a> or
|
target="_parent">original GLUT by Mark Kilgard</a> or
|
||||||
<a href="http://freeglut.sourceforge.net" target="_parent">freeglut</a> or
|
<a href="http://freeglut.sourceforge.net" target="_parent">freeglut</a> or
|
||||||
<a href="http://openglut.sourceforge.net" target="_parent">OpenGLUT</a>).
|
<a href="http://freeglut.sourceforge.net" target="_parent">OpenGLUT</a>).
|
||||||
</li>
|
</li>
|
||||||
<li><b>MesaGLUT-x.y.z</b> - Mark Kilgard's GLUT, easily compiled and used
|
<li><b>MesaGLUT-x.y.z</b> - Mark Kilgard's GLUT, easily compiled and used
|
||||||
with Mesa. Plus, other implementation of GLUT for DOS, OS/2, BeOS, etc.
|
with Mesa. Plus, other implementation of GLUT for DOS, OS/2, BeOS, etc.
|
||||||
|
|||||||
@@ -20,25 +20,19 @@ Mesa supports the following environment variables:
|
|||||||
If the value of MESA_DEBUG is "FP" floating point arithmetic errors will
|
If the value of MESA_DEBUG is "FP" floating point arithmetic errors will
|
||||||
generate exceptions.
|
generate exceptions.
|
||||||
<li>MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER)
|
<li>MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER)
|
||||||
<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
|
|
||||||
fragment programs (intended for developers only)
|
|
||||||
<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
|
|
||||||
operations with vertex programs (intended for developers only).
|
|
||||||
Setting this variable automatically sets the MESA_TEX_PROG variable as well.
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The following are only applicable to the Xlib software driver.
|
The following environment variables are only applicable to the Xlib/X11
|
||||||
See <A HREF="README.X11">README.X11</A> for details.
|
software driver:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
|
<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
|
||||||
<li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
|
<li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
|
||||||
<li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
|
<li>MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
|
||||||
either "pixmap" or "ximage"
|
<li>MESA_GAMMA - gamma correction coefficients (X only)
|
||||||
<li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
|
<li>MESA_XSYNC - enable synchronous X behavior (for X debugging only)
|
||||||
<li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
|
<li>MESA_GLX_FORCE_CI - if set, force GLX to treak 8bpp visuals as CI visuals
|
||||||
<li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
|
|
||||||
<li>MESA_GLX_FX - set to either "fullscreen" for full-screen rendering,
|
<li>MESA_GLX_FX - set to either "fullscreen" for full-screen rendering,
|
||||||
"window" to render into a window, or "disable" to disable the Glide driver.
|
"window" to render into a window, or "disable" to disable the Glide driver.
|
||||||
<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
|
<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<center>
|
<center>
|
||||||
<h1>Mesa Frequently Asked Questions</h1>
|
<h1>Mesa Frequently Asked Questions</h1>
|
||||||
Last updated: 8 June 2006
|
Last updated: 21 October 2004
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@@ -159,12 +159,6 @@ but it does export the OpenGL API. It allows tiled rendering, sort-last
|
|||||||
rendering, etc.
|
rendering, etc.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
|
||||||
<a href="http://www.ticalc.org/archives/files/fileinfo/361/36173.html"
|
|
||||||
target="_parent">ClosedGL</a> is an OpenGL subset library for TI
|
|
||||||
graphing calculators.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There may be other open OpenGL implementations, but Mesa is the most
|
There may be other open OpenGL implementations, but Mesa is the most
|
||||||
popular and feature-complete.
|
popular and feature-complete.
|
||||||
@@ -379,7 +373,7 @@ the archives) is a good way to get information.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<h2>4.3 Why isn't GL_EXT_texture_compression_s3tc implemented in Mesa?</h2>
|
<h2>4.3 Why isn't GL_EXT_texture_compression_s3tc implemented in Mesa and/or the DRI drivers?</h2>
|
||||||
<p>
|
<p>
|
||||||
The <a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt" target="_parent">specification for the extension</a>
|
The <a href="http://oss.sgi.com/projects/ogl-sample/registry/EXT/texture_compression_s3tc.txt" target="_parent">specification for the extension</a>
|
||||||
indicates that there are intellectual property (IP) and/or patent issues
|
indicates that there are intellectual property (IP) and/or patent issues
|
||||||
@@ -391,9 +385,8 @@ implement the extension (specifically the compression/decompression
|
|||||||
algorithms).
|
algorithms).
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
In the mean time, a 3rd party <a href=
|
Until we can get official permission to do so, this extension will not
|
||||||
"http://homepage.hispeed.ch/rscheidegger/dri_experimental/s3tc_index.html"
|
be implemented in Mesa.
|
||||||
target="_parent">plug-in library</a> is available.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,13 +70,13 @@ They're found in a module of the DRI CVS tree.
|
|||||||
To obtain the code do the following:
|
To obtain the code do the following:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri login
|
cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/dri login
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
Press Enter/Return when prompted for a password. Then,
|
Press Enter/Return when prompted for a password. Then,
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
cvs -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri co drm
|
cvs -d:pserver:anonymous@pdx.freedesktop.org:/cvs/dri co drm
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -27,11 +27,9 @@
|
|||||||
Mesa may be compiled in several different ways:
|
Mesa may be compiled in several different ways:
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b><em>Stand-alone/Xlib mode</em></b> - Mesa will be compiled as
|
<li><b><em>Stand-alone/Xlib mode</em></b> - Mesa is compiled as
|
||||||
a software renderer using Xlib to do all rendering.
|
a software renderer using Xlib to do all rendering.
|
||||||
The libGL.so library will be a self-contained rendering library that will
|
libGL.so is a self-contained rendering library.
|
||||||
allow you to run OpenGL/GLX applications on any X server (regardless of
|
|
||||||
whether it supports the GLX X server extension).
|
|
||||||
<p>
|
<p>
|
||||||
To compile stand-alone Mesa type <b>make</b> in the top-level directory.
|
To compile stand-alone Mesa type <b>make</b> in the top-level directory.
|
||||||
You'll see a list of supported system configurations.
|
You'll see a list of supported system configurations.
|
||||||
@@ -43,73 +41,49 @@ Choose one from the list (such as linux-x86), and type:
|
|||||||
<p>This will produce libGL.so and several other libraries</p>
|
<p>This will produce libGL.so and several other libraries</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li><b><em>DRI/accelerated</em></b> - The DRI hardware drivers for
|
<li><b><em>DRI/accelerated</em></b> - The DRI hardware drivers (for ATI,
|
||||||
accelerated OpenGL rendering (for ATI, Intel, Matrox, etc) will be built.
|
Intel, Matrox, etc) are built.
|
||||||
The libGL.so library will support the GLX extension and will load/use
|
libGL.so implements the GLX extension and dynamically loads the DRI drivers.
|
||||||
the DRI hardware drivers.
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<b>Prerequisites:</b>
|
To build the DRI drivers you'll first need to have the DRM (Direct
|
||||||
|
Rendering Manager) kernel drivers and header files.
|
||||||
|
They're available from the <a href="http://dri.sf.net/" target="_parent">DRI</a> project.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ol>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<p>
|
<p>
|
||||||
DRM kernel modules and header files from the
|
You can get them from CVS by doing:
|
||||||
<a href="http://dri.sf.net/" target="_parent">DRI</a> project.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If you don't already have the DRM file, you can get the sources from
|
|
||||||
CVS by doing:
|
|
||||||
<pre>
|
<pre>
|
||||||
cvs -z3 -d:pserver:anonymous@anoncvs.freedesktop.org:/cvs/dri co drm
|
cvs -d:pserver:anonymous@pds.freedesktop.org:/cvs/dri login
|
||||||
|
(hit enter when prompted for a password)
|
||||||
|
cvs -z3 -d:pserver:anonymous@pdx.freedesktop.org:/cvs/dri co drm
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
|
Make note of the directory in which the drm files are placed.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
See the <a href="http://dri.freedesktop.org/wiki/Building" target="_parent">
|
See the <a href="http://dri.freedesktop.org/wiki/Building" target="_parent">
|
||||||
DRI Building Instructions</a> for the steps to build the DRM modules. Mesa
|
DRI Building Instructions</a> for the steps to build the DRM modules.
|
||||||
6.5 requires at least libdrm 2.0.1 or greater.
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
You can verify that the DRM files have been properly installed by
|
Next, in the <code>Mesa-x.y.z/configs/default</code> file, set the
|
||||||
running <code>pkg-config --modversion libdrm</code>
|
<code>DRM_SOURCE_PATH</code> variable to indicate where the DRM files
|
||||||
|
are located.
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
Recent /usr/include/GL/glxproto.h file.
|
|
||||||
<p>You'll need this if you get any errors about _GLXvop_BindTexImageEXT
|
|
||||||
being undefined.
|
|
||||||
</p>
|
</p>
|
||||||
<p>The latest version can be
|
|
||||||
obtained from <A href="http://webcvs.freedesktop.org/*checkout*/xorg/proto/GL/glxproto.h?rev=1.9&content-type=text%2Fplain">freedesktop.org CVS</a>
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>DRI-enabled X server.
|
|
||||||
<p>Visit
|
|
||||||
<a href="http://www.xfree86.org" target="_parent">XFree86</a>
|
|
||||||
or
|
|
||||||
<a href="http://freedesktop.org/wiki/Software_2fXserver" target="_parent">
|
|
||||||
X.org</a>
|
|
||||||
for more information.
|
|
||||||
</p>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ol>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Build Mesa and the DRI hardware drivers by running
|
Now build Mesa and the DRI drivers by running
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<pre>
|
||||||
make linux-dri
|
make linux-dri
|
||||||
</pre>
|
</pre>
|
||||||
<p>
|
<p>
|
||||||
There are also <code>linux-dri-x86</code>, <code>linux-dri-x86-64</code>,
|
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
|
and <code>linux-ppc</code> configurations, optimized for those architectures.
|
||||||
architectures.
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Finally, you'll need a DRI-enabled X server from
|
||||||
|
<a href="http://freedesktop.org/wiki/Software_2fXserver" target="_parent">
|
||||||
|
X.org</a> or <a href="http://www.xfree86.org" target="_parent">XFree86</a>.
|
||||||
|
Visit those projects' home pages for more information.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
@@ -163,15 +137,10 @@ 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:
|
If you built the DRI hardware drivers, you'll also see the DRI drivers:
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
<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 11320803 Jul 21 12:11 mach64_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 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 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 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 11757388 Jul 21 12:12 radeon_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 11232304 Jul 21 12:13 s3v_dri.so
|
||||||
-rwxr-xr-x 1 brian users 11062970 Jul 21 12:13 savage_dri.so
|
-rwxr-xr-x 1 brian users 11062970 Jul 21 12:13 savage_dri.so
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<li><a href="http://math.nist.gov/f90gl" target="_parent">Fortran77/90 bindings for OpenGL and Mesa</a> - by William Mitchell
|
<li><a href="http://math.nist.gov/f90gl" target="_parent">Fortran77/90 bindings for OpenGL and Mesa</a> - by William Mitchell
|
||||||
<li><a href="http://glow.sourceforge.net/" target="_parent">GLOW</a> - a GUI toolkit for GLUT and OpenGL
|
<li><a href="http://glow.sourceforge.net/" target="_parent">GLOW</a> - a GUI toolkit for GLUT and OpenGL
|
||||||
<li><a href="http://www.nigels.com/glt/">Glt</a> - an OpenGL C++ toolkit
|
<li><a href="http://www.nigels.com/glt/">Glt</a> - an OpenGL C++ toolkit
|
||||||
<li><a href="http://www.opengl.org/resources/libraries/glut.html" target="_parent">GLUT (GL Utility Toolkit)</a> - by Mark Kilgard
|
<li><a href="http://www.opengl.org/developers/documentation/glut/" target="_parent">GLUT (GL Utility Toolkit)</a> - by Mark Kilgard
|
||||||
<li><a href="http://atrey.karlin.mff.cuni.cz/%7E0rfelyus/guileGL/" target="_parent">GuileGL</a> - OpenGL and GtkGLArea language bindings for Guile
|
<li><a href="http://atrey.karlin.mff.cuni.cz/%7E0rfelyus/guileGL/" target="_parent">GuileGL</a> - OpenGL and GtkGLArea language bindings for Guile
|
||||||
<li><a href="http://www.rsinc.com/" target="_parent">IDL</a> - Interactive Data Language
|
<li><a href="http://www.rsinc.com/" target="_parent">IDL</a> - Interactive Data Language
|
||||||
<li><a href="http://www.newplanetsoftware.com/jx/" target="_parent">JX</a> - C++ application framework and GUI library
|
<li><a href="http://www.newplanetsoftware.com/jx/" target="_parent">JX</a> - C++ application framework and GUI library
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">ARCAD</a> - CAD program
|
</li><li><a href="http://mesa3d.sourceforge.net/notfound.html">ARCAD</a> - CAD program
|
||||||
</li><li><a href="http://www.mediascape.com/" target="_parent">Artstream</a> - provides
|
</li><li><a href="http://www.mediascape.com/" target="_parent">Artstream</a> - provides
|
||||||
functionality like Corel Draw and Illustrator
|
functionality like Corel Draw and Illustrator
|
||||||
</li><li><a href="http://www.blender.org/" target="_parent">Blender</a> - 3-D animation
|
</li><li><a href="http://www.blender.nl/" target="_parent">Blender</a> - 3-D animation
|
||||||
software
|
software
|
||||||
</li><li><a href="http://www.arq.net/%7Ekasten/demtools/" target="_parent">Demtools</a>
|
</li><li><a href="http://www.arq.net/%7Ekasten/demtools/" target="_parent">Demtools</a>
|
||||||
- Map viewer
|
- Map viewer
|
||||||
|
|||||||
126
docs/news.html
126
docs/news.html
@@ -11,130 +11,6 @@
|
|||||||
<H1>News</H1>
|
<H1>News</H1>
|
||||||
|
|
||||||
|
|
||||||
<h2>March 31, 2006</h2>
|
|
||||||
<p>
|
|
||||||
Mesa 6.5 has been released. This is a new development release.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
New:
|
|
||||||
- OpenGL Shading Language support through GL_ARB_shader_objects,
|
|
||||||
GL_ARB_shading_language_100, GL_ARB_vertex_shader and
|
|
||||||
GL_ARB_fragment_shader (done by Michal Krol)
|
|
||||||
- GL_EXT_packed_depth_stencil extension
|
|
||||||
- GL_EXT_timer_query extension
|
|
||||||
- GL_EXT_framebuffer_blit extension
|
|
||||||
- GL_ARB_half_float_pixel
|
|
||||||
- GLX_MESA_copy_sub_buffer for DRI drivers (Dave Reveman)
|
|
||||||
- reflect demo improved to support multiple windows
|
|
||||||
- singlebuffer demo (shows no/little-flicker single-buffered rendering)
|
|
||||||
- r200: enable GL_ARB_texture_env_crossbar, separate the texture
|
|
||||||
sampling unit bits from the texture env combine enable bits
|
|
||||||
- r200: add support for GL_ATI_fragment_shader
|
|
||||||
- added fast XOR-mode line drawing optimization
|
|
||||||
- radeon: add support for all 3 tmus, GL_ARB_texture_cube_map
|
|
||||||
and GL_EXT_fog_coord
|
|
||||||
- MESA_GLX_ALPHA_BITS env var for xlib driver
|
|
||||||
- many DRI driver updates (including screen rotation support
|
|
||||||
for the Intel DRI driver)
|
|
||||||
Changes:
|
|
||||||
- removed GL_HP_occlusion_test (use GL_ARB_occlusion_query instead)
|
|
||||||
- removed GL_SGIX/SGIS_pixel_texture extensions
|
|
||||||
Bug fixes:
|
|
||||||
- fixed glxcontextmodes.c datatype problem (bug 5835)
|
|
||||||
- fixed aix-gcc build/install bugs (bug 5874)
|
|
||||||
- fixed some bugs in texture env program generation
|
|
||||||
- glXCopyContext() didn't handle texture object bindings properly
|
|
||||||
- glXCopyContext() didn't copy all lighting state
|
|
||||||
- fixed FreeBSD config (Pedro Giffuni)
|
|
||||||
- fixed some minor framebuffer object bugs
|
|
||||||
- replaced dprintf() with _glu_printf() in GLU (bug 6244)
|
|
||||||
- fixed a number of thread safety bugs/regressions
|
|
||||||
- fixed a number of GLU tesselator bugs (John Shell, bug 6339)
|
|
||||||
- paletted texturing was broken w/ floating point palettes (K. Schultz)
|
|
||||||
- lots of assorted framebuffer object bug fixes
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The MD5 checksums are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
657be3b92f6dabc78a67ed9cb8d67813 MesaLib-6.5.tar.gz
|
|
||||||
61beda590bfc5b4a12e979d5f2d70d7a MesaLib-6.5.tar.bz2
|
|
||||||
19d48b872d579d4f91466060804a59ac MesaLib-6.5.zip
|
|
||||||
694ad3a7007010c7418a9c72d1cba5b7 MesaDemos-6.5.tar.gz
|
|
||||||
ab95b590dcd640726a2d89e62068c66e MesaDemos-6.5.tar.bz2
|
|
||||||
b792c303fefd87294488e2b7eab976e5 MesaDemos-6.5.zip
|
|
||||||
ac1d585483617db0c91e5c15cb5ec3a3 MesaGLUT-6.5.tar.gz
|
|
||||||
59f0bf2b2ffb67fe23ee479f9b044f31 MesaGLUT-6.5.tar.bz2
|
|
||||||
005decb2136718e22222ac1c4805cd15 MesaGLUT-6.5.zip
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>February 2, 2006</h2>
|
|
||||||
<p>
|
|
||||||
Mesa 6.4.2 has been released. This is primarily a bug-fix release.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
New items:
|
|
||||||
- added OSMesaColorClamp() function/feature
|
|
||||||
- added wglGetExtensionStringARB() function
|
|
||||||
Bug fixes:
|
|
||||||
- fixed some problems when building on Windows
|
|
||||||
- GLw header files weren't installed by installmesa script (bug 5396)
|
|
||||||
- GL/glfbdev.h file was missing from tarballs
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The MD5 checksums are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
cb0d745d520fa7c2bb9178058b763544 MesaLib-6.4.2.tar.gz
|
|
||||||
7674d2c603b5834259e4e5a820cefd5b MesaLib-6.4.2.tar.bz2
|
|
||||||
d224e1325b33ff71a0f3893fc6b4d594 MesaLib-6.4.2.zip
|
|
||||||
d4b345d4588fc750cd3d34f3ac26673e MesaDemos-6.4.2.tar.gz
|
|
||||||
9cae1ab874af533ce356bd7dfe2e0bb0 MesaDemos-6.4.2.tar.bz2
|
|
||||||
2da6e1d1245e441d27813595c6ba50de MesaDemos-6.4.2.zip
|
|
||||||
84427d18c3453f0ea52388eeba7169b5 MesaGLUT-6.4.2.tar.gz
|
|
||||||
b157ba8ad1ea63260cf5339132e7aac6 MesaGLUT-6.4.2.tar.bz2
|
|
||||||
fe1523744fc05edc3811dfc6a1bf4181 MesaGLUT-6.4.2.zip
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<h2>November 29, 2005</h2>
|
|
||||||
<p>
|
|
||||||
Mesa 6.4.1 has been released. This is a stable, bug-fix release.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
Bug fixes:
|
|
||||||
- redefining a vertex program string didn't take effect in TNL module
|
|
||||||
- fixed occasional segfault upon vertex/fragment parsing error
|
|
||||||
- vertex program LIT instruction didn't handle 0^0=1 correctly
|
|
||||||
- fragment program fog option didn't work with glDrawPixels, glBitmap
|
|
||||||
- USE_MGL_NAMESPACE didn't work for x86-64
|
|
||||||
- OSMesa demos were missing from previous release tarballs
|
|
||||||
- fixed problem with float->ushort conversion in glClear (bug 4992)
|
|
||||||
- popping of GL_EYE_PLANE texgen state was broken (bug 4996)
|
|
||||||
- popping of GL_SPOT_DIRECTION light state was broken (bug 5005)
|
|
||||||
- fixed occasional triangle color interpolation problem on VMS
|
|
||||||
- work around invalid free() call (bug 5131)
|
|
||||||
- fixed BSD X server compilation problem by including stdint.h
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The MD5 checksums are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
698ceb574cf882b0226761f5913c0da9 MesaLib-6.4.1.tar.gz
|
|
||||||
ea148c828ec6f645526451db1b8556f1 MesaLib-6.4.1.tar.bz2
|
|
||||||
42e93279468975ed2bf3111b8721e5d9 MesaLib-6.4.1.zip
|
|
||||||
e3b0d50807fd2bdcd1a95aaddd786f13 MesaDemos-6.4.1.tar.gz
|
|
||||||
99df1fdcb98d391666b476ca6f1dda8a MesaDemos-6.4.1.tar.bz2
|
|
||||||
b999d2c6d92fb4b7740a3dbd889348e3 MesaDemos-6.4.1.zip
|
|
||||||
eadfe01fe5ddfb1eb8227dd567b31635 MesaGLUT-6.4.1.tar.gz
|
|
||||||
bd003bb4f981a4f91dee4c38644d4f3f MesaGLUT-6.4.1.tar.bz2
|
|
||||||
71c401c037088bf688a88afdaeb3420f MesaGLUT-6.4.1.zip
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2>October 24, 2005</h2>
|
<h2>October 24, 2005</h2>
|
||||||
<p>
|
<p>
|
||||||
Mesa 6.4 has been released. This is a stable, bug-fix release.
|
Mesa 6.4 has been released. This is a stable, bug-fix release.
|
||||||
@@ -1226,6 +1102,6 @@ source code</a>.</p>
|
|||||||
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
$Id: news.html,v 3.28 2006/04/01 02:29:40 brianp Exp $
|
$Id: news.html,v 3.25 2005/10/24 23:33:27 brianp Exp $
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -10,57 +10,46 @@
|
|||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Mesa's off-screen rendering interface is used for rendering into
|
Mesa 1.2.4 introduced off-screen rendering, a facility for generating
|
||||||
user-allocated blocks of memory.
|
3-D imagery without having to open a window on your display. Mesa's
|
||||||
That is, the GL_FRONT colorbuffer is actually a buffer in main memory,
|
simple off-screen rendering interface is completely operating system
|
||||||
rather than a window on your display.
|
and window system independent so programs which use off-screen
|
||||||
There are no window system or operating system dependencies.
|
rendering should be very portable. This feature effectively
|
||||||
One potential application is to use Mesa as an off-line, batch-style renderer.
|
enables you to use Mesa as an off-line, batch-oriented renderer.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <B>OSMesa</B> API provides three basic functions for making off-screen
|
The "OSMesa" API provides 3 functions for making off-screen
|
||||||
renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
|
renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and
|
||||||
OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for
|
OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for
|
||||||
more information about the API functions.
|
more information. See the demos/osdemo.c file for an example program.
|
||||||
|
There is no facility for writing images to files. That's up to you.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There are several examples of OSMesa in the <code>progs/osdemo/</code>
|
If you want to generate large images (larger than 1280x1024) you'll
|
||||||
directory.
|
have to edit the src/config.h file to change MAX_WIDTH and MAX_HEIGHT
|
||||||
|
then recompile Mesa. Image size should only be limited by available
|
||||||
|
memory.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<H2>Deep color channels</H2>
|
<H2>Deep color channels</H2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
For some applications 8-bit color channels don't have sufficient
|
For some applications 8-bit color channels don't have sufficient
|
||||||
precision.
|
accuracy (film and IBR, for example). If you're in this situation
|
||||||
OSMesa supports 16-bit and 32-bit color channels through the OSMesa interface.
|
you'll be happy to know that Mesa supports 16-bit and 32-bit color
|
||||||
When using 16-bit channels, channels are GLushorts and RGBA pixels occupy
|
channels through the OSMesa interface. When using 16-bit channels,
|
||||||
8 bytes.
|
channels are GLushorts and RGBA pixels occupy 8 bytes. When using 32-bit
|
||||||
When using 32-bit channels, channels are GLfloats and RGBA pixels occupy
|
channels, channels are GLfloats and RGBA pixels occupy 16 bytes.
|
||||||
16 bytes.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Before version 6.5.1, Mesa had to be recompiled to support exactly
|
To build Mesa/OSMesa with 16-bit color channels:
|
||||||
one of 8, 16 or 32-bit channels.
|
|
||||||
With Mesa 6.5.1, Mesa can be compiled for either 8, 16 or 32-bit channels
|
|
||||||
and render into any of the smaller size channels.
|
|
||||||
For example, if Mesa's compiled for 32-bit channels, you can also render
|
|
||||||
16 and 8-bit channel images.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
To build Mesa/OSMesa for 16 and 8-bit color channel support:
|
|
||||||
<pre>
|
<pre>
|
||||||
make realclean
|
make realclean
|
||||||
make linux-osmesa16
|
make linux-osmesa16
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
<p>
|
For 32-bit channels:
|
||||||
To build Mesa/OSMesa for 32, 16 and 8-bit color channel support:
|
|
||||||
<pre>
|
<pre>
|
||||||
make realclean
|
make realclean
|
||||||
make linux-osmesa32
|
make linux-osmesa32
|
||||||
@@ -68,13 +57,6 @@ To build Mesa/OSMesa for 32, 16 and 8-bit color channel support:
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
You'll wind up with a library named libOSMesa16.so or libOSMesa32.so.
|
You'll wind up with a library named libOSMesa16.so or libOSMesa32.so.
|
||||||
Otherwise, most Mesa configurations build an 8-bit/channel libOSMesa.so library
|
|
||||||
by default.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
If performance is important, compile Mesa for the channel size you're
|
|
||||||
most interested in.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -84,5 +66,12 @@ the top-level Makefile. Send a patch to the Mesa developers too, if you're
|
|||||||
inclined.
|
inclined.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
BE WARNED: 16 and 32-bit channel support has not been exhaustively
|
||||||
|
tested and there may be some bugs. However, a number of people have
|
||||||
|
been using this feature successfully so it can't be too broken.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
</HTML>
|
</HTML>
|
||||||
|
|||||||
@@ -13,9 +13,6 @@ The release notes summarize what's new or changed in each Mesa release.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI><A HREF="RELNOTES-6.5">RELNOTES-6.5</A>
|
|
||||||
<LI><A HREF="RELNOTES-6.4.2">RELNOTES-6.4.2</A>
|
|
||||||
<LI><A HREF="RELNOTES-6.4.1">RELNOTES-6.4.1</A>
|
|
||||||
<LI><A HREF="RELNOTES-6.4">RELNOTES-6.4</A>
|
<LI><A HREF="RELNOTES-6.4">RELNOTES-6.4</A>
|
||||||
<LI><A HREF="RELNOTES-6.3.2">RELNOTES-6.3.2</A>
|
<LI><A HREF="RELNOTES-6.3.2">RELNOTES-6.3.2</A>
|
||||||
<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
|
<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Be warned that some drivers may be out of date and no longer function.
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<UL>
|
<UL>
|
||||||
<LI><a href="xlibdriver.html">Xlib driver</a> for the X Window System
|
<LI>Xlib driver for the X Window System <A HREF="README.X11">(README.X11)</A>
|
||||||
<li><a href="http://dri.freedesktop.org/" target="_parent">
|
<li><a href="http://dri.freedesktop.org/" target="_parent">
|
||||||
DRI hardware drivers</a> for the X window system
|
DRI hardware drivers</a> for the X window system
|
||||||
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
|
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
|
||||||
|
|||||||
@@ -1,275 +0,0 @@
|
|||||||
<HTML>
|
|
||||||
|
|
||||||
<TITLE>Xlib Software Driver</TITLE>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="mesa.css"></head>
|
|
||||||
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<H1>Xlib Software Driver</H1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Mesa's Xlib driver provides an emulation of the GLX interface so that
|
|
||||||
OpenGL programs which use the GLX API can render to any X display, even
|
|
||||||
those that don't support the GLX extension.
|
|
||||||
Effectively, the Xlib driver converts all OpenGL rendering into Xlib calls.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The Xlib driver is the oldest Mesa driver and the most mature of Mesa's
|
|
||||||
software-only drivers.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Since the Xlib driver <em>emulates</em> the GLX extension, it's not
|
|
||||||
totally conformant with a true GLX implementation.
|
|
||||||
The differences are fairly obscure, however.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The unique features of the Xlib driver follows.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<H2>X Visual Selection</H2>
|
|
||||||
<p>
|
|
||||||
Mesa supports RGB(A) rendering into almost any X visual type and depth.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The glXChooseVisual function tries to choose the best X visual
|
|
||||||
for the given attribute list. However, if this doesn't suit your needs
|
|
||||||
you can force Mesa to use any X visual you want (any supported by your
|
|
||||||
X server that is) by setting the <b>MESA_RGB_VISUAL</b> and
|
|
||||||
<b>MESA_CI_VISUAL</b>
|
|
||||||
environment variables.
|
|
||||||
When an RGB visual is requested, glXChooseVisual
|
|
||||||
will first look if the MESA_RGB_VISUAL variable is defined.
|
|
||||||
If so, it will try to use the specified visual.
|
|
||||||
Similarly, when a color index visual is requested, glXChooseVisual will
|
|
||||||
look for the MESA_CI_VISUAL variable.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
The format of accepted values is: <code>visual-class depth</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Here are some examples:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
using csh:
|
|
||||||
% setenv MESA_RGB_VISUAL "TrueColor 8" // 8-bit TrueColor
|
|
||||||
% setenv MESA_CI_VISUAL "PseudoColor 12" // 12-bit PseudoColor
|
|
||||||
% setenv MESA_RGB_VISUAL "PseudoColor 8" // 8-bit PseudoColor
|
|
||||||
|
|
||||||
using bash:
|
|
||||||
$ export MESA_RGB_VISUAL="TrueColor 8"
|
|
||||||
$ export MESA_CI_VISUAL="PseudoColor 12"
|
|
||||||
$ export MESA_RGB_VISUAL="PseudoColor 8"
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<H2>Double Buffering</H2>
|
|
||||||
<p>
|
|
||||||
Mesa can use either an X Pixmap or XImage as the back color buffer when in
|
|
||||||
double-buffer mode.
|
|
||||||
The default is to use an XImage.
|
|
||||||
The <b>MESA_BACK_BUFFER</b> environment variable can override this.
|
|
||||||
The valid values for <b>MESA_BACK_BUFFER</b> are: <b>Pixmap</b> and
|
|
||||||
<b>XImage</b> (only the first letter is checked, case doesn't matter).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Using XImage is almost always faster than a Pixmap since it resides in
|
|
||||||
the application's address space.
|
|
||||||
When glXSwapBuffers() is called, XPutImage() or XShmPutImage() is used
|
|
||||||
to transfer the XImage to the on-screen window.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
A Pixmap may be faster when doing remote rendering of a simple scene.
|
|
||||||
Some OpenGL features will be very slow with a Pixmap (for example, blending
|
|
||||||
will require a round-trip message for pixel readback.)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Experiment with the MESA_BACK_BUFFER variable to see which is faster
|
|
||||||
for your application.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<H2>Colormaps</H2>
|
|
||||||
<p>
|
|
||||||
When using Mesa directly or with GLX, it's up to the application
|
|
||||||
writer to create a window with an appropriate colormap. The GLUT
|
|
||||||
toolkit tris to minimize colormap <em>flashing</em> by sharing
|
|
||||||
colormaps when possible. Specifically, if the visual and depth of the
|
|
||||||
window matches that of the root window, the root window's colormap
|
|
||||||
will be shared by the Mesa window. Otherwise, a new, private colormap
|
|
||||||
will be allocated.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
When sharing the root colormap, Mesa may be unable to allocate the colors
|
|
||||||
it needs, resulting in poor color quality. This can happen when a
|
|
||||||
large number of colorcells in the root colormap are already allocated.
|
|
||||||
To prevent colormap sharing in GLUT, set the
|
|
||||||
<b>MESA_PRIVATE_CMAP</b> environment variable. The value isn't
|
|
||||||
significant.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<H2>Gamma Correction</H2>
|
|
||||||
<p>
|
|
||||||
To compensate for the nonlinear relationship between pixel values
|
|
||||||
and displayed intensities, there is a gamma correction feature in
|
|
||||||
Mesa. Some systems, such as Silicon Graphics, support gamma
|
|
||||||
correction in hardware (man gamma) so you won't need to use Mesa's
|
|
||||||
gamma facility. Other systems, however, may need gamma adjustment
|
|
||||||
to produce images which look correct. If you believe that
|
|
||||||
Mesa's images are too dim, read on.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Gamma correction is controlled with the <b>MESA_GAMMA</b> environment
|
|
||||||
variable. Its value is of the form <b>Gr Gg Gb</b> or just <b>G</b> where
|
|
||||||
Gr is the red gamma value, Gg is the green gamma value, Gb is the
|
|
||||||
blue gamma value and G is one gamma value to use for all three
|
|
||||||
channels. Each value is a positive real number typically in the
|
|
||||||
range 1.0 to 2.5.
|
|
||||||
The defaults are all 1.0, effectively disabling gamma correction.
|
|
||||||
Examples:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
% export MESA_GAMMA="2.3 2.2 2.4" // separate R,G,B values
|
|
||||||
% export MESA_GAMMA="2.0" // same gamma for R,G,B
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The progs/demos/gamma.c program may help you to determine reasonable gamma
|
|
||||||
value for your display. With correct gamma values, the color intensities
|
|
||||||
displayed in the top row (drawn by dithering) should nearly match those
|
|
||||||
in the bottom row (drawn as grays).
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Alex De Bruyn reports that gamma values of 1.6, 1.6 and 1.9 work well
|
|
||||||
on HP displays using the HP-ColorRecovery technology.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Mesa implements gamma correction with a lookup table which translates
|
|
||||||
a "linear" pixel value to a gamma-corrected pixel value. There is a
|
|
||||||
small performance penalty. Gamma correction only works in RGB mode.
|
|
||||||
Also be aware that pixel values read back from the frame buffer will
|
|
||||||
not be "un-corrected" so glReadPixels may not return the same data
|
|
||||||
drawn with glDrawPixels.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
For more information about gamma correction see:
|
|
||||||
<a href="http://www.inforamp.net/~poynton/notes/colour_and_gamma/GammaFAQ.html"
|
|
||||||
the Gamma FAQ</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<H2>Overlay Planes</H2>
|
|
||||||
<p>
|
|
||||||
Hardware overlay planes are supported by the Xlib driver. To
|
|
||||||
determine if your X server has overlay support you can test for the
|
|
||||||
SERVER_OVERLAY_VISUALS property:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
xprop -root | grep SERVER_OVERLAY_VISUALS
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
<H2>HPCR Dithering</H2>
|
|
||||||
<p>
|
|
||||||
If you set the <b>MESA_HPCR_CLEAR</b> environment variable then dithering
|
|
||||||
will be used when clearing the color buffer. This is only applicable
|
|
||||||
to HP systems with the HPCR (Color Recovery) feature.
|
|
||||||
This incurs a small performance penalty.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<H2>Extensions</H2>
|
|
||||||
<p>
|
|
||||||
The following MESA-specific extensions are implemented in the Xlib driver.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h3>GLX_MESA_pixmap_colormap</h3>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
This extension adds the GLX function:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual,
|
|
||||||
Pixmap pixmap, Colormap cmap )
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
It is an alternative to the standard glXCreateGLXPixmap() function.
|
|
||||||
Since Mesa supports RGB rendering into any X visual, not just True-
|
|
||||||
Color or DirectColor, Mesa needs colormap information to convert RGB
|
|
||||||
values into pixel values. An X window carries this information but a
|
|
||||||
pixmap does not. This function associates a colormap to a GLX pixmap.
|
|
||||||
See the xdemos/glxpixmap.c file for an example of how to use this
|
|
||||||
extension.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a href="MESA_pixmap_colormap.spec">GLX_MESA_pixmap_colormap specification</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<h3>GLX_MESA_release_buffers</h3>
|
|
||||||
<p>
|
|
||||||
Mesa associates a set of ancillary (depth, accumulation, stencil and
|
|
||||||
alpha) buffers with each X window it draws into. These ancillary
|
|
||||||
buffers are allocated for each X window the first time the X window
|
|
||||||
is passed to glXMakeCurrent(). Mesa, however, can't detect when an
|
|
||||||
X window has been destroyed in order to free the ancillary buffers.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The best it can do is to check for recently destroyed windows whenever
|
|
||||||
the client calls the glXCreateContext() or glXDestroyContext()
|
|
||||||
functions. This may not be sufficient in all situations though.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The GLX_MESA_release_buffers extension allows a client to explicitly
|
|
||||||
deallocate the ancillary buffers by calling glxReleaseBuffersMESA()
|
|
||||||
just before an X window is destroyed. For example:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
#ifdef GLX_MESA_release_buffers
|
|
||||||
glXReleaseBuffersMESA( dpy, window );
|
|
||||||
#endif
|
|
||||||
XDestroyWindow( dpy, window );
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
<a href="MESA_release_buffers.spec">GLX_MESA_release_buffers specification</a>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
This extension was added in Mesa 2.0.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<H3>GLX_MESA_copy_sub_buffer</H3>
|
|
||||||
<p>
|
|
||||||
This extension adds the glXCopySubBufferMESA() function. It works
|
|
||||||
like glXSwapBuffers() but only copies a sub-region of the window
|
|
||||||
instead of the whole window.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a href="MESA_copy_sub_buffer.spec">GLX_MESA_copy_sub_buffer specification</a>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
This extension was added in Mesa 2.6
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<h2>Summary of X-related environment variables</H2>
|
|
||||||
<pre>
|
|
||||||
MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
|
|
||||||
MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
|
|
||||||
MESA_BACK_BUFFER - specifies how to implement the back color buffer (X only)
|
|
||||||
MESA_PRIVATE_CMAP - force aux/tk libraries to use private colormaps (X only)
|
|
||||||
MESA_GAMMA - gamma correction coefficients (X only)
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DOS/DJGPP device driver for Mesa
|
* DOS/DJGPP device driver v1.7 for Mesa
|
||||||
*
|
*
|
||||||
* Author: Daniel Borca
|
* Copyright (C) 2002 - Daniel Borca
|
||||||
* Email : dborca@users.sourceforge.net
|
* Email : dborca@users.sourceforge.net
|
||||||
* Web : http://www.geocities.com/dborca
|
* Web : http://www.geocities.com/dborca
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
#define DMESA_H_included
|
#define DMESA_H_included
|
||||||
|
|
||||||
#define DMESA_MAJOR_VERSION 6
|
#define DMESA_MAJOR_VERSION 6
|
||||||
#define DMESA_MINOR_VERSION 5
|
#define DMESA_MINOR_VERSION 3
|
||||||
|
|
||||||
/* Sample Usage:
|
/* Sample Usage:
|
||||||
*
|
*
|
||||||
@@ -138,7 +138,7 @@ void DMesaSetCI (int ndx, GLfloat red, GLfloat green, GLfloat blue);
|
|||||||
/*
|
/*
|
||||||
* DMesa functions
|
* DMesa functions
|
||||||
*/
|
*/
|
||||||
typedef void (*DMesaProc) ();
|
typedef void (*DMesaProc) (void);
|
||||||
DMesaProc DMesaGetProcAddress (const char *name);
|
DMesaProc DMesaGetProcAddress (const char *name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -149,8 +149,8 @@ DMesaProc DMesaGetProcAddress (const char *name);
|
|||||||
#define DMESA_GET_VIDEO_MODES 0x0300
|
#define DMESA_GET_VIDEO_MODES 0x0300
|
||||||
#define DMESA_GET_BUFFER_ADDR 0x0400
|
#define DMESA_GET_BUFFER_ADDR 0x0400
|
||||||
|
|
||||||
#define DMESA_DRIVER_DBL_BIT 0x1 /* double-buffered */
|
#define DMESA_DRIVER_SWDB_BIT 0x1 /* software double-buffered */
|
||||||
#define DMESA_DRIVER_YUP_BIT 0x2 /* lower-left window origin */
|
#define DMESA_DRIVER_LLWO_BIT 0x2 /* lower-left window origin */
|
||||||
int DMesaGetIntegerv (GLenum pname, GLint *params);
|
int DMesaGetIntegerv (GLenum pname, GLint *params);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 6.5.1
|
* Version: 6.3
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -441,16 +441,16 @@ typedef double GLclampd; /* double precision float in [0,1] */
|
|||||||
#define GL_OR_INVERTED 0x150D
|
#define GL_OR_INVERTED 0x150D
|
||||||
|
|
||||||
/* Stencil */
|
/* Stencil */
|
||||||
#define GL_STENCIL_BITS 0x0D57
|
|
||||||
#define GL_STENCIL_TEST 0x0B90
|
#define GL_STENCIL_TEST 0x0B90
|
||||||
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
#define GL_STENCIL_WRITEMASK 0x0B98
|
||||||
|
#define GL_STENCIL_BITS 0x0D57
|
||||||
#define GL_STENCIL_FUNC 0x0B92
|
#define GL_STENCIL_FUNC 0x0B92
|
||||||
#define GL_STENCIL_VALUE_MASK 0x0B93
|
#define GL_STENCIL_VALUE_MASK 0x0B93
|
||||||
#define GL_STENCIL_FAIL 0x0B94
|
|
||||||
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
|
||||||
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
|
||||||
#define GL_STENCIL_REF 0x0B97
|
#define GL_STENCIL_REF 0x0B97
|
||||||
#define GL_STENCIL_WRITEMASK 0x0B98
|
#define GL_STENCIL_FAIL 0x0B94
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
|
||||||
|
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
|
||||||
|
#define GL_STENCIL_CLEAR_VALUE 0x0B91
|
||||||
#define GL_STENCIL_INDEX 0x1901
|
#define GL_STENCIL_INDEX 0x1901
|
||||||
#define GL_KEEP 0x1E00
|
#define GL_KEEP 0x1E00
|
||||||
#define GL_REPLACE 0x1E01
|
#define GL_REPLACE 0x1E01
|
||||||
@@ -500,16 +500,16 @@ typedef double GLclampd; /* double precision float in [0,1] */
|
|||||||
|
|
||||||
/* Implementation limits */
|
/* Implementation limits */
|
||||||
#define GL_MAX_LIST_NESTING 0x0B31
|
#define GL_MAX_LIST_NESTING 0x0B31
|
||||||
#define GL_MAX_EVAL_ORDER 0x0D30
|
|
||||||
#define GL_MAX_LIGHTS 0x0D31
|
|
||||||
#define GL_MAX_CLIP_PLANES 0x0D32
|
|
||||||
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
|
||||||
#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
|
|
||||||
#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
|
#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
|
||||||
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
|
||||||
#define GL_MAX_NAME_STACK_DEPTH 0x0D37
|
#define GL_MAX_NAME_STACK_DEPTH 0x0D37
|
||||||
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
|
||||||
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
|
||||||
|
#define GL_MAX_EVAL_ORDER 0x0D30
|
||||||
|
#define GL_MAX_LIGHTS 0x0D31
|
||||||
|
#define GL_MAX_CLIP_PLANES 0x0D32
|
||||||
|
#define GL_MAX_TEXTURE_SIZE 0x0D33
|
||||||
|
#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
|
||||||
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
|
||||||
#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
|
#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
|
||||||
|
|
||||||
@@ -567,22 +567,22 @@ typedef double GLclampd; /* double precision float in [0,1] */
|
|||||||
#define GL_MAP2_GRID_DOMAIN 0x0DD2
|
#define GL_MAP2_GRID_DOMAIN 0x0DD2
|
||||||
#define GL_MAP2_GRID_SEGMENTS 0x0DD3
|
#define GL_MAP2_GRID_SEGMENTS 0x0DD3
|
||||||
#define GL_COEFF 0x0A00
|
#define GL_COEFF 0x0A00
|
||||||
#define GL_ORDER 0x0A01
|
|
||||||
#define GL_DOMAIN 0x0A02
|
#define GL_DOMAIN 0x0A02
|
||||||
|
#define GL_ORDER 0x0A01
|
||||||
|
|
||||||
/* Hints */
|
/* Hints */
|
||||||
|
#define GL_FOG_HINT 0x0C54
|
||||||
|
#define GL_LINE_SMOOTH_HINT 0x0C52
|
||||||
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
|
||||||
#define GL_POINT_SMOOTH_HINT 0x0C51
|
#define GL_POINT_SMOOTH_HINT 0x0C51
|
||||||
#define GL_LINE_SMOOTH_HINT 0x0C52
|
|
||||||
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
#define GL_POLYGON_SMOOTH_HINT 0x0C53
|
||||||
#define GL_FOG_HINT 0x0C54
|
|
||||||
#define GL_DONT_CARE 0x1100
|
#define GL_DONT_CARE 0x1100
|
||||||
#define GL_FASTEST 0x1101
|
#define GL_FASTEST 0x1101
|
||||||
#define GL_NICEST 0x1102
|
#define GL_NICEST 0x1102
|
||||||
|
|
||||||
/* Scissor box */
|
/* Scissor box */
|
||||||
#define GL_SCISSOR_BOX 0x0C10
|
|
||||||
#define GL_SCISSOR_TEST 0x0C11
|
#define GL_SCISSOR_TEST 0x0C11
|
||||||
|
#define GL_SCISSOR_BOX 0x0C10
|
||||||
|
|
||||||
/* Pixel Mode / Transfer */
|
/* Pixel Mode / Transfer */
|
||||||
#define GL_MAP_COLOR 0x0D10
|
#define GL_MAP_COLOR 0x0D10
|
||||||
@@ -687,8 +687,8 @@ typedef double GLclampd; /* double precision float in [0,1] */
|
|||||||
|
|
||||||
/* Errors */
|
/* Errors */
|
||||||
#define GL_NO_ERROR 0x0
|
#define GL_NO_ERROR 0x0
|
||||||
#define GL_INVALID_ENUM 0x0500
|
|
||||||
#define GL_INVALID_VALUE 0x0501
|
#define GL_INVALID_VALUE 0x0501
|
||||||
|
#define GL_INVALID_ENUM 0x0500
|
||||||
#define GL_INVALID_OPERATION 0x0502
|
#define GL_INVALID_OPERATION 0x0502
|
||||||
#define GL_STACK_OVERFLOW 0x0503
|
#define GL_STACK_OVERFLOW 0x0503
|
||||||
#define GL_STACK_UNDERFLOW 0x0504
|
#define GL_STACK_UNDERFLOW 0x0504
|
||||||
|
|||||||
@@ -6154,12 +6154,12 @@ typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
|
|||||||
#ifdef GL_GLEXT_PROTOTYPES
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
|
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
|
||||||
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
|
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
|
||||||
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
|
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *);
|
||||||
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
|
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
#endif /* GL_GLEXT_PROTOTYPES */
|
||||||
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
|
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
|
||||||
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
||||||
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
|
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
||||||
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
|
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 6.5
|
* Version: 6.5
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -379,97 +379,6 @@ extern Bool glXDrawableAttribARB(Display *dpy, GLXDrawable draw, const int *attr
|
|||||||
#endif /* GLX_NV_float_buffer */
|
#endif /* GLX_NV_float_buffer */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #?. GLX_MESA_swap_frame_usage
|
|
||||||
*/
|
|
||||||
#ifndef GLX_MESA_swap_frame_usage
|
|
||||||
#define GLX_MESA_swap_frame_usage 1
|
|
||||||
|
|
||||||
extern int glXGetFrameUsageMESA(Display *dpy, GLXDrawable drawable, float *usage);
|
|
||||||
extern int glXBeginFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
|
|
||||||
extern int glXEndFrameTrackingMESA(Display *dpy, GLXDrawable drawable);
|
|
||||||
extern int glXQueryFrameTrackingMESA(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
|
|
||||||
|
|
||||||
typedef int (*PFNGLXGETFRAMEUSAGEMESAPROC) (Display *dpy, GLXDrawable drawable, float *usage);
|
|
||||||
typedef int (*PFNGLXBEGINFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
|
|
||||||
typedef int (*PFNGLXENDFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable);
|
|
||||||
typedef int (*PFNGLXQUERYFRAMETRACKINGMESAPROC)(Display *dpy, GLXDrawable drawable, int64_t *swapCount, int64_t *missedFrames, float *lastMissedUsage);
|
|
||||||
|
|
||||||
#endif /* GLX_MESA_swap_frame_usage */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #?. GLX_MESA_swap_control
|
|
||||||
*/
|
|
||||||
#ifndef GLX_MESA_swap_control
|
|
||||||
#define GLX_MESA_swap_control 1
|
|
||||||
|
|
||||||
extern int glXSwapIntervalMESA(unsigned int interval);
|
|
||||||
extern int glXGetSwapIntervalMESA(void);
|
|
||||||
|
|
||||||
typedef int (*PFNGLXSWAPINTERVALMESAPROC)(unsigned int interval);
|
|
||||||
typedef int (*PFNGLXGETSWAPINTERVALMESAPROC)(void);
|
|
||||||
|
|
||||||
#endif /* GLX_MESA_swap_control */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* #?. GLX_EXT_texture_from_pixmap
|
|
||||||
* XXX not finished?
|
|
||||||
*/
|
|
||||||
#ifndef GLX_EXT_texture_from_pixmap
|
|
||||||
#define GLX_EXT_texture_from_pixmap 1
|
|
||||||
|
|
||||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
|
||||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
|
||||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
|
||||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
|
||||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
|
||||||
|
|
||||||
#define GLX_TEXTURE_FORMAT_EXT 0x20D5
|
|
||||||
#define GLX_TEXTURE_TARGET_EXT 0x20D6
|
|
||||||
#define GLX_MIPMAP_TEXTURE_EXT 0x20D7
|
|
||||||
|
|
||||||
#define GLX_TEXTURE_FORMAT_NONE_EXT 0x20D8
|
|
||||||
#define GLX_TEXTURE_FORMAT_RGB_EXT 0x20D9
|
|
||||||
#define GLX_TEXTURE_FORMAT_RGBA_EXT 0x20DA
|
|
||||||
|
|
||||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
|
||||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
|
||||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
|
||||||
|
|
||||||
#define GLX_TEXTURE_1D_EXT 0x20DB
|
|
||||||
#define GLX_TEXTURE_2D_EXT 0x20DC
|
|
||||||
#define GLX_TEXTURE_RECTANGLE_EXT 0x20DD
|
|
||||||
|
|
||||||
#define GLX_FRONT_LEFT_EXT 0x20DE
|
|
||||||
#define GLX_FRONT_RIGHT_EXT 0x20DF
|
|
||||||
#define GLX_BACK_LEFT_EXT 0x20E0
|
|
||||||
#define GLX_BACK_RIGHT_EXT 0x20E1
|
|
||||||
#define GLX_FRONT_EXT GLX_FRONT_LEFT_EXT
|
|
||||||
#define GLX_BACK_EXT GLX_BACK_LEFT_EXT
|
|
||||||
#define GLX_AUX0_EXT 0x20E2
|
|
||||||
#define GLX_AUX1_EXT 0x20E3
|
|
||||||
#define GLX_AUX2_EXT 0x20E4
|
|
||||||
#define GLX_AUX3_EXT 0x20E5
|
|
||||||
#define GLX_AUX4_EXT 0x20E6
|
|
||||||
#define GLX_AUX5_EXT 0x20E7
|
|
||||||
#define GLX_AUX6_EXT 0x20E8
|
|
||||||
#define GLX_AUX7_EXT 0x20E9
|
|
||||||
#define GLX_AUX8_EXT 0x20EA
|
|
||||||
#define GLX_AUX9_EXT 0x20EB
|
|
||||||
|
|
||||||
extern void glXBindTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer, const int *attrib_list);
|
|
||||||
extern void glXReleaseTexImageEXT(Display *dpy, GLXDrawable drawable, int buffer);
|
|
||||||
|
|
||||||
#endif /* GLX_EXT_texture_from_pixmap */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*** Should these go here, or in another header? */
|
/*** Should these go here, or in another header? */
|
||||||
/*
|
/*
|
||||||
** GLX Events
|
** GLX Events
|
||||||
|
|||||||
@@ -331,7 +331,7 @@ typedef struct {
|
|||||||
} GLXBufferClobberEventSGIX;
|
} GLXBufferClobberEventSGIX;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__sun__) || defined(__osf__)
|
#if defined(__sun__)
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#if defined(__STDC__)
|
#if defined(__STDC__)
|
||||||
#if defined(__arch64__)
|
#if defined(__arch64__)
|
||||||
|
|||||||
@@ -472,14 +472,6 @@ struct __DRIdrawableRec {
|
|||||||
* \since Internal API version 20030317.
|
* \since Internal API version 20030317.
|
||||||
*/
|
*/
|
||||||
unsigned swap_interval;
|
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
|
#endif
|
||||||
|
|||||||
@@ -137,13 +137,6 @@ typedef struct __GLcontextModesRec {
|
|||||||
GLint swapMethod;
|
GLint swapMethod;
|
||||||
|
|
||||||
GLint screen;
|
GLint screen;
|
||||||
|
|
||||||
/* EXT_texture_from_pixmap */
|
|
||||||
GLint bindToTextureRgb;
|
|
||||||
GLint bindToTextureRgba;
|
|
||||||
GLint bindToMipmapTexture;
|
|
||||||
GLint bindToTextureTargets;
|
|
||||||
GLint yInverted;
|
|
||||||
} __GLcontextModes;
|
} __GLcontextModes;
|
||||||
|
|
||||||
/* Several fields of __GLcontextModes can take these as values. Since
|
/* Several fields of __GLcontextModes can take these as values. Since
|
||||||
@@ -173,17 +166,6 @@ typedef struct __GLcontextModesRec {
|
|||||||
#define GLX_PIXMAP_BIT 0x00000002
|
#define GLX_PIXMAP_BIT 0x00000002
|
||||||
#define GLX_PBUFFER_BIT 0x00000004
|
#define GLX_PBUFFER_BIT 0x00000004
|
||||||
|
|
||||||
#define GLX_BIND_TO_TEXTURE_RGB_EXT 0x20D0
|
|
||||||
#define GLX_BIND_TO_TEXTURE_RGBA_EXT 0x20D1
|
|
||||||
#define GLX_BIND_TO_MIPMAP_TEXTURE_EXT 0x20D2
|
|
||||||
#define GLX_BIND_TO_TEXTURE_TARGETS_EXT 0x20D3
|
|
||||||
#define GLX_Y_INVERTED_EXT 0x20D4
|
|
||||||
|
|
||||||
#define GLX_TEXTURE_1D_BIT_EXT 0x00000001
|
|
||||||
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
|
|
||||||
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
|
|
||||||
|
|
||||||
|
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -111,15 +111,6 @@ WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDE
|
|||||||
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
|
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
|
||||||
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
|
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
|
||||||
|
|
||||||
|
|
||||||
#ifndef WGL_ARB_extensions_string
|
|
||||||
#define WGL_ARB_extensions_string 1
|
|
||||||
|
|
||||||
WGLAPI const char * GLAPIENTRY wglGetExtensionsStringARB(HDC hdc);
|
|
||||||
|
|
||||||
#endif /* WGL_ARB_extensions_string */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# pragma warning( pop )
|
# pragma warning( pop )
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -100,14 +100,15 @@ extern WMesaContext WMesaCreateContext(HDC hDC,HPALETTE* pPal,
|
|||||||
/*
|
/*
|
||||||
* Destroy a rendering context as returned by WMesaCreateContext()
|
* Destroy a rendering context as returned by WMesaCreateContext()
|
||||||
*/
|
*/
|
||||||
extern void WMesaDestroyContext( WMesaContext ctx );
|
/*extern void WMesaDestroyContext( WMesaContext ctx );*/
|
||||||
|
extern void WMesaDestroyContext( void );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make the specified context the current one.
|
* Make the specified context the current one.
|
||||||
*/
|
*/
|
||||||
extern void WMesaMakeCurrent( WMesaContext ctx, HDC hdc );
|
extern void WMesaMakeCurrent( WMesaContext ctx );
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -120,7 +121,7 @@ extern WMesaContext WMesaGetCurrentContext( void );
|
|||||||
* Swap the front and back buffers for the current context. No action
|
* Swap the front and back buffers for the current context. No action
|
||||||
* taken if the context is not double buffered.
|
* taken if the context is not double buffered.
|
||||||
*/
|
*/
|
||||||
extern void WMesaSwapBuffers(HDC hdc);
|
extern void WMesaSwapBuffers(void);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ typedef XColor XMesaColor;
|
|||||||
|
|
||||||
#define XMesaDrawPoint XDrawPoint
|
#define XMesaDrawPoint XDrawPoint
|
||||||
#define XMesaDrawPoints XDrawPoints
|
#define XMesaDrawPoints XDrawPoints
|
||||||
#define XMesaDrawLine XDrawLine
|
|
||||||
#define XMesaFillRectangle XFillRectangle
|
#define XMesaFillRectangle XFillRectangle
|
||||||
#define XMesaPutImage XPutImage
|
#define XMesaPutImage XPutImage
|
||||||
#define XMesaCopyArea XCopyArea
|
#define XMesaCopyArea XCopyArea
|
||||||
|
|||||||
@@ -95,18 +95,6 @@ do { \
|
|||||||
(*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
|
(*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define XMesaDrawLine(__d, __b, __gc, __x0, __y0, __x1, __y1) \
|
|
||||||
do { \
|
|
||||||
XMesaPoint __p[2]; \
|
|
||||||
(void) __d; \
|
|
||||||
__p[0].x = __x0; \
|
|
||||||
__p[0].y = __y0; \
|
|
||||||
__p[1].x = __x1; \
|
|
||||||
__p[1].y = __y1; \
|
|
||||||
ValidateGC(__b, __gc); \
|
|
||||||
(*gc->ops->PolyLines)(__b, __gc, CoordModeOrigin, 2, __p); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
|
#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
|
||||||
do { \
|
do { \
|
||||||
xRectangle __r[1]; \
|
xRectangle __r[1]; \
|
||||||
|
|||||||
@@ -64,7 +64,9 @@
|
|||||||
** Versioning and extensions
|
** Versioning and extensions
|
||||||
*/
|
*/
|
||||||
#define EGL_VERSION_1_0 1
|
#define EGL_VERSION_1_0 1
|
||||||
|
#if 0
|
||||||
#define EGL_VERSION_1_1 1
|
#define EGL_VERSION_1_1 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Boolean
|
** Boolean
|
||||||
@@ -267,56 +269,6 @@ GLAPI EGLBoolean APIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source,
|
|||||||
#endif /* EGL_MESA_copy_context */
|
#endif /* EGL_MESA_copy_context */
|
||||||
|
|
||||||
|
|
||||||
/* XXX this is preliminary! */
|
|
||||||
#ifndef EGL_VERSION_1_2
|
|
||||||
#define EGL_VERSION_1_2 1
|
|
||||||
|
|
||||||
typedef int EGLenum;
|
|
||||||
typedef int EGLClientBuffer;
|
|
||||||
|
|
||||||
#define EGL_DISPLAY_SCALING 10000
|
|
||||||
#define EGL_UNKNOWN ((EGLint)-1)
|
|
||||||
|
|
||||||
#define EGL_OPENGL_ES_BIT 0x1
|
|
||||||
#define EGL_OPENVG_BIT 0x2
|
|
||||||
|
|
||||||
#define EGL_OPENGL_ES_API 0x30A0
|
|
||||||
#define EGL_OPENVG_API 0x30A1
|
|
||||||
|
|
||||||
#define EGL_LUMINANCE_SIZE 0x303D
|
|
||||||
#define EGL_ALPHA_MASK_SIZE 0x303E
|
|
||||||
#define EGL_COLOR_BUFFER_TYPE 0x303F
|
|
||||||
#define EGL_RENDERABLE_TYPE 0x3040
|
|
||||||
|
|
||||||
#define EGL_SINGLE_BUFFER 0x3085
|
|
||||||
#define EGL_RENDER_BUFFER 0x3086
|
|
||||||
#define EGL_COLORSPACE 0x3087
|
|
||||||
#define EGL_ALPHA_FORMAT 0x3088
|
|
||||||
#define EGL_COLORSPACE_sRGB 0x3089
|
|
||||||
#define EGL_COLORSPACE_LINEAR 0x308A
|
|
||||||
#define EGL_ALPHA_FORMAT_NONPRE 0x308B
|
|
||||||
#define EGL_ALPHA_FORMAT_PRE 0x308C
|
|
||||||
#define EGL_CLIENT_APIS 0x308D
|
|
||||||
#define EGL_RGB_BUFFER 0x308E
|
|
||||||
#define EGL_LUMINANCE_BUFFER 0x308F
|
|
||||||
#define EGL_HORIZONTAL_RESOLUTION 0x3090
|
|
||||||
#define EGL_VERTICAL_RESOLUTION 0x3091
|
|
||||||
#define EGL_PIXEL_ASPECT_RATIO 0x3092
|
|
||||||
#define EGL_SWAP_BEHAVIOR 0x3093
|
|
||||||
#define EGL_BUFFER_PRESERVED 0x3094
|
|
||||||
#define EGL_BUFFER_DESTROYED 0x3095
|
|
||||||
#define EGL_OPENVG_IMAGE 0x3096
|
|
||||||
#define EGL_CONTEXT_CLIENT_TYPE 0x3097
|
|
||||||
|
|
||||||
GLAPI EGLBoolean APIENTRY eglBindAPI(EGLenum api);
|
|
||||||
GLAPI EGLenum APIENTRY eglQueryAPI(void);
|
|
||||||
GLAPI EGLBoolean APIENTRY eglWaitClient(void);
|
|
||||||
GLAPI EGLBoolean APIENTRY eglReleaseThread(void);
|
|
||||||
GLAPI EGLSurface APIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list);
|
|
||||||
|
|
||||||
#endif /* EGL_VERSION_1_2 */
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ subdirs:
|
|||||||
fi \
|
fi \
|
||||||
done
|
done
|
||||||
|
|
||||||
# Dummy install target
|
|
||||||
install:
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for dir in $(SUBDIRS) tests ; do \
|
@for dir in $(SUBDIRS) tests ; do \
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ readtex.h
|
|||||||
reflect
|
reflect
|
||||||
renormal
|
renormal
|
||||||
shadowtex
|
shadowtex
|
||||||
showbuffer.c
|
|
||||||
showbuffer.h
|
|
||||||
spectex
|
spectex
|
||||||
stex3d
|
stex3d
|
||||||
teapot
|
teapot
|
||||||
|
|||||||
@@ -15,23 +15,22 @@ LIB_DEP = $(LIB_DIR)/$(GL_LIB_NAME) $(LIB_DIR)/$(GLU_LIB_NAME) $(LIB_DIR)/$(GLUT
|
|||||||
|
|
||||||
PROGS = \
|
PROGS = \
|
||||||
arbfplight \
|
arbfplight \
|
||||||
arbfslight \
|
|
||||||
arbocclude \
|
arbocclude \
|
||||||
bounce \
|
bounce \
|
||||||
clearspd \
|
clearspd \
|
||||||
cubemap \
|
cubemap \
|
||||||
drawpix \
|
drawpix \
|
||||||
engine \
|
copypix \
|
||||||
|
drawpix_pbo \
|
||||||
fire \
|
fire \
|
||||||
fogcoord \
|
fogcoord \
|
||||||
fplight \
|
fplight \
|
||||||
gamma \
|
gamma \
|
||||||
gearbox \
|
|
||||||
gears \
|
gears \
|
||||||
|
gearbox \
|
||||||
geartrain \
|
geartrain \
|
||||||
glinfo \
|
glinfo \
|
||||||
gloss \
|
gloss \
|
||||||
glslnoise \
|
|
||||||
gltestperf \
|
gltestperf \
|
||||||
glutfx \
|
glutfx \
|
||||||
isosurf \
|
isosurf \
|
||||||
@@ -39,6 +38,7 @@ PROGS = \
|
|||||||
lodbias \
|
lodbias \
|
||||||
morph3d \
|
morph3d \
|
||||||
multiarb \
|
multiarb \
|
||||||
|
occlude \
|
||||||
paltex \
|
paltex \
|
||||||
pointblast \
|
pointblast \
|
||||||
ray \
|
ray \
|
||||||
@@ -54,13 +54,12 @@ PROGS = \
|
|||||||
terrain \
|
terrain \
|
||||||
tessdemo \
|
tessdemo \
|
||||||
texcyl \
|
texcyl \
|
||||||
texdown \
|
texdown-pool \
|
||||||
texenv \
|
texenv \
|
||||||
texobj \
|
texobj \
|
||||||
trispd \
|
trispd \
|
||||||
tunnel \
|
tunnel \
|
||||||
tunnel2 \
|
tunnel2 \
|
||||||
vao_demo \
|
|
||||||
winpos
|
winpos
|
||||||
|
|
||||||
|
|
||||||
@@ -77,9 +76,8 @@ PROGS = \
|
|||||||
|
|
||||||
##### TARGETS #####
|
##### TARGETS #####
|
||||||
|
|
||||||
default: $(PROGS)
|
default: readtex.o $(PROGS)
|
||||||
|
|
||||||
$(PROGS): readtex.o
|
|
||||||
|
|
||||||
readtex.c: $(TOP)/progs/util/readtex.c
|
readtex.c: $(TOP)/progs/util/readtex.c
|
||||||
cp $< .
|
cp $< .
|
||||||
@@ -101,16 +99,6 @@ showbuffer.o: showbuffer.c showbuffer.h
|
|||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) showbuffer.c
|
||||||
|
|
||||||
|
|
||||||
trackball.c: $(TOP)/progs/util/trackball.c
|
|
||||||
cp $< .
|
|
||||||
|
|
||||||
trackball.h: $(TOP)/progs/util/trackball.h
|
|
||||||
cp $< .
|
|
||||||
|
|
||||||
trackball.o: trackball.c trackball.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) trackball.c
|
|
||||||
|
|
||||||
|
|
||||||
reflect: reflect.o showbuffer.o readtex.o
|
reflect: reflect.o showbuffer.o readtex.o
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
|
$(CC) -I$(INCDIR) $(CFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
|
||||||
|
|
||||||
@@ -124,21 +112,6 @@ shadowtex: shadowtex.o showbuffer.o
|
|||||||
shadowtex.o: shadowtex.c showbuffer.h
|
shadowtex.o: shadowtex.c showbuffer.h
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
|
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
|
||||||
|
|
||||||
|
|
||||||
gloss: gloss.o trackball.o readtex.o
|
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) gloss.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
|
|
||||||
|
|
||||||
gloss.o: gloss.c trackball.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
|
|
||||||
|
|
||||||
|
|
||||||
engine: engine.o trackball.o readtex.o
|
|
||||||
$(CC) -I$(INCDIR) $(CFLAGS) engine.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
|
|
||||||
|
|
||||||
engine.o: engine.c trackball.h
|
|
||||||
$(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f $(PROGS)
|
-rm -f $(PROGS)
|
||||||
-rm -f *.o *~
|
-rm -f *.o *~
|
||||||
|
|||||||
@@ -1,118 +0,0 @@
|
|||||||
|
|
||||||
# Mesa 3-D graphics library
|
|
||||||
# Version: 6.5
|
|
||||||
# Copyright (C) 1995-2006 Brian Paul
|
|
||||||
|
|
||||||
# Makefile for GLUT-based demo programs for Windows
|
|
||||||
|
|
||||||
# Build the Mesa and GLUT libraries by using the Visual Studio
|
|
||||||
# Workspaces in this distribution before running this Makefile.
|
|
||||||
|
|
||||||
# Invocation: nmake -f Makefile.win
|
|
||||||
|
|
||||||
NODEBUG=1
|
|
||||||
!include <win32.mak>
|
|
||||||
|
|
||||||
##### MACROS #####
|
|
||||||
|
|
||||||
TOP = ..\..
|
|
||||||
INCDIR = ..\..\include
|
|
||||||
LIBDIR = ..\..\lib
|
|
||||||
LIBS = GLUT32.LIB OPENGL32.LIB
|
|
||||||
|
|
||||||
all: OPENGL32.DLL GLU32.DLL GLUT32.DLL \
|
|
||||||
readtex.h readtex.c showbuffer.h showbuffer.c \
|
|
||||||
arbfplight.exe arbfslight.exe arbocclude.exe bounce.exe \
|
|
||||||
clearspd.exe cubemap.exe drawpix.exe fire.exe fogcoord.exe \
|
|
||||||
fplight.exe gamma.exe gearbox.exe \
|
|
||||||
gears.exe geartrain.exe gloss.exe \
|
|
||||||
glinfo.exe glslnoise.exe \
|
|
||||||
gltestperf.exe glutfx.exe ipers.exe isosurf.exe lodbias.exe \
|
|
||||||
morph3d.exe multiarb.exe occlude.exe paltex.exe pointblast.exe \
|
|
||||||
ray.exe readpix.exe reflect.exe renormal.exe \
|
|
||||||
shadowtex.exe singlebuffer.exe spectex.exe spriteblast.exe \
|
|
||||||
stex3d.exe teapot.exe terrain.exe tessdemo.exe texcyl.exe \
|
|
||||||
texdown.exe texenv.exe texobj.exe trispd.exe tunnel.exe tunnel2.exe \
|
|
||||||
winpos.exe
|
|
||||||
|
|
||||||
arbfplight.exe: arbfplight.obj
|
|
||||||
arbfslight.exe: arbfslight.obj
|
|
||||||
arbocclude.exe: arbocclude.obj
|
|
||||||
bounce.exe: bounce.obj
|
|
||||||
clearspd.exe: clearspd.obj
|
|
||||||
cubemap.exe: cubemap.obj readtex.obj
|
|
||||||
drawpix.exe: drawpix.obj readtex.obj
|
|
||||||
fire.exe: fire.obj readtex.obj
|
|
||||||
fogcoord.exe: fogcoord.obj readtex.obj
|
|
||||||
fplight.exe: fplight.obj
|
|
||||||
gamma.exe: gamma.obj
|
|
||||||
gearbox.exe: gearbox.obj
|
|
||||||
gears.exe: gears.obj
|
|
||||||
geartrain.exe: geartrain.obj
|
|
||||||
gloss.exe: gloss.obj readtex.obj
|
|
||||||
glinfo.exe: glinfo.obj
|
|
||||||
glslnoise.exe: glslnoise.obj
|
|
||||||
gltestperf.exe: gltestperf.obj
|
|
||||||
glutfx.exe: glutfx.obj
|
|
||||||
ipers.exe: ipers.obj readtex.obj
|
|
||||||
isosurf.exe: isosurf.obj readtex.obj
|
|
||||||
lodbias.exe: lodbias.obj readtex.obj
|
|
||||||
morph3d.exe: morph3d.obj
|
|
||||||
multiarb.exe: multiarb.obj readtex.obj
|
|
||||||
occlude.exe: occlude.obj
|
|
||||||
paltex.exe: paltex.obj
|
|
||||||
pointblast.exe: pointblast.obj
|
|
||||||
ray.exe: ray.obj
|
|
||||||
readpix.exe: readpix.obj readtex.obj
|
|
||||||
reflect.exe: reflect.obj readtex.obj showbuffer.obj
|
|
||||||
renormal.exe: renormal.obj
|
|
||||||
shadowtex.exe: shadowtex.obj showbuffer.obj
|
|
||||||
singlebuffer.exe: singlebuffer.obj
|
|
||||||
spectex.exe: spectex.obj
|
|
||||||
spriteblast.exe: spriteblast.obj
|
|
||||||
stex3d.exe: stex3d.obj
|
|
||||||
teapot.exe: teapot.obj readtex.obj
|
|
||||||
terrain.exe: terrain.obj
|
|
||||||
tessdemo.exe: tessdemo.obj
|
|
||||||
texcyl.exe: texcyl.obj readtex.obj
|
|
||||||
texdown.exe: texdown.obj
|
|
||||||
texenv.exe: texenv.obj
|
|
||||||
texobj.exe: texobj.obj
|
|
||||||
trispd.exe: trispd.obj
|
|
||||||
tunnel.exe: tunnel.obj readtex.obj
|
|
||||||
tunnel2.exe: tunnel2.obj readtex.obj
|
|
||||||
winpos.exe: winpos.obj readtex.obj
|
|
||||||
|
|
||||||
|
|
||||||
OPENGL32.DLL: $(LIBDIR)\OPENGL32.DLL
|
|
||||||
copy $? .
|
|
||||||
|
|
||||||
GLU32.DLL: $(LIBDIR)\GLU32.DLL
|
|
||||||
copy $? .
|
|
||||||
|
|
||||||
GLUT32.DLL: $(LIBDIR)\GLUT32.DLL
|
|
||||||
copy $? .
|
|
||||||
|
|
||||||
readtex.c: $(TOP)\progs\util\readtex.c
|
|
||||||
copy $** .
|
|
||||||
|
|
||||||
readtex.h: $(TOP)\progs\util\readtex.h
|
|
||||||
copy $** .
|
|
||||||
|
|
||||||
showbuffer.c: $(TOP)\progs\util\showbuffer.c
|
|
||||||
copy $** .
|
|
||||||
|
|
||||||
showbuffer.h: $(TOP)\progs\util\showbuffer.h
|
|
||||||
copy $** .
|
|
||||||
|
|
||||||
.obj.exe:
|
|
||||||
$(link) $(ldebug) -out:$@ $** /LIBPATH:$(LIBDIR) $(LIBS)
|
|
||||||
|
|
||||||
.c.obj:
|
|
||||||
$(cc) $(cdebug) $(cflags) $(cvars) /I$(INCDIR) $*.c
|
|
||||||
|
|
||||||
clean::
|
|
||||||
del *.obj *.exe readtex.* showbuffer.*
|
|
||||||
|
|
||||||
clobber::
|
|
||||||
|
|
||||||
@@ -343,7 +343,7 @@ static void Init( void )
|
|||||||
(const GLubyte *) vertProgramText);
|
(const GLubyte *) vertProgramText);
|
||||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
|
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
|
||||||
if (glGetError() != GL_NO_ERROR || errorPos != -1) {
|
if (glGetError() != GL_NO_ERROR || errorPos != -1) {
|
||||||
int l = FindLine(vertProgramText, errorPos);
|
int l = FindLine(fragProgramText, errorPos);
|
||||||
printf("Vertex Program Error (pos=%d line=%d): %s\n", errorPos, l,
|
printf("Vertex Program Error (pos=%d line=%d): %s\n", errorPos, l,
|
||||||
(char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
|
(char *) glGetString(GL_PROGRAM_ERROR_STRING_ARB));
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|||||||
@@ -1,289 +0,0 @@
|
|||||||
/*
|
|
||||||
* Use GL_ARB_fragment_shader and GL_ARB_vertex_shader to implement
|
|
||||||
* simple per-pixel lighting.
|
|
||||||
*
|
|
||||||
* Michal Krol
|
|
||||||
* 20 February 2006
|
|
||||||
*
|
|
||||||
* Based on the original demo by:
|
|
||||||
* Brian Paul
|
|
||||||
* 17 April 2003
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <GL/glut.h>
|
|
||||||
#include <GL/glext.h>
|
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#define GETPROCADDRESS wglGetProcAddress
|
|
||||||
#else
|
|
||||||
#define GETPROCADDRESS glutGetProcAddress
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static GLfloat diffuse[4] = { 0.5f, 0.5f, 1.0f, 1.0f };
|
|
||||||
static GLfloat specular[4] = { 0.8f, 0.8f, 0.8f, 1.0f };
|
|
||||||
static GLfloat lightPos[4] = { 0.0f, 10.0f, 20.0f, 1.0f };
|
|
||||||
static GLfloat delta = 1.0f;
|
|
||||||
|
|
||||||
static GLhandleARB fragShader;
|
|
||||||
static GLhandleARB vertShader;
|
|
||||||
static GLhandleARB program;
|
|
||||||
|
|
||||||
static GLint uLightPos;
|
|
||||||
static GLint uDiffuse;
|
|
||||||
static GLint uSpecular;
|
|
||||||
|
|
||||||
static GLboolean anim = GL_TRUE;
|
|
||||||
static GLboolean wire = GL_FALSE;
|
|
||||||
static GLboolean pixelLight = GL_TRUE;
|
|
||||||
|
|
||||||
static GLint t0 = 0;
|
|
||||||
static GLint frames = 0;
|
|
||||||
|
|
||||||
static GLfloat xRot = 0.0f, yRot = 0.0f;
|
|
||||||
|
|
||||||
static PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB = NULL;
|
|
||||||
static PFNGLSHADERSOURCEARBPROC glShaderSourceARB = NULL;
|
|
||||||
static PFNGLCOMPILESHADERARBPROC glCompileShaderARB = NULL;
|
|
||||||
static PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL;
|
|
||||||
static PFNGLATTACHOBJECTARBPROC glAttachObjectARB = NULL;
|
|
||||||
static PFNGLLINKPROGRAMARBPROC glLinkProgramARB = NULL;
|
|
||||||
static PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB = NULL;
|
|
||||||
static PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB = NULL;
|
|
||||||
static PFNGLUNIFORM4FVARBPROC glUniform4fvARB = NULL;
|
|
||||||
|
|
||||||
static void Redisplay (void)
|
|
||||||
{
|
|
||||||
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
|
||||||
|
|
||||||
if (pixelLight)
|
|
||||||
{
|
|
||||||
glUseProgramObjectARB (program);
|
|
||||||
glUniform4fvARB (uLightPos, 1, lightPos);
|
|
||||||
glDisable(GL_LIGHTING);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
glUseProgramObjectARB (0);
|
|
||||||
glLightfv (GL_LIGHT0, GL_POSITION, lightPos);
|
|
||||||
glEnable(GL_LIGHTING);
|
|
||||||
}
|
|
||||||
|
|
||||||
glPushMatrix ();
|
|
||||||
glRotatef (xRot, 1.0f, 0.0f, 0.0f);
|
|
||||||
glRotatef (yRot, 0.0f, 1.0f, 0.0f);
|
|
||||||
glutSolidSphere (2.0, 10, 5);
|
|
||||||
glPopMatrix ();
|
|
||||||
|
|
||||||
glutSwapBuffers();
|
|
||||||
frames++;
|
|
||||||
|
|
||||||
if (anim)
|
|
||||||
{
|
|
||||||
GLint t = glutGet (GLUT_ELAPSED_TIME);
|
|
||||||
if (t - t0 >= 5000)
|
|
||||||
{
|
|
||||||
GLfloat seconds = (GLfloat) (t - t0) / 1000.0f;
|
|
||||||
GLfloat fps = frames / seconds;
|
|
||||||
printf ("%d frames in %6.3f seconds = %6.3f FPS\n", frames, seconds, fps);
|
|
||||||
t0 = t;
|
|
||||||
frames = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Idle (void)
|
|
||||||
{
|
|
||||||
lightPos[0] += delta;
|
|
||||||
if (lightPos[0] > 25.0f || lightPos[0] < -25.0f)
|
|
||||||
delta = -delta;
|
|
||||||
glutPostRedisplay ();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Reshape (int width, int height)
|
|
||||||
{
|
|
||||||
glViewport (0, 0, width, height);
|
|
||||||
glMatrixMode (GL_PROJECTION);
|
|
||||||
glLoadIdentity ();
|
|
||||||
glFrustum (-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
|
|
||||||
glMatrixMode (GL_MODELVIEW);
|
|
||||||
glLoadIdentity ();
|
|
||||||
glTranslatef (0.0f, 0.0f, -15.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Key (unsigned char key, int x, int y)
|
|
||||||
{
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch (key)
|
|
||||||
{
|
|
||||||
case ' ':
|
|
||||||
case 'a':
|
|
||||||
anim = !anim;
|
|
||||||
if (anim)
|
|
||||||
glutIdleFunc (Idle);
|
|
||||||
else
|
|
||||||
glutIdleFunc (NULL);
|
|
||||||
break;
|
|
||||||
case 'x':
|
|
||||||
lightPos[0] -= 1.0f;
|
|
||||||
break;
|
|
||||||
case 'X':
|
|
||||||
lightPos[0] += 1.0f;
|
|
||||||
break;
|
|
||||||
case 'w':
|
|
||||||
wire = !wire;
|
|
||||||
if (wire)
|
|
||||||
glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
|
|
||||||
else
|
|
||||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
|
||||||
break;
|
|
||||||
case 'p':
|
|
||||||
pixelLight = !pixelLight;
|
|
||||||
if (pixelLight)
|
|
||||||
printf ("Per-pixel lighting\n");
|
|
||||||
else
|
|
||||||
printf ("Conventional lighting\n");
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
exit(0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay ();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void SpecialKey (int key, int x, int y)
|
|
||||||
{
|
|
||||||
const GLfloat step = 3.0f;
|
|
||||||
|
|
||||||
(void) x;
|
|
||||||
(void) y;
|
|
||||||
|
|
||||||
switch (key)
|
|
||||||
{
|
|
||||||
case GLUT_KEY_UP:
|
|
||||||
xRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_DOWN:
|
|
||||||
xRot += step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_LEFT:
|
|
||||||
yRot -= step;
|
|
||||||
break;
|
|
||||||
case GLUT_KEY_RIGHT:
|
|
||||||
yRot += step;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
glutPostRedisplay ();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void Init (void)
|
|
||||||
{
|
|
||||||
static const char *fragShaderText =
|
|
||||||
"uniform vec4 lightPos;\n"
|
|
||||||
"uniform vec4 diffuse;\n"
|
|
||||||
"uniform vec4 specular;\n"
|
|
||||||
"void main () {\n"
|
|
||||||
" // Compute dot product of light direction and normal vector\n"
|
|
||||||
" float dotProd;\n"
|
|
||||||
" dotProd = clamp (dot (normalize (lightPos).xyz, normalize (gl_TexCoord[0]).xyz), 0.0, 1.0);\n"
|
|
||||||
" // Compute diffuse and specular contributions\n"
|
|
||||||
" gl_FragColor = diffuse * dotProd + specular * pow (dotProd, 20.0);\n"
|
|
||||||
"}\n"
|
|
||||||
;
|
|
||||||
static const char *vertShaderText =
|
|
||||||
"void main () {\n"
|
|
||||||
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n"
|
|
||||||
" gl_TexCoord[0] = vec4 (gl_NormalMatrix * gl_Normal, 1.0);\n"
|
|
||||||
"}\n"
|
|
||||||
;
|
|
||||||
|
|
||||||
if (!glutExtensionSupported ("GL_ARB_fragment_shader"))
|
|
||||||
{
|
|
||||||
printf ("Sorry, this demo requires GL_ARB_fragment_shader\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (!glutExtensionSupported ("GL_ARB_shader_objects"))
|
|
||||||
{
|
|
||||||
printf ("Sorry, this demo requires GL_ARB_shader_objects\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (!glutExtensionSupported ("GL_ARB_shading_language_100"))
|
|
||||||
{
|
|
||||||
printf ("Sorry, this demo requires GL_ARB_shading_language_100\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
if (!glutExtensionSupported ("GL_ARB_vertex_shader"))
|
|
||||||
{
|
|
||||||
printf ("Sorry, this demo requires GL_ARB_vertex_shader\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) GETPROCADDRESS ("glCreateShaderObjectARB");
|
|
||||||
glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) GETPROCADDRESS ("glShaderSourceARB");
|
|
||||||
glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) GETPROCADDRESS ("glCompileShaderARB");
|
|
||||||
glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) GETPROCADDRESS ("glCreateProgramObjectARB");
|
|
||||||
glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) GETPROCADDRESS ("glAttachObjectARB");
|
|
||||||
glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) GETPROCADDRESS ("glLinkProgramARB");
|
|
||||||
glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) GETPROCADDRESS ("glUseProgramObjectARB");
|
|
||||||
glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) GETPROCADDRESS ("glGetUniformLocationARB");
|
|
||||||
glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) GETPROCADDRESS ("glUniform4fvARB");
|
|
||||||
|
|
||||||
fragShader = glCreateShaderObjectARB (GL_FRAGMENT_SHADER_ARB);
|
|
||||||
glShaderSourceARB (fragShader, 1, &fragShaderText, NULL);
|
|
||||||
glCompileShaderARB (fragShader);
|
|
||||||
|
|
||||||
vertShader = glCreateShaderObjectARB (GL_VERTEX_SHADER_ARB);
|
|
||||||
glShaderSourceARB (vertShader, 1, &vertShaderText, NULL);
|
|
||||||
glCompileShaderARB (vertShader);
|
|
||||||
|
|
||||||
program = glCreateProgramObjectARB ();
|
|
||||||
glAttachObjectARB (program, fragShader);
|
|
||||||
glAttachObjectARB (program, vertShader);
|
|
||||||
glLinkProgramARB (program);
|
|
||||||
glUseProgramObjectARB (program);
|
|
||||||
|
|
||||||
uLightPos = glGetUniformLocationARB (program, "lightPos");
|
|
||||||
uDiffuse = glGetUniformLocationARB (program, "diffuse");
|
|
||||||
uSpecular = glGetUniformLocationARB (program, "specular");
|
|
||||||
|
|
||||||
glUniform4fvARB (uDiffuse, 1, diffuse);
|
|
||||||
glUniform4fvARB (uSpecular, 1, specular);
|
|
||||||
|
|
||||||
glClearColor (0.3f, 0.3f, 0.3f, 0.0f);
|
|
||||||
glEnable (GL_DEPTH_TEST);
|
|
||||||
glEnable (GL_LIGHT0);
|
|
||||||
glEnable (GL_LIGHTING);
|
|
||||||
glMaterialfv (GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse);
|
|
||||||
glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR, specular);
|
|
||||||
glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, 20.0f);
|
|
||||||
|
|
||||||
printf ("GL_RENDERER = %s\n", (const char *) glGetString (GL_RENDERER));
|
|
||||||
printf ("Press p to toggle between per-pixel and per-vertex lighting\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
int main (int argc, char *argv[])
|
|
||||||
{
|
|
||||||
glutInit (&argc, argv);
|
|
||||||
glutInitWindowPosition ( 0, 0);
|
|
||||||
glutInitWindowSize (200, 200);
|
|
||||||
glutInitDisplayMode (GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
|
||||||
glutCreateWindow (argv[0]);
|
|
||||||
glutReshapeFunc (Reshape);
|
|
||||||
glutKeyboardFunc (Key);
|
|
||||||
glutSpecialFunc (SpecialKey);
|
|
||||||
glutDisplayFunc (Redisplay);
|
|
||||||
if (anim)
|
|
||||||
glutIdleFunc (Idle);
|
|
||||||
Init ();
|
|
||||||
glutMainLoop ();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -14,6 +14,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#define COS(X) cos( (X) * 3.14159/180.0 )
|
#define COS(X) cos( (X) * 3.14159/180.0 )
|
||||||
#define SIN(X) sin( (X) * 3.14159/180.0 )
|
#define SIN(X) sin( (X) * 3.14159/180.0 )
|
||||||
|
|||||||
364
progs/demos/copypix.c
Normal file
364
progs/demos/copypix.c
Normal file
@@ -0,0 +1,364 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* glDrawPixels demo/test/benchmark
|
||||||
|
*
|
||||||
|
* Brian Paul September 25, 1997 This file is in the public domain.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
#include "readtex.h"
|
||||||
|
|
||||||
|
#define IMAGE_FILE "../images/girl.rgb"
|
||||||
|
|
||||||
|
static int ImgWidth, ImgHeight;
|
||||||
|
static GLenum ImgFormat;
|
||||||
|
static GLubyte *Image = NULL;
|
||||||
|
|
||||||
|
static int Xpos, Ypos;
|
||||||
|
static int SkipPixels, SkipRows;
|
||||||
|
static int DrawWidth, DrawHeight;
|
||||||
|
static int Scissor = 0;
|
||||||
|
static int Fog = 0;
|
||||||
|
static GLfloat Zpos = -1.0;
|
||||||
|
static float Xzoom, Yzoom;
|
||||||
|
static GLboolean DrawFront = GL_FALSE;
|
||||||
|
static GLboolean Dither = GL_TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
static void Reset( void )
|
||||||
|
{
|
||||||
|
Xpos = Ypos = 20;
|
||||||
|
DrawWidth = ImgWidth;
|
||||||
|
DrawHeight = ImgHeight;
|
||||||
|
SkipPixels = SkipRows = 0;
|
||||||
|
Scissor = 0;
|
||||||
|
Fog = 0;
|
||||||
|
Zpos = -1.0;
|
||||||
|
Xzoom = Yzoom = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Display( void )
|
||||||
|
{
|
||||||
|
glClear( GL_COLOR_BUFFER_BIT );
|
||||||
|
|
||||||
|
glRasterPos2i(10, 10);
|
||||||
|
glPixelZoom( 1, 1 );
|
||||||
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
glDisable(GL_FOG);
|
||||||
|
glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
glRasterPos2i(Xpos, Ypos);
|
||||||
|
#else
|
||||||
|
/* This allows negative raster positions: */
|
||||||
|
glRasterPos3f(0, 0, Zpos);
|
||||||
|
glBitmap(0, 0, 0, 0, Xpos, Ypos, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_PIXELS, SkipPixels);
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_ROWS, SkipRows);
|
||||||
|
|
||||||
|
glPixelZoom( Xzoom, Yzoom );
|
||||||
|
|
||||||
|
if (Scissor)
|
||||||
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
|
if (Fog)
|
||||||
|
glEnable(GL_FOG);
|
||||||
|
|
||||||
|
glCopyPixels(10, 10, ImgWidth, ImgHeight, GL_COLOR);
|
||||||
|
|
||||||
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
glDisable(GL_FOG);
|
||||||
|
|
||||||
|
if (DrawFront)
|
||||||
|
glFinish();
|
||||||
|
else
|
||||||
|
glutSwapBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Benchmark( void )
|
||||||
|
{
|
||||||
|
int startTime, endTime;
|
||||||
|
int draws = 500;
|
||||||
|
double seconds, pixelsPerSecond;
|
||||||
|
|
||||||
|
printf("Benchmarking...\n");
|
||||||
|
/* GL set-up */
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_PIXELS, SkipPixels);
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_ROWS, SkipRows);
|
||||||
|
glPixelZoom( Xzoom, Yzoom );
|
||||||
|
if (Scissor)
|
||||||
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
if (Fog)
|
||||||
|
glEnable(GL_FOG);
|
||||||
|
|
||||||
|
if (DrawFront)
|
||||||
|
glDrawBuffer(GL_FRONT);
|
||||||
|
else
|
||||||
|
glDrawBuffer(GL_BACK);
|
||||||
|
|
||||||
|
/* Run timing test */
|
||||||
|
draws = 0;
|
||||||
|
startTime = glutGet(GLUT_ELAPSED_TIME);
|
||||||
|
do {
|
||||||
|
glCopyPixels(10, 10, ImgWidth, ImgHeight, GL_COLOR);
|
||||||
|
draws++;
|
||||||
|
endTime = glutGet(GLUT_ELAPSED_TIME);
|
||||||
|
} while (endTime - startTime < 4000); /* 4 seconds */
|
||||||
|
|
||||||
|
/* GL clean-up */
|
||||||
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
glDisable(GL_FOG);
|
||||||
|
|
||||||
|
/* Results */
|
||||||
|
seconds = (double) (endTime - startTime) / 1000.0;
|
||||||
|
pixelsPerSecond = draws * DrawWidth * DrawHeight / seconds;
|
||||||
|
printf("Result: %d draws in %f seconds = %f pixels/sec\n",
|
||||||
|
draws, seconds, pixelsPerSecond);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Reshape( int width, int 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 'w':
|
||||||
|
if (DrawWidth > 0)
|
||||||
|
DrawWidth--;
|
||||||
|
break;
|
||||||
|
case 'W':
|
||||||
|
DrawWidth++;
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
if (DrawHeight > 0)
|
||||||
|
DrawHeight--;
|
||||||
|
break;
|
||||||
|
case 'H':
|
||||||
|
DrawHeight++;
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
if (SkipPixels > 0)
|
||||||
|
SkipPixels--;
|
||||||
|
break;
|
||||||
|
case 'P':
|
||||||
|
SkipPixels++;
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
if (SkipRows > 0)
|
||||||
|
SkipRows--;
|
||||||
|
break;
|
||||||
|
case 'R':
|
||||||
|
SkipRows++;
|
||||||
|
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 'z':
|
||||||
|
Zpos -= 0.1;
|
||||||
|
printf("RasterPos Z = %g\n", Zpos);
|
||||||
|
break;
|
||||||
|
case 'Z':
|
||||||
|
Zpos += 0.1;
|
||||||
|
printf("RasterPos Z = %g\n", Zpos);
|
||||||
|
break;
|
||||||
|
case 'b':
|
||||||
|
Benchmark();
|
||||||
|
break;
|
||||||
|
case 'F':
|
||||||
|
Fog = !Fog;
|
||||||
|
printf("Fog %d\n", Fog);
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
DrawFront = !DrawFront;
|
||||||
|
if (DrawFront)
|
||||||
|
glDrawBuffer(GL_FRONT);
|
||||||
|
else
|
||||||
|
glDrawBuffer(GL_BACK);
|
||||||
|
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 )
|
||||||
|
{
|
||||||
|
(void) x;
|
||||||
|
(void) y;
|
||||||
|
switch (key) {
|
||||||
|
case GLUT_KEY_UP:
|
||||||
|
Ypos += 1;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_DOWN:
|
||||||
|
Ypos -= 1;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_LEFT:
|
||||||
|
Xpos -= 1;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_RIGHT:
|
||||||
|
Xpos += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
glutPostRedisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Init( GLboolean ciMode, const char *filename )
|
||||||
|
{
|
||||||
|
static const GLfloat fogColor[4] = {0, 1, 0, 0};
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
glFogi(GL_FOG_MODE, GL_LINEAR);
|
||||||
|
glFogf(GL_FOG_START, 0);
|
||||||
|
glFogf(GL_FOG_END, 2);
|
||||||
|
glFogfv(GL_FOG_COLOR, fogColor);
|
||||||
|
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Usage(void)
|
||||||
|
{
|
||||||
|
printf("Keys:\n");
|
||||||
|
printf(" SPACE Reset Parameters\n");
|
||||||
|
printf(" Up/Down Move image up/down\n");
|
||||||
|
printf(" Left/Right Move image left/right\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(" w Decrease glDrawPixels width*\n");
|
||||||
|
printf(" W Increase glDrawPixels width*\n");
|
||||||
|
printf(" h Decrease glDrawPixels height*\n");
|
||||||
|
printf(" H Increase glDrawPixels height*\n");
|
||||||
|
printf(" p Decrease GL_UNPACK_SKIP_PIXELS*\n");
|
||||||
|
printf(" P Increase GL_UNPACK_SKIP_PIXELS*\n");
|
||||||
|
printf(" r Decrease GL_UNPACK_SKIP_ROWS*\n");
|
||||||
|
printf(" R Increase GL_UNPACK_SKIP_ROWS*\n");
|
||||||
|
printf(" s Toggle GL_SCISSOR_TEST\n");
|
||||||
|
printf(" F Toggle GL_FOG\n");
|
||||||
|
printf(" z Decrease RasterPos Z\n");
|
||||||
|
printf(" Z Increase RasterPos Z\n");
|
||||||
|
|
||||||
|
printf(" f Toggle front/back buffer drawing\n");
|
||||||
|
printf(" b Benchmark test\n");
|
||||||
|
printf(" ESC Exit\n");
|
||||||
|
printf("* Warning: no limits are imposed on these parameters so it's\n");
|
||||||
|
printf(" possible to cause a segfault if you go too far.\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( 500, 400 );
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
376
progs/demos/drawpix_pbo.c
Normal file
376
progs/demos/drawpix_pbo.c
Normal file
@@ -0,0 +1,376 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* glDrawPixels demo/test/benchmark
|
||||||
|
*
|
||||||
|
* Brian Paul September 25, 1997 This file is in the public domain.
|
||||||
|
*/
|
||||||
|
#define GL_GLEXT_PROTOTYPES
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <GL/glut.h>
|
||||||
|
|
||||||
|
#include "readtex.h"
|
||||||
|
|
||||||
|
#define IMAGE_FILE "../images/tree2.rgba"
|
||||||
|
|
||||||
|
static int ImgWidth, ImgHeight;
|
||||||
|
static GLenum ImgFormat;
|
||||||
|
static GLenum ImgType = GL_UNSIGNED_BYTE;
|
||||||
|
static GLubyte *Image = NULL;
|
||||||
|
|
||||||
|
static int Xpos, Ypos;
|
||||||
|
static int SkipPixels, SkipRows;
|
||||||
|
static int DrawWidth, DrawHeight;
|
||||||
|
static int Scissor = 0;
|
||||||
|
static int Fog = 0;
|
||||||
|
static GLfloat Zpos = -1.0;
|
||||||
|
static float Xzoom, Yzoom;
|
||||||
|
static GLboolean DrawFront = GL_FALSE;
|
||||||
|
static GLboolean Dither = GL_TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
static GLuint DrawPBO;
|
||||||
|
|
||||||
|
|
||||||
|
static void Reset( void )
|
||||||
|
{
|
||||||
|
Xpos = Ypos = 20;
|
||||||
|
DrawWidth = ImgWidth;
|
||||||
|
DrawHeight = ImgHeight;
|
||||||
|
SkipPixels = SkipRows = 0;
|
||||||
|
Scissor = 0;
|
||||||
|
Fog = 0;
|
||||||
|
Zpos = -1.0;
|
||||||
|
Xzoom = Yzoom = 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Display( void )
|
||||||
|
{
|
||||||
|
glClear( GL_COLOR_BUFFER_BIT );
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
glRasterPos2i(Xpos, Ypos);
|
||||||
|
#else
|
||||||
|
/* This allows negative raster positions: */
|
||||||
|
glRasterPos3f(0, 0, Zpos);
|
||||||
|
glBitmap(0, 0, 0, 0, Xpos, Ypos, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_PIXELS, SkipPixels);
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_ROWS, SkipRows);
|
||||||
|
|
||||||
|
glPixelZoom( Xzoom, Yzoom );
|
||||||
|
|
||||||
|
if (Scissor)
|
||||||
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
|
if (Fog)
|
||||||
|
glEnable(GL_FOG);
|
||||||
|
|
||||||
|
/*** Draw from the DrawPBO */
|
||||||
|
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
|
||||||
|
glDrawPixels(DrawWidth, DrawHeight, ImgFormat, ImgType, NULL);
|
||||||
|
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
|
||||||
|
|
||||||
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
glDisable(GL_FOG);
|
||||||
|
|
||||||
|
if (DrawFront)
|
||||||
|
glFinish();
|
||||||
|
else
|
||||||
|
glutSwapBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Benchmark( void )
|
||||||
|
{
|
||||||
|
int startTime, endTime;
|
||||||
|
int draws = 500;
|
||||||
|
double seconds, pixelsPerSecond;
|
||||||
|
|
||||||
|
printf("Benchmarking...\n");
|
||||||
|
/* GL set-up */
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_PIXELS, SkipPixels);
|
||||||
|
glPixelStorei(GL_UNPACK_SKIP_ROWS, SkipRows);
|
||||||
|
glPixelZoom( Xzoom, Yzoom );
|
||||||
|
if (Scissor)
|
||||||
|
glEnable(GL_SCISSOR_TEST);
|
||||||
|
if (Fog)
|
||||||
|
glEnable(GL_FOG);
|
||||||
|
|
||||||
|
if (DrawFront)
|
||||||
|
glDrawBuffer(GL_FRONT);
|
||||||
|
else
|
||||||
|
glDrawBuffer(GL_BACK);
|
||||||
|
|
||||||
|
/* Run timing test */
|
||||||
|
draws = 0;
|
||||||
|
startTime = glutGet(GLUT_ELAPSED_TIME);
|
||||||
|
do {
|
||||||
|
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, DrawPBO);
|
||||||
|
glDrawPixels(DrawWidth, DrawHeight, ImgFormat, ImgType, NULL);
|
||||||
|
glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, 0);
|
||||||
|
draws++;
|
||||||
|
endTime = glutGet(GLUT_ELAPSED_TIME);
|
||||||
|
} while (endTime - startTime < 4000); /* 4 seconds */
|
||||||
|
|
||||||
|
/* GL clean-up */
|
||||||
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
glDisable(GL_FOG);
|
||||||
|
|
||||||
|
/* Results */
|
||||||
|
seconds = (double) (endTime - startTime) / 1000.0;
|
||||||
|
pixelsPerSecond = draws * DrawWidth * DrawHeight / seconds;
|
||||||
|
printf("Result: %d draws in %f seconds = %f pixels/sec\n",
|
||||||
|
draws, seconds, pixelsPerSecond);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Reshape( int width, int 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 'w':
|
||||||
|
if (DrawWidth > 0)
|
||||||
|
DrawWidth--;
|
||||||
|
break;
|
||||||
|
case 'W':
|
||||||
|
DrawWidth++;
|
||||||
|
break;
|
||||||
|
case 'h':
|
||||||
|
if (DrawHeight > 0)
|
||||||
|
DrawHeight--;
|
||||||
|
break;
|
||||||
|
case 'H':
|
||||||
|
DrawHeight++;
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
if (SkipPixels > 0)
|
||||||
|
SkipPixels--;
|
||||||
|
break;
|
||||||
|
case 'P':
|
||||||
|
SkipPixels++;
|
||||||
|
break;
|
||||||
|
case 'r':
|
||||||
|
if (SkipRows > 0)
|
||||||
|
SkipRows--;
|
||||||
|
break;
|
||||||
|
case 'R':
|
||||||
|
SkipRows++;
|
||||||
|
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 'z':
|
||||||
|
Zpos -= 0.1;
|
||||||
|
printf("RasterPos Z = %g\n", Zpos);
|
||||||
|
break;
|
||||||
|
case 'Z':
|
||||||
|
Zpos += 0.1;
|
||||||
|
printf("RasterPos Z = %g\n", Zpos);
|
||||||
|
break;
|
||||||
|
case 'b':
|
||||||
|
Benchmark();
|
||||||
|
break;
|
||||||
|
case 'F':
|
||||||
|
Fog = !Fog;
|
||||||
|
printf("Fog %d\n", Fog);
|
||||||
|
break;
|
||||||
|
case 'f':
|
||||||
|
DrawFront = !DrawFront;
|
||||||
|
if (DrawFront)
|
||||||
|
glDrawBuffer(GL_FRONT);
|
||||||
|
else
|
||||||
|
glDrawBuffer(GL_BACK);
|
||||||
|
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 )
|
||||||
|
{
|
||||||
|
(void) x;
|
||||||
|
(void) y;
|
||||||
|
switch (key) {
|
||||||
|
case GLUT_KEY_UP:
|
||||||
|
Ypos += 1;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_DOWN:
|
||||||
|
Ypos -= 1;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_LEFT:
|
||||||
|
Xpos -= 1;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_RIGHT:
|
||||||
|
Xpos += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
glutPostRedisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Init( GLboolean ciMode, const char *filename )
|
||||||
|
{
|
||||||
|
static const GLfloat fogColor[4] = {0, 1, 0, 0};
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
/* put image into DrawPBO */
|
||||||
|
glGenBuffersARB(1, &DrawPBO);
|
||||||
|
glBindBufferARB(GL_PIXEL_PACK_BUFFER_EXT, DrawPBO);
|
||||||
|
glBufferDataARB(GL_PIXEL_PACK_BUFFER_EXT,
|
||||||
|
ImgWidth * ImgHeight * 4, Image, GL_STATIC_DRAW);
|
||||||
|
|
||||||
|
|
||||||
|
glFogi(GL_FOG_MODE, GL_LINEAR);
|
||||||
|
glFogf(GL_FOG_START, 0);
|
||||||
|
glFogf(GL_FOG_END, 2);
|
||||||
|
glFogfv(GL_FOG_COLOR, fogColor);
|
||||||
|
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Usage(void)
|
||||||
|
{
|
||||||
|
printf("Keys:\n");
|
||||||
|
printf(" SPACE Reset Parameters\n");
|
||||||
|
printf(" Up/Down Move image up/down\n");
|
||||||
|
printf(" Left/Right Move image left/right\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(" w Decrease glDrawPixels width*\n");
|
||||||
|
printf(" W Increase glDrawPixels width*\n");
|
||||||
|
printf(" h Decrease glDrawPixels height*\n");
|
||||||
|
printf(" H Increase glDrawPixels height*\n");
|
||||||
|
printf(" p Decrease GL_UNPACK_SKIP_PIXELS*\n");
|
||||||
|
printf(" P Increase GL_UNPACK_SKIP_PIXELS*\n");
|
||||||
|
printf(" r Decrease GL_UNPACK_SKIP_ROWS*\n");
|
||||||
|
printf(" R Increase GL_UNPACK_SKIP_ROWS*\n");
|
||||||
|
printf(" s Toggle GL_SCISSOR_TEST\n");
|
||||||
|
printf(" F Toggle GL_FOG\n");
|
||||||
|
printf(" z Decrease RasterPos Z\n");
|
||||||
|
printf(" Z Increase RasterPos Z\n");
|
||||||
|
|
||||||
|
printf(" f Toggle front/back buffer drawing\n");
|
||||||
|
printf(" b Benchmark test\n");
|
||||||
|
printf(" ESC Exit\n");
|
||||||
|
printf("* Warning: no limits are imposed on these parameters so it's\n");
|
||||||
|
printf(" possible to cause a segfault if you go too far.\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( 500, 400 );
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
1099
progs/demos/engine.c
1099
progs/demos/engine.c
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@
|
|||||||
static GLint WinWidth = 800, WinHeight = 500;
|
static GLint WinWidth = 800, WinHeight = 500;
|
||||||
static GLint TexWidth, TexHeight;
|
static GLint TexWidth, TexHeight;
|
||||||
static GLuint TexObj = 1;
|
static GLuint TexObj = 1;
|
||||||
static GLenum IntFormat = GL_RGB;
|
static GLenum IntFormat = GL_RGBA;
|
||||||
|
|
||||||
static GLboolean WireFrame = GL_FALSE;
|
static GLboolean WireFrame = GL_FALSE;
|
||||||
|
|
||||||
@@ -325,9 +325,10 @@ idle(void)
|
|||||||
dt = t - t0;
|
dt = t - t0;
|
||||||
t0 = t;
|
t0 = t;
|
||||||
|
|
||||||
/* fmod to prevent overflow */
|
GearRot += 70.0 * dt; /* 70 degrees per second */
|
||||||
GearRot = fmod(GearRot + 70.0 * dt, 360.0); /* 70 deg/sec */
|
GearRot = fmod(GearRot, 360.0); /* prevents eventual overflow */
|
||||||
CubeRot = fmod(CubeRot + 15.0 * dt, 360.0); /* 15 deg/sec */
|
|
||||||
|
CubeRot += 15.0 * dt;
|
||||||
|
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,8 +25,6 @@
|
|||||||
#include <GL/glut.h>
|
#include <GL/glut.h>
|
||||||
|
|
||||||
#include "readtex.h"
|
#include "readtex.h"
|
||||||
#include "trackball.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb"
|
#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb"
|
||||||
#define BASE_TEXTURE_FILE "../images/tile.rgb"
|
#define BASE_TEXTURE_FILE "../images/tile.rgb"
|
||||||
@@ -40,13 +38,13 @@
|
|||||||
/* for convolution */
|
/* for convolution */
|
||||||
#define FILTER_SIZE 7
|
#define FILTER_SIZE 7
|
||||||
|
|
||||||
static GLint WinWidth = 500, WinHeight = 500;
|
|
||||||
static GLuint CylinderObj = 0;
|
static GLuint CylinderObj = 0;
|
||||||
static GLuint TeapotObj = 0;
|
static GLuint TeapotObj = 0;
|
||||||
static GLuint Object = 0;
|
static GLuint Object = 0;
|
||||||
static GLboolean Animate = GL_TRUE;
|
static GLboolean Animate = GL_TRUE;
|
||||||
|
|
||||||
static float CurQuat[4] = { 0, 0, 0, 1 };
|
static GLfloat Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
|
||||||
|
static GLfloat DXrot = 20.0, DYrot = 50.;
|
||||||
|
|
||||||
static GLfloat Black[4] = { 0, 0, 0, 0 };
|
static GLfloat Black[4] = { 0, 0, 0, 0 };
|
||||||
static GLfloat White[4] = { 1, 1, 1, 1 };
|
static GLfloat White[4] = { 1, 1, 1, 1 };
|
||||||
@@ -56,10 +54,6 @@ static GLfloat Shininess = 6;
|
|||||||
static GLuint BaseTexture, SpecularTexture;
|
static GLuint BaseTexture, SpecularTexture;
|
||||||
static GLboolean DoSpecTexture = GL_TRUE;
|
static GLboolean DoSpecTexture = GL_TRUE;
|
||||||
|
|
||||||
static GLboolean ButtonDown = GL_FALSE;
|
|
||||||
static GLint ButtonX, ButtonY;
|
|
||||||
|
|
||||||
|
|
||||||
/* performance info */
|
/* performance info */
|
||||||
static GLint T0 = 0;
|
static GLint T0 = 0;
|
||||||
static GLint Frames = 0;
|
static GLint Frames = 0;
|
||||||
@@ -67,31 +61,29 @@ static GLint Frames = 0;
|
|||||||
|
|
||||||
static void Idle( void )
|
static void Idle( void )
|
||||||
{
|
{
|
||||||
static const float yAxis[3] = {0, 1, 0};
|
|
||||||
static double t0 = -1.;
|
static double t0 = -1.;
|
||||||
float quat[4];
|
|
||||||
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
|
double dt, t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
|
||||||
if (t0 < 0.0)
|
if (t0 < 0.0)
|
||||||
t0 = t;
|
t0 = t;
|
||||||
dt = t - t0;
|
dt = t - t0;
|
||||||
t0 = t;
|
t0 = t;
|
||||||
|
|
||||||
axis_to_quat(yAxis, 2.0 * dt, quat);
|
if (Animate) {
|
||||||
add_quats(quat, CurQuat, CurQuat);
|
Xrot += DXrot*dt;
|
||||||
|
Yrot += DYrot*dt;
|
||||||
glutPostRedisplay();
|
glutPostRedisplay();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void Display( void )
|
static void Display( void )
|
||||||
{
|
{
|
||||||
GLfloat rot[4][4];
|
|
||||||
|
|
||||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||||
|
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
build_rotmatrix(rot, CurQuat);
|
glRotatef(Xrot, 1.0, 0.0, 0.0);
|
||||||
glMultMatrixf(&rot[0][0]);
|
glRotatef(Yrot, 0.0, 1.0, 0.0);
|
||||||
|
glRotatef(Zrot, 0.0, 0.0, 1.0);
|
||||||
|
|
||||||
/* First pass: diffuse lighting with base texture */
|
/* First pass: diffuse lighting with base texture */
|
||||||
glMaterialfv(GL_FRONT, GL_DIFFUSE, Diffuse);
|
glMaterialfv(GL_FRONT, GL_DIFFUSE, Diffuse);
|
||||||
@@ -142,8 +134,6 @@ static void Reshape( int width, int height )
|
|||||||
{
|
{
|
||||||
GLfloat h = 30.0;
|
GLfloat h = 30.0;
|
||||||
GLfloat w = h * width / height;
|
GLfloat w = h * width / height;
|
||||||
WinWidth = width;
|
|
||||||
WinHeight = height;
|
|
||||||
glViewport( 0, 0, width, height );
|
glViewport( 0, 0, width, height );
|
||||||
glMatrixMode( GL_PROJECTION );
|
glMatrixMode( GL_PROJECTION );
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
@@ -208,7 +198,6 @@ static void Key( unsigned char key, int x, int y )
|
|||||||
glMaterialf(GL_FRONT, GL_SHININESS, Shininess);
|
glMaterialf(GL_FRONT, GL_SHININESS, Shininess);
|
||||||
printf("Shininess = %g\n", Shininess);
|
printf("Shininess = %g\n", Shininess);
|
||||||
break;
|
break;
|
||||||
case 'a':
|
|
||||||
case ' ':
|
case ' ':
|
||||||
ToggleAnimate();
|
ToggleAnimate();
|
||||||
break;
|
break;
|
||||||
@@ -220,44 +209,33 @@ static void Key( unsigned char key, int x, int y )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void SpecialKey( int key, int x, int y )
|
||||||
MouseMotion(int x, int y)
|
|
||||||
{
|
{
|
||||||
if (ButtonDown) {
|
float step = 3.0;
|
||||||
float x0 = (2.0 * ButtonX - WinWidth) / WinWidth;
|
(void) x;
|
||||||
float y0 = (WinHeight - 2.0 * ButtonY) / WinHeight;
|
(void) y;
|
||||||
float x1 = (2.0 * x - WinWidth) / WinWidth;
|
|
||||||
float y1 = (WinHeight - 2.0 * y) / WinHeight;
|
|
||||||
float q[4];
|
|
||||||
|
|
||||||
trackball(q, x0, y0, x1, y1);
|
switch (key) {
|
||||||
ButtonX = x;
|
case GLUT_KEY_UP:
|
||||||
ButtonY = y;
|
Xrot += step;
|
||||||
add_quats(q, CurQuat, CurQuat);
|
break;
|
||||||
|
case GLUT_KEY_DOWN:
|
||||||
glutPostRedisplay();
|
Xrot -= step;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_LEFT:
|
||||||
|
Yrot += step;
|
||||||
|
break;
|
||||||
|
case GLUT_KEY_RIGHT:
|
||||||
|
Yrot -= step;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
glutPostRedisplay();
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
MouseButton(int button, int state, int x, int y)
|
|
||||||
{
|
|
||||||
if (button == GLUT_LEFT_BUTTON && state == GLUT_DOWN) {
|
|
||||||
ButtonDown = GL_TRUE;
|
|
||||||
ButtonX = x;
|
|
||||||
ButtonY = y;
|
|
||||||
}
|
|
||||||
else if (button == GLUT_LEFT_BUTTON && state == GLUT_UP) {
|
|
||||||
ButtonDown = GL_FALSE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void Init( int argc, char *argv[] )
|
static void Init( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
GLboolean convolve = GL_FALSE;
|
GLboolean convolve = GL_FALSE;
|
||||||
GLboolean fullscreen = GL_FALSE;
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
@@ -270,13 +248,8 @@ static void Init( int argc, char *argv[] )
|
|||||||
else if (strcmp(argv[i], "-c")==0) {
|
else if (strcmp(argv[i], "-c")==0) {
|
||||||
convolve = GL_TRUE;
|
convolve = GL_TRUE;
|
||||||
}
|
}
|
||||||
else if (strcmp(argv[i], "-f")==0) {
|
|
||||||
fullscreen = GL_TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fullscreen)
|
|
||||||
glutFullScreen();
|
|
||||||
|
|
||||||
/* Cylinder object */
|
/* Cylinder object */
|
||||||
{
|
{
|
||||||
@@ -435,16 +408,20 @@ static void Init( int argc, char *argv[] )
|
|||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
glutInit( &argc, argv );
|
glutInit( &argc, argv );
|
||||||
glutInitWindowSize(WinWidth, WinHeight);
|
glutInitWindowPosition(0, 0);
|
||||||
|
glutInitWindowSize( 500, 500 );
|
||||||
|
|
||||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||||
|
|
||||||
glutCreateWindow(argv[0] );
|
glutCreateWindow(argv[0] );
|
||||||
|
|
||||||
|
Init(argc, argv);
|
||||||
|
|
||||||
glutReshapeFunc( Reshape );
|
glutReshapeFunc( Reshape );
|
||||||
glutKeyboardFunc( Key );
|
glutKeyboardFunc( Key );
|
||||||
|
glutSpecialFunc( SpecialKey );
|
||||||
glutDisplayFunc( Display );
|
glutDisplayFunc( Display );
|
||||||
glutMotionFunc(MouseMotion);
|
glutIdleFunc( Idle );
|
||||||
glutMouseFunc(MouseButton);
|
|
||||||
if (Animate)
|
|
||||||
glutIdleFunc( Idle );
|
|
||||||
|
|
||||||
glutCreateMenu(ModeMenu);
|
glutCreateMenu(ModeMenu);
|
||||||
glutAddMenuEntry("Toggle Highlight", DO_SPEC_TEXTURE);
|
glutAddMenuEntry("Toggle Highlight", DO_SPEC_TEXTURE);
|
||||||
@@ -453,8 +430,6 @@ int main( int argc, char *argv[] )
|
|||||||
glutAddMenuEntry("Quit", QUIT);
|
glutAddMenuEntry("Quit", QUIT);
|
||||||
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
glutAttachMenu(GLUT_RIGHT_BUTTON);
|
||||||
|
|
||||||
Init(argc, argv);
|
|
||||||
|
|
||||||
glutMainLoop();
|
glutMainLoop();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user