summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2003-11-24 12:01:39 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2003-11-24 12:01:39 +0000
commit027fdb8bbd73119a1c0ad09432f7ac24ff24517b (patch)
treefdf93e01e792f4761a2df8753ab47cfd0fa806b6
parent3a7c3b02a38ce4707effbd5ac1ca5c07a9d3e8a4 (diff)
Merge head into branchvtx-0-2-24112003
-rw-r--r--Make-config28
-rw-r--r--Makefile.X11363
-rw-r--r--Makefile.wfx87
-rwxr-xr-xbin/mklib66
-rw-r--r--docs/README.3DFX59
-rw-r--r--docs/README.DJ3
-rw-r--r--docs/README.WIN326
-rw-r--r--docs/VERSIONS7
-rw-r--r--docs/cvs_anonymous.html4
-rw-r--r--docs/news.html34
-rw-r--r--include/GL/fxmesa.h2
-rw-r--r--include/GL/gl.h10
-rw-r--r--include/GL/glu.h6
-rw-r--r--include/GL/glu_mangle.h2
-rw-r--r--include/GL/glut.h2
-rw-r--r--progs/demos/paltex.c1
-rw-r--r--progs/demos/texobj.c2
-rw-r--r--progs/samples/Makefile.mgw2
-rw-r--r--progs/tests/bufferobj.c61
-rw-r--r--progs/tests/texcmp.c389
20 files changed, 867 insertions, 267 deletions
diff --git a/Make-config b/Make-config
index d81ce51ae4a..5f20adbc9fd 100644
--- a/Make-config
+++ b/Make-config
@@ -33,6 +33,7 @@ VERSION=$(MESA_MAJOR).$(MESA_MINOR)
# ASM_SOURCES optional list of assembly language files to assemble
# MAKELIB the script or command to make a library file
# XXX MAKELIB is obsolete; edit bin/mklib to support new systems
+# MKLIB_OPTIONS extra options to pass to the mklib script (like -arch)
aix:
@@ -527,10 +528,10 @@ linux-glide:
"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
"CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE" \
"GLUT_CFLAGS = -fexceptions" \
- "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L/usr/local/glide/lib -lglide2x" \
+ "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L/usr/local/glide/lib -lglide3x" \
"GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
- "APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -lglut -lGLU -lGL"
+ "APP_LIB_DEPS = -L/usr/local/glide/lib -lglide3x -lglut -lGLU -lGL"
linux-x86-glide:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
@@ -544,7 +545,7 @@ linux-x86-glide:
"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include -I/usr/src/mesa-glx/src/FX/X86" \
"CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE" \
"GLUT_CFLAGS = -fexceptions" \
- "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
+ "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide3x -lm -lpthread" \
"GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm" \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
"GLW_LIB_DEPS = -L$(TOP)/lib -lGL -L/usr/X11R6/lib -lXt -lX11" \
@@ -678,12 +679,24 @@ linux-osmesa16:
"OSMESA16_LIB = libOSMesa16.so" \
"CC = gcc" \
"CXX = g++" \
- "CFLAGS = -O3 -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
- "CXXFLAGS = -O3 -ansi -pedantic -Wall -Wmissing-prototypes -Wundef -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE" \
+ "CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
+ "CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE" \
"GLUT_CFLAGS = -fexceptions" \
"GL_LIB_DEPS = -lm -lpthread" \
"APP_LIB_DEPS = -lOSMesa16 -lGL"
+linux-osmesa16-static:
+ $(MAKE) $(MFLAGS) -f Makefile.OSMesa16 targets \
+ "OSMESA16_LIB = libOSMesa16.a" \
+ "CC = gcc" \
+ "CXX = g++" \
+ "CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -I/usr/X11R6/include -DCHAN_BITS=16 -DDEFAULT_SOFTWARE_DEPTH_BITS=31" \
+ "CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE" \
+ "GLUT_CFLAGS = -fexceptions" \
+ "GL_LIB_DEPS = -lm -lpthread" \
+ "MAKELIB_FLAGS = -static" \
+ "APP_LIB_DEPS = -lOSMesa16 -lGL"
+
# 32-bit/channel Mesa using OSMesa driver
linux-osmesa32:
$(MAKE) $(MFLAGS) -f Makefile.OSMesa16 targets \
@@ -700,6 +713,7 @@ linux-osmesa32:
# change -g to -O3 for non-debug
linux-solo:
$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
+ "SOLO = true" \
"LIBMESA = mesa.a" \
"GLU_LIB = libGLU.so" \
"GLUT_LIB = libglut.so" \
@@ -708,7 +722,7 @@ linux-solo:
"CFLAGS = -g -std=c99 -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE" \
"CXXFLAGS = -g -std=c99 -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE" \
"GLUT_CFLAGS = -fexceptions" \
- "GL_LIB_DEPS = -lm -lpthread" \
+ "GL_LIB_DEPS = -lm -lpthread -lexpat" \
"GLU_LIB_DEPS = -L$(TOP)/lib -lGL -lm -Wl,-rpath,$(TOP)/lib" \
"GLUT_LIB_DEPS = -L$(TOP)/lib -lGLU -lGL -lm -Wl,-rpath,$(TOP)/lib" \
"APP_LIB_DEPS = -L$(TOP)/lib -lglut -lGLU -lGL -lm -lpthread -Wl,-rpath,$(TOP)/lib"
@@ -1078,5 +1092,5 @@ linux-glide-debug:
"CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DFX -DDEBUG -I/usr/local/glide/include -I/usr/include/glide" \
"CXXFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DDEBUG" \
"GLUT_CFLAGS = -fexceptions" \
- "APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lvga -lm -lpthread"
+ "APP_LIB_DEPS = -L/usr/local/glide/lib -lglide3x -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lvga -lm -lpthread"
diff --git a/Makefile.X11 b/Makefile.X11
index 39fae1ccffb..747c6ca8ece 100644
--- a/Makefile.X11
+++ b/Makefile.X11
@@ -1,4 +1,4 @@
-# $Id: Makefile.X11,v 1.90 2003/10/03 14:03:14 brianp Exp $
+# $Id: Makefile.X11,v 1.89.2.1 2003/11/24 12:01:39 keithw Exp $
# Mesa 3-D graphics library
# Version: 5.1
@@ -33,69 +33,70 @@ SHELL = /bin/sh
default:
@echo "Type one of the following:"
- @echo " make aix for IBM RS/6000 with AIX"
- @echo " make aix-sl for IBM RS/6000, make shared libs"
- @echo " make beos-r4 for BeOS R4"
- @echo " make cygnus for Win95/NT using Cygnus-Win32"
- @echo " make cygnus-linux for Win95/NT using Cygnus-Win32 under Linux"
- @echo " make darwin for Darwin - Mac OS X"
- @echo " make freebsd for FreeBSD systems with GCC"
- @echo " make freebsd-386 for FreeBSD systems with GCC, w/ Intel assembly"
- @echo " make gcc-sl for a generic system with GCC for shared libs"
- @echo " make hpux9 for HP systems with HPUX 9.x"
- @echo " make hpux9-sl for HP systems with HPUX 9.x, make shared libs"
- @echo " make hpux9-gcc for HP systems with HPUX 9.x using GCC"
- @echo " make hpux9-gcc-sl for HP systems with HPUX 9.x, GCC, make shared libs"
- @echo " make hpux10 for HP systems with HPUX 10.x and 11.x"
- @echo " make hpux10-sl for HP systems with HPUX 10.x and 11.x, shared libs"
- @echo " make hpux10-gcc for HP systems with HPUX 10.x w/ GCC"
- @echo " make hpux10-gcc-sl for HP systems with HPUX 10.x w/ GCC, shared libs"
- @echo " make irix6-o32 for SGI systems with IRIX 6.x, make o32-bit libs"
- @echo " make irix6-o32-dso for SGI systems with IRIX 6.x, make o32-bit DSOs"
- @echo " make irix6-n32 for SGI systems with IRIX 6.x, make n32-bit libs"
- @echo " make irix6-n32-dso for SGI systems with IRIX 6.x, make n32-bit DSOs"
- @echo " make irix6-gcc-n32-sl for SGI systems with IRIX 6.x, GCC, make n32 DSOs"
- @echo " make irix6-64 for SGI systems with IRIX 6.x, make 64-bit libs"
- @echo " make irix6-64-dso for SGI systems with IRIX 6.x, make 64-bit DSOs"
-
- @echo " make linux for Linux"
- @echo " make linux-x86 for Linux with x86 optimizations"
- @echo " make linux-ggi for Linux with libggi driver"
- @echo " make linux-x86-ggi for Linux with libggi driver and x86 optimizations"
- @echo " make linux-glide for Linux with 3Dfx Glide driver"
- @echo " make linux-x86-glide for Linux with 3Dfx Glide driver and x86 opts"
- @echo " make linux-alpha for Linux with Alpha optimizations"
- @echo " make linux-alpha-static for Linux with Alpha opts, make static libs"
- @echo " make linux-ppc for Linux with PowerPC opts"
- @echo " make linux-ppc-static for Linux with PowerPC opts, make static libs"
- @echo " make linux-sparc for Linux with Sparc optimzations"
- @echo " make linux-sparc5 for Linux with Sparc5 optimizations"
- @echo " make linux-sparc-ultra for Linux with UltraSparc optimizations"
- @echo " make linux-osmesa16 for 16-bit/channel OSMesa"
- @echo " make linux-osmesa32 for 32-bit/channel OSMesa"
- @echo " make linux-solo for Linux standalone with dri drivers"
- @echo " make linux-icc for Linux with the Intel C/C++ compiler"
- @echo " make lynxos for LynxOS systems with GCC"
- @echo " make mklinux for Linux on Power Macintosh"
- @echo " make netbsd for NetBSD 1.0 systems with GCC"
- @echo " make openbsd for OpenBSD systems"
- @echo " make openstep for OpenStep/MacOSX Server systems"
- @echo " make osf1 for DEC Alpha systems with OSF/1"
- @echo " make qnx for QNX V4 systems with Watcom compiler"
- @echo " make solaris-x86 for PCs with Solaris"
- @echo " make solaris-x86-gcc for PCs with Solaris using GCC"
- @echo " make sunos4 for Suns with SunOS 4.x"
- @echo " make sunos4-sl for Suns with SunOS 4.x, make shared libs"
- @echo " make sunos4-gcc for Suns with SunOS 4.x and GCC"
- @echo " make sunos4-gcc-sl for Suns with SunOS 4.x, GCC, make shared libs"
- @echo " make sunos5 for Suns with SunOS 5.x"
- @echo " make sunos5-smp for Suns with SunOS 5.x, SMP optimization"
- @echo " make sunos5-gcc for Suns with SunOS 5.x and GCC"
- @echo " make ultrix-gcc for DEC systems with Ultrix and GCC"
- @echo " make unixware for PCs running UnixWare"
- @echo " make unixware-shared for PCs running UnixWare, shared libs"
- @echo " make clean remove .o files"
- @echo " make realclean remove .o, library and executable files"
+ @echo " make aix for IBM RS/6000 with AIX"
+ @echo " make aix-sl for IBM RS/6000, make shared libs"
+ @echo " make beos-r4 for BeOS R4"
+ @echo " make cygnus for Win95/NT using Cygnus-Win32"
+ @echo " make cygnus-linux for Win95/NT using Cygnus-Win32 under Linux"
+ @echo " make darwin for Darwin - Mac OS X"
+ @echo " make freebsd for FreeBSD systems with GCC"
+ @echo " make freebsd-386 for FreeBSD systems with GCC, w/ Intel assembly"
+ @echo " make gcc-sl for a generic system with GCC for shared libs"
+ @echo " make hpux9 for HP systems with HPUX 9.x"
+ @echo " make hpux9-sl for HP systems with HPUX 9.x, make shared libs"
+ @echo " make hpux9-gcc for HP systems with HPUX 9.x using GCC"
+ @echo " make hpux9-gcc-sl for HP systems with HPUX 9.x, GCC, make shared libs"
+ @echo " make hpux10 for HP systems with HPUX 10.x and 11.x"
+ @echo " make hpux10-sl for HP systems with HPUX 10.x and 11.x, shared libs"
+ @echo " make hpux10-gcc for HP systems with HPUX 10.x w/ GCC"
+ @echo " make hpux10-gcc-sl for HP systems with HPUX 10.x w/ GCC, shared libs"
+ @echo " make irix6-o32 for SGI systems with IRIX 6.x, make o32-bit libs"
+ @echo " make irix6-o32-dso for SGI systems with IRIX 6.x, make o32-bit DSOs"
+ @echo " make irix6-n32 for SGI systems with IRIX 6.x, make n32-bit libs"
+ @echo " make irix6-n32-dso for SGI systems with IRIX 6.x, make n32-bit DSOs"
+ @echo " make irix6-gcc-n32-sl for SGI systems with IRIX 6.x, GCC, make n32 DSOs"
+ @echo " make irix6-64 for SGI systems with IRIX 6.x, make 64-bit libs"
+ @echo " make irix6-64-dso for SGI systems with IRIX 6.x, make 64-bit DSOs"
+
+ @echo " make linux for Linux"
+ @echo " make linux-x86 for Linux with x86 optimizations"
+ @echo " make linux-ggi for Linux with libggi driver"
+ @echo " make linux-x86-ggi for Linux with libggi driver and x86 optimizations"
+ @echo " make linux-glide for Linux with 3Dfx Glide driver"
+ @echo " make linux-x86-glide for Linux with 3Dfx Glide driver and x86 opts"
+ @echo " make linux-alpha for Linux with Alpha optimizations"
+ @echo " make linux-alpha-static for Linux with Alpha opts, make static libs"
+ @echo " make linux-ppc for Linux with PowerPC opts"
+ @echo " make linux-ppc-static for Linux with PowerPC opts, make static libs"
+ @echo " make linux-sparc for Linux with Sparc optimzations"
+ @echo " make linux-sparc5 for Linux with Sparc5 optimizations"
+ @echo " make linux-sparc-ultra for Linux with UltraSparc optimizations"
+ @echo " make linux-osmesa16 for 16-bit/channel OSMesa"
+ @echo " make linux-osmesa16-static for 16-bit/channel OSMesa, make static libs"
+ @echo " make linux-osmesa32 for 32-bit/channel OSMesa"
+ @echo " make linux-solo for Linux standalone with dri drivers"
+ @echo " make linux-icc for Linux with the Intel C/C++ compiler"
+ @echo " make lynxos for LynxOS systems with GCC"
+ @echo " make mklinux for Linux on Power Macintosh"
+ @echo " make netbsd for NetBSD 1.0 systems with GCC"
+ @echo " make openbsd for OpenBSD systems"
+ @echo " make openstep for OpenStep/MacOSX Server systems"
+ @echo " make osf1 for DEC Alpha systems with OSF/1"
+ @echo " make qnx for QNX V4 systems with Watcom compiler"
+ @echo " make solaris-x86 for PCs with Solaris"
+ @echo " make solaris-x86-gcc for PCs with Solaris using GCC"
+ @echo " make sunos4 for Suns with SunOS 4.x"
+ @echo " make sunos4-sl for Suns with SunOS 4.x, make shared libs"
+ @echo " make sunos4-gcc for Suns with SunOS 4.x and GCC"
+ @echo " make sunos4-gcc-sl for Suns with SunOS 4.x, GCC, make shared libs"
+ @echo " make sunos5 for Suns with SunOS 5.x"
+ @echo " make sunos5-smp for Suns with SunOS 5.x, SMP optimization"
+ @echo " make sunos5-gcc for Suns with SunOS 5.x and GCC"
+ @echo " make ultrix-gcc for DEC systems with Ultrix and GCC"
+ @echo " make unixware for PCs running UnixWare"
+ @echo " make unixware-shared for PCs running UnixWare, shared libs"
+ @echo " make clean remove .o files"
+ @echo " make realclean remove .o, library and executable files"
@@ -224,11 +225,11 @@ linux-ggi-install linux-x86-ggi-install:
# echo ".include $(DESTDIR)/etc/ggi/ggimesa.conf" >> $(DESTDIR)/etc/ggi/libggi.conf ; \
# fi
-linux-osmesa16 linux-osmesa32:
+linux-osmesa16 linux-osmesa16-static linux-osmesa32:
-mkdir lib
- if [ -d src ] ; then touch src/depend ; fi
- if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.OSMesa16 $@ ; fi
-
+ if [ -d src/mesa ] ; then touch src/mesa/depend ; fi
+ if [ -d src/mesa ] ; then cd src/mesa ; $(MAKE) -f Makefile.OSMesa16 $@ ; fi
+
linux-solo:
-mkdir lib
if [ -d src/mesa ] ; then touch src/mesa/depend ; fi
@@ -347,6 +348,10 @@ GLUT_NAME = GLUT-3.7
LIB_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/Make-config \
+ $(DIRECTORY)/descrip.mms \
+ $(DIRECTORY)/mms-config. \
+ $(DIRECTORY)/Mesa.dsw \
+ $(DIRECTORY)/bin/mklib* \
$(DIRECTORY)/docs/*.html \
$(DIRECTORY)/docs/COPYING \
$(DIRECTORY)/docs/INSTALL.GNU \
@@ -354,14 +359,7 @@ LIB_FILES = \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/VERSIONS \
$(DIRECTORY)/docs/*.spec \
- $(DIRECTORY)/bin/README \
- $(DIRECTORY)/bin/mklib* \
- $(DIRECTORY)/descrip.mms \
- $(DIRECTORY)/mms-config \
- $(DIRECTORY)/xlib.opt \
$(DIRECTORY)/include/GL/internal/glcore.h \
- $(DIRECTORY)/include/GL/Makefile.in \
- $(DIRECTORY)/include/GL/Makefile.am \
$(DIRECTORY)/include/GL/dmesa.h \
$(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/fxmesa.h \
@@ -384,135 +382,86 @@ LIB_FILES = \
$(DIRECTORY)/include/GL/xmesa.h \
$(DIRECTORY)/include/GL/xmesa_x.h \
$(DIRECTORY)/include/GL/xmesa_xf86.h \
- $(DIRECTORY)/include/GLView.h \
- $(DIRECTORY)/include/Makefile.in \
- $(DIRECTORY)/include/Makefile.am \
$(DIRECTORY)/src/mesa/Makefile* \
- $(DIRECTORY)/src/mesa/descrip.mms \
- $(DIRECTORY)/src/mesa/mesa.conf \
- $(DIRECTORY)/src/mesa/*.def \
- $(DIRECTORY)/src/mesa/depend \
- $(DIRECTORY)/src/mesa/*.[chS] \
- $(DIRECTORY)/src/mesa/array_cache/*.[ch] \
- $(DIRECTORY)/src/mesa/array_cache/Makefile* \
- $(DIRECTORY)/src/mesa/math/*.[ch] \
- $(DIRECTORY)/src/mesa/math/Makefile* \
- $(DIRECTORY)/src/mesa/swrast/*.[ch] \
- $(DIRECTORY)/src/mesa/swrast/Makefile* \
- $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
- $(DIRECTORY)/src/mesa/swrast_setup/Makefile* \
- $(DIRECTORY)/src/mesa/tnl/*.[ch] \
- $(DIRECTORY)/src/mesa/tnl/Makefile* \
- $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
- $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
- $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
- $(DIRECTORY)/src/mesa/drivers/windml/*.[ch] \
- $(DIRECTORY)/src/mesa/drivers/windml/tornado/*.c \
- $(DIRECTORY)/src/mesa/drivers/windml/tornado/*.cdf \
- $(DIRECTORY)/src/mesa/drivers/windml/man3/*.3 \
- $(DIRECTORY)/src/mesa/drivers/windml/man3/*.html \
- $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
- $(DIRECTORY)/src/mesa/drivers/dos/mga/*.[ch] \
- $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
- $(DIRECTORY)/src/mesa/drivers/glide/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/glide/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
- $(DIRECTORY)/src/mesa/drivers/glide/*.def \
- $(DIRECTORY)/src/mesa/drivers/glide/X86/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/glide/X86/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/glide/X86/*.[Shc] \
- $(DIRECTORY)/src/mesa/drivers/ggi/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/ggi/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
- $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
- $(DIRECTORY)/src/mesa/drivers/ggi/default/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/ggi/default/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
- $(DIRECTORY)/src/mesa/drivers/ggi/display/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/ggi/display/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/include/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/ggi/include/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
- $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
- $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
- $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
- $(DIRECTORY)/src/mesa/sparc/*.[chS] \
- $(DIRECTORY)/src/mesa/sparc/Makefile.am \
- $(DIRECTORY)/src/mesa/sparc/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/svga/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/svga/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
- $(DIRECTORY)/src/mesa/drivers/windows/*.[ch] \
- $(DIRECTORY)/src/mesa/drivers/windows/*.def \
- $(DIRECTORY)/src/mesa/drivers/x11/Makefile.am \
- $(DIRECTORY)/src/mesa/drivers/x11/Makefile.in \
- $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
- $(DIRECTORY)/src/mesa/x86/*.[ch] \
- $(DIRECTORY)/src/mesa/x86/Makefile.am \
- $(DIRECTORY)/src/mesa/x86/Makefile.in \
- $(DIRECTORY)/src/mesa/x86/*.S \
- $(DIRECTORY)/src/glu/sgi/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/Makefile.in \
- $(DIRECTORY)/src/glu/sgi/Makefile.X11 \
- $(DIRECTORY)/src/glu/sgi/Makefile.win \
- $(DIRECTORY)/src/glu/sgi/Makefile.DJ \
- $(DIRECTORY)/src/glu/sgi/glu.def \
- $(DIRECTORY)/src/glu/sgi/dummy.cc \
- $(DIRECTORY)/src/glu/sgi/descrip.mms \
- $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
- $(DIRECTORY)/src/glu/sgi/include/gluos.h \
- $(DIRECTORY)/src/glu/sgi/include/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/include/Makefile.in \
- $(DIRECTORY)/src/glu/sgi/libnurbs/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/libnurbs/Makefile.in \
- $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
- $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
- $(DIRECTORY)/src/glu/sgi/libnurbs/interface/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/libnurbs/interface/Makefile.in \
- $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
- $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
- $(DIRECTORY)/src/glu/sgi/libnurbs/internals/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/libnurbs/internals/Makefile.in \
- $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
- $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
- $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/Makefile.in \
- $(DIRECTORY)/src/glu/sgi/libtess/README \
- $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
- $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
- $(DIRECTORY)/src/glu/sgi/libtess/libtess_la_SOURCES \
- $(DIRECTORY)/src/glu/sgi/libtess/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/libtess/Makefile.in \
- $(DIRECTORY)/src/glu/sgi/libutil/*.[ch] \
- $(DIRECTORY)/src/glu/sgi/libutil/libutil_la_SOURCES \
- $(DIRECTORY)/src/glu/sgi/libutil/Makefile.am \
- $(DIRECTORY)/src/glu/sgi/libutil/Makefile.in \
- $(DIRECTORY)/src/glu/mesa/README[12] \
- $(DIRECTORY)/src/glu/mesa/Makefile* \
- $(DIRECTORY)/src/glu/mesa/descrip.mms \
- $(DIRECTORY)/src/glu/mesa/mms_depend \
- $(DIRECTORY)/src/glu/mesa/*.def \
- $(DIRECTORY)/src/glu/mesa/depend \
- $(DIRECTORY)/src/glu/mesa/*.[ch] \
- $(DIRECTORY)/src/glw/*.[ch] \
- $(DIRECTORY)/src/glw/Makefile* \
- $(DIRECTORY)/src/glw/README \
- $(DIRECTORY)/progs/util/README \
- $(DIRECTORY)/progs/util/Makefile.am \
- $(DIRECTORY)/progs/util/Makefile.in \
- $(DIRECTORY)/progs/util/*.[ch] \
- $(DIRECTORY)/progs/util/sampleMakefile \
- $(DIRECTORY)/vms/analyze_map.com \
- $(DIRECTORY)/vms/xlib.opt \
+ $(DIRECTORY)/src/mesa/descrip.mms \
+ $(DIRECTORY)/src/mesa/depend \
+ $(DIRECTORY)/src/mesa/main/*.[chS] \
+ $(DIRECTORY)/src/mesa/main/main.dsp \
+ $(DIRECTORY)/src/mesa/glapi/*.[chS] \
+ $(DIRECTORY)/src/mesa/glapi/glapi.dsp \
+ $(DIRECTORY)/src/mesa/array_cache/*.[ch] \
+ $(DIRECTORY)/src/mesa/array_cache/array_cache.dsp \
+ $(DIRECTORY)/src/mesa/math/*.[ch] \
+ $(DIRECTORY)/src/mesa/math/math.dsp \
+ $(DIRECTORY)/src/mesa/swrast/*.[ch] \
+ $(DIRECTORY)/src/mesa/swrast/swrast.dsp \
+ $(DIRECTORY)/src/mesa/swrast_setup/*.[ch] \
+ $(DIRECTORY)/src/mesa/swrast_setup/swrast_setup.dsp \
+ $(DIRECTORY)/src/mesa/tnl/*.[ch] \
+ $(DIRECTORY)/src/mesa/tnl/tnl.dsp \
+ $(DIRECTORY)/src/mesa/tnl_dd/*.[ch] \
+ $(DIRECTORY)/src/mesa/tnl_dd/imm/*.[ch] \
+ $(DIRECTORY)/src/mesa/tnl_dd/imm/NOTES.imm \
+ $(DIRECTORY)/src/mesa/drivers/common/*.[ch] \
+ $(DIRECTORY)/src/mesa/drivers/dos/*.[chS] \
+ $(DIRECTORY)/src/mesa/drivers/dos/mga/*.[ch] \
+ $(DIRECTORY)/src/mesa/drivers/beos/*.cpp \
+ $(DIRECTORY)/src/mesa/drivers/glide/*.[ch] \
+ $(DIRECTORY)/src/mesa/drivers/glide/*.def \
+ $(DIRECTORY)/src/mesa/drivers/ggi/*.[ch] \
+ $(DIRECTORY)/src/mesa/drivers/ggi/ggimesa.conf.in \
+ $(DIRECTORY)/src/mesa/drivers/ggi/default/*.c \
+ $(DIRECTORY)/src/mesa/drivers/ggi/default/genkgi.conf.in \
+ $(DIRECTORY)/src/mesa/drivers/ggi/display/*.c \
+ $(DIRECTORY)/src/mesa/drivers/ggi/display/fbdev.conf.in \
+ $(DIRECTORY)/src/mesa/drivers/ggi/include/ggi/mesa/*.h \
+ $(DIRECTORY)/src/mesa/drivers/osmesa/Makefile.win \
+ $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.def \
+ $(DIRECTORY)/src/mesa/drivers/osmesa/osmesa.dsp \
+ $(DIRECTORY)/src/mesa/drivers/osmesa/*.[ch] \
+ $(DIRECTORY)/src/mesa/drivers/svga/*.[ch] \
+ $(DIRECTORY)/src/mesa/drivers/windows/*/*.[ch] \
+ $(DIRECTORY)/src/mesa/drivers/windows/*/*.def \
+ $(DIRECTORY)/src/mesa/drivers/windows/*/*.dsp \
+ $(DIRECTORY)/src/mesa/drivers/x11/*.[ch] \
+ $(DIRECTORY)/src/mesa/sparc/*.[chS] \
+ $(DIRECTORY)/src/mesa/x86/*.[ch] \
+ $(DIRECTORY)/src/mesa/x86/*.S \
+ $(DIRECTORY)/src/glu/sgi/Makefile.X11 \
+ $(DIRECTORY)/src/glu/sgi/Makefile.win \
+ $(DIRECTORY)/src/glu/sgi/Makefile.DJ \
+ $(DIRECTORY)/src/glu/sgi/cc*.txt \
+ $(DIRECTORY)/src/glu/sgi/glu.def \
+ $(DIRECTORY)/src/glu/sgi/glu.dsp \
+ $(DIRECTORY)/src/glu/sgi/dummy.cc \
+ $(DIRECTORY)/src/glu/sgi/descrip.mms \
+ $(DIRECTORY)/src/glu/sgi/mesaglu.opt \
+ $(DIRECTORY)/src/glu/sgi/include/gluos.h \
+ $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.h \
+ $(DIRECTORY)/src/glu/sgi/libnurbs/interface/*.cc \
+ $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.h \
+ $(DIRECTORY)/src/glu/sgi/libnurbs/internals/*.cc \
+ $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.h \
+ $(DIRECTORY)/src/glu/sgi/libnurbs/nurbtess/*.cc \
+ $(DIRECTORY)/src/glu/sgi/libtess/README \
+ $(DIRECTORY)/src/glu/sgi/libtess/alg-outline \
+ $(DIRECTORY)/src/glu/sgi/libtess/*.[ch] \
+ $(DIRECTORY)/src/glu/sgi/libutil/*.[ch] \
+ $(DIRECTORY)/src/glu/mesa/README[12] \
+ $(DIRECTORY)/src/glu/mesa/Makefile* \
+ $(DIRECTORY)/src/glu/mesa/descrip.mms \
+ $(DIRECTORY)/src/glu/mesa/mms_depend \
+ $(DIRECTORY)/src/glu/mesa/*.def \
+ $(DIRECTORY)/src/glu/mesa/depend \
+ $(DIRECTORY)/src/glu/mesa/*.[ch] \
+ $(DIRECTORY)/src/glw/*.[ch] \
+ $(DIRECTORY)/src/glw/Makefile* \
+ $(DIRECTORY)/src/glw/README \
+ $(DIRECTORY)/progs/util/README \
+ $(DIRECTORY)/progs/util/*.[ch] \
+ $(DIRECTORY)/progs/util/sampleMakefile \
+ $(DIRECTORY)/vms/analyze_map.com \
+ $(DIRECTORY)/vms/xlib.opt \
$(DIRECTORY)/vms/xlib_share.opt
@@ -524,10 +473,11 @@ DEMO_FILES = \
$(DIRECTORY)/src/glut/glx/*def \
$(DIRECTORY)/src/glut/glx/descrip.mms \
$(DIRECTORY)/src/glut/glx/mms_depend \
+ $(DIRECTORY)/src/glut/glx/glut.dsp \
$(DIRECTORY)/src/glut/glx/*.[ch] \
- $(DIRECTORY)/src/glut/glx.dos/*.[ch] \
- $(DIRECTORY)/src/glut/glx.dos/Makefile.DJ \
- $(DIRECTORY)/src/glut/glx.dos/PC_HW/*.[chS] \
+ $(DIRECTORY)/src/glut/dos/*.[ch] \
+ $(DIRECTORY)/src/glut/dos/Makefile.DJ \
+ $(DIRECTORY)/src/glut/dos/PC_HW/*.[chS] \
$(DIRECTORY)/progs/images/* \
$(DIRECTORY)/progs/demos/Makefile* \
$(DIRECTORY)/progs/demos/descrip.mms \
@@ -535,6 +485,7 @@ DEMO_FILES = \
$(DIRECTORY)/progs/demos/*.cxx \
$(DIRECTORY)/progs/demos/*.dat \
$(DIRECTORY)/progs/demos/README \
+ $(DIRECTORY)/progs/demos/Windows/* \
$(DIRECTORY)/progs/xdemos/Makefile* \
$(DIRECTORY)/progs/xdemos/descrip.mms \
$(DIRECTORY)/progs/xdemos/*.[chf] \
diff --git a/Makefile.wfx b/Makefile.wfx
new file mode 100644
index 00000000000..14ab00c8d1a
--- /dev/null
+++ b/Makefile.wfx
@@ -0,0 +1,87 @@
+# Mesa 3-D graphics library
+# Version: 5.1
+#
+# Copyright (C) 1999-2003 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.
+
+# Win32/FX makefile for Mesa
+#
+# Copyright (c) 2003 - Hiroshi Morii
+# Email : koolsmoky@users.sourceforge.net
+# URL : http://www.3dfxzone.it/koolsmoky
+
+# Debug build : nmake -f Makefile.wfx debug
+# Optimized build : nmake -f Makefile.wfx
+# Remove objects : nmake -f Makefile.wfx clean
+# Remove files in bin, lib : nmake -f Makefile.wfx clobber
+# Remove all generated files : nmake -f Makefile.wfx realclean
+
+# Build the libs
+SUBDIRS = src\mesa.dir
+DBGBUILD = $(SUBDIRS:.dir=.debug)
+CLEAN = $(SUBDIRS:.dir=.clean)
+CLOBBER = $(SUBDIRS:.dir=.clobber)
+REALCLEAN = $(SUBDIRS:.dir=.realclean)
+LIBDIR = lib
+
+# default rule
+default : $(LIBDIR) $(SUBDIRS)
+
+# debug build rules
+debug : $(LIBDIR) $(DBGBUILD)
+
+# cleanup rules
+clean : $(CLEAN)
+clobber : $(CLOBBER)
+realclean : $(REALCLEAN)
+
+# inference rules
+$(LIBDIR):
+ @echo.
+ @mkdir $(LIBDIR)
+
+$(SUBDIRS):
+ @echo.
+ @cd $*
+ @nmake -f Makefile.wfx
+ @cd ..
+
+$(DBGBUILD):
+ @echo.
+ @cd $*
+ @nmake -f Makefile.wfx DEBUG=1
+ @cd ..
+
+$(CLEAN):
+ @echo.
+ @cd $*
+ @nmake -f Makefile.wfx clean
+ @cd ..
+
+$(CLOBBER):
+ @echo.
+ @cd $*
+ @nmake -f Makefile.wfx clobber
+ @cd ..
+
+$(REALCLEAN):
+ @echo.
+ @cd $*
+ @nmake -f Makefile.wfx realclean
+ @cd ..
diff --git a/bin/mklib b/bin/mklib
index b207ade5e13..3501d6529c5 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -110,29 +110,40 @@ case $ARCH in
'Linux')
LIBNAME="lib${LIBNAME}" # prefix with "lib"
- OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
- VERSION="${MAJOR}.${MINOR}.${PATCH}"
- echo "mklib: Making Linux shared library: " ${LIBNAME}.so.${VERSION}
-
- if [ $CPLUSPLUS = 1 ] ; then
- LINK="g++"
- else
- LINK="gcc"
- fi
-
- # rm any old libs
- rm -f ${LIBNAME}.so.${VERSION}
- rm -f ${LIBNAME}.so.${MAJOR}
- rm -f ${LIBNAME}.so
-
- # make lib
- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
- # make usual symlinks
- ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
- ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
- # finish up
- FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
+ if [ $STATIC = 1 ] ; then
+ echo "mklib: Making Linux static library: " ${LIBNAME}.a
+ LINK="ar"
+ OPTS="-ruv"
+ # make lib
+ ${LINK} ${OPTS} ${LIBNAME}.a ${OBJECTS}
+ # finish up
+ FINAL_LIBS="${LIBNAME}.a"
+ else
+ OPTS="-Xlinker -Bsymbolic -shared -Wl,-soname,${LIBNAME}.so.${MAJOR}"
+ VERSION="${MAJOR}.${MINOR}.${PATCH}"
+
+ echo "mklib: Making Linux shared library: " ${LIBNAME}.so.${VERSION}
+
+ if [ $CPLUSPLUS = 1 ] ; then
+ LINK="g++"
+ else
+ LINK="gcc"
+ fi
+
+ # rm any old libs
+ rm -f ${LIBNAME}.so.${VERSION}
+ rm -f ${LIBNAME}.so.${MAJOR}
+ rm -f ${LIBNAME}.so
+
+ # make lib
+ ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+ # make usual symlinks
+ ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
+ ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
+ # finish up
+ FINAL_LIBS="${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so"
+ fi
;;
'SunOS')
@@ -302,6 +313,13 @@ case $ARCH in
FINAL_LIBS=${LIBNAME}
;;
+ 'MorphOS')
+ LIBNAME="lib${LIBNAME}.a"
+ echo "mklib: Making MorphOS library: " ${LIBNAME}
+ ppc-morphos-ar rc ${LIBNAME} ${OBJECTS}
+ FINAL_LIBS="${LIBNAME}"
+ ;;
+
'example')
# If you're adding support for a new architecture, you can
# start with this:
@@ -317,7 +335,9 @@ case $ARCH in
echo "mklib: WARNING: please update the bin/mklib script!"
# XXX this is a total hack for Mesa - remove someday
# fall-back to an old mklib.* script
- ${MAKELIB} "lib${LIBNAME}.a" ${MAJOR} ${MINOR} ${PATCH} ${OBJECTS}
+ LIBNAME="lib${LIBNAME}.a"
+ ${TOP}/${MAKELIB} "lib${LIBNAME}.a" ${MAJOR} ${MINOR} ${PATCH} ${OBJECTS}
+ FINAL_LIBS="${LIBNAME}"
;;
esac
diff --git a/docs/README.3DFX b/docs/README.3DFX
index 817faaa39a1..ffa5468e37c 100644
--- a/docs/README.3DFX
+++ b/docs/README.3DFX
@@ -3,6 +3,65 @@
+Mesa-5.1 release notes:
+-----------------------
+
+1) Glide2 support has been ceased; in order to keep Voodoo Graphics
+ and Voodoo Rush compatibility, please visit the Glide SourceForge
+ and help us to fix Glide3 for those cards.
+2) The current release is a WIP; among other things, the Linux build works
+ only to some extent. Any help will be appreciated.
+3) Glide3 can be found at http://sourceforge.net/projects/glide/
+
+
+
+Known supported HW/OS:
+----------------------
+
+Voodoo^2, Voodoo Banshee, Voodoo3, Voodoo4, Voodoo5
+DOS (DJGPP), Windows9x/2k (MinGW/MSVC), Linux
+
+
+
+How to compile:
+---------------
+
+DJGPP/MinGW/MSVC:
+ Place the Glide3 SDK in the top Mesa directory:
+ $(MESA)/glide3/include/*.h
+ $(MESA)/glide3/lib/
+ Required headers:
+ 3dfx.h, g3ext.h, glide.h, glidesys.h, glideutl.h, sst1vid.h
+ Required libraries:
+ OS specific
+ Type:
+ make -f Makefile.DJ HAVE_MMX=1 HAVE_3DNOW=1 FX=1
+ or
+ make -f Makefile.mgw HAVE_MMX=1 HAVE_3DNOW=1 FX=1
+ or
+ nmake -f Makefile.wfx
+ Look into the corresponding makefiles for further information.
+
+Linux:
+ Place the Glide3 SDK in /usr/local/glide
+ Type:
+ make linux-glide
+
+
+
+Contact:
+--------
+
+Daniel Borca <dborca@users.sourceforge.net>
+Hiroshi Morii <koolsmoky@users.sourceforge.net>
+
+
+
+The info below this line is outdated. You have been warned...
+*************************************************************
+
+
+
Info for Mesa 4.1
-----------------
diff --git a/docs/README.DJ b/docs/README.DJ
index da174f4acbd..722218cfda7 100644
--- a/docs/README.DJ
+++ b/docs/README.DJ
@@ -209,11 +209,12 @@ v1.3 (mar-2003)
* revamped GLUT
* switched to DXE3
-v1.4 (oct-2003)
+v1.4 (nov-2003)
+ enabled GLUT fonts with DXE
+ truly added multi-window support in GLUT (for Adrian Woodward)
* accomodated makefiles with the new sourcetree
* fixed some ALPHA issues
+ * minor changes to PC_HW/timer interface
x hacked and slashed the 3dfx driver (w/ help from Hiroshi Morii)
diff --git a/docs/README.WIN32 b/docs/README.WIN32
index fe9a67f6cdb..8802d8748d0 100644
--- a/docs/README.WIN32
+++ b/docs/README.WIN32
@@ -75,6 +75,12 @@ Details and Notes
- No assembly code is compiled or assembled. Again, this may need
some work to turn it back on or use it again.
+- To build "mangled" Mesa, add the preprocessor define USE_MGL_NAMESPACE
+ to the project settings. You will also need to edit src/mesa.def to change
+ all the gl* symbols to mgl*. Because this is easy to do with a global
+ replace operation in a text editor, no additional mangled version of mesa.def
+ is maintained or shipped.
+
If you have a Windows-related build problem or question, it is
probably better to direct it to me (kschultz@users.sourceforge.net),
rather than directly to the other Mesa developers. I will help you
diff --git a/docs/VERSIONS b/docs/VERSIONS
index 14652bf6843..5de3d2bdbbc 100644
--- a/docs/VERSIONS
+++ b/docs/VERSIONS
@@ -1164,10 +1164,17 @@ Mesa Version History
- less memory used for display lists and vertex buffers
- demo of per-pixel lighting with a fragment program (demos/fplight.c)
- new version (18) of glext.h header
+ - new spriteblast.c demo of GL_ARB_point_sprite
Bug fixes:
- really enable OpenGL 1.4 features in DOS driver.
- fixed issues in glDrawPixels and glCopyPixels for very wide images
- glPixelMapf/ui/usv()'s size parameter is GLsizei, not GLint
+ - fixed some texgen bugs reported by Daniel Borca
+ - fixed wglMakeCurrent(NULL, NULL) bug (#835861)
+ - fixed glTexSubImage3D z-offset bug (Cedric Gautier)
+ - fixed RGBA blend enable bug (Ville Syrjala)
+ - glAccum is supposed to be a no-op in selection/feedback mode
+ - fixed texgen bug #597589 (John Popplewell)
Changes:
- dropped API trace feature (src/Trace/)
- documentation overhaul. merged with website content. more html.
diff --git a/docs/cvs_anonymous.html b/docs/cvs_anonymous.html
index 19cac143842..e1f89520841 100644
--- a/docs/cvs_anonymous.html
+++ b/docs/cvs_anonymous.html
@@ -17,7 +17,7 @@ available. Here are the basic instructions for Unix systems:
login</code>
</li><li>Just hit return at the <code>CVS password:</code> prompt.
</li><li>Then checkout mesa: <code>cvs -z3 -d:pserver:anonymous@cvs.mesa3d.sourceforge.net:/cvsroot/mesa3d
- co Mesa</code>
+ co Mesa-newtree</code>
</li></ol>
<p>To update your Mesa CVS source to the latest CVS source:
@@ -34,4 +34,4 @@ available. Here are the basic instructions for Unix systems:
</p>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/docs/news.html b/docs/news.html
index 04eba57b16d..fadac39a36a 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -7,6 +7,26 @@
<H1>News</H1>
+<H2>November 12, 2003</H2>
+
+<p>
+New Mesa 5.0.2 tarballs have been uploaded to SourceForge which fix a
+number of automake/libtool problems.
+</p>
+<p>
+The new MD5 checksums are:
+</p>
+<pre>
+a9dcf3ff9ad1b7d6ce73a0df7cff8b5b MesaLib-5.0.2.tar.gz
+7b4bf9261657c2fca03796d4955e6f50 MesaLib-5.0.2.tar.bz2
+79c141bddcbad557647535d02194f346 MesaLib-5.0.2.zip
+952d9dc823dd818981d1a648d7b2668a MesaDemos-5.0.2.tar.gz
+b81fafff90995025d2f25ea02b786642 MesaDemos-5.0.2.tar.bz2
+a21be975589e8a2d1871b6bb7874fffa MesaDemos-5.0.2.zip
+</pre>
+
+
+
<h2>September 5, 2003</h2>
<p>
@@ -39,18 +59,6 @@ Mesa 5.0.2 has been released. This is a stable, bug-fix release.
Changes:
- build GLUT with -fexceptions so C++ apps propogate exceptions
</pre>
-<p>
-MD5 checksums follow:
-</p>
-<pre>
-2deb4176e7a06a0477ae31cadd55444b MesaLib-5.0.2.tar.gz
-dc147598ebdff4312260a7f79b3c5c9c MesaLib-5.0.2.tar.bz2
-1eb0fa7079131efef574e3bda328b8c8 MesaLib-5.0.2.zip
-e0dc86e9417620e794968641403604d4 MesaDemos-5.0.2.tar.gz
-a71afaeddd0b567423f88085576850d3 MesaDemos-5.0.2.tar.bz2
-32fbf1925cf45f548468ddda96087828 MesaDemos-5.0.2.zip
-</pre>
-
@@ -673,6 +681,6 @@ source code</a>.</p>
<hr>
-$Id: news.html,v 3.7 2003/09/05 13:39:39 brianp Exp $
+$Id: news.html,v 3.7.2.1 2003/11/24 12:01:42 keithw Exp $
</body>
</html> \ No newline at end of file
diff --git a/include/GL/fxmesa.h b/include/GL/fxmesa.h
index 24c38278f50..fd3dbaeac5b 100644
--- a/include/GL/fxmesa.h
+++ b/include/GL/fxmesa.h
@@ -22,7 +22,7 @@
/*
* FXMesa - 3Dfx Glide driver for Mesa. Contributed by David Bucciarelli
*
- * NOTE: This version requires Glide 2.3 or later.
+ * NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide)
*/
diff --git a/include/GL/gl.h b/include/GL/gl.h
index a3179cf2570..e2dbeb3e93a 100644
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -2261,6 +2261,16 @@ typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC)(GLuint id, GLenum pname,
#endif /* GL_ARB_occlusion_query */
+/* XXX temporary until glext.h is updated! */
+#ifndef GL_ARB_point_sprite
+#define GL_ARB_point_sprite 1
+
+#define GL_POINT_SPRITE_ARB 0x8861
+#define GL_COORD_REPLACE_ARB 0x8862
+
+#endif /* GL_ARB_point_sprite */
+
+
#ifndef GL_MESA_program_debug
#define GL_MESA_program_debug 1
diff --git a/include/GL/glu.h b/include/GL/glu.h
index 5eaa5547482..99515dcc373 100644
--- a/include/GL/glu.h
+++ b/include/GL/glu.h
@@ -40,6 +40,10 @@
#define GLAPIENTRY
#endif
+#ifndef GLAPIENTRYP
+#define GLAPIENTRYP GLAPIENTRY *
+#endif
+
#ifndef GLAPI
#define GLAPI
#endif
@@ -266,7 +270,7 @@ typedef GLUtesselator GLUtriangulatorObj;
#define GLU_TESS_MAX_COORD 1.0e150
/* Internal convenience typedefs */
-typedef void (GLAPIENTRY *_GLUfuncptr)();
+typedef void (GLAPIENTRYP _GLUfuncptr)();
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
diff --git a/include/GL/glu_mangle.h b/include/GL/glu_mangle.h
index 4cc9b6f044c..9c25aa864c1 100644
--- a/include/GL/glu_mangle.h
+++ b/include/GL/glu_mangle.h
@@ -80,5 +80,7 @@
#define gluBuild3DMipmaps mgluBuild3DMipmaps
#define gluCheckExtension mgluCheckExtension
#define gluUnProject4 mgluUnProject4
+#define gluNurbsCallbackData mgluNurbsCallbackData
+#define gluNurbsCallbackDataEXT mgluNurbsCallbackDataEXT
#endif
diff --git a/include/GL/glut.h b/include/GL/glut.h
index 27d937f7ce8..3a67f1f560d 100644
--- a/include/GL/glut.h
+++ b/include/GL/glut.h
@@ -648,7 +648,7 @@ GLUTAPI void GLUTAPIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned in
#endif
/* GLUT color index sub-API. */
-GLUTAPI void GLUTAPIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
+GLUTAPI void GLUTAPIENTRY glutSetColor(int ndx, GLfloat red, GLfloat green, GLfloat blue);
GLUTAPI GLfloat GLUTAPIENTRY glutGetColor(int ndx, int component);
GLUTAPI void GLUTAPIENTRY glutCopyColormap(int win);
diff --git a/progs/demos/paltex.c b/progs/demos/paltex.c
index 8d0400c76a4..206e85f1029 100644
--- a/progs/demos/paltex.c
+++ b/progs/demos/paltex.c
@@ -11,7 +11,6 @@
#ifdef _WIN32
#include <windows.h>
#endif
-#define GL_GLEXT_LEGACY
#include <GL/glut.h>
diff --git a/progs/demos/texobj.c b/progs/demos/texobj.c
index ff701e98c3b..f30ede464c0 100644
--- a/progs/demos/texobj.c
+++ b/progs/demos/texobj.c
@@ -34,8 +34,6 @@ static GLboolean UseObj = GL_FALSE;
static void draw( void )
{
- glDepthFunc(GL_EQUAL);
- /* glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );*/
glClear( GL_COLOR_BUFFER_BIT );
glColor3f( 1.0, 1.0, 1.0 );
diff --git a/progs/samples/Makefile.mgw b/progs/samples/Makefile.mgw
index 04c4b792534..bf2ac05b8b4 100644
--- a/progs/samples/Makefile.mgw
+++ b/progs/samples/Makefile.mgw
@@ -50,7 +50,7 @@ CC = mingw32-gcc
CFLAGS = -Wall -W -pedantic
CFLAGS += -O2 -ffast-math -mcpu=$(CPU)
CFLAGS += -I$(TOP)/include -I../util
-CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK
+CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK -D_STDCALL_SUPPORTED
CFLAGS += -D_WINDEF_ -D_WINGDI_
LD = mingw32-g++
diff --git a/progs/tests/bufferobj.c b/progs/tests/bufferobj.c
index 9653f998d0f..cd73737640a 100644
--- a/progs/tests/bufferobj.c
+++ b/progs/tests/bufferobj.c
@@ -159,12 +159,48 @@ static void SpecialKey( int key, int x, int y )
static void MakeObject1(struct object *obj)
{
GLfloat *v, *c;
+ void *p;
+ int i;
+ GLubyte buffer[500];
+
+ for (i = 0; i < 500; i++)
+ buffer[i] = i & 0xff;
glGenBuffersARB(1, &obj->BufferID);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 1000, NULL, GL_STATIC_DRAW_ARB);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, 500, buffer, GL_STATIC_DRAW_ARB);
+
+ for (i = 0; i < 500; i++)
+ buffer[i] = 0;
+
+ glGetBufferSubDataARB(GL_ARRAY_BUFFER_ARB, 0, 500, buffer);
+
+ for (i = 0; i < 500; i++)
+ assert(buffer[i] == (i & 0xff));
+
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i);
+ assert(!i);
+
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_USAGE_ARB, &i);
+
v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ /* do some sanity tests */
+ glGetBufferPointervARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAP_POINTER_ARB, &p);
+ assert(p == v);
+
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SIZE_ARB, &i);
+ assert(i == 500);
+
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_USAGE_ARB, &i);
+ assert(i == GL_STATIC_DRAW_ARB);
+
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_ACCESS_ARB, &i);
+ assert(i == GL_WRITE_ONLY_ARB);
+
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i);
+ assert(i);
+
/* Make rectangle */
v[0] = -1; v[1] = -1; v[2] = 0;
v[3] = 1; v[4] = -1; v[5] = 0;
@@ -181,6 +217,12 @@ static void MakeObject1(struct object *obj)
obj->NumElements = 0;
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
+
+ glGetBufferPointervARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAP_POINTER_ARB, &p);
+ assert(!p);
+
+ glGetBufferParameterivARB(GL_ARRAY_BUFFER_ARB, GL_BUFFER_MAPPED_ARB, &i);
+ assert(!i);
}
@@ -212,20 +254,18 @@ static void MakeObject2(struct object *obj)
static void MakeObject3(struct object *obj)
{
+ GLfloat vertexData[1000];
GLfloat *v, *c;
GLuint *i;
-
- glGenBuffersARB(1, &obj->BufferID);
- glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, 1000, NULL, GL_STATIC_DRAW_ARB);
- v = (GLfloat *) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
+ int bytes;
/* Make rectangle */
+ v = vertexData;
v[0] = -1; v[1] = -0.5; v[2] = 0;
v[3] = 1; v[4] = -0.5; v[5] = 0;
v[6] = 1; v[7] = 0.5; v[8] = 0;
v[9] = -1; v[10] = 0.5; v[11] = 0;
- c = v + 12;
+ c = vertexData + 12;
c[0] = 0; c[1] = 0; c[2] = 1;
c[3] = 0; c[4] = 0; c[5] = 1;
c[6] = 0; c[7] = 1; c[8] = 1;
@@ -234,7 +274,12 @@ static void MakeObject3(struct object *obj)
obj->VertexOffset = 0;
obj->ColorOffset = 3 * sizeof(GLfloat) * obj->NumVerts;
- glUnmapBufferARB(GL_ARRAY_BUFFER_ARB);
+ bytes = obj->NumVerts * (3 + 3) * sizeof(GLfloat);
+
+ /* Don't use glMap/UnmapBuffer for this object */
+ glGenBuffersARB(1, &obj->BufferID);
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, obj->BufferID);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, bytes, vertexData, GL_STATIC_DRAW_ARB);
/* Setup a buffer of indices to test the ELEMENTS path */
glGenBuffersARB(1, &obj->ElementsBufferID);
diff --git a/progs/tests/texcmp.c b/progs/tests/texcmp.c
new file mode 100644
index 00000000000..fc66a96030e
--- /dev/null
+++ b/progs/tests/texcmp.c
@@ -0,0 +1,389 @@
+/*
+ * Compressed texture demo. Written by Daniel Borca.
+ * This program is in the public domain.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+#define GL_GLEXT_PROTOTYPES 1
+#include <GL/glut.h>
+
+#include "readtex.c" /* I know, this is a hack. */
+#define TEXTURE_FILE "../images/tree2.rgba"
+
+
+static float Rot = 0.0;
+static GLboolean Anim = 1;
+
+typedef struct {
+ GLubyte *data;
+ GLuint size;
+ GLenum format;
+ GLuint w, h;
+
+ GLenum TC;
+
+ GLubyte *cData;
+ GLuint cSize;
+ GLenum cFormat;
+} TEXTURE;
+
+static TEXTURE *Tx, t1, t2, t3;
+static GLboolean fxt1, dxtc, s3tc;
+
+
+static const char *TextureName (GLenum TC)
+{
+ switch (TC) {
+ case GL_RGBA:
+ return "RGBA";
+ case GL_COMPRESSED_RGB:
+ return "COMPRESSED_RGB";
+ case GL_COMPRESSED_RGBA:
+ return "COMPRESSED_RGBA";
+ case GL_COMPRESSED_RGB_FXT1_3DFX:
+ return "GL_COMPRESSED_RGB_FXT1_3DFX";
+ case GL_COMPRESSED_RGBA_FXT1_3DFX:
+ return "GL_COMPRESSED_RGBA_FXT1_3DFX";
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
+ return "GL_COMPRESSED_RGB_S3TC_DXT1_EXT";
+ case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
+ return "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT";
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ return "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT";
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ return "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT";
+ case GL_RGB_S3TC:
+ return "GL_RGB_S3TC";
+ case GL_RGB4_S3TC:
+ return "GL_RGB4_S3TC";
+ case GL_RGBA_S3TC:
+ return "GL_RGBA_S3TC";
+ case GL_RGBA4_S3TC:
+ return "GL_RGBA4_S3TC";
+ default:
+ return "?";
+ }
+}
+
+
+static void
+PrintString(const char *s)
+{
+ while (*s) {
+ glutBitmapCharacter(GLUT_BITMAP_8_BY_13, (int) *s);
+ s++;
+ }
+}
+
+
+static void Idle( void )
+{
+ float t = glutGet(GLUT_ELAPSED_TIME) * 0.001; /* in seconds */
+ Rot = t * 360 / 4; /* 1 rotation per 4 seconds */
+ glutPostRedisplay();
+}
+
+
+static void Display( void )
+{
+ /* draw background gradient */
+ glDisable(GL_TEXTURE_2D);
+ glBegin(GL_POLYGON);
+ glColor3f(1.0, 0.0, 0.2); glVertex2f(-1.5, -1.0);
+ glColor3f(1.0, 0.0, 0.2); glVertex2f( 1.5, -1.0);
+ glColor3f(0.0, 0.0, 1.0); glVertex2f( 1.5, 1.0);
+ glColor3f(0.0, 0.0, 1.0); glVertex2f(-1.5, 1.0);
+ glEnd();
+
+ glPushMatrix();
+ glRotatef(Rot, 0, 0, 1);
+
+ glEnable(GL_TEXTURE_2D);
+ glBegin(GL_POLYGON);
+ glTexCoord2f(0, 1); glVertex2f(-1, -0.5);
+ glTexCoord2f(1, 1); glVertex2f( 1, -0.5);
+ glTexCoord2f(1, 0); glVertex2f( 1, 0.5);
+ glTexCoord2f(0, 0); glVertex2f(-1, 0.5);
+ glEnd();
+
+ glPopMatrix();
+
+ /* info */
+ glColor4f(1, 1, 1, 1);
+
+ glRasterPos3f(-1.2, -0.7, 0);
+ PrintString("Selected: ");
+ PrintString(TextureName(Tx->TC));
+ if (Tx->cData) {
+ char tmp[64];
+ glRasterPos3f(-1.2, -0.8, 0);
+ PrintString("Internal: ");
+ PrintString(TextureName(Tx->cFormat));
+ glRasterPos3f(-1.2, -0.9, 0);
+ PrintString("Size : ");
+ sprintf(tmp, "%d (%d%% of %d)", Tx->cSize, Tx->cSize * 100 / Tx->size, Tx->size);
+ PrintString(tmp);
+ }
+
+ glutSwapBuffers();
+}
+
+
+static void Reshape( int width, int height )
+{
+ glViewport( 0, 0, width, height );
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glOrtho( -1.5, 1.5, -1.0, 1.0, -1.0, 1.0 );
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+}
+
+
+static void ReInit( GLenum TC, TEXTURE *Tx )
+{
+ GLint rv;
+
+ if ((Tx->TC == TC) && (Tx->cData != NULL)) {
+ glCompressedTexImage2DARB(GL_TEXTURE_2D, /* target */
+ 0, /* level */
+ Tx->cFormat, /* real format */
+ Tx->w, /* original width */
+ Tx->h, /* original height */
+ 0, /* border */
+ Tx->cSize, /* compressed size*/
+ Tx->cData); /* compressed data*/
+ } else {
+ glTexImage2D(GL_TEXTURE_2D, /* target */
+ 0, /* level */
+ TC, /* internal format */
+ Tx->w, Tx->h, /* width, height */
+ 0, /* border */
+ Tx->format, /* texture format */
+ GL_UNSIGNED_BYTE, /* texture type */
+ Tx->data); /* the texture */
+
+ /* okay, now cache the compressed texture */
+ Tx->TC = TC;
+ if (Tx->cData != NULL) {
+ free(Tx->cData);
+ Tx->cData = NULL;
+ }
+ glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_ARB, &rv);
+ if (rv) {
+ glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_INTERNAL_FORMAT, (GLint *)&Tx->cFormat);
+ glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, (GLint *)&Tx->cSize);
+ if ((Tx->cData = malloc(Tx->cSize)) != NULL) {
+ glGetCompressedTexImageARB(GL_TEXTURE_2D, 0, Tx->cData);
+ }
+ }
+ }
+}
+
+
+static void Init( void )
+{
+ /* HEIGHT * WIDTH + 1 (for trailing '\0') */
+ static char pattern[8 * 32 + 1] = {"\
+ \
+ MMM EEEE SSS AAA \
+ M M M E S S A A \
+ M M M EEEE SS A A \
+ M M M E SS AAAAA \
+ M M E S S A A \
+ M M EEEE SSS A A \
+ "
+ };
+
+ GLuint i, j;
+
+ GLubyte (*texture1)[8 * 32][4];
+ GLubyte (*texture2)[256][256][4];
+
+ t1.w = 32;
+ t1.h = 8;
+ t1.size = t1.w * t1.h * 4;
+ t1.data = malloc(t1.size);
+ t1.format = GL_RGBA;
+ t1.TC = GL_RGBA;
+
+ texture1 = (GLubyte (*)[8 * 32][4])t1.data;
+ for (i = 0; i < sizeof(pattern) - 1; i++) {
+ switch (pattern[i]) {
+ default:
+ case ' ':
+ (*texture1)[i][0] = 255;
+ (*texture1)[i][1] = 255;
+ (*texture1)[i][2] = 255;
+ (*texture1)[i][3] = 64;
+ break;
+ case 'M':
+ (*texture1)[i][0] = 255;
+ (*texture1)[i][1] = 0;
+ (*texture1)[i][2] = 0;
+ (*texture1)[i][3] = 255;
+ break;
+ case 'E':
+ (*texture1)[i][0] = 0;
+ (*texture1)[i][1] = 255;
+ (*texture1)[i][2] = 0;
+ (*texture1)[i][3] = 255;
+ break;
+ case 'S':
+ (*texture1)[i][0] = 0;
+ (*texture1)[i][1] = 0;
+ (*texture1)[i][2] = 255;
+ (*texture1)[i][3] = 255;
+ break;
+ case 'A':
+ (*texture1)[i][0] = 255;
+ (*texture1)[i][1] = 255;
+ (*texture1)[i][2] = 0;
+ (*texture1)[i][3] = 255;
+ break;
+ }
+ }
+
+ t2.w = 256;
+ t2.h = 256;
+ t2.size = t2.w * t2.h * 4;
+ t2.data = malloc(t2.size);
+ t2.format = GL_RGBA;
+ t2.TC = GL_RGBA;
+
+ texture2 = (GLubyte (*)[256][256][4])t2.data;
+ for (j = 0; j < t2.h; j++) {
+ for (i = 0; i < t2.w; i++) {
+ (*texture2)[j][i][0] = sqrt(i * j * 255 * 255 / (t2.w * t2.h));
+ (*texture2)[j][i][1] = 0;
+ (*texture2)[j][i][2] = 0;
+ (*texture2)[j][i][3] = 255;
+ }
+ }
+
+ t3.data = LoadRGBImage(TEXTURE_FILE, (GLint *)&t3.w, (GLint *)&t3.h, &t3.format);
+ t3.size = t3.w * t3.h * ((t3.format == GL_RGB) ? 3 : 4);
+ t3.TC = GL_RGBA;
+
+ ReInit(GL_RGBA, Tx = &t1);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+ glEnable(GL_TEXTURE_2D);
+
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+}
+
+
+static void Key( unsigned char key, int x, int y )
+{
+ (void) x;
+ (void) y;
+ switch (key) {
+ case 27:
+ exit(0);
+ break;
+ case ' ':
+ Anim = !Anim;
+ if (Anim)
+ glutIdleFunc( Idle );
+ else
+ glutIdleFunc( NULL );
+ break;
+ case 't':
+ if (Tx == &t1) {
+ Tx = &t2;
+ } else if (Tx == &t2) {
+ Tx = &t3;
+ } else {
+ Tx = &t1;
+ }
+ ReInit(Tx->TC, Tx);
+ break;
+ case '0':
+ ReInit(GL_RGBA, Tx);
+ break;
+ case '1':
+ ReInit(GL_COMPRESSED_RGB, Tx);
+ break;
+ case '2':
+ ReInit(GL_COMPRESSED_RGBA, Tx);
+ break;
+ case '3':
+ if (fxt1) ReInit(GL_COMPRESSED_RGB_FXT1_3DFX, Tx);
+ break;
+ case '4':
+ if (fxt1) ReInit(GL_COMPRESSED_RGBA_FXT1_3DFX, Tx);
+ break;
+ case '5':
+ if (dxtc) ReInit(GL_COMPRESSED_RGB_S3TC_DXT1_EXT, Tx);
+ break;
+ case '6':
+ if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, Tx);
+ break;
+ case '7':
+ if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, Tx);
+ break;
+ case '8':
+ if (dxtc) ReInit(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, Tx);
+ break;
+ case 'a':
+ if (s3tc) ReInit(GL_RGB_S3TC, Tx);
+ break;
+ case 's':
+ if (s3tc) ReInit(GL_RGB4_S3TC, Tx);
+ break;
+ case 'd':
+ if (s3tc) ReInit(GL_RGBA_S3TC, Tx);
+ break;
+ case 'f':
+ if (s3tc) ReInit(GL_RGBA4_S3TC, Tx);
+ break;
+ }
+ glutPostRedisplay();
+}
+
+
+int main( int argc, char *argv[] )
+{
+ glutInit( &argc, argv );
+ glutInitWindowPosition( 0, 0 );
+ glutInitWindowSize( 400, 300 );
+
+ glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
+
+ if (glutCreateWindow(argv[0]) <= 0) {
+ printf("Couldn't create window\n");
+ exit(0);
+ }
+
+ if (!glutExtensionSupported("GL_ARB_texture_compression")) {
+ printf("Sorry, GL_ARB_texture_compression not supported\n");
+ exit(0);
+ }
+ if (glutExtensionSupported("GL_3DFX_texture_compression_FXT1")) {
+ fxt1 = GL_TRUE;
+ }
+ if (glutExtensionSupported("GL_EXT_texture_compression_s3tc")) {
+ dxtc = GL_TRUE;
+ }
+ if (glutExtensionSupported("GL_S3_s3tc")) {
+ s3tc = GL_TRUE;
+ }
+
+ Init();
+
+ glutReshapeFunc( Reshape );
+ glutKeyboardFunc( Key );
+ glutDisplayFunc( Display );
+ if (Anim)
+ glutIdleFunc( Idle );
+
+ glutMainLoop();
+ return 0;
+}