Compare commits
269 Commits
mesa_6_3_1
...
mesa_6_4_1
Author | SHA1 | Date | |
---|---|---|---|
|
53e595017e | ||
|
f8be78367d | ||
|
89568e0509 | ||
|
149675017f | ||
|
4d87d19a60 | ||
|
7a46bf5e1b | ||
|
c2cabc6755 | ||
|
3fa7668f99 | ||
|
2370d426cf | ||
|
d8eb2d49dd | ||
|
fcda7131b4 | ||
|
6ff7b66f4a | ||
|
e037150407 | ||
|
c2e6917e14 | ||
|
2048fabe04 | ||
|
b7da962caf | ||
|
040bdbe2e6 | ||
|
471c17cc84 | ||
|
ad9a205ba8 | ||
|
45c30dbead | ||
|
eeb4f1aff9 | ||
|
1ea4669fce | ||
|
a110f0f407 | ||
|
4f42aa83f1 | ||
|
eb72779ef1 | ||
|
47604ffc2f | ||
|
5889e4b775 | ||
|
f9d66b2a44 | ||
|
2119711dac | ||
|
fcc21abbc6 | ||
|
c331aef105 | ||
|
2fc89f126a | ||
|
22c8686dad | ||
|
7a12ad5a08 | ||
|
c6165ec3b3 | ||
|
67ef9d76e7 | ||
|
aa5f5d54a8 | ||
|
c18fd3a3bf | ||
|
d799fbf78e | ||
|
48d7f01740 | ||
|
59f84d5723 | ||
|
6f9ff2af81 | ||
|
4591406e21 | ||
|
2c6cf3d0aa | ||
|
154a8be6a7 | ||
|
db03e55efa | ||
|
d038563a60 | ||
|
469bd21184 | ||
|
13a5235305 | ||
|
4e4f6a29f3 | ||
|
87855fd59b | ||
|
546b020144 | ||
|
84663e12d0 | ||
|
c16bb264e8 | ||
|
8ef980af6e | ||
|
7cd7a78d72 | ||
|
5c57efd6b4 | ||
|
ea9ed5849f | ||
|
1ef0939a64 | ||
|
d0f9c2887c | ||
|
ed75287003 | ||
|
c01c2fb542 | ||
|
e1d7297812 | ||
|
b4227f0d98 | ||
|
c868c1ee14 | ||
|
a1dcb43658 | ||
|
cc7b6810e2 | ||
|
7b9fecee10 | ||
|
8856180e4f | ||
|
df51dfbdc3 | ||
|
2fd1ed1b45 | ||
|
66b928e95e | ||
|
d5e9cca0b2 | ||
|
c072c17a8c | ||
|
8367420be9 | ||
|
e2a2ed06b2 | ||
|
0cc3703188 | ||
|
fb6c1492fb | ||
|
89ad797f9a | ||
|
fa67028ae7 | ||
|
8e1724dfe9 | ||
|
fbdb5c9b14 | ||
|
4b2728f95c | ||
|
3a7437399f | ||
|
3338f04be7 | ||
|
047f7bb11c | ||
|
5b25acdac7 | ||
|
cb16208ec0 | ||
|
88107bea56 | ||
|
b4d25157f2 | ||
|
c6d1f32ebe | ||
|
281f388e03 | ||
|
c0a0dfeb96 | ||
|
ab07593563 | ||
|
5b08058604 | ||
|
3bf13d3c4b | ||
|
2b05784084 | ||
|
2292262de4 | ||
|
a9358bb3b0 | ||
|
b9d111f202 | ||
|
20fd105e2a | ||
|
1faaa0090a | ||
|
23803bd5fb | ||
|
c000250504 | ||
|
b854297bab | ||
|
3c1b44ad55 | ||
|
bdab2cc216 | ||
|
91ade9ad68 | ||
|
7355bbce55 | ||
|
1d2671e6cb | ||
|
0a405dcc5f | ||
|
b210ffaadf | ||
|
b1e8471898 | ||
|
aefe0dabec | ||
|
758c5b9a7e | ||
|
44db6d7cb8 | ||
|
04f1fdc755 | ||
|
b181773d02 | ||
|
4218cddfb1 | ||
|
a4e35c21d2 | ||
|
5d63323d34 | ||
|
419a350499 | ||
|
db78ec7018 | ||
|
291911aeb5 | ||
|
e15a7d4883 | ||
|
2e95fdc5d8 | ||
|
6e03f6ed43 | ||
|
97790948f6 | ||
|
a882648023 | ||
|
b7f8d69bb3 | ||
|
5bad790e56 | ||
|
382b00f483 | ||
|
718bd385ed | ||
|
402ca8903f | ||
|
25a9c9f370 | ||
|
d73a838f01 | ||
|
c72b2fb2db | ||
|
5a6ce051ef | ||
|
e7c2fa9cff | ||
|
5919aec5c3 | ||
|
f5a6175d83 | ||
|
e41ea35fee | ||
|
38cf2b14f4 | ||
|
66725dca81 | ||
|
59ad040754 | ||
|
5e16f314d6 | ||
|
2376438410 | ||
|
1be13df2c3 | ||
|
1f6892527b | ||
|
e5f6f26c87 | ||
|
e14b3baca0 | ||
|
5eb129de76 | ||
|
3f27b6ffeb | ||
|
270572e543 | ||
|
7b56e1a443 | ||
|
cfaac5dc4f | ||
|
1e5c3e977f | ||
|
831b4143f7 | ||
|
b26b565f91 | ||
|
f4d1dafc18 | ||
|
db70c3f9b6 | ||
|
384b1d03e4 | ||
|
e3c1b594ae | ||
|
453eb90128 | ||
|
cb505bf744 | ||
|
133112c71a | ||
|
a66eebc579 | ||
|
89ea47182d | ||
|
2efe639f26 | ||
|
39e4095560 | ||
|
b19ec5009f | ||
|
afed3e55ba | ||
|
46cf4fa1bd | ||
|
b4198e821a | ||
|
5a1fb7db0e | ||
|
f16fbf03bd | ||
|
ec0c42a3be | ||
|
a4c1895d07 | ||
|
b2971358ad | ||
|
24a36c26fa | ||
|
247e27d0b8 | ||
|
912bcb2386 | ||
|
cee416863f | ||
|
8e946792dc | ||
|
dfb6c56ed8 | ||
|
dcf14aa3a7 | ||
|
1e71d6af48 | ||
|
298af7a609 | ||
|
ae27ef2219 | ||
|
f350e22716 | ||
|
eacd347fce | ||
|
8fcd1e0287 | ||
|
2ae5645115 | ||
|
b7c727e500 | ||
|
d912f6cfe3 | ||
|
f7eb54a12f | ||
|
e0029b33ef | ||
|
ab5be2c5f7 | ||
|
61ac29e7c6 | ||
|
b462855c24 | ||
|
e918bac8cd | ||
|
aa2a357bae | ||
|
05fe2871e3 | ||
|
926a19e108 | ||
|
160b3284dd | ||
|
c2c2600728 | ||
|
7a362deb8c | ||
|
a3dd6efb00 | ||
|
dabec11d27 | ||
|
69dc32cfac | ||
|
33f9c98aa6 | ||
|
6fe7a0dc01 | ||
|
f2876d1ee3 | ||
|
fbcc5aedf2 | ||
|
4c4e4bfa4e | ||
|
ac7c147aaf | ||
|
b7ae3e4787 | ||
|
82dfd4b71f | ||
|
ac887d4211 | ||
|
967b006f51 | ||
|
1b8d0f149e | ||
|
8c9cd63c89 | ||
|
63c9ebeaff | ||
|
6b563bda43 | ||
|
5d40169436 | ||
|
738c9a073f | ||
|
258f005c6b | ||
|
c91720fb1a | ||
|
d2e289c70f | ||
|
e78a3c42e4 | ||
|
a1a6fa2fa1 | ||
|
ecde87054c | ||
|
24d55a1145 | ||
|
aba4864a25 | ||
|
7bf08c23fd | ||
|
63dffa4e77 | ||
|
da0c5b2e2c | ||
|
0d942b740c | ||
|
ac54de021a | ||
|
ae4e58c9ab | ||
|
81b3c5e85c | ||
|
f1a261377f | ||
|
8e653f12bc | ||
|
bf54a28384 | ||
|
9a4dbf1cff | ||
|
7e5da5d526 | ||
|
94a4eb1e78 | ||
|
b8731903df | ||
|
23a4f50c5b | ||
|
6965f2cb0a | ||
|
928218a283 | ||
|
6bc24c5c05 | ||
|
126c89e35f | ||
|
33f5e47faf | ||
|
485528f2ac | ||
|
b507bd4160 | ||
|
711555d1e3 | ||
|
7f5925d57c | ||
|
7adcedcd54 | ||
|
29206ae569 | ||
|
dc6e2c778a | ||
|
4508bcc72c | ||
|
a7d4bfed8a | ||
|
4ce390b933 | ||
|
df68d11b47 | ||
|
82e3ecf413 | ||
|
f7c9eafa85 | ||
|
68679d2b9e | ||
|
960467443e |
54
Makefile
54
Makefile
@@ -89,6 +89,7 @@ linux-dri \
|
||||
linux-dri-x86 \
|
||||
linux-dri-x86-64 \
|
||||
linux-dri-ppc \
|
||||
linux-indirect \
|
||||
linux-fbdev \
|
||||
linux-glide \
|
||||
linux-icc \
|
||||
@@ -133,9 +134,10 @@ ultrix-gcc:
|
||||
|
||||
# Rules for making release tarballs
|
||||
|
||||
DIRECTORY = Mesa-6.3.1
|
||||
LIB_NAME = MesaLib-6.3.1
|
||||
DEMO_NAME = MesaDemos-6.3.1
|
||||
DIRECTORY = Mesa-6.4.1
|
||||
LIB_NAME = MesaLib-6.4.1
|
||||
DEMO_NAME = MesaDemos-6.4.1
|
||||
GLUT_NAME = MesaGLUT-6.4.1
|
||||
|
||||
MAIN_FILES = \
|
||||
$(DIRECTORY)/Makefile* \
|
||||
@@ -151,8 +153,9 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/docs/VERSIONS \
|
||||
$(DIRECTORY)/docs/*.spec \
|
||||
$(DIRECTORY)/include/GL/internal/glcore.h \
|
||||
$(DIRECTORY)/include/GL/dmesa.h \
|
||||
$(DIRECTORY)/include/GL/amesa.h \
|
||||
$(DIRECTORY)/include/GL/dmesa.h \
|
||||
$(DIRECTORY)/include/GL/directfbgl.h \
|
||||
$(DIRECTORY)/include/GL/fxmesa.h \
|
||||
$(DIRECTORY)/include/GL/ggimesa.h \
|
||||
$(DIRECTORY)/include/GL/gl.h \
|
||||
@@ -211,7 +214,6 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/directfb/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/fbdev/glfbdev.c \
|
||||
$(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
|
||||
@@ -258,17 +260,16 @@ MAIN_FILES = \
|
||||
$(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj
|
||||
|
||||
DRI_FILES = \
|
||||
$(DIRECTORY)/include/GL/internal/*.h \
|
||||
$(DIRECTORY)/include/GL/internal/dri_interface.h \
|
||||
$(DIRECTORY)/include/GL/internal/sarea.h \
|
||||
$(DIRECTORY)/src/glx/Makefile \
|
||||
$(DIRECTORY)/src/glx/x11/Makefile \
|
||||
$(DIRECTORY)/src/glx/x11/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/Makefile.template \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/common/xmlpool/*.po \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/dri_client/imports/*.h \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[ch] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/*.[chS] \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/Makefile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/Doxyfile \
|
||||
$(DIRECTORY)/src/mesa/drivers/dri/*/server/*.[ch]
|
||||
@@ -310,7 +311,7 @@ GLW_FILES = \
|
||||
$(DIRECTORY)/src/glw/README \
|
||||
$(DIRECTORY)/src/glw/depend
|
||||
|
||||
PROG_FILES = \
|
||||
DEMO_FILES = \
|
||||
$(DIRECTORY)/progs/beos/*.cpp \
|
||||
$(DIRECTORY)/progs/beos/Makefile \
|
||||
$(DIRECTORY)/progs/images/*.rgb \
|
||||
@@ -321,6 +322,8 @@ PROG_FILES = \
|
||||
$(DIRECTORY)/progs/demos/*.cxx \
|
||||
$(DIRECTORY)/progs/demos/*.dat \
|
||||
$(DIRECTORY)/progs/demos/README \
|
||||
$(DIRECTORY)/progs/osdemos/Makefile \
|
||||
$(DIRECTORY)/progs/osdemos/*.c \
|
||||
$(DIRECTORY)/progs/xdemos/Makefile* \
|
||||
$(DIRECTORY)/progs/xdemos/descrip.mms \
|
||||
$(DIRECTORY)/progs/xdemos/*.[chf] \
|
||||
@@ -335,10 +338,8 @@ PROG_FILES = \
|
||||
$(DIRECTORY)/progs/windml/*.bmp \
|
||||
$(DIRECTORY)/progs/ggi/*.c \
|
||||
$(DIRECTORY)/windows/VC6/progs/demos/*.dsp \
|
||||
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
|
||||
$(DIRECTORY)/windows/VC6/progs/progs.dsw \
|
||||
$(DIRECTORY)/windows/VC7/progs/demos/*.vcproj \
|
||||
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj \
|
||||
$(DIRECTORY)/windows/VC7/progs/progs.sln
|
||||
|
||||
GLUT_FILES = \
|
||||
@@ -357,7 +358,9 @@ GLUT_FILES = \
|
||||
$(DIRECTORY)/src/glut/dos/Makefile.DJ \
|
||||
$(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
|
||||
$(DIRECTORY)/src/glut/ggi/*.[ch] \
|
||||
$(DIRECTORY)/src/glut/ggi/Makefile
|
||||
$(DIRECTORY)/src/glut/ggi/Makefile \
|
||||
$(DIRECTORY)/windows/VC6/progs/glut/glut.dsp \
|
||||
$(DIRECTORY)/windows/VC7/progs/glut/glut.vcproj
|
||||
|
||||
DEPEND_FILES = \
|
||||
$(TOP)/src/mesa/depend \
|
||||
@@ -368,11 +371,9 @@ DEPEND_FILES = \
|
||||
|
||||
LIB_FILES = $(MAIN_FILES) $(DRI_FILES) $(SGI_GLU_FILES) $(GLW_FILES)
|
||||
|
||||
DEMO_FILES = $(PROG_FILES) $(GLUT_FILES)
|
||||
|
||||
|
||||
# Everything for new a Mesa release:
|
||||
tarballs: rm_depend lib_gz demo_gz lib_bz2 demo_bz2 lib_zip demo_zip md5
|
||||
tarballs: rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 glut_bz2 lib_zip demo_zip glut_zip md5
|
||||
|
||||
|
||||
rm_depend:
|
||||
@@ -394,6 +395,12 @@ demo_gz:
|
||||
gzip $(DEMO_NAME).tar ; \
|
||||
mv $(DEMO_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
glut_gz:
|
||||
cd .. ; \
|
||||
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
|
||||
gzip $(GLUT_NAME).tar ; \
|
||||
mv $(GLUT_NAME).tar.gz $(DIRECTORY)
|
||||
|
||||
lib_bz2:
|
||||
rm -f configs/current ; \
|
||||
cd .. ; \
|
||||
@@ -407,6 +414,12 @@ demo_bz2:
|
||||
bzip2 $(DEMO_NAME).tar ; \
|
||||
mv $(DEMO_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
glut_bz2:
|
||||
cd .. ; \
|
||||
tar -cf $(GLUT_NAME).tar $(GLUT_FILES) ; \
|
||||
bzip2 $(GLUT_NAME).tar ; \
|
||||
mv $(GLUT_NAME).tar.bz2 $(DIRECTORY)
|
||||
|
||||
lib_zip:
|
||||
rm -f configs/current ; \
|
||||
rm -f $(LIB_NAME).zip ; \
|
||||
@@ -420,6 +433,12 @@ demo_zip:
|
||||
zip -qr $(DEMO_NAME).zip $(DEMO_FILES) ; \
|
||||
mv $(DEMO_NAME).zip $(DIRECTORY)
|
||||
|
||||
glut_zip:
|
||||
rm -f $(GLUT_NAME).zip ; \
|
||||
cd .. ; \
|
||||
zip -qr $(GLUT_NAME).zip $(GLUT_FILES) ; \
|
||||
mv $(GLUT_NAME).zip $(DIRECTORY)
|
||||
|
||||
md5:
|
||||
@-md5sum $(LIB_NAME).tar.gz
|
||||
@-md5sum $(LIB_NAME).tar.bz2
|
||||
@@ -427,3 +446,6 @@ md5:
|
||||
@-md5sum $(DEMO_NAME).tar.gz
|
||||
@-md5sum $(DEMO_NAME).tar.bz2
|
||||
@-md5sum $(DEMO_NAME).zip
|
||||
@-md5sum $(GLUT_NAME).tar.gz
|
||||
@-md5sum $(GLUT_NAME).tar.bz2
|
||||
@-md5sum $(GLUT_NAME).zip
|
||||
|
@@ -12,7 +12,7 @@ TOP=.
|
||||
INCLUDE_DIR="/usr/local/include"
|
||||
LIB_DIR="/usr/local/lib"
|
||||
|
||||
if [ x$# == "x0" ] ; then
|
||||
if [ "x$#" = "x0" ] ; then
|
||||
echo
|
||||
echo "***** Mesa installation - You may need root privileges to do this *****"
|
||||
echo
|
||||
@@ -20,7 +20,7 @@ echo "Default directory for header files is:" ${INCLUDE_DIR}
|
||||
echo "Enter new directory or press <Enter> to accept this default."
|
||||
|
||||
read INPUT
|
||||
if [ x${INPUT} != "x" ] ; then
|
||||
if [ "x${INPUT}" != "x" ] ; then
|
||||
INCLUDE_DIR=${INPUT}
|
||||
fi
|
||||
|
||||
@@ -29,7 +29,7 @@ echo "Default directory for library files is:" ${LIB_DIR}
|
||||
echo "Enter new directory or press <Enter> to accept this default."
|
||||
|
||||
read INPUT
|
||||
if [ x${INPUT} != "x" ] ; then
|
||||
if [ "x${INPUT}" != "x" ] ; then
|
||||
LIB_DIR=${INPUT}
|
||||
fi
|
||||
|
||||
@@ -47,7 +47,14 @@ fi
|
||||
|
||||
# flags:
|
||||
# -f = force
|
||||
# -d = preserve symlinks
|
||||
# -d = preserve symlinks (does not work on BSD)
|
||||
|
||||
if [ `uname` = "FreeBSD" ] ; then
|
||||
CP_FLAGS="-f"
|
||||
else
|
||||
CP_FLAGS="-fd"
|
||||
fi
|
||||
|
||||
|
||||
set -v
|
||||
|
||||
@@ -56,7 +63,7 @@ mkdir ${INCLUDE_DIR}/GL
|
||||
mkdir ${INCLUDE_DIR}/GLES
|
||||
mkdir ${LIB_DIR}
|
||||
cp -f ${TOP}/include/GL/*.h ${INCLUDE_DIR}/GL
|
||||
cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
|
||||
cp -fd ${TOP}/lib*/lib* ${LIB_DIR}
|
||||
# NOT YET: cp -f ${TOP}/include/GLES/*.h ${INCLUDE_DIR}/GLES
|
||||
cp ${CP_FLAGS} ${TOP}/lib*/lib* ${LIB_DIR}
|
||||
|
||||
echo "Done."
|
||||
|
80
bin/mklib
80
bin/mklib
@@ -25,31 +25,6 @@
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo 'Usage: mklib [options] objects'
|
||||
echo 'Create a shared library from object files.'
|
||||
echo ' -o LIBRARY specifies the name of the resulting library, without'
|
||||
echo ' the leading "lib" or any suffix.'
|
||||
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
|
||||
echo ' -major N specifies major version number (default is 1)'
|
||||
echo ' -minor N specifies minor version number (default is 0)'
|
||||
echo ' -patch N specifies patch version number (default is 0)'
|
||||
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
||||
echo ' -LDIR search in DIR for library dependencies'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -cplusplus link with C++ runtime'
|
||||
echo ' -static make a static library (default is dynamic/shared)'
|
||||
echo ' -install DIR put resulting library file(s) in DIR'
|
||||
echo ' -arch ARCH override using `uname` to determine host system'
|
||||
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -h, --help display this information and exit'
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Option defaults
|
||||
#
|
||||
@@ -75,7 +50,26 @@ while true
|
||||
do
|
||||
case $1 in
|
||||
'-h' | '--help')
|
||||
usage;
|
||||
echo 'Usage: mklib [options] objects'
|
||||
echo 'Create a shared library from object files.'
|
||||
echo ' -o LIBRARY specifies the name of the resulting library, without'
|
||||
echo ' the leading "lib" or any suffix.'
|
||||
echo ' (eg: "-o GL" might result in "libGL.so" being made)'
|
||||
echo ' -major N specifies major version number (default is 1)'
|
||||
echo ' -minor N specifies minor version number (default is 0)'
|
||||
echo ' -patch N specifies patch version number (default is 0)'
|
||||
echo ' -lLIBRARY specifies a dependency on LIBRARY'
|
||||
echo ' -LDIR search in DIR for library dependencies'
|
||||
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
|
||||
echo ' Not observed on all systems at this time.'
|
||||
echo ' -cplusplus link with C++ runtime'
|
||||
echo ' -static make a static library (default is dynamic/shared)'
|
||||
echo ' -install DIR put resulting library file(s) in DIR'
|
||||
echo ' -arch ARCH override using `uname` to determine host system'
|
||||
echo ' -archopt OPT specify an extra achitecture-specific option OPT'
|
||||
echo " -noprefix don't prefix library name with 'lib' nor add any suffix"
|
||||
echo ' -exports FILE only export the symbols listed in FILE'
|
||||
echo ' -h, --help display this information and exit'
|
||||
exit 1
|
||||
;;
|
||||
'-o')
|
||||
@@ -198,6 +192,15 @@ case $ARCH in
|
||||
echo "mklib: Making" $ARCH "shared library: " ${LIBNAME}
|
||||
#OPTS="-shared -Wl,-soname,${LIBNAME}" # soname???
|
||||
OPTS="-shared"
|
||||
|
||||
# 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}" -a `uname -m` = "x86_64" ] ; then
|
||||
OPTS="-m32 ${OPTS}"
|
||||
fi
|
||||
|
||||
rm -f ${LIBNAME}
|
||||
# make lib
|
||||
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
@@ -306,11 +309,23 @@ case $ARCH in
|
||||
;;
|
||||
|
||||
'FreeBSD')
|
||||
# we assume gcc
|
||||
|
||||
if [ "x$LINK" = "x" ] ; then
|
||||
# -linker was not specified so set default link command now
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK=g++
|
||||
else
|
||||
LINK=gcc
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $NOPREFIX = 1 ] ; then
|
||||
# No "lib" or ".so" part
|
||||
echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
|
||||
OPTS="-shared"
|
||||
rm -f ${LIBNAME}
|
||||
ld -Bshareable -o ${LIBNAME} ${OBJECTS}
|
||||
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
|
||||
FINAL_LIBS=${LIBNAME}
|
||||
elif [ $STATIC = 1 ] ; then
|
||||
STLIB="lib${LIBNAME}.a"
|
||||
@@ -320,12 +335,13 @@ case $ARCH in
|
||||
ranlib ${STLIB}
|
||||
FINAL_LIBS=${STLIB}
|
||||
else
|
||||
SHLIB="lib${LIBNAME}.so.${MAJOR}.${MINOR}"
|
||||
SHLIB="lib${LIBNAME}.so.${MAJOR}"
|
||||
OPTS="-shared -Wl,-soname,${SHLIB}"
|
||||
echo "mklib: Making FreeBSD shared library: " ${SHLIB}
|
||||
rm -f ${SHLIB}
|
||||
ld -Bshareable -o ${SHLIB} ${OBJECTS}
|
||||
# XXX make lib${LIBNAME}.so.${MAJOR} symlink?
|
||||
FINAL_LIBS=${SHLIB}
|
||||
${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
|
||||
ln -sf ${SHLIB} "lib${LIBNAME}.so"
|
||||
FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -489,7 +505,7 @@ case $ARCH in
|
||||
else
|
||||
LIBNAME="lib${LIBNAME}.dylib"
|
||||
echo "mklib: Making Darwin shared library: " ${LIBNAME}
|
||||
FLAGS="-dynamiclib -multiply_defined suppress"
|
||||
FLAGS="-dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0"
|
||||
if [ $CPLUSPLUS = 1 ] ; then
|
||||
LINK="g++"
|
||||
else
|
||||
|
@@ -7,10 +7,10 @@ CONFIG_NAME = default
|
||||
|
||||
# Version info
|
||||
MESA_MAJOR=6
|
||||
MESA_MINOR=3
|
||||
MESA_MINOR=4
|
||||
MESA_TINY=1
|
||||
|
||||
# external projects
|
||||
# external projects. This should be useless now that we use libdrm.
|
||||
DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
|
||||
# Compiler and flags
|
||||
|
@@ -13,5 +13,4 @@ CFLAGS = -O2 -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
|
||||
CXXFLAGS = -O2 -fPIC -pedantic
|
||||
GLUT_CFLAGS = -fexceptions
|
||||
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
|
||||
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
|
||||
|
@@ -12,8 +12,9 @@ WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O
|
||||
|
||||
EXPAT_INCLUDES = -I/usr/local/include
|
||||
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
|
||||
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
DEFINES = -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
||||
CFLAGS = $(DEFINES) -Wmissing-prototypes -g -std=c99 -Wundef -fPIC \
|
||||
-ffast-math $(X11_INCLUDES)
|
||||
CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
|
||||
@@ -21,15 +22,16 @@ CXXFLAGS = $(DEFINES) -Wall -g -ansi -pedantic -fPIC
|
||||
ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
|
||||
DRI_LIB_DEPS = -L/usr/local/lib -lm -lpthread -lexpat $(LIBDRM_LIB)
|
||||
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread $(LIBDRM_LIB)
|
||||
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
|
||||
GLW_LIB_DEPS = -L$(LIB_DIR) -L/usr/X11R6/lib -lGL -lXt -lXm -lX11
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = mesa glu glut/glx glw glx/x11
|
||||
SRC_DIRS = glx/x11 mesa glu glut/glx glw
|
||||
DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM=dri
|
||||
@@ -38,6 +40,6 @@ DRM_SOURCE_PATH=$(TOP)/../drm
|
||||
|
||||
# ffb and gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
|
||||
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon tdfx \
|
||||
unichrome savage sis
|
||||
|
||||
|
@@ -22,9 +22,10 @@ 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
|
||||
-DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER \
|
||||
-DGLX_DIRECT_RENDERING -DHAVE_ALIAS
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
@@ -37,17 +38,31 @@ ASM_SOURCES =
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
|
||||
LIBDRM_LIB = `pkg-config --libs libdrm` -ldrm
|
||||
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)
|
||||
|
||||
|
||||
# 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
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM=dri
|
||||
|
||||
# gamma are missing because they have not been converted to use the new
|
||||
# interface.
|
||||
DRI_DIRS = dri_client i810 i830 i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 r300 radeon s3v \
|
||||
savage sis tdfx trident unichrome ffb
|
||||
|
@@ -13,5 +13,5 @@ ASM_SOURCES = $(PPC_SOURCES)
|
||||
|
||||
# Build only the drivers for cards that exist on PowerPC. At some point MGA
|
||||
# will be added, but not yet.
|
||||
DRI_DIRS = dri_client mach64 r128 r200 radeon tdfx
|
||||
DRI_DIRS = mach64 r128 r200 r300 radeon tdfx
|
||||
|
||||
|
@@ -19,5 +19,5 @@ EXTRA_LIB_PATH=-L/usr/X11R6/lib64
|
||||
# the new interface. i810 and i830 are missing because there is no x86-64
|
||||
# system where they could *ever* be used.
|
||||
#
|
||||
DRI_DIRS = dri_client i915 mach64 mga r128 r200 radeon tdfx unichrome savage
|
||||
DRI_DIRS = i915 mach64 mga r128 r200 radeon tdfx unichrome savage r300
|
||||
|
||||
|
49
configs/linux-indirect
Normal file
49
configs/linux-indirect
Normal file
@@ -0,0 +1,49 @@
|
||||
# -*-makefile-*-
|
||||
# Configuration for linux-indirect: Builds a libGL capable of indirect
|
||||
# rendering, but *NOT* capable of direct rendering.
|
||||
|
||||
include $(TOP)/configs/default
|
||||
|
||||
CONFIG_NAME = linux-dri
|
||||
|
||||
# Compiler and flags
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
|
||||
MKDEP = /usr/X11R6/bin/makedepend
|
||||
#MKDEP = gcc -M
|
||||
#MKDEP_OPTIONS = -MF depend
|
||||
|
||||
WARN_FLAGS = -Wall
|
||||
OPT_FLAGS = -O -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 -DHAVE_ALIAS
|
||||
|
||||
X11_INCLUDES = -I/usr/X11R6/include
|
||||
|
||||
CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
|
||||
$(ASM_FLAGS) -std=c99 -ffast-math
|
||||
|
||||
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
|
||||
|
||||
ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
EXTRA_LIB_PATH=-L/usr/X11R6/lib
|
||||
|
||||
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl
|
||||
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lm -lpthread -ldl
|
||||
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = glx/x11 glu glut/glx glw
|
||||
DRIVER_DIRS =
|
||||
PROGRAM_DIRS =
|
||||
WINDOW_SYSTEM=dri
|
@@ -28,16 +28,16 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES)
|
||||
ASM_SOURCES =
|
||||
|
||||
# Library/program dependencies
|
||||
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR) -lEGL -l$(GL_LIB)
|
||||
DRI_LIB_DEPS = -lm -lpthread -lexpat -ldl -L$(LIB_DIR)
|
||||
GL_LIB_DEPS = -lm -lpthread -ldl
|
||||
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
|
||||
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -lm
|
||||
APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lm -lpthread
|
||||
|
||||
# Directories
|
||||
SRC_DIRS = egl mesa glx/mini glu glut/mini
|
||||
SRC_DIRS = glx/mini mesa glu glut/mini
|
||||
DRIVER_DIRS = dri
|
||||
PROGRAM_DIRS = miniglx egl
|
||||
PROGRAM_DIRS = miniglx
|
||||
|
||||
#DRI_DIRS = ffb gamma sis savage
|
||||
DRI_DIRS = i810 i830 i915 mach64 mga r128 r200 radeon tdfx unichrome fb
|
||||
|
@@ -26,3 +26,7 @@ On Alpha platforms at default a sharable images for the libraries are created.
|
||||
To get a static library make it by typing MMS/MACRO=(NOSHARE=1).
|
||||
On VAX platforms only static libraries can be build.
|
||||
|
||||
|
||||
You may want to compile Mesa to use IEEE floating point arithmetic, instead
|
||||
of VAX floating point by specifying the /float=IEEE flag to the compiler.
|
||||
For more information see https://bugs.freedesktop.org/show_bug.cgi?id=4270
|
||||
|
37
docs/RELNOTES-6.3.2
Normal file
37
docs/RELNOTES-6.3.2
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
Mesa 6.3.2 Release Notes
|
||||
|
||||
August 19, 2005
|
||||
|
||||
|
||||
|
||||
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.2) designate stable releases.
|
||||
|
||||
|
||||
6.3.2 is primarily a bug-fix release. See the VERSIONS file for details.
|
||||
|
||||
|
||||
|
||||
Driver Status
|
||||
---------------------- ----------------------
|
||||
DRI drivers varies with the driver
|
||||
XMesa (Xlib) implements OpenGL 1.5
|
||||
OSMesa (off-screen) implements OpenGL 1.5
|
||||
Glide (3dfx Voodoo1/2) implements OpenGL 1.3
|
||||
SVGA implements OpenGL 1.3
|
||||
Wind River UGL implements OpenGL 1.3
|
||||
Windows/Win32 implements OpenGL 1.5
|
||||
DJGPP implements OpenGL 1.5
|
||||
GGI implements OpenGL 1.3
|
||||
BeOS implements OpenGL 1.5
|
||||
Allegro needs updating
|
||||
D3D needs updating
|
||||
|
||||
|
||||
----------------------------------------------------------------------
|
||||
$Id: RELNOTES-6.3.2,v 3.2 2005/08/19 16:57:50 brianp Exp $
|
50
docs/RELNOTES-6.4
Normal file
50
docs/RELNOTES-6.4
Normal file
@@ -0,0 +1,50 @@
|
||||
|
||||
Mesa 6.4 Release Notes
|
||||
|
||||
October 24, 2005
|
||||
|
||||
|
||||
|
||||
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 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,v 1.1.2.5 2005/10/24 23:12:29 brianp Exp $
|
47
docs/RELNOTES-6.4.1
Normal file
47
docs/RELNOTES-6.4.1
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
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 1.1.2.1 2005/11/30 01:15:15 brianp Exp $
|
@@ -1352,10 +1352,72 @@ Mesa Version History
|
||||
- fixed a few Darwin compilation problems
|
||||
|
||||
|
||||
6.3.1 July XX, 2005
|
||||
6.3.1
|
||||
This was an intermediate release for X.org which wasn't otherwise released.
|
||||
|
||||
|
||||
6.3.2 August 19, 2005
|
||||
New:
|
||||
- The distribution now includes the DRI drivers and GLX code
|
||||
Changes:
|
||||
- Made the DRI "new" driver interface standard, remove old code
|
||||
Bug fixes:
|
||||
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
|
||||
extensions string
|
||||
- negative relative addressing in vertex programs was broken
|
||||
- update/fix SPARC assembly code for vertex transformation
|
||||
- fixed memory leak when freeing GLX drawables/renderbuffers
|
||||
- fixed display list memory leak
|
||||
- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
|
||||
- wglGetProcAddress() didn't handle wgl-functions
|
||||
- fixed glxext.h cross-compile issue (Colin Harrison)
|
||||
- assorted DRI driver fixes
|
||||
|
||||
|
||||
6.4 October 24, 2005
|
||||
New:
|
||||
- Added a fast XOR line drawing function in Xlib driver
|
||||
- Added support for GL_ARB_texture_mirrored_repeat to savage
|
||||
driver (supported only on Savage4 hardware).
|
||||
Changes:
|
||||
- Mesa now packaged in three parts: Library, Demos and GLUT
|
||||
Bug fixes:
|
||||
- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
|
||||
- Some files were present multiple times in the 6.3.2 tarballs
|
||||
- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
|
||||
- glxgears_fbconfig demo didn't work (bug 4237)
|
||||
- fixed bug when bilinear sampling 2d textures with borders
|
||||
- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
|
||||
- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
|
||||
- fixed a few problems with proxy color tables (bug 4270)
|
||||
- fixed precision problem in Z clearing (bug 4395)
|
||||
- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
|
||||
- fixed potential segfault caused by reading pixels outside
|
||||
of renderbuffer bounds
|
||||
- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
|
||||
- fixed memory corruption bug involving software alpha buffers
|
||||
- glReadPixels clipped by window bounds was sometimes broken
|
||||
- glDraw/CopyPixels of stencil data ignored the stencil write mask
|
||||
- glReadPixels from a texture bound to a framebuffer object didn't work
|
||||
- glIsRender/FramebufferEXT weren't totally correct
|
||||
- fixed a number of point size attenuation/fade bugs
|
||||
- fixed glFogCoord bug 4729
|
||||
- GLX encoding for transpose matrix functions was broken
|
||||
- fixed broken fragment program KIL and SWZ instructions
|
||||
- fragment programs that wrote result.depth.z didn't work
|
||||
|
||||
|
||||
6.4.1 November 30, 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
|
||||
|
@@ -37,8 +37,6 @@ a:visited {
|
||||
|
||||
<b>Download / Install</b>
|
||||
<ul>
|
||||
<li><a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">Stable Release (6.2.1)</a>
|
||||
<li><a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">Devel Release (6.3)</a>
|
||||
<li><a href="download.html" target="MainFrame">Downloading/Unpacking</a>
|
||||
<li><a href="install.html" target="MainFrame">Compilation/Installation</a>
|
||||
<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
|
||||
@@ -82,6 +80,7 @@ a:visited {
|
||||
<ul>
|
||||
<li><a href="http://www.opengl.org" target="_parent">OpenGL website</a>
|
||||
<li><a href="http://dri.sourceforge.net" target="_parent">DRI website</a>
|
||||
<li><a href="http://www.freedesktop.org" target="_parent">freedesktop.org</a>
|
||||
<li><a href="games.html" target="MainFrame">Games and Entertainment</a>
|
||||
<li><a href="libraries.html" target="MainFrame">Libraries and Toolkits</a>
|
||||
<li><a href="modelers.html" target="MainFrame">Modeling and Rendering</a>
|
||||
@@ -90,9 +89,13 @@ a:visited {
|
||||
<li><a href="demos.html" target="MainFrame">Demos / other</a>
|
||||
</ul>
|
||||
|
||||
<b>Hosted by:</b>
|
||||
<br>
|
||||
<blockquote>
|
||||
<A HREF="http://sourceforge.net"
|
||||
target="_parent"><IMG SRC="http://sourceforge.net/sflogo.php?group_id=3&type=1"
|
||||
WIDTH="88" HEIGHT="31" ALIGN="BOTTOM" ALT="Sourceforge.net" BORDER="0"></A>
|
||||
</blockquote>
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -6,101 +6,125 @@
|
||||
|
||||
<BODY>
|
||||
|
||||
<H1>Downloading / Unpacking</H1>
|
||||
<H1>Downloading</H1>
|
||||
|
||||
<p>
|
||||
Mesa can be downloaded from the
|
||||
<a href="http://www.sourceforge.net/projects/mesa3d" target="_parent">
|
||||
SourceForge download area</A>.
|
||||
Current stable release: <b>6.4.1</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Since version 2.3, Mesa is distributed in two pieces: main library code
|
||||
and demos. If you're upgrading from a previous version of Mesa or you're not
|
||||
interested in the demos you can just download the core Mesa archive file.
|
||||
Primary download site:
|
||||
<a href="http://sourceforge.net/project/showfiles.php?group_id=3"
|
||||
target="_parent">SourceForge</a>
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
Mesa is distributed in several parts:
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>MesaLib-x.y.z</b> - the main Mesa library source code, drivers
|
||||
and documentation.
|
||||
</li>
|
||||
<li><b>MesaDemos-x.y.z</b> - OpenGL demonstration and test programs.
|
||||
Most of the programs require GLUT (either the
|
||||
<a href="http://www.opengl.org/resources/libraries/glut.html"
|
||||
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">OpenGLUT</a>).
|
||||
</li>
|
||||
<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.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
If you're not interested in running the demos, you'll only need the first
|
||||
package.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Mesa is available in at least three archive formats:
|
||||
The packages are available in .tar.gz, .tar.bz2 and .zip formats.
|
||||
Other organizations might offer additional package formats.
|
||||
</p>
|
||||
|
||||
<H1>Unpacking</H1>
|
||||
|
||||
<p>
|
||||
All the packages should be in the same directory prior to unpacking.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>To unpack .tar.gz files:
|
||||
<pre>
|
||||
1. GNU zip/tar
|
||||
|
||||
Download MesaLib-X.Y.tar.gz and optionally MesaDemos-X.Y.tar.gz
|
||||
Unpack with:
|
||||
gzcat MesaLib-X.Y.tar.gz | tar xf -
|
||||
gzcat MesaDemos-X.Y.tar.gz | tar xf -
|
||||
or
|
||||
gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
|
||||
gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
|
||||
or
|
||||
tar zxf MesaLib-X.Y.tar.gz
|
||||
tar zxf MesaDemos-X.Y.tar.gz
|
||||
|
||||
If you don't have gzcat try zcat instead.
|
||||
|
||||
2. Unix compressed/tar
|
||||
|
||||
Download MesaLib-X.Y.tar.Z and optionally MesaDemos-X.Y.tar.Z
|
||||
Unpack with:
|
||||
zcat MesaLib-X.Y.tar.Z | tar xf -
|
||||
zcat MesaDemos-X.Y.tar.Z | tar xf -
|
||||
|
||||
3. ZIP format
|
||||
|
||||
Download MesaLib-X.Y.zip and optionally MesaDemos-X.Y.zip
|
||||
Unpack with:
|
||||
unzip MesaLib-X.Y.zip
|
||||
unzip MesaDemos-X.Y.zip
|
||||
tar zxf MesaLib-X.Y.tar.gz
|
||||
tar zxf MesaDemos-X.Y.tar.gz
|
||||
tar zxf MesaGLUT-X.Y.tar.gz
|
||||
</pre>
|
||||
or
|
||||
<pre>
|
||||
gzcat MesaLib-X.Y.tar.gz | tar xf -
|
||||
gzcat MesaDemos-X.Y.tar.gz | tar xf -
|
||||
gzcat MesaGLUT-X.Y.tar.gz | tar xf -
|
||||
</pre>
|
||||
or
|
||||
<pre>
|
||||
gunzip MesaLib-X.Y.tar.gz ; tar xf MesaLib-X.Y.tar
|
||||
gunzip MesaDemos-X.Y.tar.gz ; tar xf MesaDemos-X.Y.tar
|
||||
gunzip MesaGLUT-X.Y.tar.gz ; tar xf MesaGLUT-X.Y.tar
|
||||
</pre>
|
||||
<li>To unpack .tar.bz2 files:
|
||||
<pre>
|
||||
bunzip2 -c MesaLib-X.Y.tar.gz | tar xf -
|
||||
bunzip2 -c MesaDemos-X.Y.tar.gz | tar xf -
|
||||
bunzip2 -c MesaGLUT-X.Y.tar.gz | tar xf -
|
||||
</pre>
|
||||
<li>To unpack .zip files:
|
||||
<pre>
|
||||
unzip MesaLib-X.Y.zip
|
||||
unzip MesaDemos-X.Y.zip
|
||||
unzip MesaGLUT-X.Y.zip
|
||||
</pre>
|
||||
</ul>
|
||||
|
||||
|
||||
<h1>Contents</h1>
|
||||
|
||||
<p>
|
||||
After unpacking you'll have these directories (and more):
|
||||
After unpacking you'll have these directories:
|
||||
</p>
|
||||
<pre>
|
||||
Makefile.X11 - top-level Makefile for X11-based systems
|
||||
Make-config - system configurations used by the Makefile.X11
|
||||
Makefile - top-level Makefile for most systems
|
||||
configs/ - makefile parameter files for various systems
|
||||
include/ - GL header (include) files
|
||||
bin/ - shell scripts for making shared libraries, etc
|
||||
lib/ - final client libraries, created during compilation
|
||||
docs/ - documentation
|
||||
src/ - source code for libraries
|
||||
src/mesa - sources for the main Mesa library and device drivers
|
||||
src/glu - libGLU source code
|
||||
src/glw - Xt/Motif/OpenGL widget code
|
||||
</pre>
|
||||
|
||||
If you downloaded and unpacked the MesaDemos.X.Y package:
|
||||
|
||||
and if you downloaded and unpacked the MesaDemos.X.Y archive:
|
||||
|
||||
src/glut - GLUT source code
|
||||
progs/ - OpenGL programs
|
||||
<pre>
|
||||
progs/demos - original Mesa demos
|
||||
progs/xdemos - GLX OpenGL/Mesa demos
|
||||
progs/redbook - examples from the OpenGL Programming Guide
|
||||
progs/samples - examples from SGI
|
||||
progs/images/ - image files
|
||||
</pre>
|
||||
|
||||
If you downloaded and unpacked the MesaGLUT.X.Y package:
|
||||
<pre>
|
||||
src/glut - GLUT library source code
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
Proceed to <a href="install.html">compilation and installation
|
||||
Proceed to the <a href="install.html">compilation and installation
|
||||
instructions</a>.
|
||||
</p>
|
||||
|
||||
<H1>GLUT</H1>
|
||||
|
||||
<p>
|
||||
Mesa 2.5 and later includes Mark Kilgard's GLUT library (GL Utility Toolkit).
|
||||
GLUT is built automatically on systems which support it.
|
||||
</p>
|
||||
<p>
|
||||
The GLUT tests, demos, examples, etc are not included, just the main library.
|
||||
To obtain the latest complete release of GLUT please visit the
|
||||
<a href="http://www.opengl.org/resources/libraries/glut.html"
|
||||
target ="_parent">GLUT page</a> on www.opengl.org.
|
||||
</p>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
@@ -16,7 +16,9 @@ Mesa supports the following environment variables:
|
||||
<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
|
||||
<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
|
||||
<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
|
||||
<li>MESA_DEBUG - if set, error messages are printed to stderr
|
||||
<li>MESA_DEBUG - if set, error messages are printed to stderr.
|
||||
If the value of MESA_DEBUG is "FP" floating point arithmetic errors will
|
||||
generate exceptions.
|
||||
<li>MESA_NO_DITHER - if set, disables dithering, overriding glEnable(GL_DITHER)
|
||||
</ul>
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
<center>
|
||||
<h1>Mesa Frequently Asked Questions</h1>
|
||||
Last updated: 17 November 2004
|
||||
Last updated: 21 October 2004
|
||||
</center>
|
||||
|
||||
<br>
|
||||
@@ -39,14 +39,14 @@ See the </a><a href="http://www.opengl.org/">OpenGL website</a> for more
|
||||
information.
|
||||
</p>
|
||||
<p>
|
||||
Mesa 5.x supports the OpenGL 1.4 specification.
|
||||
Mesa 6.x supports the OpenGL 1.5 specification.
|
||||
</p>
|
||||
|
||||
|
||||
<h2>1.2 Does Mesa support/use graphics hardware?</h2>
|
||||
<p>
|
||||
Yes. Specifically, Mesa serves as the OpenGL core for the open-source
|
||||
XFree86/DRI OpenGL drivers. See the <a href="http://dri.sf.net/">DRI
|
||||
Yes. Specifically, Mesa serves as the OpenGL core for the open-source DRI
|
||||
drivers for XFree86/X.org. See the <a href="http://dri.sf.net/">DRI
|
||||
website</a> for more information.
|
||||
</p>
|
||||
<p>
|
||||
@@ -62,7 +62,8 @@ operating systems today.
|
||||
Still, Mesa serves at least these purposes:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Mesa is used as the core of the open-source XFree86/DRI hardware drivers.
|
||||
<li>Mesa is used as the core of the open-source XFree86/X.org DRI
|
||||
hardware drivers.
|
||||
</li>
|
||||
<li>Mesa is quite portable and allows OpenGL to be used on systems
|
||||
that have no other OpenGL solution.
|
||||
@@ -86,8 +87,8 @@ Still, Mesa serves at least these purposes:
|
||||
<h2>1.4 What's the difference between"Stand-Alone" Mesa and the DRI drivers?</h2>
|
||||
<p>
|
||||
<em>Stand-alone Mesa</em> is the original incarnation of Mesa.
|
||||
On systems running the X Window System, it does all its rendering through
|
||||
the Xlib API.
|
||||
On systems running the X Window System it does all its rendering through
|
||||
the Xlib API:
|
||||
<ul>
|
||||
<li>The GLX API is supported, but it's really just an emulation of the
|
||||
real thing.
|
||||
@@ -116,21 +117,10 @@ within the DRI (Direct Rendering Infrastructure):
|
||||
|
||||
<h2>1.5 How do I upgrade my DRI installation to use a new Mesa release?</h2>
|
||||
<p>
|
||||
You don't! A copy of the Mesa source code lives inside the XFree86/DRI source
|
||||
tree and gets compiled into the individual DRI driver modules.
|
||||
If you try to install Mesa over an XFree86/DRI installation, you'll lose
|
||||
hardware rendering (because stand-alone Mesa's libGL.so is different than
|
||||
the XFree86 libGL.so).
|
||||
</p>
|
||||
<p>
|
||||
The DRI developers will incorporate the latest release of Mesa into the
|
||||
DRI drivers when the time is right.
|
||||
</p>
|
||||
<p>
|
||||
To upgrade, either look for a new release of <a href="http://www.xfree86.org"
|
||||
target="_parent">XFree86</a> or visit the
|
||||
<a href="http://dri.sf.net" target="_parent">DRI website</a> to see
|
||||
if there's newer drivers.
|
||||
This wasn't easy in the past.
|
||||
Now, the DRI drivers are included in the Mesa tree and can be compiled
|
||||
separately from the X server.
|
||||
Just follow the Mesa <a href="install.html">compilation instructions</a>.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -201,7 +191,7 @@ Mesa no longer supports GNU autoconf/automake. Why?
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
Now, Mesa again uses a conventional Makefile system (as it did originally).
|
||||
Now Mesa again uses a conventional Makefile system (as it did originally).
|
||||
Basically, each Makefile in the tree includes one of the configuration
|
||||
files from the config/ directory.
|
||||
The config files specify all the variables for a variety of popular systems.
|
||||
@@ -219,9 +209,9 @@ Mesa's not the solution.
|
||||
|
||||
<h2><a name="part2">2.4 Where is the GLUT library?</a></h2>
|
||||
<p>
|
||||
<a name="part2">GLUT (OpenGL Utility Toolkit) is in the separate MesaDemos-x.y.z.tar.gz file.
|
||||
If you don't already have GLUT installed, you should grab the MesaDemos
|
||||
package and unpack it before compiling Mesa.
|
||||
<a name="part2">GLUT (OpenGL Utility Toolkit) is in the separate MesaGLUT-x.y.z.tar.gz file.
|
||||
If you don't already have GLUT installed, you should grab the MesaGLUT
|
||||
package and compile it with the rest of Mesa.
|
||||
</a></p>
|
||||
|
||||
|
||||
@@ -250,7 +240,7 @@ Mesa version number.
|
||||
version number.
|
||||
</li></ul>
|
||||
<p>
|
||||
After installing XFree86 and the DRI drivers, some of these files
|
||||
After installing XFree86/X.org and the DRI drivers, some of these files
|
||||
may be symlinks into the /usr/X11R6/ tree.
|
||||
</p>
|
||||
<p>
|
||||
|
@@ -24,7 +24,7 @@ We're no longer developing the original Mesa GLU library.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The new SI GLU library code is included in the Mesa package.
|
||||
The SI GLU library code is included in the Mesa distribution.
|
||||
You don't have to download it separately.
|
||||
</p>
|
||||
|
||||
|
@@ -146,7 +146,8 @@ I continue to enhance Mesa with new extensions and features.
|
||||
|
||||
<p>
|
||||
This is a summary of the major versions of Mesa. Note that Mesa's major
|
||||
version number tracks OpenGL's minor version number.
|
||||
version number tracks OpenGL's minor version number (+1).
|
||||
Work is underway to implement the OpenGL 2.0 specification.
|
||||
</p>
|
||||
|
||||
|
||||
@@ -162,10 +163,11 @@ extensions incorporated as standard features:
|
||||
</ul>
|
||||
<p>
|
||||
Also note that several OpenGL tokens were renamed in OpenGL 1.5
|
||||
for the sake of consistency. The old names will still be valid.
|
||||
for the sake of consistency.
|
||||
The old tokens are still available.
|
||||
</p>
|
||||
<pre>
|
||||
New Name Old Name
|
||||
New Token Old Token
|
||||
------------------------------------------------------------
|
||||
GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
|
||||
GL_FOG_COORD GL_FOG_COORDINATE
|
||||
|
@@ -13,17 +13,18 @@ The Mesa distribution consists of several components. Different copyrights
|
||||
and licenses apply to different components. For example, GLUT is copyrighted
|
||||
by Mark Kilgard, some demo programs are copyrighted by SGI, some of the Mesa
|
||||
device drivers are copyrighted by their authors. See below for a list of
|
||||
Mesa's components and the copyright/license for each.
|
||||
Mesa's main components and the license for each.
|
||||
</p>
|
||||
<p>
|
||||
The core Mesa library is licensed according to the terms of the XFree86
|
||||
copyright (an MIT-style license). This allows integration with the
|
||||
XFree86/DRI project. Unless otherwise stated, the Mesa source code and
|
||||
documentation is licensed as follows:
|
||||
The core Mesa library is licensed according to the terms of the MIT license.
|
||||
This allows integration with the XFree86, Xorg and DRI projects.
|
||||
</p>
|
||||
<p>
|
||||
The default Mesa license is as follows:
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
Copyright (C) 1999-2003 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
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -47,70 +48,38 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
<H1>Attention, Contributors</H1>
|
||||
|
||||
<p>
|
||||
When contributing to the Mesa project you must agree to relinquish your
|
||||
work to the holder of the copyright for the particular component you're
|
||||
contributing to. That is, you can't put your own copyright on the code,
|
||||
unless it's a modular piece that can be omitted from Mesa (like a new
|
||||
device driver). If for example, you contribute a bug fix to Mesa's
|
||||
texture mapping code, your code will become a part of the body of work
|
||||
which is copyrighted by Brian Paul and licensed by the above terms.
|
||||
When contributing to the Mesa project you must agree to the licensing terms
|
||||
of the component to which you're contributing.
|
||||
The following section lists the primary components of the Mesa distribution
|
||||
and their respective licenses.
|
||||
</p>
|
||||
|
||||
|
||||
<H1>Mesa Component Licenses</H1>
|
||||
|
||||
<pre>
|
||||
Mesa Component Licenses:
|
||||
|
||||
Component Files Primary Author License
|
||||
Component Location Primary Author License
|
||||
----------------------------------------------------------------------------
|
||||
core Mesa code src/*.[ch] Brian Paul Mesa
|
||||
include/GL/gl.h
|
||||
Main Mesa code src/mesa/ Brian Paul Mesa (MIT)
|
||||
|
||||
GLX driver src/X/* Brian Paul Mesa
|
||||
include/GL/glx.h
|
||||
include/GL/xmesa.h
|
||||
Device drivers src/mesa/drivers/* See drivers See drivers
|
||||
|
||||
OS/Mesa driver src/OSmesa/* Brian Paul Mesa
|
||||
include/GL/osmesa.h
|
||||
Ext headers include/GL/glext.h SGI SGI Free B
|
||||
include/GL/glxext.h
|
||||
|
||||
3Dfx driver src/FX/* David Bucciarelli Mesa
|
||||
include/GL/fxmesa.h
|
||||
GLUT src/glut/ Mark Kilgard Mark's copyright
|
||||
|
||||
BeOS R4 driver src/BeOS/* Brian Paul Mesa
|
||||
Mesa GLU library src/glu/mesa/ Brian Paul GNU-LGPL
|
||||
|
||||
MGL driver src/MGL/* SciTech, Inc SciTech copyright
|
||||
include/GL/mglmesa.h
|
||||
SGI GLU library src/glu/sgi/ SGI SGI Free B
|
||||
|
||||
Windows driver src/Windows/* Li Wei copyright by Li Wei
|
||||
include/GL/wmesa.h
|
||||
demo programs progs/demos/ various see source files
|
||||
|
||||
SVGA driver src/SVGA/* Brian Paul GNU-LGPL
|
||||
include/GL/svgamesa.h
|
||||
X demos progs/xdemos/ Brian Paul see source files
|
||||
|
||||
DOS driver src/DOS/* Charlie Wallace GNU-LGPL
|
||||
include/GL/dosmesa.h
|
||||
SGI demos progs/samples/ SGI SGI copyright
|
||||
|
||||
GGI driver src/GGI/* Uwe Maurer GNU-LGPL
|
||||
include/GL/ggimesa.h
|
||||
|
||||
S3 driver src/S3/* S3, Inc. S3 copyright
|
||||
|
||||
GLUT src-glut/* Mark Kilgard Mark's copyright
|
||||
include/GL/*glut*.h
|
||||
|
||||
GLU library src-glu/* Brian Paul GNU-LGPL
|
||||
|
||||
SI GLU library si-glu/* SGI SGI Free B
|
||||
include/GL/glu.h
|
||||
|
||||
Ext registry include/GL/glext.h SGI SGI Free B
|
||||
include/GL/glxext.h
|
||||
|
||||
demo programs demos/* various see source files
|
||||
|
||||
X demos xdemos/* Brian Paul see source files
|
||||
|
||||
SGI demos samples/* SGI SGI copyright
|
||||
|
||||
RedBook demos book/* SGI SGI copyright
|
||||
RedBook demos progs/redbook/ SGI SGI copyright
|
||||
</pre>
|
||||
|
||||
</body>
|
||||
|
@@ -32,7 +32,7 @@
|
||||
- VRML viewer
|
||||
</li><li><a href="http://aig.cs.man.ac.uk/systems/Maverik/" target="_parent">Maverik</a>
|
||||
- VR graphics and interaction system
|
||||
</li><li><a href="http://www.swissquake.ch/chumb.alum-soft" target="_parent">MD2 Viewer</a>
|
||||
</li><li><a href="http://www.swissquake.ch/chumbalum-soft/md2v" target="_parent">MD2 Viewer</a>
|
||||
- View .MD2 files
|
||||
</li><li><a href="http://www.megacads.dlr.de/" target="_parent">MegaCads</a>
|
||||
- Multiblock-Elliptic-Grid-Generation-And-CAD-System
|
||||
|
117
docs/news.html
117
docs/news.html
@@ -11,6 +11,121 @@
|
||||
<H1>News</H1>
|
||||
|
||||
|
||||
<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>
|
||||
TBD
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>October 24, 2005</h2>
|
||||
<p>
|
||||
Mesa 6.4 has been released. This is a stable, bug-fix release.
|
||||
</p>
|
||||
<pre>
|
||||
New:
|
||||
- Added a fast XOR line drawing function in Xlib driver
|
||||
- Added support for GL_ARB_texture_mirrored_repeat to savage
|
||||
driver (supported only on Savage4 hardware).
|
||||
Changes:
|
||||
- Mesa now packaged in three parts: Library, Demos and GLUT
|
||||
Bug fixes:
|
||||
- GLX_X_RENDERABLE token wasn't accepted by glXChooseFBConfig
|
||||
- Some files were present multiple times in the 6.3.2 tarballs
|
||||
- r200_vtxtmp_x86.S file was missing from 6.3.2 tarball (bug 4207)
|
||||
- glxgears_fbconfig demo didn't work (bug 4237)
|
||||
- fixed bug when bilinear sampling 2d textures with borders
|
||||
- glXCreatePbuffer() could segfault instead of returning 0 (bug 4235)
|
||||
- fixed undefined frexp and rand in X.org libGLcore.a (bug 4242)
|
||||
- fixed a few problems with proxy color tables (bug 4270)
|
||||
- fixed precision problem in Z clearing (bug 4395)
|
||||
- glBitmap, glDraw/CopyPixels mistakenly generated selection hits
|
||||
- fixed potential segfault caused by reading pixels outside
|
||||
of renderbuffer bounds
|
||||
- glGetTexLevelParameter didn't accept GL_TEXTURE_DEPTH_SIZE_ARB
|
||||
- fixed memory corruption bug involving software alpha buffers
|
||||
- glReadPixels clipped by window bounds was sometimes broken
|
||||
- glDraw/CopyPixels of stencil data ignored the stencil write mask
|
||||
- glReadPixels from a texture bound to a framebuffer object didn't work
|
||||
- glIsRender/FramebufferEXT weren't totally correct
|
||||
- fixed a number of point size attenuation/fade bugs
|
||||
- fixed glFogCoord bug 4729
|
||||
- GLX encoding for transpose matrix functions was broken
|
||||
- fixed broken fragment program KIL and SWZ instructions
|
||||
</pre>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
<pre>
|
||||
1cce0c1eb4fd15e9dfe837a1ce0c9812 MesaLib-6.4.tar.gz
|
||||
85a84e47a3f718f752f306b9e0954ef6 MesaLib-6.4.tar.bz2
|
||||
b976fea4f3ee06354c53f91b6e3f2ffc MesaLib-6.4.zip
|
||||
d8734f2c69bcf7ef9f5ae454a85743ba MesaDemos-6.4.tar.gz
|
||||
1a8c4d4fc699233f5fdb902b8753099e MesaDemos-6.4.tar.bz2
|
||||
607ab7c7a7de0cc5febbdde2bfa03098 MesaDemos-6.4.zip
|
||||
3260156f66174322a092be0767962d34 MesaGLUT-6.4.tar.gz
|
||||
0465d053f83775f44a12dec4050dfd78 MesaGLUT-6.4.tar.bz2
|
||||
02abfcdcdf72ba938ae00f6e3b70fbe0 MesaGLUT-6.4.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>August 19, 2005</h2>
|
||||
<p>
|
||||
Mesa 6.3.2 has been released.
|
||||
Note: there was no public release of version 6.3.1.
|
||||
</p>
|
||||
<pre>
|
||||
New:
|
||||
- The distribution now includes the DRI drivers and GLX code
|
||||
Changes:
|
||||
- Made the DRI "new" driver interface standard, remove old code
|
||||
Bug fixes:
|
||||
- GL_ARB_vertex/fragment_shader were mistakenly listed in the
|
||||
extensions string
|
||||
- negative relative addressing in vertex programs was broken
|
||||
- update/fix SPARC assembly code for vertex transformation
|
||||
- fixed memory leak when freeing GLX drawables/renderbuffers
|
||||
- fixed display list memory leak
|
||||
- the GL_PIXEL_MAP_I_TO_I table is now floating point, not integer
|
||||
- wglGetProcAddress() didn't handle wgl-functions
|
||||
- fixed glxext.h cross-compile issue (Colin Harrison)
|
||||
- assorted DRI driver fixes
|
||||
</pre>
|
||||
<p>
|
||||
The MD5 checksums are:
|
||||
</p>
|
||||
<pre>
|
||||
98192e45ed8d69113688f89f90869346 MesaLib-6.3.2.tar.gz
|
||||
0df27701df0924d17ddf41185efa8ce1 MesaLib-6.3.2.tar.bz2
|
||||
ccb2423aab77fc7e81ce628734586140 MesaLib-6.3.2.zip
|
||||
9d0fca0a7d051c34a0b485423fb3e85d MesaDemos-6.3.2.tar.gz
|
||||
96708868450c188205e42229b5d813c4 MesaDemos-6.3.2.tar.bz2
|
||||
c5102501e609aa8996d832fafacb8ab9 MesaDemos-6.3.2.zip
|
||||
</pre>
|
||||
|
||||
|
||||
<h2>July 20, 2005</h2>
|
||||
<p>
|
||||
Mesa 6.3 has been released.
|
||||
@@ -1016,6 +1131,6 @@ source code</a>.</p>
|
||||
|
||||
|
||||
<hr>
|
||||
$Id: news.html,v 3.22 2005/07/20 18:20:45 brianp Exp $
|
||||
$Id: news.html,v 3.24.2.4 2005/11/30 01:15:50 brianp Exp $
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -13,7 +13,9 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="RELNOTES-6.3.1">RELNOTES-6.3.1</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.3.2">RELNOTES-6.3.2</A>
|
||||
<LI><A HREF="RELNOTES-6.3">RELNOTES-6.3</A>
|
||||
<LI><A HREF="RELNOTES-6.2.1">RELNOTES-6.2.1</A>
|
||||
<LI><A HREF="RELNOTES-6.2">RELNOTES-6.2</A>
|
||||
|
@@ -14,98 +14,43 @@ supported on those systems. All you need is an ANSI C compiler and the
|
||||
X development environment to use Mesa.
|
||||
</p>
|
||||
|
||||
<p>Others have contributed drivers
|
||||
for the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows
|
||||
<p>
|
||||
The DRI hardware drivers for the X.org server and XFree86 provide
|
||||
hardware accelerated rendering for chips from ATI, Intel, Matrox, 3dfx
|
||||
and others on Linux and FreeBSD.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Drivers for other assorted platforms include:
|
||||
the Amiga, Apple Macintosh, BeOS, NeXT, OS/2, MS-DOS, VMS, Windows
|
||||
9x/NT, and Direct3D.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The following files describe the details for various platforms.
|
||||
Be warned, some of these files (and drivers) may be very out of date.
|
||||
Details about particular drivers follows.
|
||||
Be warned that some drivers may be out of date and no longer function.
|
||||
</p>
|
||||
|
||||
<UL>
|
||||
<LI><A HREF="README.X11">README.X11</A> - X Window System / Unix / Linux
|
||||
<LI><A HREF="README.WIN32">README.WIN32</A> - Microsoft Windows
|
||||
<LI><A HREF="README.VMS">README.VMS</A> - DEC VMS
|
||||
<LI><A HREF="README.GGI">README.GGI</A> - GGI
|
||||
<LI><A HREF="README.3DFX">README.3DFX</A> - 3Dfx/Glide driver
|
||||
<LI><A HREF="README.AMIWIN">README.AMIWIN</A> - Amiga Amiwin
|
||||
<LI><A HREF="README.BEOS">README.BEOS</A> - BeOS
|
||||
<LI><A HREF="README.D3D">README.D3D</A> - Direct3D driver
|
||||
<LI><A HREF="README.DJ">README.DJ</A> - DJGPP
|
||||
<LI><A HREF="README.LYNXOS">README.LYNXOS</A> - LynxOS
|
||||
<LI><A HREF="README.MINGW32">README.MINGW32</A> - Mingw32
|
||||
<LI><A HREF="README.NeXT">README.NeXT</A> - NeXT
|
||||
<LI><A HREF="README.OpenStep">README.OpenStep</A> - OpenStep
|
||||
<LI><A HREF="README.OS2">README.OS2</A> - OS/2
|
||||
<LI><A HREF="README.WINDML">README.WINDML</A> - WindML
|
||||
<LI>Xlib driver for the X Window System <A HREF="README.X11">(README.X11)</A>
|
||||
<li><a href="http://dri.sourceforge.net/" target="_parent">
|
||||
DRI hardware drivers</a> for the X window system
|
||||
<LI>Microsoft Windows <A HREF="README.WIN32">(README.WIN32)</A>
|
||||
<LI>DEC VMS <A HREF="README.VMS">(README.VMS)</A>
|
||||
<LI>3dfx/Glide <A HREF="README.3DFX">(README.3DFX)</A>
|
||||
<LI>GGI <A HREF="README.GGI">(README.GGI)</A>
|
||||
<LI>Amiga Amiwin <A HREF="README.AMIWIN">(README.AMIWIN)</A>
|
||||
<LI>BeOS <A HREF="README.BEOS">(README.BEOS)</A>
|
||||
<LI>Direct3D driver <A HREF="README.D3D">(README.D3D)</A>
|
||||
<LI>DJGPP <A HREF="README.DJ">(README.DJ)</A>
|
||||
<LI>LynxOS <A HREF="README.LYNXOS">(README.LYNXOS)</A>
|
||||
<LI>Mingw32 <A HREF="README.MINGW32">(README.MINGW32)</A>
|
||||
<LI>NeXT <A HREF="README.NeXT">(README.NeXT)</A>
|
||||
<LI>OpenStep <A HREF="README.OpenStep">(README.OpenStep)</A>
|
||||
<LI>OS/2 <A HREF="README.OS2">(README.OS2)</A>
|
||||
<LI>WindML <A HREF="README.WINDML">(README.WINDML)</A>
|
||||
<LI><a href="http://utah-glx.sourceforge.net/" target="_parent">Utah GLX drivers</a>
|
||||
</UL>
|
||||
|
||||
|
||||
<p>
|
||||
The standard Mesa distribution only supports software-based rendering, with
|
||||
the exception of the 3Dfx Glide driver.
|
||||
Information about other hardware support follows.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>DRI-based hardware support for 3dfx, Intel, Matrox, ATI with XFree86
|
||||
<blockquote>
|
||||
<p>The <a href="http://dri.sourceforge.net/" target="_parent">DRI architecture</a>,
|
||||
originally developed by Precision Insight, Inc. uses Mesa and
|
||||
provides hardware acceleration for a number of popular chipsets.<br>
|
||||
<br>
|
||||
The DRI is part of XFree86 4.0 and later.
|
||||
<br><br>
|
||||
If you download and install XFree86 4.x you do not need to
|
||||
install Mesa separately. All the important parts of Mesa
|
||||
will be installed with the rest of XFree86.
|
||||
</blockquote>
|
||||
|
||||
|
||||
<li>3dfx Voodoo1, Voodoo2, Voodoo Rush, Voodoo Banshee, Voodoo3
|
||||
<blockquote>
|
||||
<p>All cards based on these chipsets should work with Linux and
|
||||
Windows 95 via 3dfx's Glide library.
|
||||
The Mesa/Glide driver is included with the Mesa distribution.
|
||||
You'll need to install the Glide header files and runtime library.
|
||||
</p>
|
||||
<p>
|
||||
David Bucciarelli wrote the original 3dfx driver for Mesa.<br>
|
||||
Daryll Strauss ported Glide to Linux.
|
||||
</p>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<li>Matrox G200/G400, nVidia RIVA, ATI Rage Pro, Intel i810 on Linux
|
||||
<blockquote>
|
||||
<p>The <a href="http://utah-glx.sourceforge.net/" target="_parent">
|
||||
Utah GLX project</a>
|
||||
(no longer active) developed drivers for these chipsets and others.
|
||||
</blockquote>
|
||||
|
||||
<li>Amiga Warp3D
|
||||
<blockquote>
|
||||
<p>Amiga systems can support 3D hardware with the Warp3D API.
|
||||
See <a href="http://www.haage-partner.com/3dworld" target="_parent">here</a>.
|
||||
</blockquote>
|
||||
|
||||
<li>Also see
|
||||
<blockquote>
|
||||
<p><a href="http://www.linux3d.org/" target="_parent">www.linux3d.org</a> for
|
||||
other 3D hardware info for Linux.
|
||||
</blockquote>
|
||||
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<b><em>Note:</em></b>
|
||||
If you have NVIDIA hardware in your computer,
|
||||
you should download and install NVIDIA's OpenGL library. You may
|
||||
however, want to download Mesa in order to use its GLU and GLUT
|
||||
libraries, or assorted demo programs.</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
@@ -347,6 +347,8 @@ typedef long long int int64_t;
|
||||
#include <inttypes.h>
|
||||
#elif defined(__SCO__) || defined(__USLC__)
|
||||
#include <stdint.h>
|
||||
#elif defined(WIN32) && defined(__GNUC__)
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifndef GLX_VERSION_1_3
|
||||
|
@@ -38,14 +38,7 @@
|
||||
#ifndef DRI_INTERFACE_H
|
||||
#define DRI_INTERFACE_H
|
||||
|
||||
#if 0 /*ndef DRI_NEW_INTERFACE_ONLY*/
|
||||
# include <X11/X.h>
|
||||
# include <GL/glx.h>
|
||||
# include "GL/glxint.h"
|
||||
#endif
|
||||
|
||||
#include <GL/internal/glcore.h>
|
||||
#include <xf86drm.h>
|
||||
#include <drm.h>
|
||||
|
||||
/**
|
||||
|
@@ -71,7 +71,9 @@ static void Display( void )
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glDisable(GL_FOG);
|
||||
|
||||
if (!DrawFront)
|
||||
if (DrawFront)
|
||||
glFinish();
|
||||
else
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
@@ -26,6 +26,7 @@
|
||||
static GLint T0 = 0;
|
||||
static GLint Frames = 0;
|
||||
static GLint autoexit = 0;
|
||||
static GLint win = 0;
|
||||
|
||||
|
||||
/**
|
||||
@@ -163,6 +164,15 @@ static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
|
||||
static GLint gear1, gear2, gear3;
|
||||
static GLfloat angle = 0.0;
|
||||
|
||||
static void
|
||||
cleanup(void)
|
||||
{
|
||||
glDeleteLists(gear1, 1);
|
||||
glDeleteLists(gear2, 1);
|
||||
glDeleteLists(gear3, 1);
|
||||
glutDestroyWindow(win);
|
||||
}
|
||||
|
||||
static void
|
||||
draw(void)
|
||||
{
|
||||
@@ -198,16 +208,18 @@ draw(void)
|
||||
Frames++;
|
||||
|
||||
{
|
||||
GLint t = glutGet(GLUT_ELAPSED_TIME);
|
||||
if (t - T0 >= 5000) {
|
||||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
if ((t >= 999.0 * autoexit) && (autoexit))
|
||||
exit(0);
|
||||
}
|
||||
GLint t = glutGet(GLUT_ELAPSED_TIME);
|
||||
if (t - T0 >= 5000) {
|
||||
GLfloat seconds = (t - T0) / 1000.0;
|
||||
GLfloat fps = Frames / seconds;
|
||||
printf("%d frames in %6.3f seconds = %6.3f FPS\n", Frames, seconds, fps);
|
||||
T0 = t;
|
||||
Frames = 0;
|
||||
if ((t >= 999.0 * autoexit) && (autoexit)) {
|
||||
cleanup();
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +234,9 @@ idle(void)
|
||||
dt = t - t0;
|
||||
t0 = t;
|
||||
|
||||
angle += 70.0 * dt; /* 90 degrees per second */
|
||||
angle += 70.0 * dt; /* 70 degrees per second */
|
||||
angle = fmod(angle, 360.0); /* prevents eventual overflow */
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
@@ -239,6 +253,7 @@ key(unsigned char k, int x, int y)
|
||||
view_rotz -= 5.0;
|
||||
break;
|
||||
case 27: /* Escape */
|
||||
cleanup();
|
||||
exit(0);
|
||||
break;
|
||||
default:
|
||||
@@ -352,7 +367,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
glutInitWindowPosition(0, 0);
|
||||
glutInitWindowSize(300, 300);
|
||||
glutCreateWindow("Gears");
|
||||
win = glutCreateWindow("Gears");
|
||||
init(argc, argv);
|
||||
|
||||
glutDisplayFunc(draw);
|
||||
|
@@ -186,11 +186,12 @@ Display( void )
|
||||
else {
|
||||
/* clear the temporary image to white (helpful for debugging */
|
||||
memset(TempImage, 255, ImgWidth * ImgHeight * 4);
|
||||
#if 0
|
||||
/* you might use this when debugging */
|
||||
#if 1
|
||||
glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
|
||||
ReadFormat, ReadType, TempImage);
|
||||
(void) ComplexReadPixels;
|
||||
#else
|
||||
/* you might use this when debugging */
|
||||
ComplexReadPixels(APosX, APosY, ImgWidth, ImgHeight,
|
||||
ReadFormat, ReadType, TempImage);
|
||||
#endif
|
||||
|
@@ -25,35 +25,35 @@ default: $(PROGRAMS)
|
||||
|
||||
|
||||
demo1: demo1.o $(LIB_DIR)/libEGL.so
|
||||
$(CC) demo1.o -L$(LIB_DIR) -lEGL -o $@
|
||||
$(CC) $(CFLAGS) demo1.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
|
||||
|
||||
demo1.o: demo1.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -I$(TOP)/include demo1.c
|
||||
|
||||
|
||||
demo2: demo2.o $(LIB_DIR)/libEGL.so
|
||||
$(CC) demo2.o -L$(LIB_DIR) -lEGL $(APP_LIB_DEPS) -o $@
|
||||
$(CC) $(CFLAGS) demo2.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
|
||||
|
||||
demo2.o: demo2.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -I$(TOP)/include demo2.c
|
||||
|
||||
|
||||
demo3: demo3.o $(LIB_DIR)/libEGL.so
|
||||
$(CC) demo3.o -L$(LIB_DIR) -lEGL $(APP_LIB_DEPS) -o $@
|
||||
$(CC) $(CFLAGS) demo3.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
|
||||
|
||||
demo3.o: demo3.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -I$(TOP)/include demo3.c
|
||||
|
||||
|
||||
eglinfo: eglinfo.o $(LIB_DIR)/libEGL.so
|
||||
$(CC) eglinfo.o -L$(LIB_DIR) -lEGL -o $@
|
||||
$(CC) $(CFLAGS) eglinfo.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
|
||||
|
||||
eglinfo.o: eglinfo.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c
|
||||
|
||||
|
||||
eglgears: eglgears.o $(LIB_DIR)/libEGL.so
|
||||
$(CC) eglgears.o -L$(LIB_DIR) -lEGL $(APP_LIB_DEPS) -o $@
|
||||
$(CC) $(CFLAGS) eglgears.o -L$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
|
||||
|
||||
eglgears.o: eglgears.c $(HEADERS)
|
||||
$(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c
|
||||
|
@@ -576,7 +576,7 @@ main(int argc, char *argv[])
|
||||
/*
|
||||
EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
*/
|
||||
EGLDisplay d = eglGetDisplay("!fb_dri");
|
||||
EGLDisplay d = eglGetDisplay(":0");
|
||||
assert(d);
|
||||
|
||||
if (!eglInitialize(d, &maj, &min)) {
|
||||
@@ -602,7 +602,7 @@ main(int argc, char *argv[])
|
||||
printf("failed to create screen surface\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
eglShowSurfaceMESA(d, screen, screen_surf, mode);
|
||||
|
||||
b = eglMakeCurrent(d, screen_surf, screen_surf, ctx);
|
||||
@@ -610,25 +610,24 @@ main(int argc, char *argv[])
|
||||
printf("make current failed\n");
|
||||
return 0;
|
||||
}
|
||||
glViewport(0, 0, 1024, 768);
|
||||
|
||||
Init();
|
||||
|
||||
Init();
|
||||
Reshape(1024, 768);
|
||||
|
||||
glDrawBuffer( GL_FRONT );
|
||||
glClearColor( 0,
|
||||
1.0,
|
||||
0,
|
||||
1);
|
||||
glDrawBuffer( GL_FRONT );
|
||||
glClearColor( 0, 1.0, 0, 1);
|
||||
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
doubleBuffer = 1;
|
||||
glDrawBuffer( GL_BACK );
|
||||
doubleBuffer = 1;
|
||||
glDrawBuffer( GL_BACK );
|
||||
|
||||
Draw(d, screen_surf);
|
||||
|
||||
|
||||
write_ppm("dump.ppm", ((struct fb_display *)_eglLookupDisplay(d))->pFB, 1024, 768);
|
||||
|
||||
|
||||
eglDestroySurface(d, screen_surf);
|
||||
eglDestroyContext(d, ctx);
|
||||
eglTerminate(d);
|
||||
|
@@ -87,9 +87,9 @@ static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
|
||||
static GLint gear1, gear2, gear3;
|
||||
static GLfloat angle = 0.0;
|
||||
|
||||
static GLfloat eyesep = 5.0; /* Eye separation. */
|
||||
static GLfloat fix_point = 40.0; /* Fixation point distance. */
|
||||
static GLfloat left, right, asp; /* Stereo frustum params. */
|
||||
//static GLfloat eyesep = 5.0; /* Eye separation. */
|
||||
//static GLfloat fix_point = 40.0; /* Fixation point distance. */
|
||||
//static GLfloat left, right, asp; /* Stereo frustum params. */
|
||||
|
||||
|
||||
/*
|
||||
@@ -385,7 +385,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// DBR : Create EGL context/surface etc
|
||||
EGLDisplay d = eglGetDisplay("!fb_dri");
|
||||
EGLDisplay d = eglGetDisplay(":0");
|
||||
assert(d);
|
||||
|
||||
if (!eglInitialize(d, &maj, &min)) {
|
||||
@@ -431,7 +431,9 @@ main(int argc, char *argv[])
|
||||
|
||||
init(); // Initialise the GL visual
|
||||
reshape(1024,768);
|
||||
|
||||
|
||||
glDrawBuffer( GL_BACK );
|
||||
|
||||
// DBR : Run the simulation
|
||||
run_gears(d, screen_surf, 5.0);
|
||||
|
||||
|
@@ -136,7 +136,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
int maj, min;
|
||||
/*EGLDisplay d = eglGetDisplay(EGL_DEFAULT_DISPLAY);*/
|
||||
EGLDisplay d = eglGetDisplay("!fb_dri");
|
||||
EGLDisplay d = eglGetDisplay("!r200_dri");
|
||||
|
||||
if (!eglInitialize(d, &maj, &min)) {
|
||||
printf("eglinfo: eglInitialize failed\n");
|
||||
|
@@ -23,6 +23,7 @@ SOURCES = antialias.c \
|
||||
blendsquare.c \
|
||||
bufferobj.c \
|
||||
bug_3101.c \
|
||||
bug_3195.c \
|
||||
crossbar.c \
|
||||
cva.c \
|
||||
dinoshade.c \
|
||||
@@ -104,6 +105,12 @@ texrect: texrect.o readtex.o
|
||||
texrect.o: texrect.c readtex.h
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
|
||||
bug_3195: bug_3195.o readtex.o
|
||||
$(CC) $(CFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
|
||||
|
||||
bug_3195.o: bug_3195.c readtex.h
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
|
||||
invert: invert.o readtex.o
|
||||
$(CC) invert.o readtex.o $(LIBS) -o $@
|
||||
|
||||
|
275
progs/tests/bug_3195.c
Normal file
275
progs/tests/bug_3195.c
Normal file
@@ -0,0 +1,275 @@
|
||||
/*
|
||||
* Copyright (C) 2000 Brian Paul All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file bug_3195.c
|
||||
*
|
||||
* Simple regression test for bug #3195. A bug in the i180 driver caused
|
||||
* a segfault (inside the driver) when the LOD bias is adjusted and no texture
|
||||
* is enabled. This test, which is based on progs/demos/lodbias.c, sets up
|
||||
* all the texturing, disables all textures, adjusts the LOD bias, then
|
||||
* re-enables \c GL_TEXTURE_2D.
|
||||
*
|
||||
* \author Brian Paul
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <GL/glut.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#include "readtex.h"
|
||||
|
||||
#define TEXTURE_FILE "../images/girl.rgb"
|
||||
|
||||
static GLfloat Xrot = 0, Yrot = -30, Zrot = 0;
|
||||
static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */
|
||||
static GLint BiasMin = -400, BiasMax = 400;
|
||||
|
||||
|
||||
|
||||
static void
|
||||
PrintString(const char *s)
|
||||
{
|
||||
while (*s) {
|
||||
glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
|
||||
s++;
|
||||
}
|
||||
}
|
||||
|
||||
static void Idle( void )
|
||||
{
|
||||
static int lastTime = 0;
|
||||
int time = glutGet(GLUT_ELAPSED_TIME);
|
||||
int step;
|
||||
|
||||
if (lastTime == 0)
|
||||
lastTime = time;
|
||||
else if (time - lastTime < 10)
|
||||
return;
|
||||
|
||||
step = (time - lastTime) / 10 * BiasStepSign;
|
||||
lastTime = time;
|
||||
|
||||
Bias += step;
|
||||
if (Bias < BiasMin) {
|
||||
exit(0);
|
||||
}
|
||||
else if (Bias > BiasMax) {
|
||||
Bias = BiasMax;
|
||||
BiasStepSign = -1;
|
||||
}
|
||||
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void Display( void )
|
||||
{
|
||||
char str[100];
|
||||
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glOrtho(-1, 1, -1, 1, -1, 1);
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
glColor3f(1,1,1);
|
||||
glRasterPos3f(-0.9, -0.9, 0.0);
|
||||
sprintf(str, "Texture LOD Bias = %4.1f", Bias * 0.01);
|
||||
PrintString(str);
|
||||
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
glTranslatef( 0.0, 0.0, -8.0 );
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(Xrot, 1, 0, 0);
|
||||
glRotatef(Yrot, 0, 1, 0);
|
||||
glRotatef(Zrot, 0, 0, 1);
|
||||
|
||||
glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0.01 * Bias);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
glBegin(GL_POLYGON);
|
||||
glTexCoord2f(0, 0); glVertex2f(-1, -1);
|
||||
glTexCoord2f(2, 0); glVertex2f( 1, -1);
|
||||
glTexCoord2f(2, 2); glVertex2f( 1, 1);
|
||||
glTexCoord2f(0, 2); glVertex2f(-1, 1);
|
||||
glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
|
||||
static void Reshape( int width, int height )
|
||||
{
|
||||
glViewport( 0, 0, width, height );
|
||||
}
|
||||
|
||||
|
||||
static void Key( unsigned char key, int x, int y )
|
||||
{
|
||||
(void) x;
|
||||
(void) y;
|
||||
switch (key) {
|
||||
case 27:
|
||||
exit(0);
|
||||
break;
|
||||
}
|
||||
glutPostRedisplay();
|
||||
}
|
||||
|
||||
|
||||
static void SpecialKey( int key, int x, int y )
|
||||
{
|
||||
const GLfloat step = 3.0;
|
||||
(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 )
|
||||
{
|
||||
GLfloat maxBias;
|
||||
const char * const ver_string = (const char * const)
|
||||
glGetString( GL_VERSION );
|
||||
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION = %s\n", ver_string);
|
||||
|
||||
printf("\nThis program should function nearly identically to Mesa's lodbias demo.\n"
|
||||
"It should cycle through the complet LOD bias range once and exit. If bug\n"
|
||||
"#3195 still exists, the demo should crash almost immediatly.\n");
|
||||
printf("This is a regression test for bug #3101.\n");
|
||||
printf("https://bugs.freedesktop.org/show_bug.cgi?id=3101\n");
|
||||
|
||||
if (!glutExtensionSupported("GL_EXT_texture_lod_bias")) {
|
||||
printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
if (glutExtensionSupported("GL_SGIS_generate_mipmap")) {
|
||||
/* test auto mipmap generation */
|
||||
GLint width, height, i;
|
||||
GLenum format;
|
||||
GLubyte *image = LoadRGBImage(TEXTURE_FILE, &width, &height, &format);
|
||||
if (!image) {
|
||||
printf("Error: could not load texture image %s\n", TEXTURE_FILE);
|
||||
exit(1);
|
||||
}
|
||||
/* resize to 256 x 256 */
|
||||
if (width != 256 || height != 256) {
|
||||
GLubyte *newImage = malloc(256 * 256 * 4);
|
||||
gluScaleImage(format, width, height, GL_UNSIGNED_BYTE, image,
|
||||
256, 256, GL_UNSIGNED_BYTE, newImage);
|
||||
free(image);
|
||||
image = newImage;
|
||||
}
|
||||
printf("Using GL_SGIS_generate_mipmap\n");
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, format, 256, 256, 0,
|
||||
format, GL_UNSIGNED_BYTE, image);
|
||||
free(image);
|
||||
|
||||
/* make sure mipmap was really generated correctly */
|
||||
width = height = 256;
|
||||
for (i = 0; i < 9; i++) {
|
||||
GLint w, h;
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_WIDTH, &w);
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, i, GL_TEXTURE_HEIGHT, &h);
|
||||
printf("Level %d size: %d x %d\n", i, w, h);
|
||||
assert(w == width);
|
||||
assert(h == height);
|
||||
width /= 2;
|
||||
height /= 2;
|
||||
}
|
||||
|
||||
}
|
||||
else if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
|
||||
printf("Error: could not load texture image %s\n", TEXTURE_FILE);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* mipmapping required for this extension */
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
|
||||
glGetFloatv(GL_MAX_TEXTURE_LOD_BIAS_EXT, &maxBias);
|
||||
printf("LOD bias range: [%g, %g]\n", -maxBias, maxBias);
|
||||
BiasMin = -100 * maxBias;
|
||||
BiasMax = 100 * maxBias;
|
||||
|
||||
/* Since we have (about) 8 mipmap levels, no need to bias beyond
|
||||
* the range [-1, +8].
|
||||
*/
|
||||
if (BiasMin < -100)
|
||||
BiasMin = -100;
|
||||
if (BiasMax > 800)
|
||||
BiasMax = 800;
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] )
|
||||
{
|
||||
glutInit( &argc, argv );
|
||||
glutInitWindowPosition( 0, 0 );
|
||||
glutInitWindowSize( 350, 350 );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
|
||||
glutCreateWindow( "Bug #3195 Test" );
|
||||
glutReshapeFunc( Reshape );
|
||||
glutKeyboardFunc( Key );
|
||||
glutSpecialFunc( SpecialKey );
|
||||
glutDisplayFunc( Display );
|
||||
glutIdleFunc(Idle);
|
||||
Init();
|
||||
glutMainLoop();
|
||||
return 0;
|
||||
}
|
@@ -71,7 +71,9 @@ Display( void )
|
||||
static void
|
||||
Reshape( int width, int height )
|
||||
{
|
||||
#if 0
|
||||
float ar = (float) width / (float) height;
|
||||
#endif
|
||||
glViewport( 0, 0, width, height );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
@@ -117,14 +119,14 @@ Init( void )
|
||||
|
||||
glGenFramebuffersEXT(1, &MyFB);
|
||||
assert(MyFB);
|
||||
assert(glIsFramebufferEXT(MyFB));
|
||||
assert(!glIsFramebufferEXT(MyFB));
|
||||
glDeleteFramebuffersEXT(1, &MyFB);
|
||||
assert(!glIsFramebufferEXT(MyFB));
|
||||
/* Note, continue to use MyFB below */
|
||||
|
||||
glGenRenderbuffersEXT(1, &rb);
|
||||
assert(rb);
|
||||
assert(glIsRenderbufferEXT(rb));
|
||||
assert(!glIsRenderbufferEXT(rb));
|
||||
glDeleteRenderbuffersEXT(1, &rb);
|
||||
assert(!glIsRenderbufferEXT(rb));
|
||||
rb = 42; /* an arbitrary ID */
|
||||
@@ -156,6 +158,12 @@ Init( void )
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
GL_RENDERBUFFER_ALPHA_SIZE_EXT, &a);
|
||||
printf("renderbuffer RGBA sizes = %d %d %d %d\n", r, g, b, a);
|
||||
|
||||
glGetIntegerv(GL_RED_BITS, &r);
|
||||
glGetIntegerv(GL_GREEN_BITS, &g);
|
||||
glGetIntegerv(GL_BLUE_BITS, &b);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &a);
|
||||
printf("Visual RGBA sizes = %d %d %d %d\n", r, g, b, a);
|
||||
}
|
||||
|
||||
CheckError(__LINE__);
|
||||
|
@@ -56,7 +56,8 @@ RenderTexture(void)
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0, 0.0, -15.0);
|
||||
|
||||
/* draw to texture */
|
||||
/* draw to texture image */
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
|
||||
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
|
||||
GL_TEXTURE_2D, TexObj, level);
|
||||
@@ -142,6 +143,7 @@ Display(void)
|
||||
glPushMatrix();
|
||||
glRotatef(Rot, 0, 1, 0);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBindTexture(GL_TEXTURE_2D, TexObj);
|
||||
glBegin(GL_POLYGON);
|
||||
glColor3f(0.25, 0.25, 0.25);
|
||||
glTexCoord2f(0, 0);
|
||||
@@ -203,10 +205,10 @@ Init(void)
|
||||
}
|
||||
printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
|
||||
|
||||
/* make framebuffer */
|
||||
/* gen framebuffer id, delete it, do some assertions, just for testing */
|
||||
glGenFramebuffersEXT(1, &MyFB);
|
||||
assert(MyFB);
|
||||
assert(glIsFramebufferEXT(MyFB));
|
||||
assert(!glIsFramebufferEXT(MyFB));
|
||||
glDeleteFramebuffersEXT(1, &MyFB);
|
||||
assert(!glIsFramebufferEXT(MyFB));
|
||||
/* Note, continue to use MyFB below */
|
||||
@@ -219,8 +221,9 @@ Init(void)
|
||||
/* make depth renderbuffer */
|
||||
glGenRenderbuffersEXT(1, &DepthRB);
|
||||
assert(DepthRB);
|
||||
assert(glIsRenderbufferEXT(DepthRB));
|
||||
assert(!glIsRenderbufferEXT(DepthRB));
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, DepthRB);
|
||||
assert(glIsRenderbufferEXT(DepthRB));
|
||||
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT,
|
||||
TexWidth, TexHeight);
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
@@ -231,8 +234,9 @@ Init(void)
|
||||
/* make stencil renderbuffer */
|
||||
glGenRenderbuffersEXT(1, &StencilRB);
|
||||
assert(StencilRB);
|
||||
assert(glIsRenderbufferEXT(StencilRB));
|
||||
assert(!glIsRenderbufferEXT(StencilRB));
|
||||
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, StencilRB);
|
||||
assert(glIsRenderbufferEXT(StencilRB));
|
||||
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX,
|
||||
TexWidth, TexHeight);
|
||||
glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,
|
||||
|
@@ -10,28 +10,94 @@
|
||||
#include <math.h>
|
||||
#include <GL/glut.h>
|
||||
|
||||
GLboolean wrapping;
|
||||
|
||||
static void RunTest(void)
|
||||
{
|
||||
const GLenum prim = GL_QUAD_STRIP;
|
||||
GLubyte val;
|
||||
int bits, max, i;
|
||||
int expected;
|
||||
GLboolean failed;
|
||||
|
||||
glGetIntegerv(GL_STENCIL_BITS, &bits);
|
||||
max = (1 << bits) - 1;
|
||||
|
||||
glClearStencil(0);
|
||||
|
||||
glEnable(GL_STENCIL_TEST);
|
||||
glStencilFunc(GL_ALWAYS, 0, ~0);
|
||||
|
||||
/* test GL_KEEP */
|
||||
glClearStencil(max);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_KEEP...\n");
|
||||
expected = max;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0);
|
||||
glVertex2f(10, 0);
|
||||
glVertex2f(0, 10);
|
||||
glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf("Failed GL_KEEP test(got %u, expected %u)\n", val, expected);
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
else
|
||||
printf("OK!\n");
|
||||
|
||||
/* test GL_ZERO */
|
||||
glClearStencil(max);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_ZERO...\n");
|
||||
expected = 0;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0);
|
||||
glVertex2f(10, 0);
|
||||
glVertex2f(0, 10);
|
||||
glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf("Failed GL_ZERO test(got %u, expected %u)\n", val, expected);
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
else
|
||||
printf("OK!\n");
|
||||
|
||||
/* test GL_REPLACE */
|
||||
glClearStencil(max);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_REPLACE...\n");
|
||||
expected = 0;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0);
|
||||
glVertex2f(10, 0);
|
||||
glVertex2f(0, 10);
|
||||
glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf("Failed GL_REPLACE test(got %u, expected %u)\n", val, expected);
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
else
|
||||
printf("OK!\n");
|
||||
|
||||
/* test GL_INCR (saturation) */
|
||||
glClearStencil(0);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_INCR...\n");
|
||||
for (i = 1; i < max+10; i++) {
|
||||
int expected = (i > max) ? max : i;
|
||||
expected = (i > max) ? max : i;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0); glVertex2f(10, 0);
|
||||
glVertex2f(0, 10); glVertex2f(10, 10);
|
||||
@@ -44,39 +110,17 @@ static void RunTest(void)
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
}
|
||||
if ( !failed )
|
||||
printf("OK!\n");
|
||||
|
||||
if ( !failed ) printf("OK!\n");
|
||||
|
||||
|
||||
/* test GL_INCR_WRAP_EXT (wrap around) */
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP_EXT);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_INCR_WRAP_EXT...\n");
|
||||
for (i = 1; i < max+10; i++) {
|
||||
int expected = i % (max + 1);
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0); glVertex2f(10, 0);
|
||||
glVertex2f(0, 10); glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf( "Failed GL_INCR_WRAP test on iteration #%u "
|
||||
"(got %u, expected %u)\n", i, val, expected );
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
}
|
||||
if ( !failed ) printf("OK!\n");
|
||||
|
||||
/* test GL_DECR (saturation) */
|
||||
glClearStencil(max);
|
||||
|
||||
/* test GL_INCR (saturation) */
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_DECR...\n");
|
||||
for (i = max-1; i > -10; i--) {
|
||||
int expected = (i < 0) ? 0 : i;
|
||||
expected = (i < 0) ? 0 : i;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0); glVertex2f(10, 0);
|
||||
glVertex2f(0, 10); glVertex2f(10, 10);
|
||||
@@ -88,27 +132,76 @@ static void RunTest(void)
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
}
|
||||
if ( !failed ) printf("OK!\n");
|
||||
if ( !failed )
|
||||
printf("OK!\n");
|
||||
|
||||
/* test GL_INCR_WRAP_EXT (wrap-around) */
|
||||
/* test GL_INVERT */
|
||||
glClearStencil(0);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP_EXT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_INVERT);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_DECR_WRAP_EXT...\n");
|
||||
for (i = max-1; i > -10; i--) {
|
||||
int expected = (i < 0) ? max + i + 1: i;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0); glVertex2f(10, 0);
|
||||
glVertex2f(0, 10); glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf( "Failed GL_DECR_WRAP test on iteration #%u "
|
||||
"(got %u, expected %u)\n", max - i, val, expected );
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
printf("Testing GL_INVERT...\n");
|
||||
expected = max;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0);
|
||||
glVertex2f(10, 0);
|
||||
glVertex2f(0, 10);
|
||||
glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf("Failed GL_INVERT test(got %u, expected %u)\n", val, expected);
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
else
|
||||
printf("OK!\n");
|
||||
|
||||
if(wrapping)
|
||||
{
|
||||
/* test GL_INCR_WRAP_EXT (wrap around) */
|
||||
glClearStencil(0);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_INCR_WRAP_EXT);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_INCR_WRAP_EXT...\n");
|
||||
for (i = 1; i < max+10; i++) {
|
||||
expected = i % (max + 1);
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0); glVertex2f(10, 0);
|
||||
glVertex2f(0, 10); glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf( "Failed GL_INCR_WRAP test on iteration #%u "
|
||||
"(got %u, expected %u)\n", i, val, expected );
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
}
|
||||
if ( !failed )
|
||||
printf("OK!\n");
|
||||
|
||||
/* test GL_DECR_WRAP_EXT (wrap-around) */
|
||||
glClearStencil(max);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_DECR_WRAP_EXT);
|
||||
failed = GL_FALSE;
|
||||
printf("Testing GL_DECR_WRAP_EXT...\n");
|
||||
for (i = max-1; i > -10; i--) {
|
||||
expected = (i < 0) ? max + i + 1: i;
|
||||
glBegin(prim);
|
||||
glVertex2f(0, 0); glVertex2f(10, 0);
|
||||
glVertex2f(0, 10); glVertex2f(10, 10);
|
||||
glEnd();
|
||||
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
|
||||
if (val != expected) {
|
||||
printf( "Failed GL_DECR_WRAP test on iteration #%u "
|
||||
"(got %u, expected %u)\n", max - i, val, expected );
|
||||
failed = GL_TRUE;
|
||||
}
|
||||
}
|
||||
if ( !failed )
|
||||
printf("OK!\n");
|
||||
}
|
||||
if ( !failed ) printf("OK!\n");
|
||||
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
}
|
||||
@@ -158,7 +251,7 @@ static void Init( void )
|
||||
|
||||
|
||||
/* Check for both the extension string and GL version 1.4 on the
|
||||
* outside chance that some silly vendor exports version 1.4 but doesn't
|
||||
* outside chance that some vendor exports version 1.4 but doesn't
|
||||
* export the extension string. The stencil-wrap modes are a required
|
||||
* part of GL 1.4.
|
||||
*/
|
||||
@@ -166,11 +259,9 @@ static void Init( void )
|
||||
ver_str = glGetString( GL_VERSION );
|
||||
version = (ver_str == NULL) ? 1.0 : atof( ver_str );
|
||||
|
||||
if ( !glutExtensionSupported("GL_EXT_stencil_wrap")
|
||||
&& (version < 1.4) ) {
|
||||
printf("Sorry, GL_EXT_stencil_wrap not supported.\n");
|
||||
exit(1);
|
||||
}
|
||||
wrapping = (glutExtensionSupported("GL_EXT_stencil_wrap") || (version >= 1.4));
|
||||
if (!wrapping)
|
||||
printf("GL_EXT_stencil_wrap not supported. Only testing the rest.\n");
|
||||
}
|
||||
|
||||
|
||||
|
@@ -590,6 +590,9 @@ main(int argc, char *argv[])
|
||||
|
||||
event_loop(dpy, win);
|
||||
|
||||
glDeleteLists(gear1, 1);
|
||||
glDeleteLists(gear2, 1);
|
||||
glDeleteLists(gear3, 1);
|
||||
glXDestroyContext(dpy, ctx);
|
||||
XDestroyWindow(dpy, win);
|
||||
XCloseDisplay(dpy);
|
||||
|
@@ -467,7 +467,7 @@ make_window( Display *dpy, const char *name,
|
||||
None, (char **)NULL, 0, &sizehints);
|
||||
}
|
||||
|
||||
ctx = (*create_new_context)(dpy, fbconfig[0], GLX_RGBA_BIT, NULL, GL_TRUE);
|
||||
ctx = (*create_new_context)(dpy, fbconfig[0], GLX_RGBA_TYPE, NULL, GL_TRUE);
|
||||
if (!ctx) {
|
||||
printf("Error: glXCreateNewContext failed\n");
|
||||
exit(1);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
TOP = ../..
|
||||
|
||||
SUBDIRS = main drivers/demo
|
||||
SUBDIRS = main drivers/demo drivers/dri
|
||||
|
||||
|
||||
default: subdirs
|
||||
|
@@ -286,19 +286,12 @@ demoMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw, EGLSurface rea
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Just to silence warning
|
||||
*/
|
||||
extern _EGLDriver *
|
||||
_eglMain(NativeDisplayType dpy);
|
||||
|
||||
|
||||
/**
|
||||
* The bootstrap function. Return a new DemoDriver object and
|
||||
* plug in API functions.
|
||||
*/
|
||||
_EGLDriver *
|
||||
_eglMain(NativeDisplayType dpy)
|
||||
_eglMain(_EGLDisplay *dpy)
|
||||
{
|
||||
DemoDriver *demo;
|
||||
|
||||
|
64
src/egl/drivers/dri/Makefile
Normal file
64
src/egl/drivers/dri/Makefile
Normal file
@@ -0,0 +1,64 @@
|
||||
# src/egl/drivers/dri/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
### Include directories
|
||||
INCLUDE_DIRS = \
|
||||
-I. \
|
||||
-I$(DRM_SOURCE_PATH)/shared-core \
|
||||
-I$(DRM_SOURCE_PATH)/libdrm \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/include/GL/internal \
|
||||
-I$(TOP)/src/mesa \
|
||||
-I$(TOP)/src/mesa/main \
|
||||
-I$(TOP)/src/mesa/glapi \
|
||||
-I$(TOP)/src/mesa/math \
|
||||
-I$(TOP)/src/mesa/transform \
|
||||
-I$(TOP)/src/mesa/shader \
|
||||
-I$(TOP)/src/mesa/swrast \
|
||||
-I$(TOP)/src/mesa/swrast_setup \
|
||||
-I$(TOP)/src/egl/main \
|
||||
-I$(TOP)/src/mesa/drivers/dri/common
|
||||
|
||||
|
||||
HEADERS = egldri.h
|
||||
|
||||
SOURCES = egldri.c \
|
||||
$(DRM_SOURCE_PATH)/libdrm/xf86drm.c \
|
||||
$(DRM_SOURCE_PATH)/libdrm/xf86drmHash.c \
|
||||
$(DRM_SOURCE_PATH)/libdrm/xf86drmRandom.c
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.o)
|
||||
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
|
||||
|
||||
|
||||
|
||||
default: depend library Makefile
|
||||
|
||||
|
||||
# EGLdri Library
|
||||
library: $(LIB_DIR)/libEGLdri.so
|
||||
|
||||
$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
|
||||
$(TOP)/bin/mklib -o EGLdri -major 1 -minor 0 \
|
||||
-install $(LIB_DIR) -ldl $(OBJECTS)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f *.so
|
||||
|
||||
depend: $(SOURCES) $(HEADERS)
|
||||
@ echo "running $(MKDEP)"
|
||||
@ touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \
|
||||
$(SOURCES) $(HEADERS) > /dev/null
|
||||
|
||||
include depend
|
||||
# DO NOT DELETE
|
||||
|
1001
src/egl/drivers/dri/egldri.c
Normal file
1001
src/egl/drivers/dri/egldri.c
Normal file
File diff suppressed because it is too large
Load Diff
113
src/egl/drivers/dri/egldri.h
Normal file
113
src/egl/drivers/dri/egldri.h
Normal file
@@ -0,0 +1,113 @@
|
||||
#ifndef EGLDRI_INCLUDED
|
||||
#define EGLDRI_INCLUDED
|
||||
|
||||
#include "egldisplay.h"
|
||||
#include "eglscreen.h"
|
||||
#include "eglsurface.h"
|
||||
#include "eglcontext.h"
|
||||
#include "mtypes.h"
|
||||
#include "dri_util.h"
|
||||
#include "drm_sarea.h"
|
||||
|
||||
/**
|
||||
* dri display-specific driver class derived from _EGLDisplay
|
||||
*/
|
||||
typedef struct dri_display
|
||||
{
|
||||
_EGLDisplay Base; /* base class/object */
|
||||
void *pFB;
|
||||
int drmFD; /**< \brief DRM device file descriptor */
|
||||
int minor;
|
||||
unsigned long hFrameBuffer;
|
||||
|
||||
int virtualWidth;
|
||||
int virtualHeight;
|
||||
int fbSize;
|
||||
int bpp;
|
||||
int cpp;
|
||||
int isPCI;
|
||||
int SAREASize;
|
||||
drm_sarea_t *pSAREA;
|
||||
unsigned int serverContext; /**< \brief DRM context only active on server */
|
||||
unsigned long FBStart; /**< \brief physical address of the framebuffer */
|
||||
void *driverClientMsg;
|
||||
int driverClientMsgSize;
|
||||
int chipset;
|
||||
void *driverPrivate;
|
||||
drm_magic_t magic;
|
||||
|
||||
__GLcontextModes *driver_modes;
|
||||
__DRIscreen driScreen;
|
||||
|
||||
} driDisplay;
|
||||
|
||||
/**
|
||||
* dri driver-specific screen class derived from _EGLScreen
|
||||
*/
|
||||
typedef struct dri_screen
|
||||
{
|
||||
_EGLScreen Base;
|
||||
char fb[NAME_MAX];
|
||||
} driScreen;
|
||||
|
||||
|
||||
/**
|
||||
* dri driver-specific surface class derived from _EGLSurface
|
||||
*/
|
||||
typedef struct dri_surface
|
||||
{
|
||||
_EGLSurface Base; /* base class/object */
|
||||
__DRIdrawable drawable;
|
||||
} driSurface;
|
||||
|
||||
|
||||
/**
|
||||
* dri driver-specific context class derived from _EGLContext
|
||||
*/
|
||||
typedef struct dri_context
|
||||
{
|
||||
_EGLContext Base; /* base class/object */
|
||||
__DRIcontext driContext; /**< \brief context dependent methods */
|
||||
} driContext;
|
||||
|
||||
|
||||
|
||||
static inline driDisplay *
|
||||
Lookup_driDisplay(EGLDisplay dpy)
|
||||
{
|
||||
_EGLDisplay *d = _eglLookupDisplay(dpy);
|
||||
return (driDisplay *) d;
|
||||
}
|
||||
|
||||
|
||||
static inline driScreen *
|
||||
Lookup_driScreen(EGLDisplay dpy, EGLScreenMESA screen)
|
||||
{
|
||||
_EGLScreen *s = _eglLookupScreen(dpy, screen);
|
||||
return (driScreen *) s;
|
||||
}
|
||||
|
||||
|
||||
static inline driContext *
|
||||
Lookup_driContext(EGLContext ctx)
|
||||
{
|
||||
_EGLContext *c = _eglLookupContext(ctx);
|
||||
return (driContext *) c;
|
||||
}
|
||||
|
||||
|
||||
static inline driSurface *
|
||||
Lookup_driSurface(EGLSurface surf)
|
||||
{
|
||||
_EGLSurface *s = _eglLookupSurface(surf);
|
||||
return (driSurface *) s;
|
||||
}
|
||||
|
||||
extern void _eglDRIInitDriverFallbacks(_EGLDriver *drv);
|
||||
extern EGLBoolean _eglDRIShowSurfaceMESA(_EGLDriver *drv, EGLDisplay dpy, EGLScreenMESA screen, EGLSurface surface, EGLModeMESA m);
|
||||
extern EGLBoolean _eglDRIInitialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor);
|
||||
extern EGLBoolean _eglDRIGetDisplayInfo(driDisplay *dpy);
|
||||
extern EGLBoolean _eglDRICreateDisplay(driDisplay *dpy, __DRIframebuffer *framebuffer);
|
||||
extern EGLBoolean _eglDRICreateScreen(driDisplay *dpy);
|
||||
|
||||
#endif /* EGLDRI_INCLUDED */
|
@@ -45,7 +45,7 @@ _eglChooseDriver(EGLDisplay display)
|
||||
else if (name[0] == ':' && (name[1] >= '0' && name[1] <= '9') && !name[2]) {
|
||||
printf("EGL: Use driver for screen: %s\n", name);
|
||||
/* XXX probe hardware here to determine which driver to open */
|
||||
/* driverName = "something"; */
|
||||
driverName = "libEGLdri";
|
||||
}
|
||||
else if (name[0] == '!') {
|
||||
/* use specified driver name */
|
||||
@@ -71,44 +71,40 @@ _eglChooseDriver(EGLDisplay display)
|
||||
_EGLDriver *
|
||||
_eglOpenDriver(_EGLDisplay *dpy, const char *driverName)
|
||||
{
|
||||
_EGLDriver *drv;
|
||||
_EGLMain_t mainFunc;
|
||||
void *lib;
|
||||
char driverFilename[1000];
|
||||
|
||||
/* XXX also prepend a directory path??? */
|
||||
sprintf(driverFilename, "%s.so", driverName);
|
||||
|
||||
#if 1
|
||||
lib = dlopen(driverFilename, RTLD_NOW);
|
||||
if (lib) {
|
||||
_EGLDriver *drv;
|
||||
_EGLMain_t mainFunc;
|
||||
|
||||
mainFunc = (_EGLMain_t) dlsym(lib, "_eglMain");
|
||||
if (!mainFunc) {
|
||||
fprintf(stderr, "_eglMain not found in %s", (char *) driverFilename);
|
||||
dlclose(lib);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
drv = mainFunc(dpy);
|
||||
if (!drv) {
|
||||
dlclose(lib);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
drv->LibHandle = lib;
|
||||
drv->Display = dpy;
|
||||
return drv;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr, "EGLdebug: Error opening %s: %s\n",
|
||||
driverFilename, dlerror());
|
||||
if (!lib) {
|
||||
fprintf(stderr, "EGLdebug: Error opening %s: %s\n", driverFilename, dlerror());
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
/* use built-in driver */
|
||||
return _eglDefaultMain(d);
|
||||
#endif
|
||||
|
||||
mainFunc = (_EGLMain_t) dlsym(lib, "_eglMain");
|
||||
if (!mainFunc) {
|
||||
fprintf(stderr, "_eglMain not found in %s", (char *) driverFilename);
|
||||
dlclose(lib);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
drv = mainFunc(dpy);
|
||||
if (!drv) {
|
||||
dlclose(lib);
|
||||
return NULL;
|
||||
}
|
||||
/* with a recurvise open you want the inner most handle */
|
||||
if (!drv->LibHandle)
|
||||
drv->LibHandle = lib;
|
||||
else
|
||||
dlclose(lib);
|
||||
|
||||
drv->Display = dpy;
|
||||
return drv;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -125,10 +125,7 @@ struct _egl_driver
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
extern _EGLDriver *
|
||||
_eglDefaultMain(NativeDisplayType d);
|
||||
extern _EGLDriver *_eglMain(_EGLDisplay *dpy);
|
||||
|
||||
|
||||
extern _EGLDriver *
|
||||
|
@@ -57,7 +57,9 @@
|
||||
|
||||
static void normalize(float vec[3]);
|
||||
static void crossProduct(float x[3], float y[3], float ret[3]);
|
||||
#if 0 // UNUSED
|
||||
static void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]);
|
||||
#endif
|
||||
|
||||
static float binomialCoefficients[8][8] = {
|
||||
{1,0,0,0,0,0,0,0},
|
||||
@@ -91,7 +93,7 @@ void bezierCurveEval(float u0, float u1, int order, float *ctlpoints, int stride
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if 0 // UNUSED
|
||||
/*order = degree +1 >=1.
|
||||
*/
|
||||
void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[])
|
||||
@@ -115,7 +117,7 @@ void bezierCurveEvalfast(float u0, float u1, int order, float *ctlpoints, int st
|
||||
for(j=0; j<dimension; j++)
|
||||
retpoint[j] = buf[order-1][0][j];
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*order = degree +1 >=1.
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2001/03/17 00:25:40 $ $Revision: 1.1 $
|
||||
** $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.1 2001/03/17 00:25:40 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/dataTransform.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -47,6 +47,7 @@
|
||||
|
||||
extern directedLine* arcLoopToDLineLoop(Arc_ptr loop);
|
||||
|
||||
#if 0 // UNUSED
|
||||
static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, directedLine dline_buf[], sampledLine sline_buf[], int& index_dline)
|
||||
{
|
||||
directedLine *ret;
|
||||
@@ -95,7 +96,9 @@ static directedLine* copy_loop(Arc_ptr loop, Real2* vertArray, int& index, direc
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0 // UNUSED
|
||||
static int num_edges(Bin& bin)
|
||||
{
|
||||
int sum=0;
|
||||
@@ -103,6 +106,8 @@ static int num_edges(Bin& bin)
|
||||
sum += jarc->pwlArc->npts-1;
|
||||
return sum;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
directedLine* bin_to_DLineLoops(Bin& bin)
|
||||
{
|
||||
|
@@ -35,8 +35,8 @@
|
||||
/*
|
||||
* intersect.c++
|
||||
*
|
||||
* $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
|
||||
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/intersect.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "glimports.h"
|
||||
@@ -53,7 +53,9 @@
|
||||
enum i_result { INTERSECT_VERTEX, INTERSECT_EDGE };
|
||||
|
||||
/* local functions */
|
||||
#ifndef NDEBUG // for asserts only
|
||||
static int arc_classify( Arc_ptr, int, REAL );
|
||||
#endif
|
||||
static enum i_result pwlarc_intersect( PwlArc *, int, REAL, int, int[3] );
|
||||
|
||||
|
||||
@@ -400,6 +402,7 @@ pwlarc_intersect(
|
||||
*----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef NDEBUG // for asserts only
|
||||
static int
|
||||
arc_classify( Arc_ptr jarc, int param, REAL value )
|
||||
{
|
||||
@@ -438,6 +441,7 @@ arc_classify( Arc_ptr jarc, int param, REAL value )
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
Subdivider::classify_tailonleft_s( Bin& bin, Bin& in, Bin& out, REAL val )
|
||||
|
@@ -35,8 +35,8 @@
|
||||
/*
|
||||
* maplist.c++
|
||||
*
|
||||
* $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
|
||||
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/maplist.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "glimports.h"
|
||||
@@ -73,8 +73,10 @@ Maplist::add( long type, int israt, int ncoords )
|
||||
void
|
||||
Maplist::define( long type, int israt, int ncoords )
|
||||
{
|
||||
#ifndef NDEBUG // to avoid warning
|
||||
Mapdesc *m = locate( type );
|
||||
assert( m == NULL || ( m->isrational == israt && m->ncoords == ncoords ) );
|
||||
#endif
|
||||
add( type, israt, ncoords );
|
||||
}
|
||||
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
|
||||
** $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/monoTriangulationBackend.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "monoTriangulation.h"
|
||||
@@ -86,7 +86,7 @@ void reflexChain::processNewVertex(Real v[2], Backend* backend)
|
||||
{
|
||||
Int i,j,k;
|
||||
Int isReflex;
|
||||
TrimVertex trimVert;
|
||||
/*TrimVertex trimVert;*/
|
||||
/*if there are at most one vertex in the queue, then simply insert
|
||||
*/
|
||||
if(index_queue <=1){
|
||||
|
@@ -35,8 +35,8 @@
|
||||
/*
|
||||
* slicer.c++
|
||||
*
|
||||
* $Date: 2002/11/01 23:35:07 $ $Revision: 1.4 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.4 2002/11/01 23:35:07 brianp Exp $
|
||||
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.4.26.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/slicer.cc,v 1.4.26.1 2005/10/28 13:09:08 brianp Exp $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -84,6 +84,7 @@ Int num_quads = 0;
|
||||
#define ZERO 0.00001 /*determing whether a loop is a rectngle or not*/
|
||||
#define equalRect(a,b) ((glu_abs(a-b) <= ZERO)? 1:0) //only used in tessellating a rectangle
|
||||
|
||||
#if 0 // UNUSED
|
||||
static Int is_Convex(Arc_ptr loop)
|
||||
{
|
||||
if(area(loop->tail(), loop->head(), loop->next->head()) <0 )
|
||||
@@ -95,9 +96,11 @@ static Int is_Convex(Arc_ptr loop)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/******triangulate a monotone polygon**************/
|
||||
#include "monoTriangulation.h"
|
||||
#if 0 // UNUSED
|
||||
static int is_U_monotone(Arc_ptr loop)
|
||||
{
|
||||
int n_changes=0;
|
||||
@@ -126,6 +129,7 @@ static int is_U_monotone(Arc_ptr loop)
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline int compInY(REAL a[2], REAL b[2])
|
||||
{
|
||||
@@ -259,6 +263,7 @@ if(loop->next->tail()[1] == loop->next->head()[1])
|
||||
|
||||
|
||||
//a line with the same u for opt
|
||||
#ifdef USE_OPTTT
|
||||
static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend)
|
||||
{
|
||||
int i;
|
||||
@@ -266,8 +271,10 @@ static void evalLineNOGE_BU(TrimVertex *verts, int n, Backend& backend)
|
||||
for(i=0; i<n; i++)
|
||||
backend.tmeshvertNOGE_BU(&verts[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
//a line with the same v for opt
|
||||
#ifdef USE_OPTTT
|
||||
static void evalLineNOGE_BV(TrimVertex *verts, int n, Backend& backend)
|
||||
{
|
||||
int i;
|
||||
@@ -276,6 +283,9 @@ static void evalLineNOGE_BV(TrimVertex *verts, int n, Backend& backend)
|
||||
for(i=0; i<n; i++)
|
||||
backend.tmeshvertNOGE_BV(&verts[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPTTT
|
||||
static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
|
||||
{
|
||||
|
||||
@@ -290,7 +300,7 @@ static void evalLineNOGE(TrimVertex *verts, int n, Backend& backend)
|
||||
backend.tmeshvertNOGE(&verts[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
inline void OPT_OUTVERT(TrimVertex& vv, Backend& backend)
|
||||
{
|
||||
@@ -861,6 +871,7 @@ return;
|
||||
|
||||
|
||||
/**********for reading newtess_flag from a file**********/
|
||||
#ifdef USE_READ_FLAG
|
||||
static Int read_flag(char* name)
|
||||
{
|
||||
Int ret;
|
||||
@@ -874,7 +885,7 @@ static Int read_flag(char* name)
|
||||
fclose(fp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/***********nextgen tess****************/
|
||||
#include "sampleMonoPoly.h"
|
||||
|
@@ -35,8 +35,8 @@
|
||||
/*
|
||||
* trimline.c++
|
||||
*
|
||||
* $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
|
||||
* $Date: 2005/10/28 13:09:08 $ $Revision: 1.1.30.1 $
|
||||
* $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/internals/trimline.cc,v 1.1.30.1 2005/10/28 13:09:08 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "glimports.h"
|
||||
@@ -162,10 +162,11 @@ Trimline::getNextPts( Arc_ptr botarc )
|
||||
{
|
||||
reset(); swap(); append( tinterp );
|
||||
|
||||
#ifndef NDEBUG
|
||||
PwlArc *lastpwl = botarc->prev->pwlArc;
|
||||
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
|
||||
#endif
|
||||
TrimVertex *lastpt2 = botarc->pwlArc->pts;
|
||||
|
||||
register TrimVertex *p = jarcl.getnextpt();
|
||||
for( append( p ); p != lastpt2; append( p ) ) {
|
||||
assert( p != lastpt1 );
|
||||
@@ -180,7 +181,9 @@ Trimline::getPrevPts( Arc_ptr botarc )
|
||||
|
||||
PwlArc *lastpwl = botarc->prev->pwlArc;
|
||||
TrimVertex *lastpt1 = &lastpwl->pts[lastpwl->npts-1];
|
||||
#ifndef NDEBUG
|
||||
TrimVertex *lastpt2 = botarc->pwlArc->pts;
|
||||
#endif
|
||||
|
||||
register TrimVertex *q = jarcl.getprevpt();
|
||||
for( append( q ); q != lastpt1; append( q ) ) {
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.2 $
|
||||
** $Date: 2005/10/28 13:09:08 $ $Revision: 1.2.8.1 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2 2004/05/12 15:29:36 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoChain.cc,v 1.2.8.1 2005/10/28 13:09:08 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "gluos.h"
|
||||
@@ -61,6 +61,7 @@ extern Int isCusp(directedLine *v);
|
||||
extern Int deleteRepeatDiagonals(Int num_diagonals, directedLine** diagonal_vertices, directedLine** new_vertices);
|
||||
|
||||
//for debug purpose only
|
||||
#if 0 // UNUSED
|
||||
static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
|
||||
{
|
||||
Int i;
|
||||
@@ -72,6 +73,7 @@ static void drawDiagonals(Int num_diagonals, directedLine** diagonal_vertices)
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*given (x_1, y_1) and (x_2, y_2), and y
|
||||
*return x such that (x,y) is on the line
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.3 $
|
||||
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.3.8.1 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3 2004/05/12 15:29:36 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.cc,v 1.3.8.1 2005/10/28 13:09:09 brianp Exp $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -1037,8 +1037,8 @@ void monoTriangulationRec(directedLine* inc_chain, Int inc_index,
|
||||
primStream* pStream)
|
||||
{
|
||||
Int i;
|
||||
directedLine *temp, *oldtemp;
|
||||
Int tempIndex, oldtempIndex;
|
||||
directedLine *temp, *oldtemp = NULL;
|
||||
Int tempIndex, oldtempIndex = 0;
|
||||
|
||||
assert(inc_chain != NULL && dec_chain != NULL);
|
||||
|
||||
|
@@ -621,6 +621,7 @@ directedLine* DBG_cutIntersectionPoly(directedLine *polygon, int& cutOccur)
|
||||
//given a polygon, cut the edges off and finally obtain a
|
||||
//a polygon without intersections. The cut-off edges are
|
||||
//dealloated. The new polygon is returned.
|
||||
#if 0 // UNUSED
|
||||
static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon)
|
||||
{
|
||||
directedLine *crt;//current polygon
|
||||
@@ -673,6 +674,7 @@ static directedLine* DBG_cutIntersectionPoly_notwork(directedLine *polygon)
|
||||
find = 0; //go to next loop
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
directedLine* DBG_cutIntersectionAllPoly(directedLine* list)
|
||||
{
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
|
||||
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.1.30.1 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.1 2001/03/17 00:25:41 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleComp.cc,v 1.1.30.1 2005/10/28 13:09:09 brianp Exp $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -159,7 +159,7 @@ void sampleCompLeft(Real* topVertex, Real* botVertex,
|
||||
*/
|
||||
Int midIndex1;
|
||||
Int midIndex2;
|
||||
Int gridMidIndex1, gridMidIndex2;
|
||||
Int gridMidIndex1 = 0, gridMidIndex2 = 0;
|
||||
//midIndex1: array[i] <= v, array[i-1] > v
|
||||
//midIndex2: array[i] >= v, array[i+1] < v
|
||||
// v(gridMidIndex1) >= v(midindex1) > v(gridMidIndex1+1)
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2001/03/22 11:41:40 $ $Revision: 1.2 $
|
||||
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.2.30.1 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.2 2001/03/22 11:41:40 joukj Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleCompRight.cc,v 1.2.30.1 2005/10/28 13:09:09 brianp Exp $
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
@@ -72,7 +72,7 @@ void sampleCompRight(Real* topVertex, Real* botVertex,
|
||||
*/
|
||||
Int midIndex1;
|
||||
Int midIndex2;
|
||||
Int gridMidIndex1, gridMidIndex2;
|
||||
Int gridMidIndex1, gridMidIndex2 = 0;
|
||||
//midIndex1: array[i] <= v, array[i+1] > v
|
||||
//midIndex2: array[i] >= v, array[i+1] < v
|
||||
midIndex1 = rightChain->findIndexBelowGen(rightGridChain->get_v_value(gridIndex1),
|
||||
|
@@ -31,10 +31,10 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2004/05/12 15:29:36 $ $Revision: 1.4 $
|
||||
** $Date: 2005/10/28 13:09:09 $ $Revision: 1.4.8.1 $
|
||||
*/
|
||||
/*
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4 2004/05/12 15:29:36 brianp Exp $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libnurbs/nurbtess/sampleMonoPoly.cc,v 1.4.8.1 2005/10/28 13:09:09 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "gluos.h"
|
||||
@@ -976,7 +976,7 @@ void findNeck(vertexArray *leftChain, Int botLeftIndex,
|
||||
void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_innerIndices)
|
||||
{
|
||||
|
||||
Int i,k,isHoriz;
|
||||
Int i,k,isHoriz = 0;
|
||||
Int n_ulines = grid->get_n_ulines();
|
||||
Real uMin = grid->get_u_min();
|
||||
Real uMax = grid->get_u_max();
|
||||
@@ -984,7 +984,7 @@ void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGrid
|
||||
Real vMin = grid->get_v_min();
|
||||
Real vMax = grid->get_v_max();
|
||||
*/
|
||||
Real slop, uinterc;
|
||||
Real slop = 0.0, uinterc;
|
||||
|
||||
#ifdef SHORTEN_GRID_LINE
|
||||
//uintercBuf stores all the interction u value for each grid line
|
||||
@@ -1102,7 +1102,7 @@ void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGri
|
||||
Real vMin = grid->get_v_min();
|
||||
Real vMax = grid->get_v_max();
|
||||
*/
|
||||
Real slop, uinterc;
|
||||
Real slop = 0.0, uinterc;
|
||||
|
||||
#ifdef SHORTEN_GRID_LINE
|
||||
//uintercBuf stores all the interction u value for each grid line
|
||||
|
@@ -31,8 +31,8 @@
|
||||
** published by SGI, but has not been independently verified as being
|
||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
|
||||
**
|
||||
** $Date: 2001/03/17 00:25:41 $ $Revision: 1.1 $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/error.c,v 1.1 2001/03/17 00:25:41 brianp Exp $
|
||||
** $Date: 2005/10/05 02:08:30 $ $Revision: 1.1.30.1 $
|
||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/src/glu/sgi/libutil/error.c,v 1.1.30.1 2005/10/05 02:08:30 brianp Exp $
|
||||
*/
|
||||
|
||||
#include "gluos.h"
|
||||
@@ -81,6 +81,11 @@ gluErrorString(GLenum errorCode)
|
||||
if ((errorCode >= GLU_TESS_ERROR1) && (errorCode <= GLU_TESS_ERROR8)) {
|
||||
return (const unsigned char *) __gluTessErrorString(errorCode - (GLU_TESS_ERROR1 - 1));
|
||||
}
|
||||
#ifdef GL_EXT_framebuffer_object
|
||||
if (errorCode == GL_INVALID_FRAMEBUFFER_OPERATION_EXT) {
|
||||
return (const unsigned char *) "invalid framebuffer operation";
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -444,7 +444,7 @@ gluPartialDisk(GLUquadric *qobj, GLdouble innerRadius,
|
||||
GLfloat sintemp, costemp;
|
||||
GLfloat deltaRadius;
|
||||
GLfloat radiusLow, radiusHigh;
|
||||
GLfloat texLow, texHigh;
|
||||
GLfloat texLow = 0.0, texHigh = 0.0;
|
||||
GLfloat angleOffset;
|
||||
GLint slices2;
|
||||
GLint finish;
|
||||
@@ -713,8 +713,8 @@ gluSphere(GLUquadric *qobj, GLdouble radius, GLint slices, GLint stacks)
|
||||
GLfloat cosCache3b[CACHE_SIZE];
|
||||
GLfloat angle;
|
||||
GLfloat zLow, zHigh;
|
||||
GLfloat sintemp1, sintemp2, sintemp3, sintemp4;
|
||||
GLfloat costemp1, costemp2, costemp3, costemp4;
|
||||
GLfloat sintemp1, sintemp2, sintemp3 = 0.0, sintemp4 = 0.0;
|
||||
GLfloat costemp1, costemp2 = 0.0, costemp3 = 0.0, costemp4 = 0.0;
|
||||
GLboolean needCache2, needCache3;
|
||||
GLint start, finish;
|
||||
|
||||
|
@@ -182,9 +182,9 @@ extern void GLwDrawingAreaSwapBuffers(Widget w);
|
||||
|
||||
#ifdef __GLX_MOTIF
|
||||
#ifdef _NO_PROTO
|
||||
GLAPI extern Widget GLwCreateMDrawingArea();
|
||||
GLAPI Widget GLwCreateMDrawingArea();
|
||||
#else
|
||||
GLAPI extern Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount);
|
||||
GLAPI Widget GLwCreateMDrawingArea(Widget parent,char *name,ArgList arglist,Cardinal argcount);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -59,7 +59,7 @@ typedef struct _GLwMDrawingAreaClassRec {
|
||||
} GLwMDrawingAreaClassRec;
|
||||
|
||||
|
||||
GLAPI extern GLwMDrawingAreaClassRec glwMDrawingAreaClassRec;
|
||||
extern GLwMDrawingAreaClassRec glwMDrawingAreaClassRec;
|
||||
|
||||
|
||||
/* XT */
|
||||
|
@@ -1,451 +0,0 @@
|
||||
/*
|
||||
|
||||
BOILERPLATE
|
||||
|
||||
To get started with mixed model programming with Motif and OpenGL, this
|
||||
boilerplate `application' might help get you started.
|
||||
|
||||
This program honors two environment variables:
|
||||
|
||||
SETVISUAL <id> Makes the application use the indicated visual,
|
||||
instead of the one chosen by glxChooseVisual.
|
||||
|
||||
SAMEVISUAL Make the application use the same visual for the
|
||||
GUI as for the 3D GL Widget.
|
||||
|
||||
The basic idea is to minimize colormap `flash' on systems with only one
|
||||
hardware colormap, especially when focus shifts between several
|
||||
of the application's windows, e.g. the about box.
|
||||
|
||||
If you have suggestions for improvements, please mail to:
|
||||
|
||||
|
||||
Jeroen van der Zijp <jvz@cyberia.cfdrc.com>
|
||||
|
||||
|
||||
Feel free to turn this into a useful program!!
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
This code is hereby placed under GNU GENERAL PUBLIC LICENSE.
|
||||
Copyright (C) 1996 Jeroen van der Zijp <jvz@cyberia.cfdrc.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
/* Include the kitchen sink */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/Intrinsic.h>
|
||||
#include <X11/StringDefs.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <Xm/Xm.h>
|
||||
#include <Xm/MainW.h>
|
||||
#include <Xm/RowColumn.h>
|
||||
#include <Xm/PushB.h>
|
||||
#include <Xm/CascadeB.h>
|
||||
#include <Xm/BulletinB.h>
|
||||
#include <Xm/DialogS.h>
|
||||
#include <Xm/Frame.h>
|
||||
#include <Xm/MessageB.h>
|
||||
#include <Xm/Form.h>
|
||||
#include <Xm/Separator.h>
|
||||
#include <Xm/MwmUtil.h>
|
||||
|
||||
/* Now some good stuff */
|
||||
#include <GLwMDrawA.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
|
||||
/* Stuff */
|
||||
Display *display;
|
||||
Visual *gui_visual;
|
||||
Colormap gui_colormap;
|
||||
Colormap gl_colormap;
|
||||
XVisualInfo *gl_visualinfo;
|
||||
XtAppContext app_context;
|
||||
Widget toplevel;
|
||||
Widget mainwindow;
|
||||
Widget menubar;
|
||||
Widget mainform;
|
||||
Widget mainframe;
|
||||
Widget glwidget;
|
||||
Widget button;
|
||||
Widget separator;
|
||||
GLXContext glx_context;
|
||||
|
||||
#ifndef __cplusplus
|
||||
#define c_class class
|
||||
#endif
|
||||
|
||||
/* Requested attributes; fix as you see fit */
|
||||
static int glxConfig[]={
|
||||
GLX_RGBA,
|
||||
GLX_DOUBLEBUFFER,
|
||||
GLX_DEPTH_SIZE, 16,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
GLX_BLUE_SIZE, 1,
|
||||
None
|
||||
};
|
||||
|
||||
|
||||
/* Forwards */
|
||||
static void exposeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
|
||||
static void initCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
|
||||
static void resizeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
|
||||
static void inputCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs);
|
||||
static void byeCB(Widget w,XtPointer client_data,XtPointer call_data);
|
||||
static void aboutCB(Widget w,XtPointer client_data,XtPointer call_data);
|
||||
static char* showvisualclass(int cls);
|
||||
|
||||
|
||||
|
||||
/* Sample application */
|
||||
int main(int argc, char *argv[]){
|
||||
char *thevisual;
|
||||
XVisualInfo vi;
|
||||
int nvisinfos,visid,n;
|
||||
Arg args[30];
|
||||
Widget pane,cascade,but;
|
||||
|
||||
/*
|
||||
** Initialize toolkit
|
||||
** We do *not* use XtAppInitialize as we want to figure visual and
|
||||
** colormap BEFORE we create the top level shell!!!
|
||||
*/
|
||||
XtToolkitInitialize();
|
||||
|
||||
/* Make application context */
|
||||
app_context=XtCreateApplicationContext();
|
||||
|
||||
/* Try open display */
|
||||
display=XtOpenDisplay(app_context,NULL,"boilerPlate","BoilerPlate",NULL,0,&argc,argv);
|
||||
|
||||
/* Report failure */
|
||||
if(!display){
|
||||
fprintf(stderr,"Unable to open the specified display.\n");
|
||||
fprintf(stderr,"Set your `DISPLAY' environment variable properly or\n");
|
||||
fprintf(stderr,"use the `xhost' command to authorize access to the display.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Check for extension; for Mesa, this is always cool */
|
||||
if(!glXQueryExtension(display,NULL,NULL)){
|
||||
fprintf(stderr,"The specified display does not support the OpenGL extension\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Init with default visual and colormap */
|
||||
gui_visual=DefaultVisual(display,0);
|
||||
gui_colormap=DefaultColormap(display,0);
|
||||
gl_colormap=DefaultColormap(display,0);
|
||||
|
||||
/* User insists on a specific visual */
|
||||
if((thevisual=getenv("SETVISUAL"))!=NULL){
|
||||
if(sscanf(thevisual,"%x",&visid)==1){
|
||||
vi.visualid=visid;
|
||||
gl_visualinfo=XGetVisualInfo(display,VisualIDMask,&vi,&nvisinfos);
|
||||
}
|
||||
else{
|
||||
fprintf(stderr,"Please set the `SETVISUAL' variable in hexadecimal\n");
|
||||
fprintf(stderr,"Use one of the Visual ID's reported by `xdpyinfo'\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Find visual the regular way */
|
||||
else{
|
||||
gl_visualinfo=glXChooseVisual(display,DefaultScreen(display),glxConfig);
|
||||
}
|
||||
|
||||
/* Make sure we have a visual */
|
||||
if(!gl_visualinfo){
|
||||
fprintf(stderr,"Unable to obtain visual for graphics\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Show what visual is being used */
|
||||
fprintf(stderr,"Using the following visual:\n");
|
||||
fprintf(stderr," visualid: %lx\n",gl_visualinfo->visualid);
|
||||
fprintf(stderr," depth: %d\n",gl_visualinfo->depth);
|
||||
fprintf(stderr," screen: %d\n",gl_visualinfo->screen);
|
||||
fprintf(stderr," bits/rgb: %d\n",gl_visualinfo->bits_per_rgb);
|
||||
fprintf(stderr," class: %s\n",showvisualclass(gl_visualinfo->c_class));
|
||||
|
||||
/*
|
||||
** If not using default visual, we need a colormap for this visual.
|
||||
** Yes, the GL widget can allocate one itself, but we want to make
|
||||
** sure the GUI and the 3D have the same one (if hardware does not
|
||||
** allow more than one simultaneously).
|
||||
** This prevents nasty flashing when the window with the 3D widget
|
||||
** looses the focus.
|
||||
*/
|
||||
if(gl_visualinfo->visual!=DefaultVisual(display,0)){
|
||||
fprintf(stderr,"Making another colormap\n");
|
||||
gl_colormap=XCreateColormap(display,
|
||||
RootWindow(display,0),
|
||||
gl_visualinfo->visual,
|
||||
AllocNone);
|
||||
if(!gl_colormap){
|
||||
fprintf(stderr,"Unable to create private colormap\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
** Use common visual for GUI and GL?
|
||||
** Maybe you can invoke some hardware interrogation function and
|
||||
** see if more than one hardware map is supported. For the purpose
|
||||
** of this demo, we'll use an environment variable instead.
|
||||
*/
|
||||
if(getenv("SAMEVISUAL")!=NULL){
|
||||
gui_visual=gl_visualinfo->visual;
|
||||
gui_colormap=gl_colormap;
|
||||
}
|
||||
|
||||
fprintf(stderr,"GUI uses visual: %lx\n",XVisualIDFromVisual(gui_visual));
|
||||
|
||||
/* Create application shell, finally */
|
||||
n=0;
|
||||
XtSetArg(args[n],XmNvisual,gui_visual); n++; /* Plug in that visual */
|
||||
XtSetArg(args[n],XmNcolormap,gui_colormap); n++; /* And that colormap */
|
||||
toplevel=XtAppCreateShell("boilerPlate","BoilerPlate",
|
||||
applicationShellWidgetClass,display,args,n);
|
||||
|
||||
|
||||
/* Main window */
|
||||
n=0;
|
||||
mainwindow=XmCreateMainWindow(toplevel,"window",args,n);
|
||||
XtManageChild(mainwindow);
|
||||
|
||||
/* Make a menu */
|
||||
n=0;
|
||||
XtSetArg(args[n],XmNmarginWidth,0); n++;
|
||||
XtSetArg(args[n],XmNmarginHeight,0); n++;
|
||||
menubar=XmCreateMenuBar(mainwindow,"menubar",args,2);
|
||||
XtManageChild(menubar);
|
||||
|
||||
n=0;
|
||||
pane=XmCreatePulldownMenu(menubar,"pane",args,n);
|
||||
n=0;
|
||||
but=XmCreatePushButton(pane,"Open",args,n);
|
||||
XtManageChild(but);
|
||||
but=XmCreatePushButton(pane,"Save",args,n);
|
||||
XtManageChild(but);
|
||||
but=XmCreatePushButton(pane,"Save As",args,n);
|
||||
XtManageChild(but);
|
||||
but=XmCreatePushButton(pane,"Quit",args,n);
|
||||
XtAddCallback(but,XmNactivateCallback,byeCB,(XtPointer)NULL);
|
||||
XtManageChild(but);
|
||||
XtSetArg(args[0],XmNsubMenuId,pane);
|
||||
cascade=XmCreateCascadeButton(menubar,"File",args,1);
|
||||
XtManageChild(cascade);
|
||||
|
||||
n=0;
|
||||
pane=XmCreatePulldownMenu(menubar,"pane",args,n);
|
||||
n=0;
|
||||
but=XmCreatePushButton(pane,"About",args,n);
|
||||
XtAddCallback(but,XmNactivateCallback,aboutCB,(XtPointer)NULL);
|
||||
XtManageChild(but);
|
||||
XtSetArg(args[0],XmNsubMenuId,pane);
|
||||
cascade=XmCreateCascadeButton(menubar,"Help",args,1);
|
||||
XtManageChild(cascade);
|
||||
XtVaSetValues(menubar,XmNmenuHelpWidget,cascade,NULL);
|
||||
|
||||
/* Main window form */
|
||||
n=0;
|
||||
XtSetArg(args[n],XmNmarginWidth,5); n++;
|
||||
XtSetArg(args[n],XmNmarginHeight,5); n++;
|
||||
mainform=XmCreateForm(mainwindow,"mainForm",args,n);
|
||||
XtManageChild(mainform);
|
||||
|
||||
/* Some nice button */
|
||||
n=0;
|
||||
XtSetArg(args[n],XmNbottomAttachment,XmATTACH_FORM); n++;
|
||||
XtSetArg(args[n],XmNrightAttachment,XmATTACH_FORM); n++;
|
||||
button=XmCreatePushButton(mainform,"Bye",args,n);
|
||||
XtAddCallback(button,XmNactivateCallback,byeCB,(XtPointer)NULL);
|
||||
XtManageChild(button);
|
||||
|
||||
n=0;
|
||||
XtSetArg(args[n],XmNleftAttachment,XmATTACH_FORM); n++;
|
||||
XtSetArg(args[n],XmNrightAttachment,XmATTACH_FORM); n++;
|
||||
XtSetArg(args[n],XmNbottomAttachment,XmATTACH_WIDGET); n++;
|
||||
XtSetArg(args[n],XmNbottomWidget,button); n++;
|
||||
XtSetArg(args[n],XmNshadowType,XmSHADOW_ETCHED_IN); n++;
|
||||
separator=XmCreateSeparator(mainform,"separator",args,n);
|
||||
XtManageChild(separator);
|
||||
|
||||
/* Main window frame */
|
||||
n = 0;
|
||||
XtSetArg(args[n],XmNleftAttachment,XmATTACH_FORM); n++;
|
||||
XtSetArg(args[n],XmNrightAttachment,XmATTACH_FORM); n++;
|
||||
XtSetArg(args[n],XmNtopAttachment,XmATTACH_FORM); n++;
|
||||
XtSetArg(args[n],XmNbottomAttachment,XmATTACH_WIDGET); n++;
|
||||
XtSetArg(args[n],XmNbottomWidget,separator); n++;
|
||||
XtSetArg(args[n],XmNshadowType,XmSHADOW_IN); n++;
|
||||
mainframe = XmCreateFrame(mainform,"mainFrame",args,n);
|
||||
XtManageChild(mainframe);
|
||||
|
||||
/* GL drawing area */
|
||||
n = 0;
|
||||
XtSetArg(args[n],XmNcolormap,gl_colormap); n++;
|
||||
XtSetArg(args[n],GLwNvisualInfo,gl_visualinfo); n++;
|
||||
XtSetArg(args[n],GLwNinstallColormap,True); n++;
|
||||
XtSetArg(args[n],XmNtraversalOn,True); n++;
|
||||
XtSetArg(args[n],XmNwidth,400); n++;
|
||||
XtSetArg(args[n],XmNheight,300); n++;
|
||||
glwidget = GLwCreateMDrawingArea(mainframe,"glWidget",args,n);
|
||||
XtAddCallback(glwidget,GLwNexposeCallback,(XtCallbackProc)exposeCB,(XtPointer)NULL);
|
||||
XtAddCallback(glwidget,GLwNresizeCallback,(XtCallbackProc)resizeCB,(XtPointer)NULL);
|
||||
XtAddCallback(glwidget,GLwNginitCallback,(XtCallbackProc)initCB,(XtPointer)NULL);
|
||||
XtAddCallback(glwidget,GLwNinputCallback,(XtCallbackProc)inputCB,(XtPointer)NULL);
|
||||
XtManageChild(glwidget);
|
||||
|
||||
/* Set into main window */
|
||||
XmMainWindowSetAreas(mainwindow,menubar,NULL,NULL,NULL,mainform);
|
||||
XtRealizeWidget(toplevel);
|
||||
|
||||
/* Loop until were done */
|
||||
XtAppMainLoop(app_context);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Show visual class */
|
||||
static char* showvisualclass(int cls){
|
||||
if(cls==TrueColor) return "TrueColor";
|
||||
if(cls==DirectColor) return "DirectColor";
|
||||
if(cls==PseudoColor) return "PseudoColor";
|
||||
if(cls==StaticColor) return "StaticColor";
|
||||
if(cls==GrayScale) return "GrayScale";
|
||||
if(cls==StaticGray) return "StaticGray";
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
|
||||
static void exposeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
|
||||
GLwDrawingAreaMakeCurrent(glwidget,glx_context);
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
|
||||
glLoadIdentity();
|
||||
glOrtho(-1.0,1.0,-1.0,1.0,0.0,1.0);
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
glLoadIdentity();
|
||||
|
||||
glColor3f(1.0,0.0,0.0);
|
||||
glBegin(GL_LINE_STRIP);
|
||||
glVertex3f(-1.0,-1.0,0.0);
|
||||
glVertex3f( 1.0, 1.0,0.0);
|
||||
glEnd();
|
||||
glXSwapBuffers(display,XtWindow(glwidget));
|
||||
}
|
||||
|
||||
|
||||
/* Initialize widget */
|
||||
static void initCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
|
||||
|
||||
/* First, create context. We prefer direct rendering */
|
||||
glx_context=glXCreateContext(display,gl_visualinfo,0,TRUE);
|
||||
if(!glx_context){
|
||||
fprintf(stderr,"Unable to create gl context\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Make it current */
|
||||
GLwDrawingAreaMakeCurrent(glwidget,glx_context);
|
||||
|
||||
/* Set a viewport */
|
||||
glViewport(0,0,cbs->width,cbs->height);
|
||||
|
||||
/* You might want to do a lot more here ... */
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glClearColor(1.0,1.0,1.0,1.0);
|
||||
glClearDepth(1.0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Widget changed size, so adjust txform */
|
||||
static void resizeCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
|
||||
GLwDrawingAreaMakeCurrent(glwidget,glx_context);
|
||||
glViewport(0,0,cbs->width,cbs->height);
|
||||
|
||||
/* blablabla */
|
||||
}
|
||||
|
||||
|
||||
/* Boilerplate event handling */
|
||||
static void inputCB(Widget w,XtPointer client_data,GLwDrawingAreaCallbackStruct *cbs){
|
||||
switch(cbs->event->type){
|
||||
case ButtonPress:
|
||||
switch(cbs->event->xbutton.button){
|
||||
case Button1: fprintf(stderr,"Pressed 1\n"); break;
|
||||
case Button2: fprintf(stderr,"Pressed 2\n"); break;
|
||||
case Button3: fprintf(stderr,"Pressed 3\n"); break;
|
||||
}
|
||||
break;
|
||||
case ButtonRelease:
|
||||
switch(cbs->event->xbutton.button){
|
||||
case Button1: fprintf(stderr,"Released 1\n"); break;
|
||||
case Button2: fprintf(stderr,"Released 2\n"); break;
|
||||
case Button3: fprintf(stderr,"Released 3\n"); break;
|
||||
}
|
||||
break;
|
||||
case MotionNotify:
|
||||
fprintf(stderr,"Moved mouse to (%d %d)\n",
|
||||
cbs->event->xbutton.x,
|
||||
cbs->event->xbutton.y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Hasta la vista, baby */
|
||||
static void byeCB(Widget w,XtPointer client_data,XtPointer call_data){
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
/* Pop informative panel */
|
||||
static void aboutCB(Widget w,XtPointer client_data,XtPointer call_data){
|
||||
Arg args[10];
|
||||
XmString str;
|
||||
Widget box;
|
||||
str=XmStringCreateLtoR("Boilerplate Mixed Model Programming Example\n\n (C) 1996 Jeroen van der Zijp \n\n jvz@cyberia.cfdrc.com",XmSTRING_DEFAULT_CHARSET);
|
||||
XtSetArg(args[0],XmNnoResize,True);
|
||||
XtSetArg(args[1],XmNautoUnmanage,True);
|
||||
XtSetArg(args[2],XmNmessageString,str);
|
||||
XtSetArg(args[3],XmNdefaultPosition,False);
|
||||
box=XmCreateInformationDialog(toplevel,"About Boilerplate",args,4);
|
||||
XtManageChild(box);
|
||||
XtUnmanageChild(XmMessageBoxGetChild(box,XmDIALOG_HELP_BUTTON));
|
||||
XtUnmanageChild(XmMessageBoxGetChild(box,XmDIALOG_CANCEL_BUTTON));
|
||||
XmStringFree(str);
|
||||
}
|
@@ -5,7 +5,7 @@ TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
|
||||
DEFINES += -DGLX_DIRECT_RENDERING
|
||||
DEFINES += -DGLX_DIRECT_RENDERING -DIN_MINI_GLX -UIN_DRI_DRIVER
|
||||
|
||||
C_SOURCES = \
|
||||
$(TOP)/src/mesa/main/dispatch.c \
|
||||
|
@@ -68,6 +68,8 @@ typedef struct DRIDriverContextRec {
|
||||
int cpp;
|
||||
int agpmode;
|
||||
int isPCI;
|
||||
|
||||
int colorTiling; /**< \brief color tiling is enabled */
|
||||
|
||||
unsigned long FBStart; /**< \brief physical address of the framebuffer */
|
||||
unsigned long MMIOStart; /**< \brief physical address of the MMIO region */
|
||||
|
@@ -30,3 +30,7 @@ agpmode=1
|
||||
|
||||
# Rotated monitor? -- NOTE: only works with subsetted radeon driver!
|
||||
rotateMode=0
|
||||
|
||||
# Do we want to use color tiling ?
|
||||
colorTiling=0
|
||||
|
||||
|
@@ -104,6 +104,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h> /* for gettimeofday */
|
||||
#include <linux/kd.h>
|
||||
#include <linux/vt.h>
|
||||
|
||||
@@ -115,17 +116,35 @@
|
||||
#include "glapi.h"
|
||||
|
||||
|
||||
extern GLboolean __glXCreateContextWithConfig(__DRInativeDisplay *dpy,
|
||||
static GLboolean __glXCreateContextWithConfig(__DRInativeDisplay *dpy,
|
||||
int screen, int fbconfigID, void *contextID,
|
||||
drm_context_t *hHWContext);
|
||||
|
||||
extern GLboolean __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn,
|
||||
static GLboolean __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn,
|
||||
__DRIid draw, unsigned int * index, unsigned int * stamp,
|
||||
int * x, int * y, int * width, int * height,
|
||||
int * numClipRects, drm_clip_rect_t ** pClipRects,
|
||||
int * backX, int * backY,
|
||||
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects);
|
||||
|
||||
static __DRIscreen * __glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn);
|
||||
|
||||
static GLboolean __glXWindowExists(__DRInativeDisplay *dpy, __DRIid draw);
|
||||
|
||||
static int __glXGetUST( int64_t * ust );
|
||||
|
||||
static GLboolean __glXGetMscRate(__DRInativeDisplay * dpy, __DRIid drawable,
|
||||
int32_t * numerator, int32_t * denominator);
|
||||
|
||||
static GLboolean xf86DRI_DestroyContext(__DRInativeDisplay *dpy, int screen,
|
||||
__DRIid context_id );
|
||||
|
||||
static GLboolean xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen,
|
||||
__DRIid drawable, drm_drawable_t *hHWDrawable );
|
||||
|
||||
static GLboolean xf86DRI_DestroyDrawable(__DRInativeDisplay *dpy, int screen,
|
||||
__DRIid drawable);
|
||||
|
||||
|
||||
/** Wrapper around either malloc() */
|
||||
void *
|
||||
@@ -418,6 +437,8 @@ SetupFBDev( Display *dpy )
|
||||
width = dpy->driverContext.shared.virtualWidth;
|
||||
height = dpy->driverContext.shared.virtualHeight;
|
||||
|
||||
if (width==832)
|
||||
width=800;
|
||||
/* Bump size up to next supported mode.
|
||||
*/
|
||||
if (width <= 720 && height <= 480) {
|
||||
@@ -440,8 +461,6 @@ SetupFBDev( Display *dpy )
|
||||
}
|
||||
|
||||
|
||||
dpy->driverContext.shared.virtualHeight = height;
|
||||
dpy->driverContext.shared.virtualWidth = width;
|
||||
dpy->driverContext.shared.fbStride = width * (dpy->driverContext.bpp / 8);
|
||||
|
||||
/* set the depth, resolution, etc */
|
||||
@@ -726,7 +745,7 @@ CloseFBDev( Display *dpy )
|
||||
* \internal
|
||||
* Returns the MiniGLXDisplayRec::driScreen attribute.
|
||||
*/
|
||||
__DRIscreen *
|
||||
static __DRIscreen *
|
||||
__glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn)
|
||||
{
|
||||
(void) scrn;
|
||||
@@ -743,11 +762,11 @@ __glXFindDRIScreen(__DRInativeDisplay *dpy, int scrn)
|
||||
* Since Mini GLX only supports one window, compares the specified drawable with
|
||||
* the MiniGLXDisplayRec::TheWindow attribute.
|
||||
*/
|
||||
Bool
|
||||
__glXWindowExists(__DRInativeDisplay *dpy, GLXDrawable draw)
|
||||
static GLboolean
|
||||
__glXWindowExists(__DRInativeDisplay *dpy, __DRIid draw)
|
||||
{
|
||||
Display* display = (Display*)dpy;
|
||||
if (display->TheWindow == draw)
|
||||
const Display * const display = (Display*)dpy;
|
||||
if (display->TheWindow == (Window) draw)
|
||||
return True;
|
||||
else
|
||||
return False;
|
||||
@@ -859,6 +878,7 @@ static int __read_config_file( Display *dpy )
|
||||
dpy->rotateMode = 0;
|
||||
dpy->driverContext.agpmode = 1;
|
||||
dpy->driverContext.isPCI = 0;
|
||||
dpy->driverContext.colorTiling = 0;
|
||||
|
||||
fname = getenv("MINIGLX_CONF");
|
||||
if (!fname) fname = "/etc/miniglx.conf";
|
||||
@@ -931,6 +951,9 @@ static int __read_config_file( Display *dpy )
|
||||
else if (strcmp(opt, "isPCI") == 0) {
|
||||
dpy->driverContext.isPCI = atoi(val) ? 1 : 0;
|
||||
}
|
||||
else if (strcmp(opt, "colorTiling") == 0) {
|
||||
dpy->driverContext.colorTiling = atoi(val) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(file);
|
||||
@@ -941,6 +964,19 @@ static int __read_config_file( Display *dpy )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Versioned name of the expected \c __driCreateNewScreen function.
|
||||
*
|
||||
* The version of the last incompatible loader/driver inteface change is
|
||||
* appended to the name of the \c __driCreateNewScreen function. This
|
||||
* prevents loaders from trying to load drivers that are too old.
|
||||
*
|
||||
* \todo
|
||||
* Create a macro or something so that this is automatically updated.
|
||||
*/
|
||||
static const char createNewScreenName[] = "__driCreateNewScreen_20050727";
|
||||
|
||||
|
||||
static int InitDriver( Display *dpy )
|
||||
{
|
||||
/*
|
||||
@@ -968,9 +1004,9 @@ static int InitDriver( Display *dpy )
|
||||
/* Pull in standard DRI client-side driver hooks:
|
||||
*/
|
||||
dpy->createNewScreen = (PFNCREATENEWSCREENFUNC)
|
||||
dlsym(dpy->dlHandle, "__driCreateNewScreen");
|
||||
dlsym(dpy->dlHandle, createNewScreenName);
|
||||
if (!dpy->createNewScreen) {
|
||||
fprintf(stderr, "Couldn't find __driCreateScreen in %s\n",
|
||||
fprintf(stderr, "Couldn't find %s in %s\n", createNewScreenName,
|
||||
dpy->clientDriverName);
|
||||
goto failed;
|
||||
}
|
||||
@@ -1083,10 +1119,43 @@ __miniglx_StartServer( const char *display_name )
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implement \c __DRIinterfaceMethods::getProcAddress.
|
||||
*/
|
||||
static __DRIfuncPtr get_proc_address( const char * proc_name )
|
||||
{
|
||||
(void) proc_name;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Table of functions exported by the loader to the driver.
|
||||
*/
|
||||
static const __DRIinterfaceMethods interface_methods = {
|
||||
get_proc_address,
|
||||
|
||||
_gl_context_modes_create,
|
||||
_gl_context_modes_destroy,
|
||||
|
||||
__glXFindDRIScreen,
|
||||
__glXWindowExists,
|
||||
|
||||
__glXCreateContextWithConfig,
|
||||
xf86DRI_DestroyContext,
|
||||
|
||||
xf86DRI_CreateDrawable,
|
||||
xf86DRI_DestroyDrawable,
|
||||
__glXGetDrawableInfo,
|
||||
|
||||
__glXGetUST,
|
||||
__glXGetMscRate,
|
||||
};
|
||||
|
||||
|
||||
static void *
|
||||
CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
|
||||
{
|
||||
int directCapable;
|
||||
void *psp = NULL;
|
||||
drm_handle_t hSAREA;
|
||||
drmAddress pSAREA;
|
||||
@@ -1102,11 +1171,8 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
|
||||
const char * err_extra;
|
||||
drmVersionPtr version;
|
||||
drm_handle_t hFB;
|
||||
int junk;
|
||||
drm_magic_t magic;
|
||||
|
||||
err_msg = "XF86DRIOpenConnection";
|
||||
err_extra = NULL;
|
||||
|
||||
hSAREA = dpy->driverContext.shared.hSAREA;
|
||||
BusID = dpy->driverContext.pciBusID;
|
||||
@@ -1149,7 +1215,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
|
||||
* We'll check the version in each DRI driver's "createScreen"
|
||||
* function.
|
||||
*/
|
||||
err_msg = "XF86DRIGetClientDriverName";
|
||||
ddx_version.major = 4;
|
||||
ddx_version.minor = 0;
|
||||
ddx_version.patch = 0;
|
||||
@@ -1157,7 +1222,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
|
||||
/*
|
||||
* Get the DRI X extension version.
|
||||
*/
|
||||
err_msg = "XF86DRIQueryVersion";
|
||||
dri_version.major = 4;
|
||||
dri_version.minor = 0;
|
||||
dri_version.patch = 0;
|
||||
@@ -1168,7 +1232,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
|
||||
* that has information about the screen size, depth, pitch,
|
||||
* ancilliary buffers, DRM mmap handles, etc.
|
||||
*/
|
||||
err_msg = "XF86DRIGetDeviceInfo";
|
||||
hFB = dpy->driverContext.shared.hFrameBuffer;
|
||||
framebuffer.size = dpy->driverContext.shared.fbSize;
|
||||
framebuffer.stride = dpy->driverContext.shared.fbStride;
|
||||
@@ -1198,11 +1261,6 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
|
||||
err_extra = strerror( -status );
|
||||
|
||||
if ( status == 0 ) {
|
||||
PFNGLXGETINTERNALVERSIONPROC get_ver;
|
||||
|
||||
get_ver = (PFNGLXGETINTERNALVERSIONPROC)
|
||||
glXGetProcAddress( (const GLubyte *) "__glXGetInternalVersion" );
|
||||
|
||||
err_msg = "InitDriver";
|
||||
err_extra = NULL;
|
||||
psp = dpy->createNewScreen(dpy, scrn, psc, NULL,
|
||||
@@ -1212,7 +1270,8 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc)
|
||||
& framebuffer,
|
||||
pSAREA,
|
||||
fd,
|
||||
(get_ver != NULL) ? (*get_ver)() : 20040602,
|
||||
20050727,
|
||||
& interface_methods,
|
||||
(__GLcontextModes **) &dpy->driver_modes);
|
||||
|
||||
/* fill in dummy visual ids */
|
||||
@@ -2083,7 +2142,7 @@ glXDestroyContext( Display *dpy, GLXContext ctx )
|
||||
if (ctx) {
|
||||
if (glxctx == ctx) {
|
||||
/* destroying current context */
|
||||
ctx->driContext.bindContext3(dpy, 0, 0, 0, 0);
|
||||
ctx->driContext.bindContext(dpy, 0, 0, 0, 0);
|
||||
CurrentContext = 0;
|
||||
}
|
||||
ctx->driContext.destroyContext(dpy, 0, ctx->driContext.private);
|
||||
@@ -2126,20 +2185,20 @@ glXMakeCurrent( Display *dpy, GLXDrawable drawable, GLXContext ctx)
|
||||
GLXDrawable oldDrawable = glXGetCurrentDrawable();
|
||||
/* unbind old */
|
||||
if (oldContext) {
|
||||
oldContext->driContext.unbindContext3(dpy, 0,
|
||||
oldContext->driContext.unbindContext(dpy, 0,
|
||||
(__DRIid) oldDrawable, (__DRIid) oldDrawable,
|
||||
&oldContext->driContext);
|
||||
}
|
||||
/* bind new */
|
||||
CurrentContext = ctx;
|
||||
ctx->driContext.bindContext3(dpy, 0, (__DRIid) drawable,
|
||||
ctx->driContext.bindContext(dpy, 0, (__DRIid) drawable,
|
||||
(__DRIid) drawable, &ctx->driContext);
|
||||
ctx->drawBuffer = drawable;
|
||||
ctx->curBuffer = drawable;
|
||||
}
|
||||
else if (ctx && dpy) {
|
||||
/* unbind */
|
||||
ctx->driContext.bindContext3(dpy, 0, 0, 0, 0);
|
||||
ctx->driContext.bindContext(dpy, 0, 0, 0, 0);
|
||||
}
|
||||
else if (dpy) {
|
||||
CurrentContext = 0; /* kw: this seems to be intended??? */
|
||||
@@ -2210,7 +2269,7 @@ glXGetCurrentDrawable( void )
|
||||
}
|
||||
|
||||
|
||||
GLboolean
|
||||
static GLboolean
|
||||
__glXCreateContextWithConfig(__DRInativeDisplay *dpy, int screen,
|
||||
int fbconfigID, void *contextID, drm_context_t *hHWContext)
|
||||
{
|
||||
@@ -2236,7 +2295,7 @@ __glXCreateContextWithConfig(__DRInativeDisplay *dpy, int screen,
|
||||
}
|
||||
|
||||
|
||||
GLboolean
|
||||
static GLboolean
|
||||
__glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn,
|
||||
__DRIid draw, unsigned int * index, unsigned int * stamp,
|
||||
int * x, int * y, int * width, int * height,
|
||||
@@ -2278,23 +2337,23 @@ __glXGetDrawableInfo(__DRInativeDisplay *dpy, int scrn,
|
||||
}
|
||||
|
||||
|
||||
GLboolean
|
||||
XF86DRIDestroyContext(__DRInativeDisplay *dpy, int screen, __DRIid context_id )
|
||||
static GLboolean
|
||||
xf86DRI_DestroyContext(__DRInativeDisplay *dpy, int screen, __DRIid context_id )
|
||||
{
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
GLboolean
|
||||
XF86DRICreateDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable,
|
||||
static GLboolean
|
||||
xf86DRI_CreateDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable,
|
||||
drm_drawable_t *hHWDrawable )
|
||||
{
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
GLboolean
|
||||
XF86DRIDestroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable)
|
||||
static GLboolean
|
||||
xf86DRI_DestroyDrawable(__DRInativeDisplay *dpy, int screen, __DRIid drawable)
|
||||
{
|
||||
return GL_TRUE;
|
||||
}
|
||||
@@ -2348,12 +2407,6 @@ void (*glXGetProcAddress(const GLubyte *procname))( void )
|
||||
{ "glXDestroyPbuffer", (void *) glXDestroyPbuffer },
|
||||
{ "glXChooseFBConfig", (void *) glXChooseFBConfig },
|
||||
{ "glXGetVisualFromFBConfig", (void *) glXGetVisualFromFBConfig },
|
||||
{ "__glXCreateContextWithConfig", (void *) __glXCreateContextWithConfig },
|
||||
{ "__glXGetDrawableInfo", (void *) __glXGetDrawableInfo },
|
||||
{ "__glXWindowExists", (void *) __glXWindowExists },
|
||||
{ "__glXCreateContextModes", (void *) _gl_context_modes_create },
|
||||
{ "__glXFindDRIScreen", (void *)__glXFindDRIScreen },
|
||||
{ "__glXScrEnableExtension", (void *)__glXScrEnableExtension },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
const struct name_address *entry;
|
||||
@@ -2438,32 +2491,73 @@ void *glXAllocateMemoryMESA(Display *dpy, int scrn,
|
||||
size_t size, float readFreq,
|
||||
float writeFreq, float priority)
|
||||
{
|
||||
if (dpy->driScreen.private && dpy->driScreen.allocateMemory) {
|
||||
return (*dpy->driScreen.allocateMemory)( dpy, scrn, size,
|
||||
readFreq, writeFreq,
|
||||
priority );
|
||||
}
|
||||
if (dpy->driScreen.private && dpy->driScreen.allocateMemory) {
|
||||
return (*dpy->driScreen.allocateMemory)( dpy, scrn, size,
|
||||
readFreq, writeFreq,
|
||||
priority );
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer){
|
||||
if (dpy->driScreen.private && dpy->driScreen.freeMemory) {
|
||||
(*dpy->driScreen.freeMemory)( dpy, scrn, pointer );
|
||||
}
|
||||
void glXFreeMemoryMESA(Display *dpy, int scrn, void *pointer)
|
||||
{
|
||||
if (dpy->driScreen.private && dpy->driScreen.freeMemory) {
|
||||
(*dpy->driScreen.freeMemory)( dpy, scrn, pointer );
|
||||
}
|
||||
}
|
||||
|
||||
GLuint glXGetMemoryOffsetMESA( Display *dpy, int scrn,
|
||||
const void *pointer )
|
||||
{
|
||||
if (dpy->driScreen.private && dpy->driScreen.memoryOffset) {
|
||||
return (*dpy->driScreen.memoryOffset)( dpy, scrn, pointer );
|
||||
}
|
||||
if (dpy->driScreen.private && dpy->driScreen.memoryOffset) {
|
||||
return (*dpy->driScreen.memoryOffset)( dpy, scrn, pointer );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
__glXScrEnableExtension( void *psc, const char * name )
|
||||
|
||||
/**
|
||||
* Get the unadjusted system time (UST). Currently, the UST is measured in
|
||||
* microseconds since Epoc. The actual resolution of the UST may vary from
|
||||
* system to system, and the units may vary from release to release.
|
||||
* Drivers should not call this function directly. They should instead use
|
||||
* \c glXGetProcAddress to obtain a pointer to the function.
|
||||
*
|
||||
* \param ust Location to store the 64-bit UST
|
||||
* \returns Zero on success or a negative errno value on failure.
|
||||
*
|
||||
* \note
|
||||
* This function was copied directly from src/glx/x11/glxcmds.c.
|
||||
*/
|
||||
static int __glXGetUST( int64_t * ust )
|
||||
{
|
||||
struct timeval tv;
|
||||
|
||||
if ( ust == NULL ) {
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
if ( gettimeofday( & tv, NULL ) == 0 ) {
|
||||
ust[0] = (tv.tv_sec * 1000000) + tv.tv_usec;
|
||||
return 0;
|
||||
} else {
|
||||
return -errno;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* \bug
|
||||
* This needs to be implemented for miniGlx.
|
||||
*/
|
||||
static GLboolean __glXGetMscRate(__DRInativeDisplay * dpy, __DRIid drawable,
|
||||
int32_t * numerator, int32_t * denominator)
|
||||
{
|
||||
*numerator = 0;
|
||||
*denominator = 0;
|
||||
return False;
|
||||
}
|
||||
/*@}*/
|
||||
|
@@ -199,9 +199,6 @@ extern int send_char_msg( Display *dpy, int i, char msg );
|
||||
extern int blocking_read( Display *dpy, int connection, char *msg, size_t msg_size );
|
||||
extern int handle_fd_events( Display *dpy, int nonblock );
|
||||
|
||||
|
||||
extern Bool __glXWindowExists(__DRInativeDisplay *dpy, GLXDrawable draw);
|
||||
|
||||
extern int __miniglx_open_connections( Display *dpy );
|
||||
extern void __miniglx_close_connections( Display *dpy );
|
||||
|
||||
|
@@ -38,7 +38,7 @@
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: miniglx_events.c,v 1.4 2004/07/16 04:27:00 jonsmirl Exp $ */
|
||||
/* $Id: miniglx_events.c,v 1.4.8.2 2005/08/31 01:25:24 airlied Exp $ */
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
@@ -258,6 +258,7 @@ static int welcome_message_part( Display *dpy, int i, void **msg, int sz )
|
||||
if (!*msg) *msg = malloc(sz);
|
||||
if (!*msg) return False;
|
||||
if (!blocking_read( dpy, i, *msg, sz )) return False;
|
||||
return sz;
|
||||
}
|
||||
else {
|
||||
if (!send_msg( dpy, i, &sz, sizeof(sz))) return False;
|
||||
@@ -283,18 +284,21 @@ static int welcome_message( Display *dpy, int i )
|
||||
{
|
||||
void *tmp = &dpy->driverContext.shared;
|
||||
int *clientid = dpy->IsClient ? &dpy->clientID : &i;
|
||||
|
||||
int size;
|
||||
if (!welcome_message_part( dpy, i, (void **)&clientid, sizeof(*clientid)))
|
||||
return False;
|
||||
|
||||
if (!welcome_message_part( dpy, i, &tmp, sizeof(dpy->driverContext.shared)))
|
||||
return False;
|
||||
|
||||
if (!welcome_message_part( dpy, i,
|
||||
size=welcome_message_part( dpy, i,
|
||||
(void **)&dpy->driverContext.driverClientMsg,
|
||||
dpy->driverContext.driverClientMsgSize ))
|
||||
dpy->driverContext.driverClientMsgSize );
|
||||
if (!size)
|
||||
return False;
|
||||
|
||||
if (dpy->IsClient) {
|
||||
dpy->driverContext.driverClientMsgSize = size;
|
||||
}
|
||||
return True;
|
||||
}
|
||||
|
||||
|
@@ -1,24 +1,15 @@
|
||||
TOP = ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
# Context creation has evolved over the years, such that this
|
||||
# code will not build with DNIO defined. When we finally drop old interface
|
||||
# support in libGL, we need to clean up both glxcmds.c and dri_interface.h.
|
||||
|
||||
DEFINES += -DGLX_DIRECT_RENDERING -DGLXEXT -DXF86DRI -DGLX_USE_DLOPEN \
|
||||
-DGLX_USE_MESA -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
|
||||
DEFINES += -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER
|
||||
|
||||
C_SOURCES = \
|
||||
$(TOP)/src/mesa/glapi/glapi.c \
|
||||
$(TOP)/src/mesa/glapi/glthread.c \
|
||||
$(TOP)/src/mesa/main/dispatch.c \
|
||||
glcontextmodes.c \
|
||||
$(DRM_SOURCE_PATH)/libdrm/xf86drm.c \
|
||||
$(DRM_SOURCE_PATH)/libdrm/xf86drmHash.c \
|
||||
$(DRM_SOURCE_PATH)/libdrm/xf86drmRandom.c \
|
||||
$(DRM_SOURCE_PATH)/libdrm/xf86drmSL.c \
|
||||
clientattrib.c \
|
||||
compsize.c \
|
||||
dispatch.c \
|
||||
eval.c \
|
||||
glxcmds.c \
|
||||
glxext.c \
|
||||
@@ -55,16 +46,10 @@ OBJECTS = $(C_SOURCES:.c=.o) \
|
||||
INCLUDES = -I. \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/include/GL/internal \
|
||||
-I$(TOP)/src/mesa \
|
||||
-I$(TOP)/src/mesa/main \
|
||||
-I$(TOP)/src/mesa/glapi \
|
||||
-I$(TOP)/src/mesa/math \
|
||||
-I$(TOP)/src/mesa/transform \
|
||||
-I$(TOP)/src/mesa/swrast \
|
||||
-I$(TOP)/src/mesa/swrast_setup \
|
||||
-I$(TOP)/src/mesa/drivers/dri/common \
|
||||
-I$(DRM_SOURCE_PATH)/libdrm \
|
||||
-I$(DRM_SOURCE_PATH)/shared-core \
|
||||
`pkg-config --cflags libdrm` \
|
||||
$(X11_INCLUDES)
|
||||
|
||||
|
||||
@@ -83,9 +68,6 @@ default: depend $(LIB_DIR)/$(GL_LIB_NAME)
|
||||
glcontextmodes.c:
|
||||
ln -s $(TOP)/src/mesa/drivers/dri/common/glcontextmodes.c .
|
||||
|
||||
dispatch.c:
|
||||
ln -s $(TOP)/src/mesa/main/dispatch.c .
|
||||
|
||||
# Make libGL
|
||||
$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
|
||||
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
|
||||
@@ -93,10 +75,6 @@ $(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
|
||||
-install $(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
|
||||
|
||||
|
||||
drmtest: xf86drm.o drmtest.o
|
||||
rm -f drmtest && $(CC) -o drmtest xf86drm.o drmtest.o
|
||||
|
||||
|
||||
depend: $(C_SOURCES) $(ASM_SOURCES) Makefile
|
||||
touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(ASM_SOURCES)
|
||||
|
@@ -40,7 +40,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#define NEED_REPLIES
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include "extutil.h"
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include "glheader.h"
|
||||
#include "xf86dristr.h"
|
||||
|
||||
|
@@ -38,7 +38,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#include <unistd.h>
|
||||
#include <X11/Xlibint.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include "extutil.h"
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include "glxclient.h"
|
||||
#include "xf86dri.h"
|
||||
#include "sarea.h"
|
||||
|
@@ -31,8 +31,8 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "glxclient.h"
|
||||
#include <extutil.h>
|
||||
#include <Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "glapi.h"
|
||||
|
@@ -60,8 +60,8 @@
|
||||
#include "GL/internal/glcore.h"
|
||||
#include "glapitable.h"
|
||||
#include "glxextensions.h"
|
||||
#if defined( XTHREADS )
|
||||
# include "Xthreads.h"
|
||||
#if defined( USE_XTHREADS )
|
||||
# include <X11/Xthreads.h>
|
||||
#elif defined( PTHREADS )
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
@@ -154,51 +154,6 @@ typedef struct __GLXpixelStoreModeRec {
|
||||
GLuint alignment;
|
||||
} __GLXpixelStoreMode;
|
||||
|
||||
/* The next 3 structures are deprecated. Client state is no longer tracked
|
||||
* using them. They only remain to maintain the layout / structure offset of
|
||||
* __GLXcontextRec. In XFree86 5.0 they will be removed altogether.
|
||||
*/
|
||||
|
||||
typedef struct __GLXvertexArrayPointerStateRecDEPRECATED {
|
||||
GLboolean enable;
|
||||
void (*proc)(const void *);
|
||||
const GLubyte *ptr;
|
||||
GLsizei skip;
|
||||
GLint size;
|
||||
GLenum type;
|
||||
GLsizei stride;
|
||||
} __GLXvertexArrayPointerStateDEPRECATED;
|
||||
|
||||
typedef struct __GLXvertArrayStateRecDEPRECATED {
|
||||
__GLXvertexArrayPointerStateDEPRECATED vertex;
|
||||
__GLXvertexArrayPointerStateDEPRECATED normal;
|
||||
__GLXvertexArrayPointerStateDEPRECATED color;
|
||||
__GLXvertexArrayPointerStateDEPRECATED index;
|
||||
__GLXvertexArrayPointerStateDEPRECATED texCoord[__GLX_MAX_TEXTURE_UNITS];
|
||||
__GLXvertexArrayPointerStateDEPRECATED edgeFlag;
|
||||
GLint maxElementsVertices;
|
||||
GLint maxElementsIndices;
|
||||
GLint activeTexture;
|
||||
} __GLXvertArrayStateDEPRECATED;
|
||||
|
||||
typedef struct __GLXattributeRecDEPRECATED {
|
||||
GLuint mask;
|
||||
|
||||
/*
|
||||
** Pixel storage state. Most of the pixel store mode state is kept
|
||||
** here and used by the client code to manage the packing and
|
||||
** unpacking of data sent to/received from the server.
|
||||
*/
|
||||
__GLXpixelStoreMode storePack, storeUnpack;
|
||||
|
||||
/*
|
||||
** Vertex Array storage state. The vertex array component
|
||||
** state is stored here and is used to manage the packing of
|
||||
** DrawArrays data sent to the server.
|
||||
*/
|
||||
__GLXvertArrayStateDEPRECATED vertArray;
|
||||
} __GLXattributeDEPRECATED;
|
||||
|
||||
|
||||
typedef struct __GLXattributeRec {
|
||||
GLuint mask;
|
||||
@@ -330,12 +285,9 @@ struct __GLXcontextRec {
|
||||
GLenum, const GLvoid*, GLubyte*, GLubyte*);
|
||||
|
||||
/**
|
||||
* \name Client side attribs.
|
||||
* Client side attribs.
|
||||
*/
|
||||
/*@{*/
|
||||
__GLXattributeDEPRECATED stateDEPRECATED;
|
||||
__GLXattributeMachine attributes;
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* Client side error code. This is set when client side gl API
|
||||
@@ -595,7 +547,7 @@ extern __GLXdisplayPrivate *__glXInitialize(Display*);
|
||||
extern int __glXDebug;
|
||||
|
||||
/* This is per-thread storage in an MT environment */
|
||||
#if defined( XTHREADS ) || defined( PTHREADS )
|
||||
#if defined( USE_XTHREADS ) || defined( PTHREADS )
|
||||
|
||||
extern void __glXSetCurrentContext(__GLXcontext *c);
|
||||
|
||||
@@ -618,14 +570,14 @@ extern __GLXcontext *__glXcurrentContext;
|
||||
#define __glXGetCurrentContext() __glXcurrentContext
|
||||
#define __glXSetCurrentContext(gc) __glXcurrentContext = gc
|
||||
|
||||
#endif /* defined( XTHREADS ) || defined( PTHREADS ) */
|
||||
#endif /* defined( USE_XTHREADS ) || defined( PTHREADS ) */
|
||||
|
||||
|
||||
/*
|
||||
** Global lock for all threads in this address space using the GLX
|
||||
** extension
|
||||
*/
|
||||
#if defined( XTHREADS )
|
||||
#if defined( USE_XTHREADS )
|
||||
extern xmutex_rec __glXmutex;
|
||||
#define __glXLock() xmutex_lock(&__glXmutex)
|
||||
#define __glXUnlock() xmutex_unlock(&__glXmutex)
|
||||
|
@@ -41,14 +41,14 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "glxclient.h"
|
||||
#include <extutil.h>
|
||||
#include <Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "glapi.h"
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
#include "indirect_init.h"
|
||||
#include "xf86vmode.h"
|
||||
#include <X11/extensions/xf86vmode.h>
|
||||
#include "xf86dri.h"
|
||||
#endif
|
||||
#include "glxextensions.h"
|
||||
@@ -1269,7 +1269,7 @@ PUBLIC const char *glXQueryExtensionsString( Display *dpy, int screen )
|
||||
|
||||
__glXCalculateUsableExtensions(psc,
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
(priv->driDisplay.private != NULL),
|
||||
(psc->driScreen.private != NULL),
|
||||
#else
|
||||
GL_FALSE,
|
||||
#endif
|
||||
|
@@ -46,16 +46,11 @@
|
||||
|
||||
#include "glxclient.h"
|
||||
#include <stdio.h>
|
||||
#include <Xext.h>
|
||||
#include <extutil.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include <assert.h>
|
||||
#include "indirect_init.h"
|
||||
#include "glapi.h"
|
||||
#ifdef XTHREADS
|
||||
# include "Xthreads.h"
|
||||
#elif defined(PTHREADS)
|
||||
# include <pthread.h>
|
||||
#endif
|
||||
#include "glxextensions.h"
|
||||
#include "glcontextmodes.h"
|
||||
#include "glheader.h"
|
||||
@@ -150,7 +145,7 @@ static __GLapi *IndirectAPI = NULL;
|
||||
* Current context management and locking
|
||||
*/
|
||||
|
||||
#if defined( XTHREADS )
|
||||
#if defined( USE_XTHREADS )
|
||||
|
||||
/* thread safe */
|
||||
static GLboolean TSDinitialized = GL_FALSE;
|
||||
@@ -733,7 +728,7 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
__DRIscreenPrivate *psp = NULL;
|
||||
#ifndef GLX_USE_APPLEGL
|
||||
drm_handle_t hSAREA;
|
||||
drmAddress pSAREA;
|
||||
drmAddress pSAREA = MAP_FAILED;
|
||||
char *BusID;
|
||||
__DRIversion ddx_version;
|
||||
__DRIversion dri_version;
|
||||
@@ -754,6 +749,7 @@ CallCreateNewScreen(Display *dpy, int scrn, __DRIscreen *psc,
|
||||
err_msg = "XF86DRIOpenConnection";
|
||||
err_extra = NULL;
|
||||
|
||||
framebuffer.base = MAP_FAILED;
|
||||
framebuffer.dev_priv = NULL;
|
||||
|
||||
if (XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) {
|
||||
@@ -1111,7 +1107,7 @@ __GLXdisplayPrivate *__glXInitialize(Display* dpy)
|
||||
XEDataObject dataObj;
|
||||
int major, minor;
|
||||
|
||||
#if defined(XTHREADS)
|
||||
#if defined(USE_XTHREADS)
|
||||
{
|
||||
static int firstCall = 1;
|
||||
if (firstCall) {
|
||||
@@ -1593,7 +1589,9 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
|
||||
|
||||
oldGC->currentContextTag = 0;
|
||||
}
|
||||
|
||||
|
||||
_glapi_check_multithread();
|
||||
|
||||
#ifdef GLX_DIRECT_RENDERING
|
||||
/* Unbind the old direct rendering context */
|
||||
if (oldGC->isDirect) {
|
||||
@@ -1613,7 +1611,6 @@ USED static Bool MakeContextCurrent(Display *dpy, GLXDrawable draw,
|
||||
}
|
||||
} else {
|
||||
#endif
|
||||
_glapi_check_multithread();
|
||||
/* Send a glXMakeCurrent request to bind the new context. */
|
||||
LockDisplay(dpy);
|
||||
|
||||
|
@@ -29,8 +29,8 @@
|
||||
*/
|
||||
|
||||
#include "glxclient.h"
|
||||
#include <extutil.h>
|
||||
#include <Xext.h>
|
||||
#include <X11/extensions/extutil.h>
|
||||
#include <X11/extensions/Xext.h>
|
||||
#include <string.h>
|
||||
#include "glapi.h"
|
||||
#include "glxextensions.h"
|
||||
|
@@ -39,7 +39,7 @@
|
||||
|
||||
#define __GLX_PAD(n) (((n) + 3) & ~3)
|
||||
|
||||
# if defined(__i386__) && defined(__GNUC__)
|
||||
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define FASTCALL __attribute__((fastcall))
|
||||
# else
|
||||
# define FASTCALL
|
||||
|
@@ -37,12 +37,12 @@
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
||||
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
|
||||
# define HIDDEN __attribute__((visibility("hidden")))
|
||||
# else
|
||||
# define HIDDEN
|
||||
# endif
|
||||
# if defined(__i386__) && defined(__GNUC__)
|
||||
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define FASTCALL __attribute__((fastcall))
|
||||
# else
|
||||
# define FASTCALL
|
||||
|
@@ -613,7 +613,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->PointParameterfEXT = __indirect_glPointParameterfEXT;
|
||||
glAPI->PointParameterfvEXT = __indirect_glPointParameterfvEXT;
|
||||
|
||||
/* 145. GL_EXT_secondary_color */
|
||||
/* 145. GL_EXT_secondary_color */
|
||||
|
||||
glAPI->SecondaryColor3usvEXT = __indirect_glSecondaryColor3usvEXT;
|
||||
glAPI->SecondaryColorPointerEXT = __indirect_glSecondaryColorPointerEXT;
|
||||
@@ -633,12 +633,12 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->SecondaryColor3uivEXT = __indirect_glSecondaryColor3uivEXT;
|
||||
glAPI->SecondaryColor3usEXT = __indirect_glSecondaryColor3usEXT;
|
||||
|
||||
/* 148. GL_EXT_multi_draw_arrays */
|
||||
/* 148. GL_EXT_multi_draw_arrays */
|
||||
|
||||
glAPI->MultiDrawArraysEXT = __indirect_glMultiDrawArraysEXT;
|
||||
glAPI->MultiDrawElementsEXT = __indirect_glMultiDrawElementsEXT;
|
||||
|
||||
/* 149. GL_EXT_fog_coord */
|
||||
/* 149. GL_EXT_fog_coord */
|
||||
|
||||
glAPI->FogCoordfEXT = __indirect_glFogCoordfEXT;
|
||||
glAPI->FogCoordfvEXT = __indirect_glFogCoordfvEXT;
|
||||
@@ -646,11 +646,11 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->FogCoorddvEXT = __indirect_glFogCoorddvEXT;
|
||||
glAPI->FogCoordPointerEXT = __indirect_glFogCoordPointerEXT;
|
||||
|
||||
/* 173. GL_EXT_blend_func_separate */
|
||||
/* 173. GL_EXT_blend_func_separate */
|
||||
|
||||
glAPI->BlendFuncSeparateEXT = __indirect_glBlendFuncSeparateEXT;
|
||||
|
||||
/* 197. GL_MESA_window_pos */
|
||||
/* 197. GL_MESA_window_pos */
|
||||
|
||||
glAPI->WindowPos2dMESA = __indirect_glWindowPos2dMESA;
|
||||
glAPI->WindowPos2dvMESA = __indirect_glWindowPos2dvMESA;
|
||||
@@ -669,7 +669,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->WindowPos3sMESA = __indirect_glWindowPos3sMESA;
|
||||
glAPI->WindowPos3svMESA = __indirect_glWindowPos3svMESA;
|
||||
|
||||
/* 233. GL_NV_vertex_program */
|
||||
/* 233. GL_NV_vertex_program */
|
||||
|
||||
glAPI->VertexAttribs4svNV = __indirect_glVertexAttribs4svNV;
|
||||
glAPI->VertexAttribs4ubvNV = __indirect_glVertexAttribs4ubvNV;
|
||||
@@ -736,16 +736,16 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->VertexAttribs4dvNV = __indirect_glVertexAttribs4dvNV;
|
||||
glAPI->VertexAttribs4fvNV = __indirect_glVertexAttribs4fvNV;
|
||||
|
||||
/* 262. GL_NV_point_sprite */
|
||||
/* 262. GL_NV_point_sprite */
|
||||
|
||||
glAPI->PointParameteriNV = __indirect_glPointParameteriNV;
|
||||
glAPI->PointParameterivNV = __indirect_glPointParameterivNV;
|
||||
|
||||
/* 268. GL_EXT_stencil_two_side */
|
||||
/* 268. GL_EXT_stencil_two_side */
|
||||
|
||||
glAPI->ActiveStencilFaceEXT = __indirect_glActiveStencilFaceEXT;
|
||||
|
||||
/* 282. GL_NV_fragment_program */
|
||||
/* 282. GL_NV_fragment_program */
|
||||
|
||||
glAPI->ProgramNamedParameter4fNV = __indirect_glProgramNamedParameter4fNV;
|
||||
glAPI->ProgramNamedParameter4dNV = __indirect_glProgramNamedParameter4dNV;
|
||||
@@ -754,7 +754,7 @@ __GLapi * __glXNewIndirectAPI( void )
|
||||
glAPI->GetProgramNamedParameterfvNV = __indirect_glGetProgramNamedParameterfvNV;
|
||||
glAPI->GetProgramNamedParameterdvNV = __indirect_glGetProgramNamedParameterdvNV;
|
||||
|
||||
/* 310. GL_EXT_framebuffer_object */
|
||||
/* 310. GL_EXT_framebuffer_object */
|
||||
|
||||
glAPI->RenderbufferStorageEXT = __indirect_glRenderbufferStorageEXT;
|
||||
glAPI->GetRenderbufferParameterivEXT = __indirect_glGetRenderbufferParameterivEXT;
|
||||
|
@@ -29,29 +29,28 @@
|
||||
#include <GL/gl.h>
|
||||
#include "indirect_size.h"
|
||||
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
||||
# define HAVE_ALIAS
|
||||
# endif
|
||||
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
|
||||
# define PURE __attribute__((pure))
|
||||
# else
|
||||
# define PURE
|
||||
# endif
|
||||
|
||||
# if defined(__i386__) && defined(__GNUC__)
|
||||
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define FASTCALL __attribute__((fastcall))
|
||||
# else
|
||||
# define FASTCALL
|
||||
# endif
|
||||
|
||||
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
||||
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
|
||||
# define INTERNAL __attribute__((visibility("internal")))
|
||||
# else
|
||||
# define INTERNAL
|
||||
# endif
|
||||
|
||||
|
||||
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
|
||||
# undef HAVE_ALIAS
|
||||
#endif
|
||||
#ifdef HAVE_ALIAS
|
||||
# define ALIAS2(from,to) \
|
||||
INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
|
||||
@@ -365,10 +364,7 @@ ALIAS( Map2f, Map2d )
|
||||
ALIAS( ColorTableParameteriv, ColorTableParameterfv )
|
||||
ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
|
||||
ALIAS( PointParameterivNV, PointParameterfvEXT )
|
||||
ALIAS( PointParameterfvARB, PointParameterfvEXT )
|
||||
ALIAS( PointParameteriv, PointParameterfvEXT )
|
||||
|
||||
# undef HAVE_ALIAS
|
||||
# undef PURE
|
||||
# undef FASTCALL
|
||||
# undef INTERNAL
|
||||
|
@@ -42,13 +42,13 @@
|
||||
# define PURE
|
||||
# endif
|
||||
|
||||
# if defined(__i386__) && defined(__GNUC__)
|
||||
# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
|
||||
# define FASTCALL __attribute__((fastcall))
|
||||
# else
|
||||
# define FASTCALL
|
||||
# endif
|
||||
|
||||
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
|
||||
# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
|
||||
# define INTERNAL __attribute__((visibility("internal")))
|
||||
# else
|
||||
# define INTERNAL
|
||||
|
@@ -29,7 +29,7 @@ static void TransposeMatrixf(const GLfloat s[16], GLfloat d[16])
|
||||
{
|
||||
int i, j;
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < i; j++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
d[i*4+j] = s[j*4+i];
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ static void TransposeMatrixd(const GLdouble s[16], GLdouble d[16])
|
||||
{
|
||||
int i, j;
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < i; j++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
d[i*4+j] = s[j*4+i];
|
||||
}
|
||||
}
|
||||
|
@@ -211,12 +211,14 @@ struct array_state_vector {
|
||||
* There are some bytes of extra data before \c array_info_cache that is
|
||||
* used to hold the header for RenderLarge commands. This is
|
||||
* \b not included in \c array_info_cache_size or
|
||||
* \c array_info_cache_buffer_size.
|
||||
* \c array_info_cache_buffer_size. \c array_info_cache_base stores a
|
||||
* pointer to the true start of the buffer (i.e., what malloc returned).
|
||||
*/
|
||||
/*@{*/
|
||||
size_t array_info_cache_size;
|
||||
size_t array_info_cache_buffer_size;
|
||||
void * array_info_cache;
|
||||
void * array_info_cache_base;
|
||||
/*@}*/
|
||||
|
||||
|
||||
|
@@ -382,13 +382,14 @@ allocate_array_info_cache( struct array_state_vector * arrays,
|
||||
{
|
||||
#define MAX_HEADER_SIZE 20
|
||||
if ( arrays->array_info_cache_buffer_size < required_size ) {
|
||||
GLubyte * temp = realloc( arrays->array_info_cache, required_size
|
||||
+ MAX_HEADER_SIZE );
|
||||
GLubyte * temp = realloc( arrays->array_info_cache_base,
|
||||
required_size + MAX_HEADER_SIZE );
|
||||
|
||||
if ( temp == NULL ) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
arrays->array_info_cache_base = temp;
|
||||
arrays->array_info_cache = temp + MAX_HEADER_SIZE;
|
||||
arrays->array_info_cache_buffer_size = required_size;
|
||||
}
|
||||
|
@@ -94,154 +94,110 @@ void __indirect_glInterleavedArrays(GLenum format, GLsizei stride, const GLvoid
|
||||
{
|
||||
__GLXcontext *gc = __glXGetCurrentContext();
|
||||
__GLXattribute * state = (__GLXattribute *)(gc->client_state_private);
|
||||
GLboolean tEnable = GL_FALSE, cEnable = GL_FALSE, nEnable = GL_FALSE;
|
||||
GLenum tType = GL_FLOAT, nType = GL_FLOAT, vType = GL_FLOAT;
|
||||
GLenum cType = GL_FALSE;
|
||||
GLint tSize = 0, cSize = 0, nSize = 3, vSize;
|
||||
int cOffset = 0, nOffset = 0, vOffset = 0;
|
||||
GLint trueStride, size;
|
||||
|
||||
switch (format) {
|
||||
case GL_V2F:
|
||||
vSize = 2;
|
||||
size = __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_V3F:
|
||||
vSize = 3;
|
||||
size = __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_C4UB_V2F:
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 4;
|
||||
cType = GL_UNSIGNED_BYTE;
|
||||
vSize = 2;
|
||||
vOffset = __glXTypeSize(cType) * cSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_C4UB_V3F:
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 4;
|
||||
cType = GL_UNSIGNED_BYTE;
|
||||
vSize = 3;
|
||||
vOffset = __glXTypeSize(vType) * cSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_C3F_V3F:
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 3;
|
||||
cType = GL_FLOAT;
|
||||
vSize = 3;
|
||||
vOffset = __glXTypeSize(cType) * cSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_N3F_V3F:
|
||||
nEnable = GL_TRUE;
|
||||
vSize = 3;
|
||||
vOffset = __glXTypeSize(nType) * nSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_C4F_N3F_V3F:
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 4;
|
||||
cType = GL_FLOAT;
|
||||
nEnable = GL_TRUE;
|
||||
nOffset = __glXTypeSize(cType) * cSize;
|
||||
vSize = 3;
|
||||
vOffset = nOffset + __glXTypeSize(nType) * nSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_T2F_V3F:
|
||||
tEnable = GL_TRUE;
|
||||
tSize = 2;
|
||||
vSize = 3;
|
||||
vOffset = __glXTypeSize(tType) * tSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_T4F_V4F:
|
||||
tEnable = GL_TRUE;
|
||||
tSize = 4;
|
||||
vSize = 4;
|
||||
vOffset = __glXTypeSize(tType) * tSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_T2F_C4UB_V3F:
|
||||
tEnable = GL_TRUE;
|
||||
tSize = 2;
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 4;
|
||||
cType = GL_UNSIGNED_BYTE;
|
||||
cOffset = __glXTypeSize(tType) * tSize;
|
||||
vSize = 3;
|
||||
vOffset = cOffset + __glXTypeSize(cType) * cSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_T2F_C3F_V3F:
|
||||
tEnable = GL_TRUE;
|
||||
tSize = 2;
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 3;
|
||||
cType = GL_FLOAT;
|
||||
cOffset = __glXTypeSize(tType) * tSize;
|
||||
vSize = 3;
|
||||
vOffset = cOffset + __glXTypeSize(cType) * cSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_T2F_N3F_V3F:
|
||||
tEnable = GL_TRUE;
|
||||
tSize = 2;
|
||||
nEnable = GL_TRUE;
|
||||
nOffset = __glXTypeSize(tType) * tSize;
|
||||
vSize = 3;
|
||||
vOffset = nOffset + __glXTypeSize(nType) * nSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_T2F_C4F_N3F_V3F:
|
||||
tEnable = GL_TRUE;
|
||||
tSize = 2;
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 4;
|
||||
cType = GL_FLOAT;
|
||||
cOffset = __glXTypeSize(tType) * tSize;
|
||||
nEnable = GL_TRUE;
|
||||
nOffset = cOffset + __glXTypeSize(cType) * cSize;
|
||||
vSize = 3;
|
||||
vOffset = nOffset + __glXTypeSize(nType) * nSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
case GL_T4F_C4F_N3F_V4F:
|
||||
tEnable = GL_TRUE;
|
||||
tSize = 4;
|
||||
cEnable = GL_TRUE;
|
||||
cSize = 4;
|
||||
cType = GL_FLOAT;
|
||||
cOffset = __glXTypeSize(tType) * tSize;
|
||||
nEnable = GL_TRUE;
|
||||
nOffset = cOffset + __glXTypeSize(cType) * cSize;
|
||||
vSize = 4;
|
||||
vOffset = nOffset + __glXTypeSize(nType) * nSize;
|
||||
size = vOffset + __glXTypeSize(vType) * vSize;
|
||||
break;
|
||||
default:
|
||||
#define NONE {0, 0, 0}
|
||||
#define F(x) {GL_FLOAT, x, x * sizeof(GLfloat)}
|
||||
#define UB4 {GL_UNSIGNED_BYTE, 4, 4 * sizeof(GLubyte)}
|
||||
|
||||
/* Each row in this array describes the elements of a particular
|
||||
* interleaved array mode. Each column describes, in the order in which
|
||||
* they appear in the interleaved arrays, one of the four possible types
|
||||
* of vertex data that can appear in an interleaved array.
|
||||
*/
|
||||
struct {
|
||||
/**
|
||||
* The enum describing the GL type, as would be passed to the
|
||||
* appropriate gl*Pointer function.
|
||||
*/
|
||||
GLushort type;
|
||||
|
||||
/**
|
||||
* Number of elements in the subarray, as would be passed (as the
|
||||
* \c size parameter) to the appropriate gl*Pointer function.
|
||||
*/
|
||||
GLubyte count;
|
||||
|
||||
/**
|
||||
* True size of a single element in the subarray, as would be passed
|
||||
* (as the \c stride parameter) to the appropriate gl*Pointer
|
||||
* function.
|
||||
*/
|
||||
GLubyte size;
|
||||
}
|
||||
static const modes[14][4] = {
|
||||
/* texture color normal vertex */
|
||||
{NONE, NONE, NONE, F(2)}, /* GL_V2F */
|
||||
{NONE, NONE, NONE, F(3)}, /* GL_V3F */
|
||||
{NONE, UB4, NONE, F(2)}, /* GL_C4UB_V2F */
|
||||
{NONE, UB4, NONE, F(3)}, /* GL_C4UB_V3F */
|
||||
{NONE, F(3), NONE, F(3)}, /* GL_C3F_V3F */
|
||||
{NONE, NONE, F(3), F(3)}, /* GL_N3F_V3F */
|
||||
{NONE, F(4), F(3), F(3)}, /* GL_C4F_N3F_V3F */
|
||||
{F(2), NONE, NONE, F(3)}, /* GL_T2F_V3F */
|
||||
{F(4), NONE, NONE, F(4)}, /* GL_T4F_V4F */
|
||||
{F(2), UB4, NONE, F(3)}, /* GL_T2F_C4UB_V3F */
|
||||
{F(2), F(3), NONE, F(3)}, /* GL_T2F_C3F_V3F */
|
||||
{F(2), NONE, F(3), F(3)}, /* GL_T2F_N3F_V3F */
|
||||
{F(2), F(4), F(3), F(3)}, /* GL_T2F_C4F_N3F_V3F */
|
||||
{F(4), F(4), F(3), F(4)}, /* GL_T4F_C4F_N3F_V4F */
|
||||
};
|
||||
#undef NONE
|
||||
#undef F
|
||||
#undef UB4
|
||||
|
||||
GLint trueStride, size;
|
||||
int offsets[4];
|
||||
unsigned i;
|
||||
const int idx = format - GL_V2F;
|
||||
|
||||
|
||||
/* All valid formats are on the range [GL_V2F, GL_V2F+0x0D]. Since idx
|
||||
* is just the format biased by -GL_V2F, all valid idx values are on the
|
||||
* range [0, 0x0D].
|
||||
*/
|
||||
if ( (idx < 0) || (idx > 0x0D) ) {
|
||||
__glXSetError(gc, GL_INVALID_ENUM);
|
||||
return;
|
||||
}
|
||||
|
||||
if ( stride < 0 ) {
|
||||
__glXSetError(gc, GL_INVALID_VALUE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* If the 'count' for a subarray is non-zero, then the offset of its
|
||||
* first element is at the currently accumulated 'size'.
|
||||
*/
|
||||
size = 0;
|
||||
for ( i = 0 ; i < 4 ; i++ ) {
|
||||
offsets[i] = (modes[idx][i].count != 0) ? size : -1;
|
||||
size += modes[idx][i].size;
|
||||
}
|
||||
|
||||
trueStride = (stride == 0) ? size : stride;
|
||||
|
||||
__glXArrayDisableAll( state );
|
||||
|
||||
if (tEnable) {
|
||||
if ( offsets[0] >= 0 ) {
|
||||
__indirect_glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
__indirect_glTexCoordPointer(tSize, tType, trueStride, (const char *)pointer);
|
||||
__indirect_glTexCoordPointer( modes[idx][0].count, GL_FLOAT,
|
||||
trueStride,
|
||||
(const char *) pointer );
|
||||
}
|
||||
if (cEnable) {
|
||||
if ( offsets[1] >= 0 ) {
|
||||
__indirect_glEnableClientState(GL_COLOR_ARRAY);
|
||||
__indirect_glColorPointer(cSize, cType, trueStride, (const char *)pointer+cOffset);
|
||||
__indirect_glColorPointer( modes[idx][1].count, modes[idx][1].type,
|
||||
trueStride,
|
||||
(const char *) pointer + offsets[1] );
|
||||
}
|
||||
if (nEnable) {
|
||||
if ( offsets[2] >= 0 ) {
|
||||
__indirect_glEnableClientState(GL_NORMAL_ARRAY);
|
||||
__indirect_glNormalPointer(nType, trueStride, (const char *)pointer+nOffset);
|
||||
__indirect_glNormalPointer( GL_FLOAT, trueStride,
|
||||
(const char *)pointer + offsets[2] );
|
||||
}
|
||||
__indirect_glEnableClientState(GL_VERTEX_ARRAY);
|
||||
__indirect_glVertexPointer(vSize, vType, trueStride, (const char *)pointer+vOffset);
|
||||
__indirect_glVertexPointer( modes[idx][3].count, GL_FLOAT,
|
||||
trueStride,
|
||||
(const char *)pointer + offsets[3] );
|
||||
}
|
||||
|
@@ -57,6 +57,9 @@
|
||||
.INTERMEDIATE: x86/gen_matypes.exe
|
||||
.SUFFIXES: .rc .res
|
||||
|
||||
# Set this to the prefix of your build tools, i.e. mingw32-
|
||||
TOOLS_PREFIX = mingw32-
|
||||
|
||||
TOP = ../..
|
||||
GLIDE ?= $(TOP)/glide3
|
||||
LIBDIR = $(TOP)/lib
|
||||
@@ -70,7 +73,7 @@ endif
|
||||
|
||||
LDLIBS = -lgdi32
|
||||
|
||||
CC = mingw32-gcc
|
||||
CC = $(TOOLS_PREFIX)gcc
|
||||
CFLAGS += -DBUILD_GL32 -D_OPENGL32_
|
||||
CFLAGS += $(INCLUDE_DIRS)
|
||||
CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
|
||||
@@ -91,9 +94,11 @@ endif
|
||||
AR = ar
|
||||
ARFLAGS = crus
|
||||
|
||||
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = del $(subst /,\,$(1))
|
||||
else
|
||||
ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
ifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
|
||||
UNLINK = $(RM) $(1)
|
||||
endif
|
||||
|
||||
@@ -142,10 +147,15 @@ RESOURCE = $(GL_RES:.rc=.res)
|
||||
.rc.res:
|
||||
windres -o $@ -Irc -Ocoff $<
|
||||
|
||||
all: $(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP)
|
||||
all: $(LIBDIR) $(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP)
|
||||
|
||||
$(LIBDIR):
|
||||
mkdir -p $(LIBDIR)
|
||||
|
||||
$(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP): $(OBJECTS) $(RESOURCE)
|
||||
dllwrap -o $(LIBDIR)/$(GL_DLL) --output-lib $(LIBDIR)/$(GL_IMP) --target i386-mingw32 --def $(GL_DEF) $^ $(LDLIBS)
|
||||
$(TOOLS_PREFIX)dllwrap -o $(LIBDIR)/$(GL_DLL) --output-lib $(LIBDIR)/$(GL_IMP) \
|
||||
--target i386-mingw32 --def $(GL_DEF) -Wl,-enable-stdcall-fixup \
|
||||
$^ $(LDLIBS)
|
||||
|
||||
$(X86_OBJECTS): x86/matypes.h
|
||||
|
||||
@@ -163,7 +173,7 @@ x86/gen_matypes.exe: x86/gen_matypes.c
|
||||
# with USE_X86_ASM (useful for trace/debug)
|
||||
ifeq (1,1)
|
||||
x86/glapi_x86.o: x86/glapi_x86.S
|
||||
$(CC) -o $@ $(CFLAGS) -U__WIN32__ -DSTDCALL_API -c $<
|
||||
$(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $<
|
||||
else
|
||||
main/dispatch.o: main/dispatch.c
|
||||
$(CC) -o $@ $(CFLAGS) -UUSE_X86_ASM -c $<
|
||||
|
@@ -45,6 +45,7 @@
|
||||
|
||||
#include "driverfuncs.h"
|
||||
#include "swrast/swrast.h"
|
||||
#include "tnl/tnl.h"
|
||||
|
||||
|
||||
|
||||
@@ -222,6 +223,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
|
||||
driver->NotifySaveBegin = NULL;
|
||||
driver->LightingSpaceChange = NULL;
|
||||
driver->MakeCurrent = NULL;
|
||||
driver->ProgramStringNotify = _tnl_program_string;
|
||||
|
||||
/* display list */
|
||||
driver->NewList = NULL;
|
||||
|
@@ -4,21 +4,18 @@ MESA_MODULES = $(TOP)/src/mesa/mesa.a
|
||||
|
||||
COMMON_SOURCES = \
|
||||
../../common/driverfuncs.c \
|
||||
../common/mm.c \
|
||||
../common/utils.c \
|
||||
../common/texmem.c \
|
||||
../common/vblank.c \
|
||||
../common/dri_util.c \
|
||||
../common/xmlconfig.c \
|
||||
../common/drirenderbuffer.c \
|
||||
../common/glcontextmodes.c
|
||||
../common/drirenderbuffer.c
|
||||
|
||||
ifeq ($(WINDOW_SYSTEM),dri)
|
||||
WINOBJ=../dri_client/dri.a
|
||||
WINOBJ=
|
||||
WINLIB=
|
||||
INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES) \
|
||||
-I../dri_client \
|
||||
-I../dri_client/imports
|
||||
`pkg-config --cflags libdrm`
|
||||
|
||||
OBJECTS = $(C_SOURCES:.c=.o) \
|
||||
$(ASM_SOURCES:.S=.o)
|
||||
@@ -54,7 +51,8 @@ SHARED_INCLUDES = \
|
||||
-I$(TOP)/src/mesa/shader \
|
||||
-I$(TOP)/src/mesa/swrast \
|
||||
-I$(TOP)/src/mesa/swrast_setup \
|
||||
-I$(TOP)/src/egl/main
|
||||
-I$(TOP)/src/egl/main \
|
||||
-I$(TOP)/src/egl/drivers/dri
|
||||
|
||||
##### RULES #####
|
||||
|
||||
|
@@ -31,7 +31,6 @@
|
||||
|
||||
#include "dri_util.h"
|
||||
#include "drm_sarea.h"
|
||||
#include "glcontextmodes.h"
|
||||
|
||||
#ifndef GLX_OML_sync_control
|
||||
typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid drawable, int32_t *numerator, int32_t *denominator);
|
||||
@@ -41,14 +40,6 @@ typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRInativeDisplay *dpy, __DRIid
|
||||
*/
|
||||
const __DRIinterfaceMethods * dri_interface = NULL;
|
||||
|
||||
/**
|
||||
* Weak thread-safety dispatch pointer. Older versions of libGL will not have
|
||||
* this symbol, so a "weak" version is included here so that the driver will
|
||||
* dynamically link properly. The value is set to \c NULL. This forces the
|
||||
* driver to fall back to the old dispatch interface.
|
||||
*/
|
||||
struct _glapi_table *_glapi_DispatchTSD __attribute__((weak)) = NULL;
|
||||
|
||||
/**
|
||||
* This is used in a couple of places that call \c driCreateNewDrawable.
|
||||
*/
|
||||
@@ -140,9 +131,8 @@ static void __driGarbageCollectDrawables(void *drawHash)
|
||||
__DRIdrawablePrivate *pdp = (__DRIdrawablePrivate *)pdraw->private;
|
||||
dpy = pdp->driScreenPriv->display;
|
||||
if (! (*dri_interface->windowExists)(dpy, draw)) {
|
||||
/* Destroy the local drawable data in the hash table, if the
|
||||
drawable no longer exists in the Xserver */
|
||||
drmHashDelete(drawHash, draw);
|
||||
/* Destroy the local drawable data, if the drawable no
|
||||
longer exists in the Xserver */
|
||||
(*pdraw->destroyDrawable)(dpy, pdraw->private);
|
||||
_mesa_free(pdraw);
|
||||
}
|
||||
@@ -673,6 +663,7 @@ static void driDestroyDrawable(__DRInativeDisplay *dpy, void *drawablePrivate)
|
||||
(*psp->DriverAPI.DestroyBuffer)(pdp);
|
||||
if ((*dri_interface->windowExists)(dpy, pdp->draw))
|
||||
(void)(*dri_interface->destroyDrawable)(dpy, scrn, pdp->draw);
|
||||
drmHashDelete(psp->drawHash, pdp->draw);
|
||||
if (pdp->pClipRects) {
|
||||
_mesa_free(pdp->pClipRects);
|
||||
pdp->pClipRects = NULL;
|
||||
@@ -836,7 +827,7 @@ static void driDestroyScreen(__DRInativeDisplay *dpy, int scrn, void *screenPriv
|
||||
_mesa_free(psp->pDevPriv);
|
||||
(void)drmClose(psp->fd);
|
||||
if ( psp->modes != NULL ) {
|
||||
_gl_context_modes_destroy( psp->modes );
|
||||
(*dri_interface->destroyContextModes)( psp->modes );
|
||||
}
|
||||
_mesa_free(psp);
|
||||
}
|
||||
|
@@ -54,6 +54,7 @@
|
||||
#include <GL/gl.h>
|
||||
#include "drm.h"
|
||||
#include "drm_sarea.h"
|
||||
#include "xf86drm.h"
|
||||
#include "GL/internal/glcore.h"
|
||||
#include "GL/internal/dri_interface.h"
|
||||
|
||||
|
@@ -31,11 +31,11 @@
|
||||
* \author Ian Romanick <idr@us.ibm.com>
|
||||
*/
|
||||
|
||||
#ifdef IN_DRI_DRIVER
|
||||
#if defined(IN_MINI_GLX)
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <GL/gl.h>
|
||||
# include "dri_interface.h"
|
||||
# include "GL/internal/dri_interface.h"
|
||||
# include "imports.h"
|
||||
# define __glXMemset memset
|
||||
#else
|
||||
@@ -55,11 +55,11 @@ extern void __glXFree( void * ptr );
|
||||
# define _mesa_malloc(b) Xmalloc(b)
|
||||
# define _mesa_free(m) Xfree(m)
|
||||
# endif /* XFree86Server */
|
||||
#endif /* !defined(IN_DRI_DRIVER) */
|
||||
#endif /* !defined(IN_MINI_GLX) */
|
||||
|
||||
#include "glcontextmodes.h"
|
||||
|
||||
#if !defined(IN_DRI_DRIVER)
|
||||
#if !defined(IN_MINI_GLX)
|
||||
#define NUM_VISUAL_TYPES 6
|
||||
|
||||
/**
|
||||
@@ -157,8 +157,8 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
|
||||
mode->greenMask = config->greenMask;
|
||||
mode->blueMask = config->blueMask;
|
||||
mode->alphaMask = config->alphaMask;
|
||||
mode->rgbBits = config->bufferSize;
|
||||
mode->indexBits = config->bufferSize;
|
||||
mode->rgbBits = mode->rgbMode ? config->bufferSize : 0;
|
||||
mode->indexBits = mode->colorIndexMode ? config->bufferSize : 0;
|
||||
|
||||
mode->accumRedBits = config->accumRedSize;
|
||||
mode->accumGreenBits = config->accumGreenSize;
|
||||
@@ -320,7 +320,7 @@ _gl_get_context_mode_data(const __GLcontextModes *mode, int attribute,
|
||||
return GLX_BAD_ATTRIBUTE;
|
||||
}
|
||||
}
|
||||
#endif /* !defined(IN_DRI_DRIVER) */
|
||||
#endif /* !defined(IN_MINI_GLX) */
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -32,14 +32,14 @@
|
||||
|
||||
#include "GL/internal/glcore.h"
|
||||
|
||||
#if !defined(IN_DRI_DRIVER)
|
||||
#if !defined(IN_MINI_GLX)
|
||||
extern GLint _gl_convert_from_x_visual_type( int visualType );
|
||||
extern GLint _gl_convert_to_x_visual_type( int visualType );
|
||||
extern void _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
|
||||
const __GLXvisualConfig * config );
|
||||
extern int _gl_get_context_mode_data( const __GLcontextModes *mode,
|
||||
int attribute, int *value_return );
|
||||
#endif /* !defined(IN_DRI_DRIVER) */
|
||||
#endif /* !defined(IN_MINI_GLX) */
|
||||
|
||||
extern __GLcontextModes * _gl_context_modes_create( unsigned count,
|
||||
size_t minimum_size );
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#include "utils.h"
|
||||
#include "dispatch.h"
|
||||
|
||||
unsigned driDispatchRemapTable[ driDispatchRemapTable_size ];
|
||||
int driDispatchRemapTable[ driDispatchRemapTable_size ];
|
||||
|
||||
#if defined(USE_X86_ASM)
|
||||
#include "x86/common_x86_asm.h"
|
||||
@@ -188,17 +188,26 @@ driGetRendererString( char * buffer, const char * hardware_name,
|
||||
#define need_GL_EXT_vertex_array
|
||||
#define need_GL_MESA_window_pos
|
||||
|
||||
/* These are needed in *all* drivers because Mesa internally implements
|
||||
* certain functionality in terms of functions provided by these extensions.
|
||||
* For example, glBlendFunc is implemented by calling glBlendFuncSeparateEXT.
|
||||
*/
|
||||
#define need_GL_EXT_blend_func_separate
|
||||
#define need_GL_NV_vertex_program
|
||||
|
||||
#include "extension_helper.h"
|
||||
|
||||
static const struct dri_extension all_mesa_extensions[] = {
|
||||
{ "GL_ARB_multisample", GL_ARB_multisample_functions },
|
||||
{ "GL_ARB_transpose_matrix", GL_ARB_transpose_matrix_functions },
|
||||
{ "GL_ARB_window_pos", GL_ARB_window_pos_functions },
|
||||
{ "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions },
|
||||
{ "GL_EXT_compiled_vertex_array", GL_EXT_compiled_vertex_array_functions },
|
||||
{ "GL_EXT_polygon_offset", GL_EXT_polygon_offset_functions },
|
||||
{ "GL_EXT_texture_object", GL_EXT_texture_object_functions },
|
||||
{ "GL_EXT_vertex_array", GL_EXT_vertex_array_functions },
|
||||
{ "GL_MESA_window_pos", GL_MESA_window_pos_functions },
|
||||
{ "GL_NV_vertex_program", GL_NV_vertex_program_functions },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -220,6 +229,10 @@ void driInitExtensions( GLcontext * ctx,
|
||||
unsigned i;
|
||||
|
||||
if ( first_time ) {
|
||||
for ( i = 0 ; i < driDispatchRemapTable_size ; i++ ) {
|
||||
driDispatchRemapTable[i] = -1;
|
||||
}
|
||||
|
||||
first_time = 0;
|
||||
driInitExtensions( ctx, all_mesa_extensions, GL_FALSE );
|
||||
}
|
||||
|
@@ -1,60 +0,0 @@
|
||||
# src/mesa/drivers/dri/gamma/Makefile
|
||||
|
||||
TOP = ../../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
# Get rid of this:
|
||||
#
|
||||
DEFINES += -DGLX_DIRECT_RENDERING
|
||||
|
||||
C_SOURCES = \
|
||||
xf86drm.c \
|
||||
xf86drmHash.c \
|
||||
xf86drmRandom.c \
|
||||
xf86drmSL.c \
|
||||
|
||||
|
||||
|
||||
OBJECTS = $(C_SOURCES:.c=.o)
|
||||
|
||||
INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(DRM_SOURCE_PATH)/shared-core \
|
||||
-I$(TOP)/include/GL/internal \
|
||||
-I$(TOP)/src/mesa \
|
||||
-I$(TOP)/src/mesa/main \
|
||||
-I$(TOP)/src/mesa/glapi \
|
||||
-Iimports
|
||||
|
||||
|
||||
##### RULES #####
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
|
||||
|
||||
|
||||
##### TARGETS #####
|
||||
|
||||
default: depend dri.a
|
||||
|
||||
|
||||
# Run 'make dep' to update the dependencies if you change
|
||||
# what's included by any source file.
|
||||
depend: $(C_SOURCES) $(ASM_SOURCES)
|
||||
touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) \
|
||||
$(C_SOURCES) $(ASM_SOURCES)
|
||||
|
||||
|
||||
dri.a: $(OBJECTS)
|
||||
rm -f $@
|
||||
ar rcv $@ $(OBJECTS)
|
||||
ranlib $@
|
||||
|
||||
# Remove .o and backup files
|
||||
clean:
|
||||
-rm -f *.o */*.o *~ *.so *.a depend depend.bak
|
||||
|
||||
install:
|
||||
|
||||
include depend
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user