Compare commits
	
		
			199 Commits
		
	
	
		
			embedded-1
			...
			mesa_3_4_2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					217ff8f196 | ||
| 
						 | 
					06e6793b60 | ||
| 
						 | 
					e01975967a | ||
| 
						 | 
					82313b4df0 | ||
| 
						 | 
					1e3b2d9b7e | ||
| 
						 | 
					b96b92f7ec | ||
| 
						 | 
					8184f76f02 | ||
| 
						 | 
					1edc9d7248 | ||
| 
						 | 
					c80ee2065a | ||
| 
						 | 
					e8bf438419 | ||
| 
						 | 
					f4f8dc57b6 | ||
| 
						 | 
					446b09ef66 | ||
| 
						 | 
					9edd7c1538 | ||
| 
						 | 
					e1b0819815 | ||
| 
						 | 
					72af1b921e | ||
| 
						 | 
					f68bfe0b5c | ||
| 
						 | 
					b585fdcefc | ||
| 
						 | 
					f752017f5b | ||
| 
						 | 
					3fef3e49bc | ||
| 
						 | 
					259de69210 | ||
| 
						 | 
					3063e1da09 | ||
| 
						 | 
					62abec65c9 | ||
| 
						 | 
					bb4f463d1c | ||
| 
						 | 
					0f6e64513b | ||
| 
						 | 
					32fda642b2 | ||
| 
						 | 
					72d4c40401 | ||
| 
						 | 
					032908842a | ||
| 
						 | 
					89e8b95d8b | ||
| 
						 | 
					736400f6b9 | ||
| 
						 | 
					9a7cc899e1 | ||
| 
						 | 
					9d2eba0c20 | ||
| 
						 | 
					c32ad4d4be | ||
| 
						 | 
					deb0a3d786 | ||
| 
						 | 
					45902de9c6 | ||
| 
						 | 
					b11ce6f485 | ||
| 
						 | 
					df89122630 | ||
| 
						 | 
					e4410ab230 | ||
| 
						 | 
					ab0bfd3f84 | ||
| 
						 | 
					ccab03eaaa | ||
| 
						 | 
					0e60b90ed5 | ||
| 
						 | 
					a387769bb9 | ||
| 
						 | 
					bd61d1b46d | ||
| 
						 | 
					7c06923b95 | ||
| 
						 | 
					ce26824c68 | ||
| 
						 | 
					026c1b2e9c | ||
| 
						 | 
					da2cccaba2 | ||
| 
						 | 
					7987dbf70d | ||
| 
						 | 
					e430f93ea0 | ||
| 
						 | 
					bb70b0eaf8 | ||
| 
						 | 
					b0f1460f13 | ||
| 
						 | 
					08a9355932 | ||
| 
						 | 
					e9bd590781 | ||
| 
						 | 
					456480981a | ||
| 
						 | 
					a241b22aaa | ||
| 
						 | 
					e32b1543e8 | ||
| 
						 | 
					5a7d5d0808 | ||
| 
						 | 
					e3aef4ed72 | ||
| 
						 | 
					47759b1d82 | ||
| 
						 | 
					0c769dba55 | ||
| 
						 | 
					9a1ca37e5b | ||
| 
						 | 
					0eedea5083 | ||
| 
						 | 
					c3ccae5f49 | ||
| 
						 | 
					18074cf055 | ||
| 
						 | 
					1929fbde14 | ||
| 
						 | 
					7a47ecdf23 | ||
| 
						 | 
					0f7e5e8a47 | ||
| 
						 | 
					44779d21a3 | ||
| 
						 | 
					ae5cc3e94c | ||
| 
						 | 
					b15870fe69 | ||
| 
						 | 
					5c08f57d87 | ||
| 
						 | 
					d6540dbaf2 | ||
| 
						 | 
					9e33f91f4b | ||
| 
						 | 
					aa2bbcbcd3 | ||
| 
						 | 
					ea083a8b59 | ||
| 
						 | 
					3b20dc1dd7 | ||
| 
						 | 
					5b3b871d79 | ||
| 
						 | 
					6b593c0b7a | ||
| 
						 | 
					7535dc796a | ||
| 
						 | 
					8a341f4d38 | ||
| 
						 | 
					8ea17294b8 | ||
| 
						 | 
					757e7feb81 | ||
| 
						 | 
					76ef5a3993 | ||
| 
						 | 
					bae4b31566 | ||
| 
						 | 
					e23ea371e6 | ||
| 
						 | 
					77743a4e08 | ||
| 
						 | 
					7510d9a56e | ||
| 
						 | 
					75b470c146 | ||
| 
						 | 
					142d00e32f | ||
| 
						 | 
					50cccb667e | ||
| 
						 | 
					202ddf7a54 | ||
| 
						 | 
					3efc845d1b | ||
| 
						 | 
					dc203452eb | ||
| 
						 | 
					f195052952 | ||
| 
						 | 
					adde46e8ee | ||
| 
						 | 
					d9ec7b48d9 | ||
| 
						 | 
					6fa6c586db | ||
| 
						 | 
					ce764717bc | ||
| 
						 | 
					c6d4a00ca9 | ||
| 
						 | 
					4cdc441b9a | ||
| 
						 | 
					17a68017c0 | ||
| 
						 | 
					6e9605a00d | ||
| 
						 | 
					e5c8261f76 | ||
| 
						 | 
					57db1be417 | ||
| 
						 | 
					ebeb5da82c | ||
| 
						 | 
					bd1b6ef5af | ||
| 
						 | 
					672da3532f | ||
| 
						 | 
					554cd6ba8c | ||
| 
						 | 
					585b358204 | ||
| 
						 | 
					1a87813f14 | ||
| 
						 | 
					fab2936ea2 | ||
| 
						 | 
					510d86231d | ||
| 
						 | 
					183e09ee42 | ||
| 
						 | 
					feb83f991e | ||
| 
						 | 
					5c4f8bdfc7 | ||
| 
						 | 
					16deaa9c49 | ||
| 
						 | 
					12dbb90d4a | ||
| 
						 | 
					0bf5284850 | ||
| 
						 | 
					e3650179c6 | ||
| 
						 | 
					c089afb55b | ||
| 
						 | 
					bfaab253d1 | ||
| 
						 | 
					4c782b7470 | ||
| 
						 | 
					fceecc5bc1 | ||
| 
						 | 
					cb5d29cd17 | ||
| 
						 | 
					807544498a | ||
| 
						 | 
					17f2610d03 | ||
| 
						 | 
					00935d9eab | ||
| 
						 | 
					c8c04359dd | ||
| 
						 | 
					534bc2e2a9 | ||
| 
						 | 
					82960fbf69 | ||
| 
						 | 
					b0c8df81ab | ||
| 
						 | 
					ceab228540 | ||
| 
						 | 
					03614d2f33 | ||
| 
						 | 
					e17c1d2202 | ||
| 
						 | 
					e27b783426 | ||
| 
						 | 
					18ef8e7c98 | ||
| 
						 | 
					b34a9dab57 | ||
| 
						 | 
					7a13c83663 | ||
| 
						 | 
					d4e84664a5 | ||
| 
						 | 
					29f19424ab | ||
| 
						 | 
					813e8585a6 | ||
| 
						 | 
					88337d5109 | ||
| 
						 | 
					77a5bab1a3 | ||
| 
						 | 
					de63653835 | ||
| 
						 | 
					2f095b9b09 | ||
| 
						 | 
					94b61f99c4 | ||
| 
						 | 
					44b450728d | ||
| 
						 | 
					bc2b379ad0 | ||
| 
						 | 
					f35a545d4f | ||
| 
						 | 
					0248965561 | ||
| 
						 | 
					29fb6b3525 | ||
| 
						 | 
					93bff74a02 | ||
| 
						 | 
					211c30cbc9 | ||
| 
						 | 
					1ef3d8407b | ||
| 
						 | 
					b64ede6f45 | ||
| 
						 | 
					a11f829108 | ||
| 
						 | 
					5715ee5d5d | ||
| 
						 | 
					08056a38ee | ||
| 
						 | 
					2591e8f1db | ||
| 
						 | 
					b92036499d | ||
| 
						 | 
					60a0b0d7c6 | ||
| 
						 | 
					c68f4fb958 | ||
| 
						 | 
					b9a3c2b3ce | ||
| 
						 | 
					2cddd4cd79 | ||
| 
						 | 
					052512e2ec | ||
| 
						 | 
					dc1e96acdc | ||
| 
						 | 
					0eb94349b6 | ||
| 
						 | 
					846101fe60 | ||
| 
						 | 
					9af68b1222 | ||
| 
						 | 
					5c4431cc0a | ||
| 
						 | 
					308b5f2e0d | ||
| 
						 | 
					013a664712 | ||
| 
						 | 
					52eee51001 | ||
| 
						 | 
					5d62414004 | ||
| 
						 | 
					5917ec0983 | ||
| 
						 | 
					06e32f455f | ||
| 
						 | 
					0ead11e448 | ||
| 
						 | 
					3edbaf7de6 | ||
| 
						 | 
					e6d349d8e4 | ||
| 
						 | 
					c25a8f9317 | ||
| 
						 | 
					9f5ddba23f | ||
| 
						 | 
					f5de04549e | ||
| 
						 | 
					fb027ada34 | ||
| 
						 | 
					e990e8c166 | ||
| 
						 | 
					394ecbde83 | ||
| 
						 | 
					7ea41a18a5 | ||
| 
						 | 
					262112dafa | ||
| 
						 | 
					e0fd3762ce | ||
| 
						 | 
					1274afbe0b | ||
| 
						 | 
					5f9760b572 | ||
| 
						 | 
					107c1a4d40 | ||
| 
						 | 
					809c5a7fc7 | ||
| 
						 | 
					aaab86427a | ||
| 
						 | 
					5e2c92b8b6 | ||
| 
						 | 
					84e8b8ea5a | ||
| 
						 | 
					051690168a | ||
| 
						 | 
					652f3b41c1 | ||
| 
						 | 
					c5e6547a95 | ||
| 
						 | 
					bc8257a729 | ||
| 
						 | 
					b353233325 | 
							
								
								
									
										591
									
								
								Make-config
									
									
									
									
									
								
							
							
						
						
									
										591
									
								
								Make-config
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										570
									
								
								Makefile.X11
									
									
									
									
									
								
							
							
						
						
									
										570
									
								
								Makefile.X11
									
									
									
									
									
								
							@@ -1,20 +1,20 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.69 2002/11/13 15:33:51 brianp Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.32.2.8 2001/05/16 20:37:47 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  5.0
 | 
			
		||||
# 
 | 
			
		||||
# Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
# 
 | 
			
		||||
# Version:  3.4.2
 | 
			
		||||
#
 | 
			
		||||
# Copyright (C) 1999-2001  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
 | 
			
		||||
@@ -42,7 +42,6 @@ default:
 | 
			
		||||
	@echo "  make bsdos4               for BSD/OS 4.x, dynamic libraries"
 | 
			
		||||
	@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 dgux                 for Data General"
 | 
			
		||||
	@echo "  make freebsd              for FreeBSD systems with GCC"
 | 
			
		||||
	@echo "  make freebsd-386          for FreeBSD systems with GCC, w/ Intel assembly"
 | 
			
		||||
@@ -51,8 +50,8 @@ default:
 | 
			
		||||
	@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               for HP systems with HPUX 10.x"
 | 
			
		||||
	@echo "  make hpux10-sl            for HP systems with HPUX 10.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 irix4                for SGI systems with IRIX 4.x"
 | 
			
		||||
@@ -69,7 +68,6 @@ default:
 | 
			
		||||
 | 
			
		||||
	@echo "  make linux                for Linux systems, make shared .so libs"
 | 
			
		||||
	@echo "  make linux-static         for Linux systems, make static .a libs"
 | 
			
		||||
	@echo "  make linux-trace          for Linux systems, with API trace extension"
 | 
			
		||||
	@echo "  make linux-x86            for Linux on Intel, make shared .so libs"
 | 
			
		||||
	@echo "  make linux-x86-static     for Linux on Intel, make static .a libs"
 | 
			
		||||
	@echo "  make linux-ggi            for Linux systems with libggi"
 | 
			
		||||
@@ -77,6 +75,7 @@ default:
 | 
			
		||||
	@echo "  make linux-glide          for Linux w/ 3Dfx Glide driver"
 | 
			
		||||
	@echo "  make linux-386-glide      for Linux w/ 3Dfx Glide driver, Intel assembly"
 | 
			
		||||
	@echo "  make linux-386-opt-glide  for Linux with 3Dfx Voodoo1 for GLQuake"
 | 
			
		||||
	@echo "  make linux-386-opt-V2-glide  for Linux with 3Dfx Voodoo2 for GLQuake"
 | 
			
		||||
	@echo "  make linux-x86-glide      for Linux w/ all x86 asm for Glide"
 | 
			
		||||
	@echo "  make linux-alpha          for Linux on Alpha systems"
 | 
			
		||||
	@echo "  make linux-alpha-static   for Linux on Alpha systems, static libs"
 | 
			
		||||
@@ -85,9 +84,6 @@ default:
 | 
			
		||||
	@echo "  make linux-sparc          for Linux on Sparc systems"
 | 
			
		||||
	@echo "  make linux-sparc5-elf     for Sparc5 systems, make ELF shared libs"
 | 
			
		||||
	@echo "  make linux-sparc-ultra    for UltraSparc systems, make ELF shared libs"
 | 
			
		||||
	@echo "  make linux-osmesa16       for 16-bit/channel OSMesa"
 | 
			
		||||
	@echo "  make linux-osmesa32       for 32-bit/channel OSMesa"
 | 
			
		||||
	@echo "  make linux-icc            for Linux with the Intel C/C++ compiler"
 | 
			
		||||
	@echo "  make lynxos               for LynxOS systems with GCC"
 | 
			
		||||
	@echo "  make macintosh            for Macintosh"
 | 
			
		||||
	@echo "  make machten-2.2          for Macs w/ MachTen 2.2 (68k w/ FPU)"
 | 
			
		||||
@@ -136,17 +132,14 @@ default:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# XXX we may have to split up this group of targets into those that
 | 
			
		||||
# have a C++ compiler and those that don't for the SI-GLU library.
 | 
			
		||||
 | 
			
		||||
aix aix-sl amix bsdos bsdos4 darwin dgux freebsd freebsd-386 gcc \
 | 
			
		||||
aix aix-sl amix bsdos bsdos4 dgux freebsd freebsd-386 gcc \
 | 
			
		||||
hpux9 hpux9-sl hpux9-gcc hpux9-gcc-sl \
 | 
			
		||||
hpux10 hpux10-sl hpux10-gcc hpux10-gcc-sl \
 | 
			
		||||
irix4 irix5 irix5-gcc irix5-dso \
 | 
			
		||||
irix4 irix5 irix5-gcc irix5-dso irix6-o32 irix6-o32-dso \
 | 
			
		||||
linux linux-static linux-debug linux-static-debug linux-prof \
 | 
			
		||||
linux-x86 linux-icc linux-x86-static linux-x86-debug \
 | 
			
		||||
linux-x86 linux-x86-static linux-x86-debug \
 | 
			
		||||
linux-glide linux-386-glide linux-386-opt-glide \
 | 
			
		||||
linux-x86-glide linux-glide-debug linux-glide-prof \
 | 
			
		||||
linux-386-opt-V2-glide linux-x86-glide linux-glide-debug linux-glide-prof \
 | 
			
		||||
linux-alpha-static linux-alpha \
 | 
			
		||||
linux-ppc-static linux-ppc \
 | 
			
		||||
linux-sparc \
 | 
			
		||||
@@ -161,11 +154,11 @@ sunos5-thread sunos5-pthread sunos5-gcc-thread sunos5-gcc-pthread \
 | 
			
		||||
sunos5-x11r6-gcc-sl ultrix-gcc unicos unixware uwin vistra:
 | 
			
		||||
	-mkdir lib
 | 
			
		||||
	if [ -d src      ] ; then touch src/depend      ; fi
 | 
			
		||||
	if [ -d si-glu   ] ; then touch si-glu/depend  ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then touch src-glu/depend  ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d si-glu   ] ; then cd si-glu   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then cd src-glu  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d demos    ] ; then cd demos    ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d xdemos   ] ; then cd xdemos   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
@@ -173,11 +166,12 @@ sunos5-x11r6-gcc-sl ultrix-gcc unicos unixware uwin vistra:
 | 
			
		||||
	if [ -d book     ] ; then cd book     ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then cd widgets-sgi; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
 | 
			
		||||
irix6-o32 irix6-o32-dso irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
 | 
			
		||||
irix6-n32 irix6-n32-dso irix6-gcc-n32-sl irix-debug:
 | 
			
		||||
	-mkdir lib32
 | 
			
		||||
	if [ -d src      ] ; then touch src/depend      ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then touch src-glu/depend  ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	if [ -d widgets-sgi ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d src      ] ; then cd src      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glu  ] ; then cd src-glu  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
@@ -266,14 +260,14 @@ os2-x11:
 | 
			
		||||
linux-ggi linux-386-ggi:
 | 
			
		||||
	-mkdir lib
 | 
			
		||||
	touch src/depend
 | 
			
		||||
	touch si-glu/depend
 | 
			
		||||
	touch src-glu/depend
 | 
			
		||||
	if [ -d src-glut        ] ; then touch src-glut/depend ; fi
 | 
			
		||||
	if [ -d widgets-sgi     ] ; then touch widgets-sgi/depend ; fi
 | 
			
		||||
	if [ -d ggi             ] ; then touch ggi/depend      ; fi
 | 
			
		||||
	if [ -d src             ] ; then cd src ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src/GGI/default ] ; then cd src/GGI/default ; $(MAKE)      ; fi
 | 
			
		||||
	if [ -d src/GGI/display ] ; then cd src/GGI/display ; $(MAKE)      ; fi
 | 
			
		||||
	if [ -d si-glu ]   ; then cd si-glu   ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d src-glut ] ; then cd src-glu  ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
#	if [ -d src-glut ] ; then cd src-glut ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d ggi ]      ; then cd ggi      ; $(MAKE) -f Makefile.X11 $@ ; fi
 | 
			
		||||
	if [ -d ggi ]      ; then cd ggi/demos; $(MAKE)                    ; fi
 | 
			
		||||
@@ -296,12 +290,6 @@ linux-ggi-install linux-386-ggi-install:
 | 
			
		||||
#	echo ".include $(DESTDIR)/etc/ggi/ggimesa.conf" >> $(DESTDIR)/etc/ggi/libggi.conf ; \
 | 
			
		||||
#	fi
 | 
			
		||||
 | 
			
		||||
linux-osmesa16 linux-osmesa32:
 | 
			
		||||
	-mkdir lib
 | 
			
		||||
	if [ -d src ] ; then touch src/depend ; fi
 | 
			
		||||
	if [ -d src ] ; then cd src ; $(MAKE) -f Makefile.OSMesa16 $@ ; fi
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
# Remove .o files, emacs backup files, etc.
 | 
			
		||||
clean:
 | 
			
		||||
	-rm -f ggi/*~ *.o
 | 
			
		||||
@@ -311,7 +299,6 @@ clean:
 | 
			
		||||
	-rm -f include/GL/*~
 | 
			
		||||
	-rm -f src/*.o src/*~ src/*.a src/*/*.o src/*/*~
 | 
			
		||||
	-rm -f src-glu/*.o src-glu/*~ src-glu/*.a
 | 
			
		||||
	-rm -f si-glu/*/*.o si-glu/*/*/*.o
 | 
			
		||||
	-rm -f src-glut/*.o
 | 
			
		||||
	-rm -f demos/*.o
 | 
			
		||||
	-rm -f book/*.o book/*~
 | 
			
		||||
@@ -323,296 +310,237 @@ clean:
 | 
			
		||||
 | 
			
		||||
# Remove everything that can be remade
 | 
			
		||||
realclean: clean
 | 
			
		||||
	-rm -fr lib lib32 lib64
 | 
			
		||||
	-rm -f lib/*
 | 
			
		||||
	cd demos       && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd xdemos      && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd book        && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd samples     && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd ggi/demos   && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
	cd src/GGI/default && $(MAKE) -f Makefile.X11 realclean || true
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DIRECTORY = Mesa-5.0
 | 
			
		||||
LIB_NAME = MesaLib-5.0
 | 
			
		||||
DEMO_NAME = MesaDemos-5.0
 | 
			
		||||
GLU_NAME = MesaGLU-5.0
 | 
			
		||||
 | 
			
		||||
DIRECTORY = Mesa-3.4.2
 | 
			
		||||
LIB_NAME = MesaLib-3.4.2
 | 
			
		||||
DEMO_NAME = MesaDemos-3.4.2
 | 
			
		||||
GLU_NAME = MesaGLU-3.4.2
 | 
			
		||||
GLUT_NAME = GLUT-3.7
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
LIB_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/Makefile*						\
 | 
			
		||||
	$(DIRECTORY)/Make-config					\
 | 
			
		||||
	$(DIRECTORY)/acconfig.h						\
 | 
			
		||||
	$(DIRECTORY)/acinclude.m4					\
 | 
			
		||||
	$(DIRECTORY)/aclocal.m4						\
 | 
			
		||||
	$(DIRECTORY)/common_rules.make					\
 | 
			
		||||
	$(DIRECTORY)/conf.h.in						\
 | 
			
		||||
	$(DIRECTORY)/config.guess					\
 | 
			
		||||
	$(DIRECTORY)/config.sub						\
 | 
			
		||||
	$(DIRECTORY)/configure						\
 | 
			
		||||
	$(DIRECTORY)/configure.in					\
 | 
			
		||||
	$(DIRECTORY)/install-sh						\
 | 
			
		||||
	$(DIRECTORY)/ltmain.sh						\
 | 
			
		||||
	$(DIRECTORY)/missing						\
 | 
			
		||||
	$(DIRECTORY)/mkinstalldirs					\
 | 
			
		||||
	$(DIRECTORY)/stamp-h.in						\
 | 
			
		||||
	$(DIRECTORY)/docs/CONFORM					\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYING					\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYRIGHT					\
 | 
			
		||||
	$(DIRECTORY)/docs/DEVINFO					\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL					\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL.GNU					\
 | 
			
		||||
	$(DIRECTORY)/docs/README					\
 | 
			
		||||
	$(DIRECTORY)/docs/README.*					\
 | 
			
		||||
	$(DIRECTORY)/docs/RELNOTES*					\
 | 
			
		||||
	$(DIRECTORY)/docs/VERSIONS					\
 | 
			
		||||
	$(DIRECTORY)/docs/*.spec					\
 | 
			
		||||
	$(DIRECTORY)/bin/README						\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*						\
 | 
			
		||||
	$(DIRECTORY)/descrip.mms					\
 | 
			
		||||
	$(DIRECTORY)/mms-config						\
 | 
			
		||||
	$(DIRECTORY)/m4/*.m4						\
 | 
			
		||||
	$(DIRECTORY)/xlib.opt						\
 | 
			
		||||
	$(DIRECTORY)/mesawin32.mak					\
 | 
			
		||||
	$(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				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/ggimesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glext.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl_mangle.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu_mangle.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glxext.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx_mangle.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/mesa_wgl.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/mglmesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/osmesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/svgamesa.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/ugl*.h					\
 | 
			
		||||
	$(DIRECTORY)/include/GL/vms_x_fix.h				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/wmesa.h					\
 | 
			
		||||
	$(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/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src/libGL_la_SOURCES				\
 | 
			
		||||
	$(DIRECTORY)/src/descrip.mms					\
 | 
			
		||||
	$(DIRECTORY)/src/mesa.conf					\
 | 
			
		||||
	$(DIRECTORY)/src/*.def						\
 | 
			
		||||
	$(DIRECTORY)/src/depend						\
 | 
			
		||||
	$(DIRECTORY)/src/*.[chS]					\
 | 
			
		||||
	$(DIRECTORY)/src/array_cache/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/array_cache/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/src/array_cache/libMesaAC_la_SOURCES		\
 | 
			
		||||
	$(DIRECTORY)/src/math/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/math/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src/swrast/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/swrast/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/src/swrast/libMesaSwrast_la_SOURCES		\
 | 
			
		||||
	$(DIRECTORY)/src/swrast_setup/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/swrast_setup/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/src/tnl/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/tnl/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src/tnl/libMesaTnl_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/src/tnl_dd/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/tnl_dd/imm/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/tnl_dd/imm/NOTES.imm				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/windml/tornado/*.c				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/tornado/*.cdf				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/man3/*.3				\
 | 
			
		||||
	$(DIRECTORY)/src/windml/man3/*.html				\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/*.[chS]					\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/vesa/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/BeOS/*.cpp					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/libMesaFX_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/*.[Shc]					\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/ggimesa.conf.in				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/*.c				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/genkgi.conf.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/*.c				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/fbdev.conf.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/*.h			\
 | 
			
		||||
	$(DIRECTORY)/src/KNOWN_BUGS					\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.win				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/osmesa.def				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/SPARC/*.[chS]					\
 | 
			
		||||
	$(DIRECTORY)/src/SPARC/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/SPARC/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/Trace/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/Trace/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/Trace/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/src/X/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.S					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.X11				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.win				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/glu.def					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/dummy.cc					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/descrip.mms					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/mesaglu.opt					\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/gluos.h				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.cc			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/libNIFac_la_SOURCES	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.cc			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/libNInt_la_SOURCES	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/*.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/*.cc			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/libNTess_la_SOURCES	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbtess/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/README				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/alg-outline				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/libtess_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/libutil_la_SOURCES			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/README[12]					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/Makefile*					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/descrip.mms				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/mms_depend					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/depend					\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/ChangeLog				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/INSTALL				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/README				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/TODO					\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/configure				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/configure.in				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/ChangeLog			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Cube				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Ed				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Mcube				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Tea				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/events				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/ChangeLog			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/*.h			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/ChangeLog				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/GL*				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/Mesa*				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/ChangeLog				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/*.c				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/README					\
 | 
			
		||||
	$(DIRECTORY)/util/README					\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.am					\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.in					\
 | 
			
		||||
	$(DIRECTORY)/util/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/util/sampleMakefile				\
 | 
			
		||||
	$(DIRECTORY)/vms/analyze_map.com				\
 | 
			
		||||
	$(DIRECTORY)/vms/xlib.opt					\
 | 
			
		||||
	$(DIRECTORY)/vms/xlib_share.opt					\
 | 
			
		||||
	$(DIRECTORY)/BeOS/Makefile					\
 | 
			
		||||
	$(DIRECTORY)/BeOS/*.cpp
 | 
			
		||||
 | 
			
		||||
OBSOLETE_LIB_FILES = \
 | 
			
		||||
	$(DIRECTORY)/src/Allegro/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.cpp					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.CPP					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.h					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.H					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.c					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.C					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/MAKEFILE					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*bat					\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*DEF					\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/DEPEND.DOS					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.[ch]					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.def					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.mak					\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.rc					\
 | 
			
		||||
	$(DIRECTORY)/macos/README					\
 | 
			
		||||
	$(DIRECTORY)/macos/gli_api/*.h					\
 | 
			
		||||
	$(DIRECTORY)/macos/cglpane/CGLPane.*				\
 | 
			
		||||
	$(DIRECTORY)/macos/include-mac/*.h				\
 | 
			
		||||
	$(DIRECTORY)/macos/libraries/*.stub				\
 | 
			
		||||
	$(DIRECTORY)/macos/libraries/*Stub				\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.mcp				\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.exp				\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.h					\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.c				\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.r				\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.rsrc				\
 | 
			
		||||
	$(DIRECTORY)/macos/src-agl/*.exp				\
 | 
			
		||||
	$(DIRECTORY)/macos/src-agl/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/macos/src-gli/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/Makefile*			\
 | 
			
		||||
	$(DIRECTORY)/Make-config		\
 | 
			
		||||
	$(DIRECTORY)/acconfig.h			\
 | 
			
		||||
	$(DIRECTORY)/acinclude.m4		\
 | 
			
		||||
	$(DIRECTORY)/aclocal.m4			\
 | 
			
		||||
	$(DIRECTORY)/conf.h.in			\
 | 
			
		||||
	$(DIRECTORY)/config.guess		\
 | 
			
		||||
	$(DIRECTORY)/config.sub			\
 | 
			
		||||
	$(DIRECTORY)/configure			\
 | 
			
		||||
	$(DIRECTORY)/configure.in		\
 | 
			
		||||
	$(DIRECTORY)/install-sh			\
 | 
			
		||||
	$(DIRECTORY)/ltconfig			\
 | 
			
		||||
	$(DIRECTORY)/ltmain.sh			\
 | 
			
		||||
	$(DIRECTORY)/missing			\
 | 
			
		||||
	$(DIRECTORY)/mkinstalldirs		\
 | 
			
		||||
	$(DIRECTORY)/stamp-h.in			\
 | 
			
		||||
	$(DIRECTORY)/docs/CONFIG		\
 | 
			
		||||
	$(DIRECTORY)/docs/CONFORM		\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYING		\
 | 
			
		||||
	$(DIRECTORY)/docs/COPYRIGHT		\
 | 
			
		||||
	$(DIRECTORY)/docs/DEVINFO		\
 | 
			
		||||
	$(DIRECTORY)/docs/IAFA-PACKAGE		\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL		\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL.GNU		\
 | 
			
		||||
	$(DIRECTORY)/docs/README		\
 | 
			
		||||
	$(DIRECTORY)/docs/README.*		\
 | 
			
		||||
	$(DIRECTORY)/docs/RELNOTES*		\
 | 
			
		||||
	$(DIRECTORY)/docs/VERSIONS		\
 | 
			
		||||
	$(DIRECTORY)/docs/*.spec		\
 | 
			
		||||
	$(DIRECTORY)/bin/README			\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*			\
 | 
			
		||||
	$(DIRECTORY)/*.BAT			\
 | 
			
		||||
	$(DIRECTORY)/*.bat			\
 | 
			
		||||
	$(DIRECTORY)/descrip.mms		\
 | 
			
		||||
	$(DIRECTORY)/mms-config			\
 | 
			
		||||
	$(DIRECTORY)/xlib.opt			\
 | 
			
		||||
	$(DIRECTORY)/STARTUP.MK			\
 | 
			
		||||
	$(DIRECTORY)/mesawin32.mak		\
 | 
			
		||||
	$(DIRECTORY)/Names.win			\
 | 
			
		||||
	$(DIRECTORY)/win32-openstep.sh		\
 | 
			
		||||
	$(DIRECTORY)/common.dja			\
 | 
			
		||||
	$(DIRECTORY)/include/GL/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/dosmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/amesa.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/fxmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/ggimesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glext.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/gl_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glx_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/mesa_wgl.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/mglmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/osmesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/svgamesa.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/wmesa.h		\
 | 
			
		||||
	$(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/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src/descrip.mms		\
 | 
			
		||||
	$(DIRECTORY)/src/mms_depend		\
 | 
			
		||||
	$(DIRECTORY)/src/mesa.conf		\
 | 
			
		||||
	$(DIRECTORY)/src/*.def			\
 | 
			
		||||
	$(DIRECTORY)/src/depend			\
 | 
			
		||||
	$(DIRECTORY)/src/*.[chS]		\
 | 
			
		||||
	$(DIRECTORY)/src/Allegro/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/BeOS/*.cpp		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.cpp		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.CPP		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.h		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.H		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.c		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*.C		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/MAKEFILE		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*bat		\
 | 
			
		||||
	$(DIRECTORY)/src/D3D/*DEF		\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/DEPEND.DOS		\
 | 
			
		||||
	$(DIRECTORY)/src/DOS/*.c		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/*.def		\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/src/FX/X86/*.[Shc]		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/ggimesa.conf.in			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/*.c			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/default/genkgi.conf.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/*.c			\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/display/fbdev.conf.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.am		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.am	\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/src/GGI/include/ggi/mesa/*.h		\
 | 
			
		||||
	$(DIRECTORY)/src/KNOWN_BUGS				\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/OSmesa/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.def				\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.mak				\
 | 
			
		||||
	$(DIRECTORY)/src/S3/*.rc				\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/SVGA/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/Windows/*.def				\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/src/X/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/src/X/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.S				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/README[12]				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/descrip.mms			\
 | 
			
		||||
	$(DIRECTORY)/src-glu/mms_depend				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.def				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/depend				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/ChangeLog			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/INSTALL			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/README			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/TODO				\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/configure			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/configure.in			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/ChangeLog		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Cube			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Ed			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Mcube			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/Tea			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/*.[ch]			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/demos/events			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/ChangeLog		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/*.h		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/include/GL/Makefile.in	\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/ChangeLog			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/GL*			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/man/Mesa*			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/ChangeLog			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/*.c			\
 | 
			
		||||
	$(DIRECTORY)/widgets-mesa/src/Makefile.in		\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/Makefile*			\
 | 
			
		||||
	$(DIRECTORY)/widgets-sgi/README				\
 | 
			
		||||
	$(DIRECTORY)/util/README				\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.am				\
 | 
			
		||||
	$(DIRECTORY)/util/Makefile.in				\
 | 
			
		||||
	$(DIRECTORY)/util/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/util/sampleMakefile			\
 | 
			
		||||
	$(DIRECTORY)/vms/analyze_map.com			\
 | 
			
		||||
	$(DIRECTORY)/vms/xlib.opt				\
 | 
			
		||||
	$(DIRECTORY)/vms/xlib_share.opt				\
 | 
			
		||||
	$(DIRECTORY)/BeOS/Makefile				\
 | 
			
		||||
	$(DIRECTORY)/BeOS/*.cpp					\
 | 
			
		||||
	$(DIRECTORY)/WIN32/NMAKE.MAK				\
 | 
			
		||||
	$(DIRECTORY)/WIN32/NMAKE.MIF				\
 | 
			
		||||
	$(DIRECTORY)/WIN32/RES/*rc				\
 | 
			
		||||
	$(DIRECTORY)/WIN32/RES/*def				\
 | 
			
		||||
	$(DIRECTORY)/WIN32/RULES/lib.*				\
 | 
			
		||||
	$(DIRECTORY)/WIN32/RULES/progs.*			\
 | 
			
		||||
	$(DIRECTORY)/macos/README				\
 | 
			
		||||
	$(DIRECTORY)/macos/gli_api/*.h				\
 | 
			
		||||
	$(DIRECTORY)/macos/cglpane/CGLPane.*			\
 | 
			
		||||
	$(DIRECTORY)/macos/include-mac/*.h			\
 | 
			
		||||
	$(DIRECTORY)/macos/libraries/*.stub			\
 | 
			
		||||
	$(DIRECTORY)/macos/libraries/*Stub			\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.mcp			\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.exp			\
 | 
			
		||||
	$(DIRECTORY)/macos/projects/*.h				\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.c			\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.r			\
 | 
			
		||||
	$(DIRECTORY)/macos/resources/*.rsrc			\
 | 
			
		||||
	$(DIRECTORY)/macos/src-agl/*.exp			\
 | 
			
		||||
	$(DIRECTORY)/macos/src-agl/*.[ch]			\
 | 
			
		||||
	$(DIRECTORY)/macos/src-gli/*.[ch]			\
 | 
			
		||||
	$(DIRECTORY)/OpenStep
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DEMO_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glutf90.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut_h.dja	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*def		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/descrip.mms	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/mms_depend	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dos/*.[ch]	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dos/Makefile.DJ	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dos/PC_HW/*.[chS]	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dja/*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/Makefile	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.cpp	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.h		\
 | 
			
		||||
	$(DIRECTORY)/images/*			\
 | 
			
		||||
	$(DIRECTORY)/demos/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/demos/descrip.mms		\
 | 
			
		||||
@@ -622,7 +550,7 @@ DEMO_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/demos/README		\
 | 
			
		||||
	$(DIRECTORY)/xdemos/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/xdemos/descrip.mms		\
 | 
			
		||||
	$(DIRECTORY)/xdemos/*.[chf]		\
 | 
			
		||||
	$(DIRECTORY)/xdemos/*.[cf]		\
 | 
			
		||||
	$(DIRECTORY)/book/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/book/README		\
 | 
			
		||||
	$(DIRECTORY)/book/*.[ch]		\
 | 
			
		||||
@@ -630,37 +558,8 @@ DEMO_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/samples/README		\
 | 
			
		||||
	$(DIRECTORY)/samples/*.c		\
 | 
			
		||||
	$(DIRECTORY)/mtdemos			\
 | 
			
		||||
	$(DIRECTORY)/windmldemos/Makefile.ugl	\
 | 
			
		||||
	$(DIRECTORY)/windmldemos/*.c		\
 | 
			
		||||
	$(DIRECTORY)/windmldemos/*.bmp		\
 | 
			
		||||
	$(DIRECTORY)/ggi
 | 
			
		||||
 | 
			
		||||
OBSOLETE_DEMO_FILES = \
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut_h.dja	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dja/*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/Makefile	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.cpp	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.h		\
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SI_GLU_FILES = \
 | 
			
		||||
	$(DIRECTORY)/Makefile*				\
 | 
			
		||||
	$(DIRECTORY)/Make-config			\
 | 
			
		||||
	$(DIRECTORY)/bin/mklib*				\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu.h			\
 | 
			
		||||
	$(DIRECTORY)/si-glu/Makefile.X11		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/include/gluos.h		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.h	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/interface/*.cc	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.h	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/internals/*.cc	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbstess/*.h	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libnurbs/nurbstess/*.cc	\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/README		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/alg-outline		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libtess/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/si-glu/libutil/*.[ch]
 | 
			
		||||
 | 
			
		||||
GLU_FILES = \
 | 
			
		||||
	$(DIRECTORY)/Makefile*			\
 | 
			
		||||
	$(DIRECTORY)/Make-config		\
 | 
			
		||||
@@ -689,16 +588,13 @@ GLUT_FILES = \
 | 
			
		||||
	$(DIRECTORY)/include/GL/glu_mangle.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut.h		\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glutf90.h	\
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut_h.dja	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/Makefile*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/depend		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*def		\
 | 
			
		||||
	$(DIRECTORY)/src-glut/descrip.mms	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/mms_depend	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*.[ch]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OBSOLETE_GLUT_FILES = \
 | 
			
		||||
	$(DIRECTORY)/include/GL/glut_h.dja	\
 | 
			
		||||
	$(DIRECTORY)/src-glut/*.[ch]		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.dja/*		\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/Makefile	\
 | 
			
		||||
	$(DIRECTORY)/src-glut.beos/*.cpp	\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,94 +0,0 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_agp_offset
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GLX_MESA_agp_offset
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
 | 
			
		||||
    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping (Mesa 4.0.4 and later.  Only implemented in particular
 | 
			
		||||
    XFree86/DRI drivers.)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    1.0
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required
 | 
			
		||||
    GLX_NV_vertex_array_range is required.
 | 
			
		||||
    This extensions is written against the OpenGL 1.4 Specification.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    This extensions provides a way to convert pointers in an AGP memory
 | 
			
		||||
    region into byte offsets into the AGP aperture.
 | 
			
		||||
    Note, this extension depends on GLX_NV_vertex_array_range, for which
 | 
			
		||||
    no real specification exists.  See GL_NV_vertex_array_range for more
 | 
			
		||||
    information.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the OpenGL 1.4 Specification
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 the GLX 1.4 Specification (Functions and Errors)
 | 
			
		||||
 | 
			
		||||
    Add a new section, 3.6 as follows:
 | 
			
		||||
 | 
			
		||||
    3.6 AGP Memory Access
 | 
			
		||||
 | 
			
		||||
    On "PC" computers, AGP memory can be allocated with glXAllocateMemoryNV
 | 
			
		||||
    and freed with glXFreeMemoryNV.  Sometimes it's useful to know where a
 | 
			
		||||
    block of AGP memory is located with respect to the start of the AGP
 | 
			
		||||
    aperature.  The function
 | 
			
		||||
 | 
			
		||||
        GLuint glXGetAGPOffsetMESA( const GLvoid *pointer )
 | 
			
		||||
 | 
			
		||||
    Returns the offset of the given memory block from the start of AGP
 | 
			
		||||
    memory in basic machine units (i.e. bytes).  If pointer is invalid
 | 
			
		||||
    the value ~0 will be returned.
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None.  This is a client side-only extension.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    glXGetAGPOffsetMESA will return ~0 if the pointer does not point to
 | 
			
		||||
    an AGP memory region.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    20 September 2002 - Initial draft
 | 
			
		||||
    2 October 2002 - finished GLX chapter 3 additions
 | 
			
		||||
@@ -1,138 +0,0 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_pack_invert
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_pack_invert
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
 | 
			
		||||
    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping (Mesa 4.0.4 and later)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    1.0
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required
 | 
			
		||||
    This extensions is written against the OpenGL 1.4 Specification.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    This extension adds a new pixel storage parameter to indicate that
 | 
			
		||||
    images are to be packed in top-to-bottom order instead of OpenGL's
 | 
			
		||||
    conventional bottom-to-top order.  Only pixel packing can be
 | 
			
		||||
    inverted (i.e. for glReadPixels, glGetTexImage, glGetConvolutionFilter,
 | 
			
		||||
    etc).
 | 
			
		||||
 | 
			
		||||
    Almost all known image file formats store images in top-to-bottom
 | 
			
		||||
    order.  As it is, OpenGL reads images from the frame buffer in
 | 
			
		||||
    bottom-to-top order.  Thus, images usually have to be inverted before
 | 
			
		||||
    writing them to a file with image I/O libraries.  This extension
 | 
			
		||||
    allows images to be read such that inverting isn't needed.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    1. Should we also defined UNPACK_INVERT_MESA for glDrawPixels, etc?
 | 
			
		||||
 | 
			
		||||
    Resolved:  No, we're only concerned with pixel packing.  There are other
 | 
			
		||||
    solutions for inverting images when using glDrawPixels (negative Y pixel
 | 
			
		||||
    zoom) or glTexImage (invert the vertex T coordinates).  It would be easy
 | 
			
		||||
    enough to define a complementary extension for pixel packing in the
 | 
			
		||||
    future if needed.
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    Accepted by the <pname> parameter of PixelStorei and PixelStoref
 | 
			
		||||
    and the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev
 | 
			
		||||
    and GetBooleanv:
 | 
			
		||||
 | 
			
		||||
        PACK_INVERT_MESA                   0x8758
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
 | 
			
		||||
Operations and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    Add the following entry to table 4.4 (PixelStore parameters) on page 182:
 | 
			
		||||
 | 
			
		||||
    Parameter Name       Type    Initial Value    Valid Range
 | 
			
		||||
    ---------------------------------------------------------
 | 
			
		||||
    PACK_INVERT_MESA     boolean     FALSE        TRUE/FALSE
 | 
			
		||||
 | 
			
		||||
    In the section labeled "Placement in Client Memory" on page 184
 | 
			
		||||
    insert the following text into the paragraph before the sentence
 | 
			
		||||
    that starts with "If the format is RED, GREEN, BLUE...":
 | 
			
		||||
 | 
			
		||||
    "The parameter PACK_INVERT_MESA controls whether the image is packed
 | 
			
		||||
     in bottom-to-top order (the default) or top-to-bottom order.  Equation
 | 
			
		||||
     3.8 is modified as follows:
 | 
			
		||||
 | 
			
		||||
     ... the first element of the Nth row is indicated by
 | 
			
		||||
 | 
			
		||||
         p + Nk,                if PACK_INVERT_MESA is false
 | 
			
		||||
         p + k * (H - 1) - Nk,  if PACK_INVERT_MESA is true, where H is the
 | 
			
		||||
                                image height
 | 
			
		||||
    "
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
 | 
			
		||||
State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the AGL/GLX/WGL Specifications
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    Add the following entry to table 6.20 (Pixels) on page 235:
 | 
			
		||||
 | 
			
		||||
    Get Value         Type     Get Cmd    Initial Value  Description                Sec    Attribute
 | 
			
		||||
    --------------------------------------------------------------------------------------------------
 | 
			
		||||
    PACK_INVERT_MESA  boolean  GetBoolean  FALSE         Value of PACK_INVERT_MESA  4.3.2  pixel-store
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    21 September 2002 - Initial draft
 | 
			
		||||
@@ -1,233 +0,0 @@
 | 
			
		||||
XXX - Not complete yet!!!
 | 
			
		||||
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_packed_depth_stencil
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_packed_depth_stencil
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com)
 | 
			
		||||
    Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Not yet shipping.
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_packed_depth_stencil.spec,v 1.1 2000/11/03 14:58:45 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    ???
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    EXT_abgr affects the definition of this extension
 | 
			
		||||
    SGIS_texture4D affects the definition of this extension
 | 
			
		||||
    EXT_cmyka affects the definition of this extension
 | 
			
		||||
    ARB_packed_pixels affects the definition of this extension
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
	
 | 
			
		||||
    Provides a mechanism for DrawPixels and ReadPixels to efficiently
 | 
			
		||||
    transfer depth and stencil image data.  Specifically, we defined new
 | 
			
		||||
    packed pixel formats and types which pack both stencil and depth
 | 
			
		||||
    into one value.
 | 
			
		||||
 | 
			
		||||
Issues:
 | 
			
		||||
 | 
			
		||||
    1. Is this the right way to distinguish between 24/8 and 8/24
 | 
			
		||||
       pixel formats?  Should we instead provide both:
 | 
			
		||||
	
 | 
			
		||||
       GL_DEPTH_STENCIL_MESA
 | 
			
		||||
       GL_STENCIL_DEPTH_MESA
 | 
			
		||||
 | 
			
		||||
       And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ?
 | 
			
		||||
 | 
			
		||||
    2. If not, is it correct to use _REV to indicate that stencil
 | 
			
		||||
       preceeds depth in the 1_15 and 8_24 formats?
 | 
			
		||||
 | 
			
		||||
    3. Do we really want the GL_UNSIGNED_SHORT formats?  
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
    
 | 
			
		||||
    Accepted by the <format> parameter of ReadPixels and DrawPixels:
 | 
			
		||||
 | 
			
		||||
	GL_DEPTH_STENCIL_MESA		0x8750
 | 
			
		||||
 | 
			
		||||
    Accepted by the <type> parameter of ReadPixels and DrawPixels:
 | 
			
		||||
 | 
			
		||||
	GL_UNSIGNED_INT_24_8_MESA	0x8751
 | 
			
		||||
	GL_UNSIGNED_INT_8_24_REV_MESA	0x8752
 | 
			
		||||
	GL_UNSIGNED_SHORT_15_1_MESA	0x8753
 | 
			
		||||
	GL_UNSIGNED_SHORT_1_15_REV_MESA	0x8754
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    One entry is added to table 3.5 (DrawPixels and ReadPixels formats).
 | 
			
		||||
    The new table is:
 | 
			
		||||
 | 
			
		||||
			Target
 | 
			
		||||
	Format Name	Buffer	Element Meaning and Order
 | 
			
		||||
	-----------	------	-------------------------
 | 
			
		||||
	COLOR_INDEX	Color	Color index
 | 
			
		||||
	STENCIL_INDEX	Stencil Stencil index
 | 
			
		||||
	DEPTH_COMPONENT Depth	Depth component
 | 
			
		||||
	RED		Color	R component
 | 
			
		||||
	GREEN		Color	G component
 | 
			
		||||
	BLUE		Color	B component
 | 
			
		||||
	ALPHA		Color	A component
 | 
			
		||||
	RGB		Color	R, G, B components
 | 
			
		||||
	RGBA		Color	R, G, B, A components
 | 
			
		||||
	BGRA	        Color   B, G, R, A components
 | 
			
		||||
	ABGR_EXT	Color	A, B, G, R components
 | 
			
		||||
	CMYK_EXT	Color	Cyan, Magenta, Yellow, Black components
 | 
			
		||||
	CMYKA_EXT	Color	Cyan, Magenta, Yellow, Black, A components
 | 
			
		||||
	LUMINANCE	Color	Luminance component
 | 
			
		||||
	LUMINANCE_ALPHA Color	Luminance, A components
 | 
			
		||||
	DEPTH_STENCIL   Depth,  Depth component, stencil index.
 | 
			
		||||
			Stencil
 | 
			
		||||
 | 
			
		||||
	Table 3.5: DrawPixels and ReadPixels formats.  The third column
 | 
			
		||||
	gives a description of and the number and order of elements in a
 | 
			
		||||
	group.
 | 
			
		||||
 | 
			
		||||
    Add to the description of packed pixel formats:
 | 
			
		||||
 | 
			
		||||
	<type> Parameter		Data	of	  Matching
 | 
			
		||||
	Token Name			Type	Elements  Pixel Formats
 | 
			
		||||
	----------------		----	--------  -------------
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_BYTE_3_3_2	      ubyte   3	      RGB
 | 
			
		||||
	UNSIGNED_BYTE_2_3_3_REV       ubyte   3	      RGB
 | 
			
		||||
	UNSIGNED_SHORT_5_6_5	      ushort  3	      RGB
 | 
			
		||||
	UNSIGNED_SHORT_5_6_5_REV      ushort  3	      RGB
 | 
			
		||||
	UNSIGNED_SHORT_4_4_4_4	      ushort  4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_SHORT_4_4_4_4_REV    ushort  4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_SHORT_5_5_5_1	      ushort  4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_SHORT_1_5_5_5_REV    ushort  4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_INT_8_8_8_8	      uint    4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_INT_8_8_8_8_REV      uint    4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_INT_10_10_10_2       uint    4	      RGBA,BGRA,ABGR_EXT,CMYK_EXT
 | 
			
		||||
	UNSIGNED_INT_2_10_10_10_REV   uint    4	      RGBA,BGRA
 | 
			
		||||
	UNSIGNED_SHORT_15_1_MESA      ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
	UNSIGNED_SHORT_1_15_REV_MESA  ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
	UNSIGNED_SHORT_24_8_MESA      ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
	UNSIGNED_SHORT_8_24_REV_MESA  ushort  2       DEPTH_STENCIL_MESA
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_INT_8_24:
 | 
			
		||||
 | 
			
		||||
	     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10	9  8  7  6  5  4  3  2	1  0
 | 
			
		||||
	    +-----------------------+-----------------------------------------------------------------------+
 | 
			
		||||
	    |			    |			     			    			    |
 | 
			
		||||
	    +-----------------------+-----------------------------------------------------------------------+
 | 
			
		||||
 | 
			
		||||
		    first					second		    
 | 
			
		||||
		    element					element		    
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_INT_24_8:
 | 
			
		||||
 | 
			
		||||
	     31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10	9  8  7  6  5  4  3  2	1  0
 | 
			
		||||
	    +----------------------------------------------------------------------+------------------------+
 | 
			
		||||
	    |			    			     			   | 			    |
 | 
			
		||||
	    +----------------------------------------------------------------------+------------------------+
 | 
			
		||||
 | 
			
		||||
		    first								  second		    
 | 
			
		||||
		    element								  element		    
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_SHORT_15_1:
 | 
			
		||||
 | 
			
		||||
	      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
	    +-----------------------------------------------------------+---+
 | 
			
		||||
	    |					    			|   |
 | 
			
		||||
	    +-----------------------------------------------------------+---+
 | 
			
		||||
 | 
			
		||||
	    		first						second	
 | 
			
		||||
			element						element	
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	UNSIGNED_SHORT_1_15_REV:
 | 
			
		||||
 | 
			
		||||
	      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
	    +---+-----------------------------------------------------------+
 | 
			
		||||
	    |	|		     					    |
 | 
			
		||||
	    +---+-----------------------------------------------------------+
 | 
			
		||||
 | 
			
		||||
	    second		    first
 | 
			
		||||
	    element		    element
 | 
			
		||||
 | 
			
		||||
    The assignment of elements to fields in the packed pixel is as
 | 
			
		||||
    described in the table below:
 | 
			
		||||
 | 
			
		||||
			   First       Second	Third	    Fourth
 | 
			
		||||
	Format		   Element     Element	Element     Element
 | 
			
		||||
	------		   -------     -------	-------     -------
 | 
			
		||||
	RGB		   red	       green	blue
 | 
			
		||||
	RGBA		   red	       green	blue	    alpha
 | 
			
		||||
	BGRA		   blue	       green	red	    alpha
 | 
			
		||||
	ABGR_EXT	   alpha       blue	green	    red
 | 
			
		||||
	CMYK_EXT	   cyan	       magenta	yellow	    black
 | 
			
		||||
	DEPTH_STENCIL_MESA depth       stencil
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
 | 
			
		||||
and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    The new format is added to the discussion of Obtaining Pixels from the
 | 
			
		||||
    Framebuffer.  It should read " If the <format> is one of RED, GREEN,
 | 
			
		||||
    BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and
 | 
			
		||||
    the GL is in color index mode, then the color index is obtained."
 | 
			
		||||
 | 
			
		||||
    The new format is added to the discussion of Index Lookup.  It should
 | 
			
		||||
    read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA,
 | 
			
		||||
    ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to
 | 
			
		||||
    reference 4 tables of color components: PIXEL_MAP_I_TO_R,
 | 
			
		||||
    PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A."
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the GLX Specification
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    Version 1.0 - 23 Sep 2000
 | 
			
		||||
        Keith's original version.
 | 
			
		||||
 | 
			
		||||
    Version 1.1 - 3 Nov 2000
 | 
			
		||||
        Brian's edits, assigned values to new enums.
 | 
			
		||||
 | 
			
		||||
@@ -1,193 +0,0 @@
 | 
			
		||||
XXX - Not complete yet!!!
 | 
			
		||||
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_sprite_point
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_sprite_point
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Not yet shipping.
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_sprite_point.spec,v 1.1 2000/12/08 00:21:02 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    ???
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    GL_EXT_point_parameters effects the definition of this extension
 | 
			
		||||
    GL_ARB_multitexture effects the definition of this extension
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
	
 | 
			
		||||
    This extension modifies the way in which points are rendered,
 | 
			
		||||
    specifically when they're textured.  When SPRITE_POINT_MESA is enabled
 | 
			
		||||
    a point is rendered as if it were a quadrilateral with unique texture
 | 
			
		||||
    coordinates at each vertex.  This extension effectively turns points
 | 
			
		||||
    into sprites which may be rendered more easily and quickly than using
 | 
			
		||||
    conventional textured quadrilaterals.
 | 
			
		||||
 | 
			
		||||
    When using point size > 1 or attenuated points this extension is an
 | 
			
		||||
    effective way to render many small sprite images for particle systems
 | 
			
		||||
    or other effects.
 | 
			
		||||
 | 
			
		||||
Issues:
 | 
			
		||||
 | 
			
		||||
    1. How are the texture coordinates computed?
 | 
			
		||||
 | 
			
		||||
       The lower-left corner has texture coordinate (0,0,r,q).
 | 
			
		||||
       The lower-right, (1,0,r,q).  The upper-right, (1,1,r,q).
 | 
			
		||||
       The upper-left, (0,1,r,q).
 | 
			
		||||
 | 
			
		||||
    2. What about texgen and texture matrices?
 | 
			
		||||
 | 
			
		||||
       Texgen and the texture matrix have no effect on the point's s and t
 | 
			
		||||
       texture coordinates.  The r and q coordinates may have been computed
 | 
			
		||||
       by texgen or the texture matrix.  Note that with a 3D texture and/or
 | 
			
		||||
       texgen that the r coordinate could be used to select a slice in the
 | 
			
		||||
       3D texture.
 | 
			
		||||
 | 
			
		||||
    3. What about point smoothing?
 | 
			
		||||
 | 
			
		||||
       When point smoothing is enabled, a triangle fan could be rendered
 | 
			
		||||
       to approximate a circular point.  This could be problematic to
 | 
			
		||||
       define and implement so POINT_SMOOTH is ignored when drawing sprite
 | 
			
		||||
       points.
 | 
			
		||||
 | 
			
		||||
       Smoothed points can be approximated by using an appropriate texture
 | 
			
		||||
       images, alpha testing and blending.
 | 
			
		||||
 | 
			
		||||
       POLYGON_SMOOTH does effect the rendering of the quadrilateral, however.
 | 
			
		||||
 | 
			
		||||
    4. What about sprite rotation?
 | 
			
		||||
 | 
			
		||||
       There is none.  Sprite points are always rendered as window-aligned
 | 
			
		||||
       squares.  One could define rotated texture images if desired.  A 3D
 | 
			
		||||
       texture and appropriate texture r coordinates could be used to
 | 
			
		||||
       effectively specify image rotation per point.
 | 
			
		||||
 | 
			
		||||
    5. What about POLYGON_MODE?
 | 
			
		||||
 | 
			
		||||
       POLYGON_MODE does not effect the rasterization of the quadrilateral.
 | 
			
		||||
 | 
			
		||||
    6. What about POLYGON_CULL?
 | 
			
		||||
 | 
			
		||||
       TBD.  Polygon culling is normally specified and implemented in the
 | 
			
		||||
       transformation stage of OpenGL.  However, some rasterization hardware
 | 
			
		||||
       implements it later during triangle setup.
 | 
			
		||||
 | 
			
		||||
       Polygon culling wouldn't be useful for sprite points since the
 | 
			
		||||
       quadrilaterals are always defined in counter-clockwise order in
 | 
			
		||||
       window space.  For that reason, polygon culling should probably be
 | 
			
		||||
       ignored.
 | 
			
		||||
 | 
			
		||||
    7. Should sprite points be alpha-attenuated if their size is below the
 | 
			
		||||
       point parameter's threshold size?
 | 
			
		||||
 | 
			
		||||
    8. Should there be an advertisized maximum sprite point size?
 | 
			
		||||
 | 
			
		||||
       No.  Since we're rendering the point as a quadrilateral there's no
 | 
			
		||||
       need to limit the size.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
    
 | 
			
		||||
    Accepted by the <pname> parameter of Enable, Disable, IsEnabled,
 | 
			
		||||
    GetIntegerv, GetBooleanv, GetFloatv and GetDoublev:
 | 
			
		||||
 | 
			
		||||
	SPRITE_POINT_MESA		0x????
 | 
			
		||||
        MAX_SPRITE_POINT_SIZE_MESA      0x????   (need this?)
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the 1.1 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    Section ???.
 | 
			
		||||
 | 
			
		||||
    When SPRITE_POINT_MESA is enabled points are rasterized as screen-
 | 
			
		||||
    aligned quadrilaterals.  If the four vertices of the quadrilateral
 | 
			
		||||
    are labeled A, B, C, and D, starting at the lower-left corner and moving
 | 
			
		||||
    counter-clockwise around the quadrilateral, then the vertex and
 | 
			
		||||
    texture coordinates are computed as follows:
 | 
			
		||||
 | 
			
		||||
      vertex   window coordinate       texture coordinate
 | 
			
		||||
        A      (x-r, y-r, z, w)          (0, 0, r, q)
 | 
			
		||||
        B      (x+r, y-r, z, w)          (1, 0, r, q)
 | 
			
		||||
        C      (x+r, y+r, z, w)          (1, 1, r, q)
 | 
			
		||||
        D      (x-r, y+r, z, w)          (0, 1, r, q)
 | 
			
		||||
 | 
			
		||||
    where x, y, z, w are the point's window coordinates, r and q are the
 | 
			
		||||
    point's 3rd and 4th texture coordinates  and r is half the point's
 | 
			
		||||
    size.  The other vertex attributes (such as the color and fog coordinate)
 | 
			
		||||
    are simply duplicated from the original point vertex.
 | 
			
		||||
 | 
			
		||||
    Point size may either be specified with PointSize or computed
 | 
			
		||||
    according to the EXT_point_parameters extension.
 | 
			
		||||
 | 
			
		||||
    The new texture coordinates are not effected by texgen or the texture
 | 
			
		||||
    matrix.  Note, however, that the texture r and q coordinates are passed
 | 
			
		||||
    unchanged and may have been computed with texgen and/or the texture
 | 
			
		||||
    matrix.
 | 
			
		||||
 | 
			
		||||
    If multiple texture units are present the same texture coordinate is
 | 
			
		||||
    used for all texture units.
 | 
			
		||||
 | 
			
		||||
    The point is then rendered as if it were a quadrilateral using the
 | 
			
		||||
    normal point sampling rules.  POLYGON_MODE does not effect the
 | 
			
		||||
    rasterization of the quadrilateral but POLYGON_SMOOTH does.
 | 
			
		||||
 | 
			
		||||
    POINT_SMOOTH has no effect when SPRITE_POINT_MESA is enabled.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
 | 
			
		||||
and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the 1.1 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the GLX Specification
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    Add boolean variable SPRITE_POINT_MESA to the point attribute group.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    Version 1.0 - 4 Dec 2000
 | 
			
		||||
        Original draft.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1,360 +0,0 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
     MESA_trace
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
     GL_MESA_TRACE
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
    
 | 
			
		||||
    Bernd Kreimeier, Loki Entertainment, bk 'at' lokigames.com
 | 
			
		||||
    Brian Paul, VA Linux Systems, Inc., brianp 'at' valinux.com
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    XXX - Not complete yet!!!
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_trace.spec,v 1.2 2001/01/29 16:10:18 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    none yet
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.2 is required.
 | 
			
		||||
    The extension is written against the OpenGL 1.2 Specification
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    Provides the application with means to enable and disable logging
 | 
			
		||||
    of GL calls including parameters as readable text. The verbosity
 | 
			
		||||
    of the generated log can be controlled. The resulting logs are
 | 
			
		||||
    valid (but possibly incomplete) C code and can be compiled and 
 | 
			
		||||
    linked for standalone test programs. The set of calls and the 
 | 
			
		||||
    amount of static data that is logged can be controlled at runtime. 
 | 
			
		||||
    The application can add comments and enable or disable tracing of GL 
 | 
			
		||||
    operations at any time. The data flow from the application to GL
 | 
			
		||||
    and back is unaffected except for timing.
 | 
			
		||||
 | 
			
		||||
    Application-side implementation of these features raises namespace
 | 
			
		||||
    and linkage issues. In the driver dispatch table a simple
 | 
			
		||||
    "chain of responsibility" pattern (aka "composable piepline")
 | 
			
		||||
    can be added.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    The extension spec is in the public domain.  The current implementation
 | 
			
		||||
    in Mesa is covered by Mesa's XFree86-style copyright by the authors above.
 | 
			
		||||
    This extension is partially inspired by the Quake2 QGL wrapper.
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
    (1) Is this Extension obsolete because it can
 | 
			
		||||
    be implemented as a wrapper DLL?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. While certain operating systems (Win32) provide linkers 
 | 
			
		||||
      that facilitate this kind of solution, other operating systems
 | 
			
		||||
      (Linux) do not support hierarchical linking, so a wrapper solution
 | 
			
		||||
      would result in symbol collisions.
 | 
			
		||||
      Further, IHV's might have builtin support for tracing GL execution 
 | 
			
		||||
      that enjoys privileged access, or that they do not wish to separate
 | 
			
		||||
      the tracing code from their driver code base.
 | 
			
		||||
 | 
			
		||||
    (2) Should the Trace API explicitely support the notion of "frames? 
 | 
			
		||||
    This would require hooking into glXSwapBuffers calls as well.
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. The application can use NewTraceMESA/EndTraceMESA
 | 
			
		||||
      and TraceComment along with external parsing tools to split the 
 | 
			
		||||
      trace into frames, in whatever way considered adequate.
 | 
			
		||||
 | 
			
		||||
    (2a) Should GLX calls be traced?
 | 
			
		||||
 | 
			
		||||
      PBuffers and other render-to-texture solutions demonstrate that
 | 
			
		||||
      context level commands beyond SwapBuffers might have to be
 | 
			
		||||
      traced. The GL DLL exports the entry points, so this would not
 | 
			
		||||
      be out of the question. 
 | 
			
		||||
 | 
			
		||||
    (3) Should the specification mandate the actual output format?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. It is sufficient to guarantee that all data and commands 
 | 
			
		||||
      will be traced as requested by Enable/DisableTraceMESA, in the order
 | 
			
		||||
      encountered. Whether the resulting trace is available as a readable 
 | 
			
		||||
      text file, binary metafile, compilable source code, much less which 
 | 
			
		||||
      indentation and formatting has been used, is up to the implementation. 
 | 
			
		||||
      For the same reason this specification does not enforce or prohibit
 | 
			
		||||
      additional information added to the trace (statistics, profiling/timing, 
 | 
			
		||||
      warnings on possible error conditions).
 | 
			
		||||
 | 
			
		||||
    (4) Should the comment strings associated with names and pointer (ranges) 
 | 
			
		||||
    be considered persistent state?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: No. The implementation is not forced to use this information 
 | 
			
		||||
      on subsequent occurences of name/pointer, and is free to consider it 
 | 
			
		||||
      transient state.
 | 
			
		||||
 
 | 
			
		||||
    (5) Should comment commands be prohibited between Begin/End?
 | 
			
		||||
 | 
			
		||||
      RESOLVED: Yes, with the exception of TraceCommentMESA. TraceCommentMESA 
 | 
			
		||||
      is transient, the other commands might cause storage of persistent
 | 
			
		||||
      data in the context. There is no need to have the ability mark names 
 | 
			
		||||
      or pointers between Begin and End.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 
 | 
			
		||||
    void NewTraceMESA( bitfield mask, const ubyte * traceName )
 | 
			
		||||
 | 
			
		||||
    void EndTraceMESA( void )
 | 
			
		||||
 | 
			
		||||
    void EnableTraceMESA( bitfield mask )
 | 
			
		||||
 | 
			
		||||
    void DisableTraceMESA( bitfield mask )
 | 
			
		||||
 | 
			
		||||
    void TraceAssertAttribMESA( bitfield attribMask )
 | 
			
		||||
 | 
			
		||||
    void TraceCommentMESA( const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TraceTextureMESA( uint name, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TraceListMESA( uint name, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TracePointerMESA( void* pointer, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    void TracePointerRangeMESA( const void* first, 
 | 
			
		||||
                                const void* last, 
 | 
			
		||||
                                const ubyte* comment ) 
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 
 | 
			
		||||
    Accepted by the <mask> parameter of EnableTrace and DisableTrace:
 | 
			
		||||
 | 
			
		||||
       TRACE_ALL_BITS_MESA           0xFFFF
 | 
			
		||||
       TRACE_OPERATIONS_BIT_MESA     0x0001
 | 
			
		||||
       TRACE_PRIMITIVES_BIT_MESA     0x0002
 | 
			
		||||
       TRACE_ARRAYS_BIT_MESA         0x0004
 | 
			
		||||
       TRACE_TEXTURES_BIT_MESA       0x0008
 | 
			
		||||
       TRACE_PIXELS_BIT_MESA         0x0010
 | 
			
		||||
       TRACE_ERRORS_BIT_MESA         0x0020
 | 
			
		||||
 | 
			
		||||
    Accepted by the <pname> parameter of GetIntegerv, GetBooleanv,
 | 
			
		||||
    GetFloatv, and GetDoublev:
 | 
			
		||||
 | 
			
		||||
       TRACE_MASK_MESA               0x8755
 | 
			
		||||
 | 
			
		||||
    Accepted by the <pname> parameter to GetString:
 | 
			
		||||
 | 
			
		||||
       TRACE_NAME_MESA               0x8756
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the OpenGL 1.2.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the OpenGL 1.2.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the OpenGL 1.2.1 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the OpenGL 1.2.1 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    Add a new section:
 | 
			
		||||
 | 
			
		||||
    5.7 Tracing
 | 
			
		||||
 | 
			
		||||
    The tracing facility is used to record the execution of a GL program
 | 
			
		||||
    to a human-readable log.  The log appears as a sequence of GL commands
 | 
			
		||||
    using C syntax.  The primary intention of tracing is to aid in program
 | 
			
		||||
    debugging.
 | 
			
		||||
 | 
			
		||||
    A trace is started with the command
 | 
			
		||||
 | 
			
		||||
      void NewTraceMESA( bitfield mask, const GLubyte * traceName )
 | 
			
		||||
 | 
			
		||||
    <mask> may be any value accepted by PushAttrib and specifies a set of
 | 
			
		||||
    attribute groups.  The state values included in those attribute groups
 | 
			
		||||
    is written to the trace as a sequence of GL commands.
 | 
			
		||||
 | 
			
		||||
    <traceName> specifies a name or label for the trace.  It is expected
 | 
			
		||||
    that <traceName> will be interpreted as a filename in most implementations.
 | 
			
		||||
 | 
			
		||||
    A trace is ended by calling the command
 | 
			
		||||
 | 
			
		||||
      void EndTraceMESA( void )
 | 
			
		||||
 | 
			
		||||
    It is illegal to call NewTraceMESA or EndTraceMESA between Begin and End. 
 | 
			
		||||
 | 
			
		||||
    The commands
 | 
			
		||||
 | 
			
		||||
      void EnableTraceMESA( bitfield mask )
 | 
			
		||||
      void DisableTraceMESA( bitfield mask )
 | 
			
		||||
 | 
			
		||||
    enable or disable tracing of different classes of GL commands.
 | 
			
		||||
    <mask> may be the union of any of TRACE_OPERATIONS_BIT_MESA,
 | 
			
		||||
    TRACE_PRIMITIVES_BIT_MESA, TRACE_ARRAYS_BIT_MESA, TRACE_TEXTURES_BIT_MESA,
 | 
			
		||||
    and TRACE_PIXELS_BIT_MESA.  The special token TRACE_ALL_BITS_MESA
 | 
			
		||||
    indicates all classes of commands are to be logged.
 | 
			
		||||
 | 
			
		||||
    TRACE_OPERATIONS_BIT_MESA controls logging of all commands outside of
 | 
			
		||||
    Begin/End, including Begin/End.
 | 
			
		||||
  
 | 
			
		||||
    TRACE_PRIMITIVES_BIT_MESA controls logging of all commands inside of
 | 
			
		||||
    Begin/End, including Begin/End.
 | 
			
		||||
 
 | 
			
		||||
    TRACE_ARRAYS_BIT_MESA controls logging of VertexPointer, NormalPointer,
 | 
			
		||||
    ColorPointer, IndexPointer, TexCoordPointer and EdgeFlagPointer commands.
 | 
			
		||||
 | 
			
		||||
    TRACE_TEXTURES_BIT_MESA controls logging of texture data dereferenced by
 | 
			
		||||
    TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, and
 | 
			
		||||
    TexSubImage3D commands.
 | 
			
		||||
 | 
			
		||||
    TRACE_PIXELS_BIT_MESA controls logging of image data dereferenced by
 | 
			
		||||
    Bitmap and DrawPixels commands.
 | 
			
		||||
 | 
			
		||||
    TRACE_ERRORS_BIT_MESA controls logging of all errors. If this bit is 
 | 
			
		||||
    set, GetError will be executed whereever applicable, and the result will 
 | 
			
		||||
    be added to the trace as a comment. The error returns are cached and 
 | 
			
		||||
    returned to the application on its GetError calls. If the user does not 
 | 
			
		||||
    wish the additional GetError calls to be performed, this bit should not
 | 
			
		||||
    be set.
 | 
			
		||||
    
 | 
			
		||||
    The command
 | 
			
		||||
 | 
			
		||||
      void TraceCommentMESA( const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    immediately adds the <comment> string to the trace output, surrounded
 | 
			
		||||
    by C-style comment delimiters.
 | 
			
		||||
 | 
			
		||||
    The commands
 | 
			
		||||
 | 
			
		||||
      void TraceTextureMESA( uint name, const ubyte* comment )
 | 
			
		||||
      void TraceListMESA( uint name, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
    associates <comment> with the texture object or display list specified
 | 
			
		||||
    by <name>.  Logged commands which reference the named texture object or
 | 
			
		||||
    display list will be annotated with <comment>.  If IsTexture(name) or
 | 
			
		||||
    IsList(name) fail (respectively) the command is quietly ignored.
 | 
			
		||||
 | 
			
		||||
    The commands
 | 
			
		||||
 | 
			
		||||
      void TracePointerMESA( void* pointer, const ubyte* comment )
 | 
			
		||||
 | 
			
		||||
      void TracePointerRangeMESA( const void* first, 
 | 
			
		||||
                                  const void* last,
 | 
			
		||||
                                  const ubyte* comment ) 
 | 
			
		||||
 | 
			
		||||
    associate <comment> with the address specified by <pointer> or with
 | 
			
		||||
    a range of addresses specified by <first> through <last>.
 | 
			
		||||
    Any logged commands which reference <pointer> or an address between
 | 
			
		||||
    <first> and <last> will be annotated with <comment>.
 | 
			
		||||
 | 
			
		||||
    The command
 | 
			
		||||
 | 
			
		||||
      void TraceAssertAttribMESA( bitfield attribMask )
 | 
			
		||||
 | 
			
		||||
    will add GL state queries and assertion statements to the log to
 | 
			
		||||
    confirm that the current state at the time TraceAssertAttrib is
 | 
			
		||||
    executed matches the current state when the trace log is executed
 | 
			
		||||
    in the future.
 | 
			
		||||
 | 
			
		||||
    <attribMask> is any value accepted by PushAttrib and specifies
 | 
			
		||||
    the groups of state variables which are to be asserted.
 | 
			
		||||
 | 
			
		||||
    The commands NewTraceMESA, EndTraceMESA, EnableTraceMESA, DisableTraceMESA,
 | 
			
		||||
    TraceAssertAttribMESA, TraceCommentMESA, TraceTextureMESA, TraceListMESA, 
 | 
			
		||||
    TracePointerMESA and TracePointerRangeMESA are not compiled into display lists.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    Examples:
 | 
			
		||||
 | 
			
		||||
    The command NewTraceMESA(DEPTH_BUFFER_BIT, "log") will query the state
 | 
			
		||||
    variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
 | 
			
		||||
    to get the values <test>, <func>, <mask>, and <clear> respectively.
 | 
			
		||||
    Statements equivalent to the following will then be logged:
 | 
			
		||||
 | 
			
		||||
       glEnable(GL_DEPTH_TEST);   (if <test> is true)
 | 
			
		||||
       glDisable(GL_DEPTH_TEST);  (if <test> is false)
 | 
			
		||||
       glDepthFunc(<func>); 
 | 
			
		||||
       glDepthMask(<mask>);
 | 
			
		||||
       glClearDepth(<clear>);
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
    The command TraceAssertAttribMESA(DEPTH_BUFFER_BIT) will query the state
 | 
			
		||||
    variables DEPTH_TEST, DEPTH_FUNC, DEPTH_WRITEMASK, and DEPTH_CLEAR_VALUE
 | 
			
		||||
    to get the values <test>, <func>, <mask>, and <clear> respectively.
 | 
			
		||||
    The resulting trace might then look will like this:
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
      GLboolean b;
 | 
			
		||||
      GLint i;
 | 
			
		||||
      GLfloat f;
 | 
			
		||||
      b = glIsEnabled(GL_DEPTH_TEST);
 | 
			
		||||
      assert(b == <test>);
 | 
			
		||||
      glGetIntegerv(GL_DEPTH_FUNC, &i);
 | 
			
		||||
      assert(i == <func>);
 | 
			
		||||
      glGetIntegerv(GL_DEPTH_MASK, &i);
 | 
			
		||||
      assert(i == <mask>);
 | 
			
		||||
      glGetFloatv(GL_DEPTH_CLEAR_VALUE, &f);
 | 
			
		||||
      assert(f == <clear>);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the OpenGL 1.2.1 Specification 
 | 
			
		||||
    (State and State Requests)
 | 
			
		||||
 | 
			
		||||
    Querying TRACE_MASK_MESA with GetIntegerv, GetFloatv, GetBooleanv or
 | 
			
		||||
    GetDoublev returns the current command class trace mask.
 | 
			
		||||
 | 
			
		||||
    Querying TRACE_NAME_MESA with GetString returns the current trace name.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Appendix A of the OpenGL 1.2.1 Specification (Invariance)
 | 
			
		||||
 | 
			
		||||
    The MESA_trace extension can be used in a way that does not affect data 
 | 
			
		||||
    flow from application to OpenGL, as well as data flow from OpenGL to 
 | 
			
		||||
    application, except for timing, possible print I/O. TRACE_ERRORS_BIT_MESA
 | 
			
		||||
    will add additional GetError queries. Setting a trace mask with NewTraceMESA
 | 
			
		||||
    as well as use of TraceAssertAttribMESA might cause additional state queries.
 | 
			
		||||
    With the possible exception of performance, OpenGL rendering should not be
 | 
			
		||||
    affected at all by a properly chosen logging operation.
 | 
			
		||||
 | 
			
		||||
Additions to the AGL/GLX/WGL Specifications
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None. The logging operation is carried out client-side, by exporting
 | 
			
		||||
    entry points to the wrapper functions that execute the logging operation.
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    INVALID_OPERATION is generated if any trace command except TraceCommentMESA
 | 
			
		||||
    is called between Begin and End.
 | 
			
		||||
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    The current trace name and current command class mask are stored
 | 
			
		||||
    per-context.
 | 
			
		||||
 | 
			
		||||
New Implementation Dependent State
 | 
			
		||||
 | 
			
		||||
    None.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
  * Revision 0.1 - Initial draft from template (bk000415)
 | 
			
		||||
  * Revision 0.2 - Draft (bk000906)
 | 
			
		||||
  * Revision 0.3 - Draft (bk000913)
 | 
			
		||||
  * Revision 0.4 - Reworked text, fixed typos (bp000914)
 | 
			
		||||
  * Revision 0.5 - Assigned final GLenum values (bp001103)
 | 
			
		||||
  * Revision 0.6 - TRACE_ERRORS_BIT_MESA (bk000916)
 | 
			
		||||
  * Revision 0.7 - Added MESA postfix (bk010126)
 | 
			
		||||
 | 
			
		||||
@@ -1,197 +0,0 @@
 | 
			
		||||
Name
 | 
			
		||||
 | 
			
		||||
    MESA_ycbcr_texture
 | 
			
		||||
 | 
			
		||||
Name Strings
 | 
			
		||||
 | 
			
		||||
    GL_MESA_ycbcr_texture
 | 
			
		||||
 | 
			
		||||
Contact
 | 
			
		||||
 | 
			
		||||
    Brian Paul, Tungsten Graphics, Inc. (brian 'at' tungstengraphics.com)
 | 
			
		||||
    Keith Whitwell, Tungsten Graphics, Inc.  (keith 'at' tungstengraphics.com)
 | 
			
		||||
 | 
			
		||||
Status
 | 
			
		||||
 | 
			
		||||
    Shipping (Mesa 4.0.4 and later)
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    1.0
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    TBD
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
    OpenGL 1.0 or later is required
 | 
			
		||||
    This extensions is written against the OpenGL 1.4 Specification.
 | 
			
		||||
    NV_texture_rectangle effects the definition of this extension.
 | 
			
		||||
 | 
			
		||||
Overview
 | 
			
		||||
 | 
			
		||||
    This extension supports texture images in the YCbCr format.  There is
 | 
			
		||||
    no support for converting YCbCr images to RGB or vice versa.  The
 | 
			
		||||
    intention is for YCbCr image data to be directly sent to the renderer
 | 
			
		||||
    without any pixel transfer operations.  Only 2D texture images are
 | 
			
		||||
    supported (not glDrawPixels, glReadPixels, etc).
 | 
			
		||||
 | 
			
		||||
    A YCbCr pixel (texel) is a 16-bit unsigned short with two components.
 | 
			
		||||
    The first component is luminance (Y).  For pixels in even-numbered
 | 
			
		||||
    image columns, the second component is Cb.  For pixels in odd-numbered
 | 
			
		||||
    image columns, the second component is Cr.  If one were to convert the
 | 
			
		||||
    data to RGB one would need to examine two pixels from columns N and N+1
 | 
			
		||||
    (where N is even) to deduce the RGB color.
 | 
			
		||||
 | 
			
		||||
IP Status
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Issues
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Procedures and Functions
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
New Tokens
 | 
			
		||||
 | 
			
		||||
    Accepted by the <internalFormat> and <format> parameters of
 | 
			
		||||
    TexImage2D and TexSubImage2D:
 | 
			
		||||
 | 
			
		||||
        GL_YCBCR_MESA                   0x8757
 | 
			
		||||
 | 
			
		||||
    Accepted by the <type> parameter of TexImage2D and TexSubImage2D:
 | 
			
		||||
 | 
			
		||||
        GL_UNSIGNED_SHORT_8_8_MESA      0x85BA /* same as Apple's */
 | 
			
		||||
        GL_UNSIGNED_SHORT_8_8_REV_MESA  0x85BB /* same as Apple's */
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 2 of the OpenGL 1.4 Specification (OpenGL Operation)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 3 of the OpenGL 1.4 Specification (Rasterization)
 | 
			
		||||
 | 
			
		||||
    In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
 | 
			
		||||
    add the following to Table 3.8 (Packed pixel formats):
 | 
			
		||||
    
 | 
			
		||||
    type Parameter                GL Data   Number of        Matching
 | 
			
		||||
     Token Name                    Type     Components     Pixel Formats
 | 
			
		||||
    --------------                -------   ----------     -------------
 | 
			
		||||
    UNSIGNED_SHORT_8_8_MESA       ushort         3         YCBCR_422_MESA
 | 
			
		||||
    UNSIGNED_SHORT_8_8_REV_MESA   ushort         3         YCBCR_422_MESA
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
 | 
			
		||||
    add the following to Table 3.10 (UNSIGNED_SHORT formats):
 | 
			
		||||
 | 
			
		||||
    UNSIGNED_SHORT_8_8_MESA:
 | 
			
		||||
 | 
			
		||||
      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
    |              1st              |              2nd              |
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
                        
 | 
			
		||||
    UNSIGNED_SHORT_8_8_REV_MESA:
 | 
			
		||||
 | 
			
		||||
      15  14  13  12  11  10  9   8   7   6   5   4   3   2   1   0
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
    |              2nd              |              1st              |
 | 
			
		||||
    +-------------------------------+-------------------------------+
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.6.4, Rasterization of Pixel Rectangles, on page 102,
 | 
			
		||||
    add the following to Table 3.12 (Packed pixel fiedl assignments):
 | 
			
		||||
 | 
			
		||||
                       First       Second     Third      Fourth
 | 
			
		||||
    Format             Element     Element    Element    Element
 | 
			
		||||
    ------             -------     -------    -------    -------
 | 
			
		||||
    YCBCR_422_MESA     luminance   chroma
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.8.1, Texture Image Specification, on page 125, add
 | 
			
		||||
    another item to the list of TexImage2D and TexImage3D equivalence
 | 
			
		||||
    exceptions:
 | 
			
		||||
 | 
			
		||||
    * The value of internalformat and format may be YCBCR_MESA to
 | 
			
		||||
      indicate that the image data is in YCbCr format.  type must
 | 
			
		||||
      be either UNSIGNED_SHORT_8_8_MESA or UNSIGNED_SHORT_8_8_REV_MESA
 | 
			
		||||
      as seen in tables 3.8 and 3.10.  Table 3.12 describes the mapping
 | 
			
		||||
      between Y and Cb/Cr to the components.
 | 
			
		||||
      If NV_texture_rectangle is supported target may also be
 | 
			
		||||
      TEXTURE_RECTANGLE_NV or PROXY_TEXTURE_RECTANGLE_NV.
 | 
			
		||||
      All pixel transfer operations are bypassed.  The texture is stored as
 | 
			
		||||
      YCbCr, not RGB.  Queries of the texture's red, green and blue component
 | 
			
		||||
      sizes will return zero.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.8.1, Texture Image Specification, on page 126, add
 | 
			
		||||
    another item to the list of TexImage1D and TexImage2D equivalence
 | 
			
		||||
    exceptions:
 | 
			
		||||
 | 
			
		||||
    * The value of internalformat and format can not be YCBCR_MESA.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    In section 3.8.2, Alternate Texture Image Specification Commands, on
 | 
			
		||||
    page 129, insert this paragraph after the first full paragraph on the
 | 
			
		||||
    page:
 | 
			
		||||
 | 
			
		||||
         "If the internal storage format of the image being updated by
 | 
			
		||||
    TexSubImage2D is YCBCR_MESA then format must be YCBCR_MESA.
 | 
			
		||||
    The error INVALID_OPERATION will be generated otherwise."
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 4 of the OpenGL 1.4 Specification (Per-Fragment
 | 
			
		||||
Operations and the Frame Buffer)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 5 of the OpenGL 1.4 Specification (Special Functions)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Chapter 6 of the OpenGL 1.4 Specification (State and
 | 
			
		||||
State Requests)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to Appendix A of the OpenGL 1.4 Specification (Invariance)
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Additions to the AGL/GLX/WGL Specifications
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
GLX Protocol
 | 
			
		||||
 | 
			
		||||
    None
 | 
			
		||||
 | 
			
		||||
Errors
 | 
			
		||||
 | 
			
		||||
    INVALID_ENUM is generated by TexImage2D if <internalFormat> is
 | 
			
		||||
    MESA_YCBCR but <format> is not MESA_YCBCR.
 | 
			
		||||
 | 
			
		||||
    INVALID_ENUM is generated by TexImage2D if <format> is MESA_YCBCR but
 | 
			
		||||
    <internalFormat> is not MESA_YCBCR.
 | 
			
		||||
 | 
			
		||||
    INVALID_VALUE is generated by TexImage2D if <format> is MESA_YCBCR and
 | 
			
		||||
    <internalFormat> is MESA_YCBCR and <border> is not zero.
 | 
			
		||||
 | 
			
		||||
    INVALID_OPERATION is generated by TexSubImage2D if the internal image
 | 
			
		||||
    format is YCBCR_MESA and format is not YCBCR_MESA.
 | 
			
		||||
 | 
			
		||||
    INVALID_OPERATION is generated by CopyTexSubImage2D if the internal
 | 
			
		||||
    image is YCBCR_MESA.
 | 
			
		||||
    
 | 
			
		||||
New State
 | 
			
		||||
 | 
			
		||||
    Edit table 6.16 on page 231: change the type of TEXTURE_INTERNAL_FORMAT
 | 
			
		||||
    from n x Z42 to n x Z43 to indicate that internal format may also be
 | 
			
		||||
    YCBCR_MESA.
 | 
			
		||||
 | 
			
		||||
Revision History
 | 
			
		||||
 | 
			
		||||
    20 September 2002 - Initial draft
 | 
			
		||||
@@ -1,26 +1,10 @@
 | 
			
		||||
 | 
			
		||||
                            3Dfx Glide device driver
 | 
			
		||||
                     3Dfx Glide device driver for Mesa 3.4.2
 | 
			
		||||
				(see below for FAQ)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Info for Mesa 4.1
 | 
			
		||||
-----------------
 | 
			
		||||
 | 
			
		||||
The 3dfx Glide driver in Mesa is disabled by default.  Not too many people
 | 
			
		||||
use this driver anymore and at some point down the road it will be dropped.
 | 
			
		||||
 | 
			
		||||
To use/enable the Glide driver either do this:
 | 
			
		||||
 | 
			
		||||
'./configure --with-glide=DIR'    Where DIR is the location of Glide, like
 | 
			
		||||
                                  /usr/ or /usr/local
 | 
			
		||||
 | 
			
		||||
OR
 | 
			
		||||
 | 
			
		||||
'make linux-x86-glide'     If using the old-style Makefile system.
 | 
			
		||||
 | 
			
		||||
The rest of this file hasn't changed since Mesa 3.3.  Some of it's out of
 | 
			
		||||
date, but some is still valid.
 | 
			
		||||
 | 
			
		||||
NOTE: This information is probably somewhat out of date.  A rewrite is
 | 
			
		||||
overdue.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
What do you need ?
 | 
			
		||||
@@ -32,6 +16,8 @@ What do you need ?
 | 
			
		||||
	  under Linux (more information in the "Useful Glide Environment
 | 
			
		||||
	  Variables");
 | 
			
		||||
 | 
			
		||||
	- Mesa 3.4.2;
 | 
			
		||||
 | 
			
		||||
	- The 3Dfx Glide library 2.3 or later for your OS (the 2.4 works fine).
 | 
			
		||||
	  The Voodoo2 requires the Glide library 2.51. The Glide 3.1 is not
 | 
			
		||||
	  compatible with the Glide 2.x so it doesn't work with the current
 | 
			
		||||
@@ -92,31 +78,28 @@ Linux:
 | 
			
		||||
	  If your Glide libraries and headers are in a different directory
 | 
			
		||||
	  you'll have to modify the Mesa-config and mklib.glide files.
 | 
			
		||||
 | 
			
		||||
	- Unpack the MesaLib-3.1.tar.gz and MesaDemos-3.1.tar.gz archives;
 | 
			
		||||
	- Unpack the MesaLib-3.4.2.tar.gz and MesaDemos-3.4.2.tar.gz archives;
 | 
			
		||||
 | 
			
		||||
	- If you're going to use a newer Mesa/Glide driver than v0.27 then
 | 
			
		||||
          unpack the new driver archive over the Mesa directory.
 | 
			
		||||
 | 
			
		||||
	- In the Mesa-3.1 directory type "make linux-glide"
 | 
			
		||||
	- In the Mesa-3.4.2 directory type "make linux-glide"
 | 
			
		||||
 | 
			
		||||
	- Compilation _should_ finish without errors;
 | 
			
		||||
 | 
			
		||||
	- Set your LD_LIBRARY_PATH environment variable so that the
 | 
			
		||||
	  libglide2x.so and Mesa library files can be found.  For example:
 | 
			
		||||
	    setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.1/lib"
 | 
			
		||||
	    setenv LD_LIBRARY_PATH "/usr/local/glide/lib:/SOMEDIR/Mesa-3.4.2/lib"
 | 
			
		||||
 | 
			
		||||
	- You'll have to run Glide-based programs as root or set the suid
 | 
			
		||||
	  bit on executables;
 | 
			
		||||
 | 
			
		||||
	- Try a demo:
 | 
			
		||||
	    cd gdemos
 | 
			
		||||
	    cd demos
 | 
			
		||||
	    su
 | 
			
		||||
	    setenv MESA_GLX_FX f
 | 
			
		||||
	    ./gears     (hit ESC to exit)
 | 
			
		||||
 | 
			
		||||
	- You can find the demos especially designed for the Voodoo driver in
 | 
			
		||||
	  in the Mesa-3.1/3Dfx/demos directory (type "make" in order to compile
 | 
			
		||||
	  everything).
 | 
			
		||||
 | 
			
		||||
MacOS:
 | 
			
		||||
------
 | 
			
		||||
@@ -132,13 +115,10 @@ MS Windows:
 | 
			
		||||
 | 
			
		||||
	- You must have the vcvars32.bat script in your PATH;
 | 
			
		||||
 | 
			
		||||
	- Go to the directory Mesa-3.1 and run the mesafx.bat;
 | 
			
		||||
	- Go to the directory Mesa-3.4.2 and run the mesafx.bat;
 | 
			
		||||
 | 
			
		||||
	- The script will compile everything (Mesa-3.1/lib/OpenGL32.{lib,dll},
 | 
			
		||||
	  Mesa-3.1/lib/GLU32.{lib,dll}, Mesa-3.1/lib/GLUT32.{lib,dll} and
 | 
			
		||||
          Voodoo demos);
 | 
			
		||||
 | 
			
		||||
	- At the end, you will be in the Mesa-3.1/3Dfx/demos directory;
 | 
			
		||||
	- The script will compile everything (Mesa-3.4.2/lib/OpenGL32.{lib,dll},
 | 
			
		||||
	  Mesa-3.4.2/lib/GLU32.{lib,dll}, Mesa-3.4.2/lib/GLUT32.{lib,dll};
 | 
			
		||||
 | 
			
		||||
	- Try some demo (fire.exe, teapot.exe, etc.) in order to check if
 | 
			
		||||
	  everything is OK (you can use Alt-Tab or Ctrl-F9 to switch between
 | 
			
		||||
@@ -150,10 +130,6 @@ MS Windows:
 | 
			
		||||
	- I think that you can easy change the Makefile.fx files in order
 | 
			
		||||
	  to work with other kind of compilers;
 | 
			
		||||
 | 
			
		||||
	- To discover how open the 3Dfx screen, read the sources under
 | 
			
		||||
	  the Mesa-3.1/3Dfx/demos directory. You can use the GLUT library or
 | 
			
		||||
          the Diego Picciani's wgl emulator.
 | 
			
		||||
 | 
			
		||||
	NOTE: the MSVC++ 5.0 optimizer is really buggy. Also if you install the
 | 
			
		||||
	SP3, you could have some problem (you can disable optimization in order
 | 
			
		||||
	solve these kind of problems).
 | 
			
		||||
@@ -251,7 +227,7 @@ Doing more with Mesa & Linux Glide:
 | 
			
		||||
		#endif
 | 
			
		||||
		...
 | 
			
		||||
 | 
			
		||||
       	See the 3Dfx/demos/tunnel.c program
 | 
			
		||||
       	See the demos/tunnel.c program
 | 
			
		||||
       	for an example.  You have to set the -DXMESA flag in the Makefile's COPTS
 | 
			
		||||
       	to enable it.
 | 
			
		||||
 | 
			
		||||
@@ -410,7 +386,7 @@ Hints and Special Features:
 | 
			
		||||
        - The Voodoo driver support multiple Voodoo Graphics boards in the
 | 
			
		||||
          some PC. Using this feature, you can write applications that use
 | 
			
		||||
          multiple monitors, videoprojectors or HMDs for the output. See
 | 
			
		||||
	  Mesa-3.1/3Dfx/demos/tunnel2.c for an example of how setup one
 | 
			
		||||
	  Mesa-3.4.2/demos/tunnel2.c for an example of how setup one
 | 
			
		||||
          context for each board.
 | 
			
		||||
 | 
			
		||||
	- The v0.19 introduces a new powerful texture memory manager: the
 | 
			
		||||
@@ -428,13 +404,8 @@ Hints and Special Features:
 | 
			
		||||
	- The Voodoo driver supports the GL_EXT_paletted_texture. it works
 | 
			
		||||
	  only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
 | 
			
		||||
	  is ignored because this is a limitation of the the current Glide
 | 
			
		||||
	  version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
 | 
			
		||||
	  a demo of this extension.
 | 
			
		||||
 | 
			
		||||
	- The Voodoo driver directly supports 3Dfx Global Palette extension.
 | 
			
		||||
	  It was written for GLQuake and I think that it isn't a good idea
 | 
			
		||||
	  to use this extension for any other purpose (it is a trick). See
 | 
			
		||||
	  Mesa-3.1/3Dfx/demos/glbpaltex.c for a demo of this extension.
 | 
			
		||||
	  version and of the Voodoo hardware. See Mesa-3.4.2/demos/paltex.c
 | 
			
		||||
	  for a demo of this extension.
 | 
			
		||||
 | 
			
		||||
	- The Voodoo driver chooses the screen resolution according to the
 | 
			
		||||
	  requested window size. If you open a 640x480 window, you will get
 | 
			
		||||
@@ -505,12 +476,12 @@ version of GLQuake with works with the Mesa/3Dfx/Glide combo.
 | 
			
		||||
Here's what you need to run GLQuake on Linux:
 | 
			
		||||
   PC with 100MHz Pentium or better
 | 
			
		||||
   a 3Dfx-based card
 | 
			
		||||
   Mesa 3.1 libraries:  libMesaGL.so  libMesaGLU.so
 | 
			
		||||
   Mesa 3.4.2 libraries:  libGL.so  libGLU.so
 | 
			
		||||
   Glide 2.4 libraries:  libglide2x.so  libtexus.so
 | 
			
		||||
   GLQuake for Linux.
 | 
			
		||||
 | 
			
		||||
Also, the windows version of GLQuake works fine with the Mesa OpenGL32.dll,
 | 
			
		||||
you have only to copy the Mesa-3.1/lib/OpenGL32.dll in the GLQuake directory
 | 
			
		||||
you have only to copy the Mesa-3.4.2/lib/OpenGL32.dll in the GLQuake directory
 | 
			
		||||
in order to test 'MesaQuake'.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,71 +3,61 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Introduction
 | 
			
		||||
Introduction
 | 
			
		||||
 | 
			
		||||
Mesa 4.1 features a driver for the BeOS.  The driver implements
 | 
			
		||||
Mesa 3.1 features a new driver for the BeOS.  The new driver implements
 | 
			
		||||
a clone of the BGLView class.  This class, derived from BView, allows
 | 
			
		||||
OpenGL rendering into a BeOS window.
 | 
			
		||||
The 4.1 BeOS driver is an update of Brian Paul's BeOS driver released in Mesa 3.1.
 | 
			
		||||
 | 
			
		||||
Any application which uses the BGLView should be able to use Mesa
 | 
			
		||||
instead of Be's OpenGL without changing any code.
 | 
			
		||||
 | 
			
		||||
Since Be's OpenGL implementation (as of R5) is basically just the
 | 
			
		||||
Since Be's OpenGL implementation (as of R4) is basically just the
 | 
			
		||||
SGI sample implementation, it's pretty slow.  You'll see that Mesa
 | 
			
		||||
is considerably faster.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Source Code
 | 
			
		||||
Source Code
 | 
			
		||||
 | 
			
		||||
The source code for the driver is in Mesa-4.1/src/BeOS/ directory.
 | 
			
		||||
The source code for the driver is in Mesa-3.1/src/BeOS/GLView.cpp
 | 
			
		||||
It's not 100% finished at this time but many GLUT-based demos are
 | 
			
		||||
working.  No optimizations have been made at this time.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Compiling
 | 
			
		||||
Compiling
 | 
			
		||||
 | 
			
		||||
Requirements:
 | 
			
		||||
  - gcc version 2.95.3 for BeOS 
 | 
			
		||||
  You can find it here: http://www.bebits.com/app/2157
 | 
			
		||||
 | 
			
		||||
Move to the Mesa-4.x src sub-directory and then type "make -f Makefile.BeOS-R5".
 | 
			
		||||
When it finishes the Mesa based libGL.so library for
 | 
			
		||||
BeOS will be in the Mesa-4.x/src/obj.{x86|ppc}/ directory.
 | 
			
		||||
 | 
			
		||||
To install it as Be's default libGL.so replacement, put it in your 
 | 
			
		||||
/boot/home/config/lib/ directory. All your GL/GLUTapps will use 
 | 
			
		||||
the Mesa based then. 
 | 
			
		||||
 | 
			
		||||
By default, it build a non-debug version library.
 | 
			
		||||
The x86 (MMX, SSE and 3DNOW) optimizations are also supported for x86 target.
 | 
			
		||||
Sorry, Mesa don't have ppc (Altivec) optimizations yet.
 | 
			
		||||
In the Mesa-3.x directory type "make -f Makefile.X11 beos-r4".
 | 
			
		||||
When it finishes the libMesaGL.so and libMesaGLU.so libraries for
 | 
			
		||||
BeOS will be in the Mesa-3.x/lib/ directory.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Example Programs
 | 
			
		||||
 | 
			
		||||
Look in the Mesa-4.x/BeOS/ directory for one or two BGLView demo
 | 
			
		||||
Example Programs
 | 
			
		||||
 | 
			
		||||
Look in the Mesa-3.x/BeOS/ directory for one or two BGLView demo
 | 
			
		||||
programs.  They should have been compiled along with the Mesa
 | 
			
		||||
library.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* GLUT
 | 
			
		||||
 | 
			
		||||
A beta version of GLUT 3.7 port for BeOS can be found at 
 | 
			
		||||
http://anobject.com/jehamby/Code/Glut-3.7-x86.zip.
 | 
			
		||||
 
 | 
			
		||||
There's is a 2.5 version in src-glut.beos/, too.
 | 
			
		||||
GLUT
 | 
			
		||||
 | 
			
		||||
A version of GLUT 2.5 for BeOS can be found in src-glut.beos/.
 | 
			
		||||
The original distribution can be obtained from
 | 
			
		||||
http://home.beoscentral.com/jehamby/Glut-3.5-x86.zip
 | 
			
		||||
 | 
			
		||||
They are special version of GLUT adapted for the BeOS.  I don't
 | 
			
		||||
This is a special version of GLUT adapted for the BeOS.  I don't
 | 
			
		||||
believe Mark Kilgard's normal GLUT distribution includes BeOS
 | 
			
		||||
support.
 | 
			
		||||
 | 
			
		||||
It seems that you have to recompile GLUT with libMesaGL.so instead
 | 
			
		||||
of libGL.so in order for everything to work.  I'm not sure why.
 | 
			
		||||
 | 
			
		||||
* Special Features
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Special Features
 | 
			
		||||
 | 
			
		||||
Mesa's implementation of the BGLView class has an extra member
 | 
			
		||||
function:  CopySubBufferMESA().  It basically works like SwapBuffers()
 | 
			
		||||
@@ -79,9 +69,7 @@ cause a fatal error when running with Be's OpenGL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Work Left To Do
 | 
			
		||||
 | 
			
		||||
BDirectWindow single buffering support is not implemented yet.
 | 
			
		||||
Work Left To Do
 | 
			
		||||
 | 
			
		||||
Color index mode is not implemented yet.
 | 
			
		||||
 | 
			
		||||
@@ -92,7 +80,7 @@ rendering.  This should also be implemented for Mesa.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* Old BeOS Driver
 | 
			
		||||
Old BeOS Driver
 | 
			
		||||
 | 
			
		||||
Mesa 2.6 had an earlier BeOS driver.  It was based on Mesa's Off-screen
 | 
			
		||||
rendering interface, not BGLView.  If you're interested in the older
 | 
			
		||||
@@ -100,7 +88,7 @@ driver you should get Mesa 2.6.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
* BeOS and Glide
 | 
			
		||||
BeOS and Glide
 | 
			
		||||
 | 
			
		||||
Mesa 3.0 supported the 3Dfx/Glide library on Beos.  Download Mesa 3.0
 | 
			
		||||
if interested.  Ideally, the 3Dfx/Glide support should be updated to
 | 
			
		||||
@@ -111,4 +99,4 @@ of February, 1999.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: README.BEOS,v 1.7 2002/09/19 16:19:44 brianp Exp $
 | 
			
		||||
$Id: README.BEOS,v 1.6 1999/11/27 01:40:40 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										209
									
								
								docs/README.DJ
									
									
									
									
									
								
							
							
						
						
									
										209
									
								
								docs/README.DJ
									
									
									
									
									
								
							@@ -1,209 +0,0 @@
 | 
			
		||||
			Mesa 4.1 DOS/DJGPP Port v1.2
 | 
			
		||||
			~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Description:
 | 
			
		||||
~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Well, guess what... this is the DOS port of Mesa 4.1, for DJGPP fans... Whoa!
 | 
			
		||||
The driver has its origins in ddsample.c, written by Brian Paul and found by me
 | 
			
		||||
in Mesa 3.4.2.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Legal:
 | 
			
		||||
~~~~~~
 | 
			
		||||
 | 
			
		||||
Mesa copyright applies, provided this package is used within Mesa. For anything
 | 
			
		||||
else, see GPL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Installation:
 | 
			
		||||
~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Unzip and type:
 | 
			
		||||
 | 
			
		||||
	make -f Makefile.DJ [OPTIONS...]
 | 
			
		||||
 | 
			
		||||
Available options:
 | 
			
		||||
 | 
			
		||||
     Environment variables:
 | 
			
		||||
	CPU		optimize for the given processor.
 | 
			
		||||
			default = k6
 | 
			
		||||
	BIG_OPT=1	crazy optimizations; not very useful, though...
 | 
			
		||||
			default = no
 | 
			
		||||
	GLIDE		absolute path to Glide library; used with FX.
 | 
			
		||||
			default = $(TOP)/include/glide3
 | 
			
		||||
	FX=1		build for 3dfx Glide3; use it if you have the Glide
 | 
			
		||||
			SDK (designed for your platform), and, of course, a
 | 
			
		||||
			3dfx card... Note that this disables compilation of
 | 
			
		||||
			actual DMesa code, as Glide does all the stuff!
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_X86=1	optimize for i386.
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_MMX=1	MMX instructions; use only if you assembler/compiler
 | 
			
		||||
			supports MMX instruction set; backwards compatibility
 | 
			
		||||
			with older processors is still preserved.
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_SSE=1	(see HAVE_MMX)
 | 
			
		||||
			default = no
 | 
			
		||||
	HAVE_3DNOW=1	(see HAVE_MMX)
 | 
			
		||||
			default = no
 | 
			
		||||
 | 
			
		||||
     Targets:
 | 
			
		||||
	all:		build everything
 | 
			
		||||
	libgl:		build GL
 | 
			
		||||
	libglu:		build GLU
 | 
			
		||||
	libglut:	build GLUT
 | 
			
		||||
	clean:		remove object files
 | 
			
		||||
	realclean:	remove all generated files
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Tested on:
 | 
			
		||||
	CPU:		K6-2 (CXT) @500(412.5) MHz
 | 
			
		||||
	Mainboard:	ViA Apollo VP2/97 w/ 128 MB SDRAM
 | 
			
		||||
	Video card:	PowerColor Evil King3 (Voodoo3 3000) w/ 16384 kB SDRAM
 | 
			
		||||
	DJGPP:		djdev 2.04 + gcc v3.2 + make v3.79.1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
FAQ:
 | 
			
		||||
~~~~
 | 
			
		||||
 | 
			
		||||
1. Compilation
 | 
			
		||||
 | 
			
		||||
   Q) I tried to run `make' and it exits because `gcc' complains it cannot find
 | 
			
		||||
      some stupid file.
 | 
			
		||||
   A) You need LFN support.
 | 
			
		||||
   A) When compiling for Glide (FX=1), pay attention to Glide path.
 | 
			
		||||
 | 
			
		||||
2. Dynamic modules
 | 
			
		||||
 | 
			
		||||
   Q) What are you mumbling about dynamic modules?
 | 
			
		||||
   A) You must have the DXE2 package (available on SimTel.Net, courtesy of
 | 
			
		||||
      Andrew Zabolotny) installed in order to build the dynamic modules.
 | 
			
		||||
 | 
			
		||||
   Q) I have DXE2, but I couldn't build the `dxe2gen.exe'.
 | 
			
		||||
   Q) I built `dxe2gen.exe', but it doesn't do the job right.
 | 
			
		||||
   A) There is a patched version on my web page.
 | 
			
		||||
 | 
			
		||||
   Q) DXE2 modules give me headaches...
 | 
			
		||||
   A) The DXE2 modules are not compulsory. The static libraries are still built
 | 
			
		||||
      and you can use them in the old-fashioned, classic way... and learn to
 | 
			
		||||
      live with your ~2MB executable size. For example:
 | 
			
		||||
	gcc -o OUT.exe IN.c -lglut -lglu -lgl
 | 
			
		||||
 | 
			
		||||
   Q) Okay, DXE2 modules are built. How can I use them?
 | 
			
		||||
   A) Build your export object file; then link it with your application.
 | 
			
		||||
      For example:
 | 
			
		||||
	dxe2res -o dmesadxe.c gl.dxe glu.dxe glut.dxe
 | 
			
		||||
	gcc -o dmesadxe.o dmesadxe.c
 | 
			
		||||
	gcc -o OUT.exe dmesadxe.o IN.c -liglut -liglu -ligl -ldl
 | 
			
		||||
 | 
			
		||||
   Q) What is that `dxe2res.exe' thing?
 | 
			
		||||
   A) That is an utility that generates the export file for a given set of
 | 
			
		||||
      modules. If you can't find it in the DXE2 package, you must be looking at
 | 
			
		||||
      the wrong archive :)
 | 
			
		||||
 | 
			
		||||
3. Using Mesa for DJGPP
 | 
			
		||||
 | 
			
		||||
   Q) Does this build work in Win9x?
 | 
			
		||||
   A) Yes.
 | 
			
		||||
 | 
			
		||||
   Q) Does it work under NT (W2k, XP) core?
 | 
			
		||||
   A) Uh... probably not!
 | 
			
		||||
 | 
			
		||||
   Q) I made a simple application and it does nothing. It exits right away. Not
 | 
			
		||||
      even a blank screen.
 | 
			
		||||
   A) The current version supports only RGB[A] modes, for it made no sense to
 | 
			
		||||
      me to endorse color-index (aka palette) modes.
 | 
			
		||||
   A) Single-buffered is not allowed at all. Until I can find a way to use
 | 
			
		||||
      *REAL* hardware acceleration, it won't get implemented.
 | 
			
		||||
   A) Another weird "feature" is that buffer width must be multiple of 4 (I'm a
 | 
			
		||||
      lazy programmer and I found that the easiest way to keep buffer handling
 | 
			
		||||
      at peak performance ;-).
 | 
			
		||||
 | 
			
		||||
   Q) My demo doesn't display text. I know I used the glut font routines!
 | 
			
		||||
   A) Then you probably use GLUT as a DXE. Well, there is no direct access to
 | 
			
		||||
      variables due to the way DXE works. Read the documentation. The author of
 | 
			
		||||
      GLUT took this into account for _WIN32 DLL's only; I don't want to modify
 | 
			
		||||
      his headers. The only workaround is to link GLUT the old way :-(
 | 
			
		||||
 | 
			
		||||
   Q) DMesa is so SLOOOW! The Win32 OpenGL performs so much
 | 
			
		||||
      better...
 | 
			
		||||
   A) Is that a question? If you have a Voodoo3/Banshee card, you're lucky. The
 | 
			
		||||
      Glide port is on my web page. If you haven't, sorry; everything is done
 | 
			
		||||
      in software. Suggestions?
 | 
			
		||||
 | 
			
		||||
   Q) I have a super/mega/ultra monitor and all you can do is 60Hz? My eyes are
 | 
			
		||||
      leaking from the orbits...
 | 
			
		||||
   A) If you were compiling for Glide, see Glide info. If not, be aware that
 | 
			
		||||
      refresh rate control works only for VESA 3.0. The environment variable
 | 
			
		||||
      DMESA_REFRESH sets the default screen refresh. For example:
 | 
			
		||||
	set DMESA_REFRESH=75
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
libGLUT (the toolkit):
 | 
			
		||||
~~~~~~~~~~~~~~~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Well, this "skeletal" GLUT implementation is not mine. Thanks should go to
 | 
			
		||||
Bernhard Tschirren, Mark Kilgard, Brian Paul and probably others (or probably
 | 
			
		||||
not ;-). I only changed it to be self-standing (Allegro-free). The keyboard,
 | 
			
		||||
mouse and timer drivers were inspired from an old project of mine (D3Xl) and
 | 
			
		||||
fixed with many Allegro "infusions"; I deeply thank to Shawn Hargreaves et co.
 | 
			
		||||
 | 
			
		||||
My keyboard driver used only scancodes, but since GLUT requires ASCII values
 | 
			
		||||
for keys, I borrowed the translation tables (and maybe more) from Allegro.
 | 
			
		||||
Ctrl-Alt-Del (plus Ctrl-Alt-End, for Windows users) will shut down the GLUT
 | 
			
		||||
engine unconditionally: it will raise SIGINT, which in turn will call the
 | 
			
		||||
destructors (let's hope), thus cleaning up your/my mess ;-) NB: since the
 | 
			
		||||
DJGPP guys ensured signal handlers won't go beyond program's space (and since
 | 
			
		||||
dynamic modules shall) the SIGINT can't be hooked (well, it can, but it is
 | 
			
		||||
useless), therefore you must live with the 'Exiting due to signal SIGINT'
 | 
			
		||||
message...
 | 
			
		||||
 | 
			
		||||
The mouse driver is far from complete (lack of positioning, drawing, etc),
 | 
			
		||||
but is enough to make almost all the demos work.
 | 
			
		||||
 | 
			
		||||
The timer is pretty versatile for it supports multiple timers with different
 | 
			
		||||
frequencies. It may not be the most accurate timer in the known universe, but
 | 
			
		||||
I think it's OK. Take this example: you have timer A with a very high rate,
 | 
			
		||||
and then you have timer B with very low rate compared to A; now, A ticks OK,
 | 
			
		||||
but timer B will probably loose precision!
 | 
			
		||||
 | 
			
		||||
As an addition, stdout and stderr are redirected and dumped upon exit. This
 | 
			
		||||
means that printf can be safely called during graphics, but all messages come
 | 
			
		||||
in bulk! A bit of a hack, I know, but I think it's better than to miss them
 | 
			
		||||
at all. "Borrowed" from RHIDE (Robert Hoehne) or SETEDIT (Salvador Eduardo
 | 
			
		||||
Tropea)... I'm not sure.
 | 
			
		||||
 | 
			
		||||
Window creating defaults: 640x480x16 at (0,0), 8-bit stencil, 16-bit accum.
 | 
			
		||||
However, the video mode is chosen in such a way that first window will fit.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
History:
 | 
			
		||||
~~~~~~~~
 | 
			
		||||
 | 
			
		||||
v1.0	mar-2002	initial release
 | 
			
		||||
 | 
			
		||||
v1.1	sep-2002	+ added 3dfx Glide3 support
 | 
			
		||||
			+ added refresh rate control
 | 
			
		||||
			+ added fonts in glut
 | 
			
		||||
			* lots of minor changes
 | 
			
		||||
 | 
			
		||||
v1.2	nov-2002	* synced w/ Mesa-4.1
 | 
			
		||||
			- removed dmesadxe.h
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Contact:
 | 
			
		||||
~~~~~~~~
 | 
			
		||||
 | 
			
		||||
Name:   Borca Daniel
 | 
			
		||||
E-mail: dborca@yahoo.com
 | 
			
		||||
WWW:    http://www.geocities.com/dborca/
 | 
			
		||||
@@ -1,98 +1,623 @@
 | 
			
		||||
File: docs/README.WIN32
 | 
			
		||||
 | 
			
		||||
Last updated: Nov 08, 2002 - Karl Schultz - kschultz@users.sourceforge.net
 | 
			
		||||
 | 
			
		||||
Quick Start
 | 
			
		||||
 | 
			
		||||
Unzip both ZIP files (MesaLib and MesaDemos) into the same directory.
 | 
			
		||||
This is important because the current makefiles in MesaLib assume that
 | 
			
		||||
the directories in MesaDemos are present.
 | 
			
		||||
 | 
			
		||||
If you have Microsoft Visual C++ 6.0 installed, simply go to the top directory
 | 
			
		||||
of the Mesa distribution and type 'nmake -f Makefile.win NODEBUG=1' for
 | 
			
		||||
an optimized build.  Note that you may have to run ...VC98/BIN/VCVARS32.BAT
 | 
			
		||||
to set up the appropriate compiler environment variables.
 | 
			
		||||
 | 
			
		||||
Details and Notes
 | 
			
		||||
 | 
			
		||||
- Building Mesa as noted above should visit and build the following:
 | 
			
		||||
  src        MesaGL.dll, MesaGL.lib, osmesa.dll, osmesa.lib
 | 
			
		||||
  si-glu     MesaGLU.dll, MesaGLU.lib
 | 
			
		||||
  src-glut   glut32.dll, glut32.lib
 | 
			
		||||
  demos      a handful of demo executables.
 | 
			
		||||
  book       more examples
 | 
			
		||||
  samples    more examples
 | 
			
		||||
 | 
			
		||||
- After building, you can copy the above DLL files to a place in your PATH
 | 
			
		||||
  such as $SystemRoot/SYSTEM32.  If you don't like putting things in a
 | 
			
		||||
  system directory, place them in the same directory as the executable(s).
 | 
			
		||||
  For example, you can copy the DLL files to the demos directory if you
 | 
			
		||||
  just want to run the demos. The build process places the DLL and LIB files
 | 
			
		||||
  in the ./lib directory.  The makefile creates this directory if it does 
 | 
			
		||||
  not already exist.
 | 
			
		||||
 | 
			
		||||
- The make targets 'clean' and 'clobber' will remove objects and libraries.
 | 
			
		||||
  But the files in ./lib are never cleaned.
 | 
			
		||||
 | 
			
		||||
- The make target 'install' will take its best shot at copying DLL files,
 | 
			
		||||
  LIB files, and headers to the right places.  I strongly suggest that
 | 
			
		||||
  you examine the makefiles to make sure that 'install' doesn't do anything
 | 
			
		||||
  that you can't live with.
 | 
			
		||||
 | 
			
		||||
- The makefiles are designed to work with Microsoft's NMAKE, and do,
 | 
			
		||||
  unfortunately, have some Microsoft-specific things in them.  If you
 | 
			
		||||
  would like to use gcc or some other build tools like the Cygnus tools,
 | 
			
		||||
  then you will have to hack the makefiles to make them work with your
 | 
			
		||||
  tools.  I'm sorry about this; I wasn't motivated to make this any
 | 
			
		||||
  different, but if you end up modifying the makefiles for your tools,
 | 
			
		||||
  you can send me the changes and I can apply the changes to the 
 | 
			
		||||
  source tree.
 | 
			
		||||
 | 
			
		||||
- There are no Microsoft Visual Studio project files.  However, these
 | 
			
		||||
  should be very easy to create.  One can use the compiler and linker
 | 
			
		||||
  options found in the makefiles to make quick progress in creating
 | 
			
		||||
  projects.
 | 
			
		||||
 | 
			
		||||
- The DLL files are built so that the external entry points use the
 | 
			
		||||
  stdcall calling convention.
 | 
			
		||||
 | 
			
		||||
- Static LIB files are not built.  The LIB files that are built with
 | 
			
		||||
  the current makefiles are the linker import files associated with
 | 
			
		||||
  the DLL files.  If static LIB's are desired, it should not be too
 | 
			
		||||
  difficult to modify the makefiles to generate them.
 | 
			
		||||
 | 
			
		||||
- The si-glu sources are used to build the GLU libs.  This was done
 | 
			
		||||
  mainly to get the better tessellator code.
 | 
			
		||||
 | 
			
		||||
- The osmesa driver builds and should work on Windows as well as
 | 
			
		||||
  any other platform.
 | 
			
		||||
 | 
			
		||||
- The Windows driver (in src/Windows) builds and runs at least at
 | 
			
		||||
  a minimal level.  I modified this driver to work with the new
 | 
			
		||||
  Mesa 4.0 code and driver architecture, but I did not do a great
 | 
			
		||||
  deal of optimization and testing.  There are many opportunities
 | 
			
		||||
  for optimization, many of which can be done by coding more specific
 | 
			
		||||
  paths for the rasterizers.  See src/osmesa/osmesa.c for some good
 | 
			
		||||
  examples.
 | 
			
		||||
 | 
			
		||||
- There is DirectDraw support in the Windows driver, updated by
 | 
			
		||||
  Daniel Slater.  You'll need to uncomment the #define DDRAW line
 | 
			
		||||
  in src/Windows/wmesadef.h and add ddraw.lib to the list of libraries
 | 
			
		||||
  in src/Makefile.win.  On some systems, you will acheive significantly
 | 
			
		||||
  higher framerates with DirectDraw.
 | 
			
		||||
 | 
			
		||||
- Some of the more specialized code like FX drivers, stereo, and
 | 
			
		||||
  parallel support isn't compiled or tested.  I left much of this
 | 
			
		||||
  code alone, but it may need some work to get it 'turned on' again.
 | 
			
		||||
 | 
			
		||||
- No assembly code is compiled or assembled.  Again, this may need
 | 
			
		||||
  some work to turn it back on or use it again.
 | 
			
		||||
 | 
			
		||||
If you have a Windows-related build problem or question, it is
 | 
			
		||||
probably better to direct it to me (kschultz@users.sourceforge.net),
 | 
			
		||||
rather than directly to the other Mesa developers.  I will help you
 | 
			
		||||
as much as I can.  I also monitor the Mesa mailing lists and will
 | 
			
		||||
answer questions in this area there as well.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Karl Schultz
 | 
			
		||||
 | 
			
		||||
    Mesa/Readme.win32
 | 
			
		||||
 | 
			
		||||
    Last Updated: Sunday, September 19th, 1999 - tjump@tertius.com
 | 
			
		||||
 | 
			
		||||
*** What's New
 | 
			
		||||
 | 
			
		||||
- Updated for Mesa 3.1beta3/CVS. Debug and Release command-line builds of
 | 
			
		||||
  Mesa, fxMesa, GLU, GLUT and all sample programs DLL-based. Manual
 | 
			
		||||
  executions tests with minimum requisite results (aka: things looked like
 | 
			
		||||
  I expected them to).
 | 
			
		||||
 | 
			
		||||
  What did you expect, complete regression testing maybe?
 | 
			
		||||
 | 
			
		||||
- NASM build support. Any file in the project coded as a .S file will
 | 
			
		||||
  automatically be recognized and built as a NASM-source assember file.
 | 
			
		||||
 | 
			
		||||
  To enable building using NASM, set the environment variable NASM to
 | 
			
		||||
  indicate that command to execute to run nasm on a file. If NASM is in
 | 
			
		||||
  your command search path then all this needs be set to is 'nasmw' -
 | 
			
		||||
  otherwise you will need to include the complete drive and directory path.
 | 
			
		||||
 | 
			
		||||
  NASM may be retrieved here: http://www.web-sites.co.uk/nasm/
 | 
			
		||||
 | 
			
		||||
- DevStudio projects suspended for compatability reasons: projects modified
 | 
			
		||||
  by DevStudio 6 are not compatible with DevStudio 5.
 | 
			
		||||
 | 
			
		||||
  These will slowly be rebuilt and put into CVS as I can.
 | 
			
		||||
 | 
			
		||||
- Build environment change: The Glide SDK is no longer assumed to be in
 | 
			
		||||
  the global INCLUDE/LIB environment vars, it is required that you set the
 | 
			
		||||
  value 'GLIDE2X' as either an environment variable pointing to your Glide
 | 
			
		||||
  SDK install directory or that you configure that as a build option to
 | 
			
		||||
  nmake.exe when building fxmesagl32.  Examples:
 | 
			
		||||
 | 
			
		||||
    nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x fxmesagl32
 | 
			
		||||
 | 
			
		||||
          <or>
 | 
			
		||||
 | 
			
		||||
    nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x allfx
 | 
			
		||||
 | 
			
		||||
          <or>
 | 
			
		||||
 | 
			
		||||
    nmake /f nmake.mak GLIDE2X=g:\sdk\glide2x progs.3dfx.demos
 | 
			
		||||
 | 
			
		||||
  The DevStudio workspace files for 3Dfx OpenGL require the definition of
 | 
			
		||||
  GLIDE2SDK as an environment variable pointing to where your copy of the
 | 
			
		||||
  Glide SDK has been installed. Adding this to your AUTOEXEC.BAT would do
 | 
			
		||||
  so (change the directories to match):
 | 
			
		||||
 | 
			
		||||
       SET GLIDE2SDK=G:\SDK\GLIDE2X
 | 
			
		||||
 | 
			
		||||
*** Legalese
 | 
			
		||||
 | 
			
		||||
These build files are provided as-is and are submitted to be included with
 | 
			
		||||
the "Mesa 3-D Graphics Library" package as (currently) maintained by Brian
 | 
			
		||||
Paul. These project build files are free software; you can redistribute it
 | 
			
		||||
and/or modify it under the terms of the GNU Library General Public License
 | 
			
		||||
as published by the Free Software Foundation; either version 2 of the
 | 
			
		||||
License, or (at your option) any later version.
 | 
			
		||||
 | 
			
		||||
These project files are distributed in the hope that they will be useful,
 | 
			
		||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library
 | 
			
		||||
General Public License for more details.
 | 
			
		||||
 | 
			
		||||
You should have received a copy of the GNU Library General Public License
 | 
			
		||||
along with this library; if not, write to the Free Software Foundation,
 | 
			
		||||
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
			
		||||
 | 
			
		||||
*** Maintenance Responsiblity and Technical Support
 | 
			
		||||
 | 
			
		||||
While these files are now part of the Mesa core distribution please do NOT
 | 
			
		||||
contact Mr. Paul for help with them if you encounter problems as he can't
 | 
			
		||||
help you (currently).  I will, however, attempt my straightforward best in
 | 
			
		||||
assisting anyone with using these files on their system.  I can NOT
 | 
			
		||||
guarantee instant responses owing to other responsiblities, but I do try
 | 
			
		||||
dang hard to answer any mail w/in 24 hours.  I may be contacted at the
 | 
			
		||||
above email address for the forseeable future.
 | 
			
		||||
 | 
			
		||||
-Ted
 | 
			
		||||
mailto://tjump@tertius.com
 | 
			
		||||
http://www.tertius.com/tjump
 | 
			
		||||
 | 
			
		||||
*** General Information
 | 
			
		||||
 | 
			
		||||
These build files facilitate convenient building of many variants of Mesa,
 | 
			
		||||
both as static link libraries (including mesaglu) and as dynamic link
 | 
			
		||||
libraries that in some cases may be used as "drop-in" replacements for
 | 
			
		||||
OpenGL32.DLL on both Windows95 and Windows NT.
 | 
			
		||||
 | 
			
		||||
The construction of the Win32 command-line build files and projects has
 | 
			
		||||
been something of a pet project of mine, and is based upon my own
 | 
			
		||||
"standard" Win32 build environment as supplied by the "nmake.mif" file.
 | 
			
		||||
They have been tested under Windows95 OSR2, Windows NT 4.0SP3, and Windows
 | 
			
		||||
NT 5.0 beta 1.  The libraries that they generated have been tested (via the
 | 
			
		||||
demo programs) in a *limited* fashion on the above three systems, including
 | 
			
		||||
the 3Dfx versions.
 | 
			
		||||
 | 
			
		||||
The reason I went with command-line build environment instead of the more
 | 
			
		||||
convenient IDE-based project files is for two reasons: 1. These appear to
 | 
			
		||||
have some amount of portability between versions (the nmake syntax hasn't
 | 
			
		||||
changed much since Microsoft C 7.0) while the IDE project files seem to
 | 
			
		||||
change drastically each version. and 2. These are readable with any ascii
 | 
			
		||||
editor and such are better self-documentation of the file relationships for
 | 
			
		||||
more people such that it will facilitate supporting other Win32 compilers.
 | 
			
		||||
 | 
			
		||||
While these files only deal with building for x86 targeted code it *should*
 | 
			
		||||
be possible to add the necessary logic to them to build for the other MSVC
 | 
			
		||||
supported CPU targets, I simply have no hardware to test them on nor the
 | 
			
		||||
alternative compilers to build with.
 | 
			
		||||
 | 
			
		||||
*** Prerequisites for use
 | 
			
		||||
 | 
			
		||||
1. You must have a 32-bit Microsoft compiler installed. I have tested
 | 
			
		||||
this with Visual C 5.0 (SP3) and Visual C 4.2, but with minor
 | 
			
		||||
(possibly no) modification to the nmake.mak and nmake.mif files this
 | 
			
		||||
sequence should work on Visual C 2.0 also. The workspace files
 | 
			
		||||
(mesalib.dsw and mesademos-*.dsw) and their included project files
 | 
			
		||||
(*.dsp) are specific to the DevStudio IDE - I have made no attempt at
 | 
			
		||||
building a VC4 IDE project set as I do not use that any more.  Note
 | 
			
		||||
that the VC workspace files NO LONGER use NORE are dependant upon the
 | 
			
		||||
nmake.mak and nmake.mif files for construction of definition (*.DEF)
 | 
			
		||||
and resource (*.RC) files.
 | 
			
		||||
 | 
			
		||||
*** Visual C 4.x Users Warning ****
 | 
			
		||||
 | 
			
		||||
Note that early editions of VC4 do NOT have header files current enough
 | 
			
		||||
for use building this code base. If you are using VC4 you will either need
 | 
			
		||||
to get an update to version 4.2 *or* you may download the Platform SDK
 | 
			
		||||
directly from Microsoft's web site (www.microsoft.com) and update your
 | 
			
		||||
build environment that way.
 | 
			
		||||
 | 
			
		||||
*** Visual C 4.x Users Warning ****
 | 
			
		||||
 | 
			
		||||
2. You must have the PATH, INCLUDE, and LIB environment variables set
 | 
			
		||||
properly. With VC5 you can easily get this by executing the VCVARS32.BAT
 | 
			
		||||
file that was created for you upon installation. It is found in the
 | 
			
		||||
DevStudio\VC\BIN directory, wherever you installed DevStudio. VC4 provides
 | 
			
		||||
a similar batch file in it's BIN directory also.
 | 
			
		||||
 | 
			
		||||
3. (optional) If you're going to build for 3Dfx/Voodoo you will need to
 | 
			
		||||
have previously installed the Glide SDK version 2.3 or later, if I
 | 
			
		||||
recall. This may be retrieved from www.3dfx.com for no money and some
 | 
			
		||||
download time. ;-) These build files assume that you have the Glide SDK
 | 
			
		||||
added to the respective environment variables (LIB and INCLUDE).
 | 
			
		||||
 | 
			
		||||
4. (optional) If you're going to build for S3/Virge you will need the S3
 | 
			
		||||
Developers Toolkit which may be downloaded from www.s3.com for the price of
 | 
			
		||||
registering on-line and some time. NOTE: I can build the s3mesa.dll file to
 | 
			
		||||
completion, however the compilation of s3mesa.c currently generates a large
 | 
			
		||||
amount of compiler warnings and between that and the fact that I can not at
 | 
			
		||||
all test it I can make no claims to it's ability to execute.  Again, like
 | 
			
		||||
the 3Dfx version before this, these build files assume you have the S3Dtk H
 | 
			
		||||
and LIB files in the path of their respective environment variables.
 | 
			
		||||
Note 2: As of Mesa3.0beta6 I have build files, both command-line and IDE,
 | 
			
		||||
which should be able to build the s3mesa code base if it weren't for updates
 | 
			
		||||
being required in the S3 DD code support (Mesa-3.0/src/s3 directory).
 | 
			
		||||
 | 
			
		||||
I advise putting any include and lib files for secondary toolkits (Glide,
 | 
			
		||||
S3Tk, whatever) in their respective environment variables *before* the
 | 
			
		||||
Microsoft-assigned default values.
 | 
			
		||||
 | 
			
		||||
*** FAQ: Frequenty Asked Questions and Other Important Information ***
 | 
			
		||||
 | 
			
		||||
- When running the 3Dfx demos under Windows NT, they crash on exit, what's
 | 
			
		||||
  up?
 | 
			
		||||
 | 
			
		||||
  This is apparently a problem in Glide itself. The workaround is to go to
 | 
			
		||||
  your C:\WINNT\SYSTEM32 directory and rename the file FXOEM2X.DLL to
 | 
			
		||||
  FXOEM2X.DL_ to prevent Glide from loading and initializing it upon
 | 
			
		||||
  startup.  This is known to be an issue with cards that do not have "TV
 | 
			
		||||
  out" and is known to cause crashes on Diamond Monster II 8M and 3Dfx
 | 
			
		||||
  Reference boards, all using 3Dfx Reference Drivers version 2.53. Other
 | 
			
		||||
  hardware/driver combinations will also likely exhibit this behavior.
 | 
			
		||||
 | 
			
		||||
- I'm having a problem building Mesa for static library linking.
 | 
			
		||||
 | 
			
		||||
  This was caused by some incomplete testing on my part, and a fix is now
 | 
			
		||||
  available in the form of an add-on to the base Mesa 3.0 release.  The
 | 
			
		||||
  file to get is:
 | 
			
		||||
 | 
			
		||||
       via FTP download from: iris.ssec.wisc.edu
 | 
			
		||||
         you want to go here: /pub/Mesa/patches_to_3.0/
 | 
			
		||||
        you want to get file: Mesa-3.0-w32-static-fixes.tar.gz
 | 
			
		||||
 | 
			
		||||
  This required a minor addition to INCLUDE/GL for a clean solution, the
 | 
			
		||||
  file "include/gl/mesa_wgl.h" is automatically included by
 | 
			
		||||
  "include/gl/gl.h" when a Win32 non-DLL build is in progress to provide
 | 
			
		||||
  prototypes for the various wgl functions.
 | 
			
		||||
 | 
			
		||||
  The only remaining hitch in this setup is that the 3Dfx build is not yet
 | 
			
		||||
  running as a static build, because of problems with conflicts in
 | 
			
		||||
  existance of the various GDI functions like ChoosePixelFormat,
 | 
			
		||||
  etc. *sigh*
 | 
			
		||||
 | 
			
		||||
  Anyway, the "allstatic" target now works as expected and builds all
 | 
			
		||||
  book/sample/demos programs to boot. ;^)
 | 
			
		||||
 | 
			
		||||
- How do I get fxMesa to render in a window on the desktop instead of only
 | 
			
		||||
  full-screen?
 | 
			
		||||
 | 
			
		||||
  Use the Microsoft Windows fxMesa-in-a-window hack!
 | 
			
		||||
 | 
			
		||||
  Seriously, if you want fxMesaGL to render using the 3Dfx Voodoo1 or
 | 
			
		||||
  Voodoo2 hardware into a window on the desktop then all you need to do is
 | 
			
		||||
  set the MESA_WGL_FX environment variable to anything other than
 | 
			
		||||
  "fullscreen" and it will render into a window.  If you wish to go
 | 
			
		||||
  fullscreen then you only need to NOT have the environment variable, or
 | 
			
		||||
  have it set to "fullscreen".  You may also switch at runtime between
 | 
			
		||||
  fullscreen-mode and windowed by pressing ALT-ENTER on the keyboard
 | 
			
		||||
  (unless the application using Mesa does something with those keystrokes,
 | 
			
		||||
  of course).
 | 
			
		||||
 | 
			
		||||
  As of 8/13/98 this should be running a LOT better for more people as a
 | 
			
		||||
  low-compatability item was cleaned up which prevented it from working on
 | 
			
		||||
  many (most?) display drivers under Windows 9x.
 | 
			
		||||
 | 
			
		||||
- I have my 3Dfx card hooked to it's own monitor and I want the output to
 | 
			
		||||
  stay on even if I switch to another program, is this possible?
 | 
			
		||||
 | 
			
		||||
  If the Glide environment variable SST_DUALHEAD is set to '1' then fxMesa
 | 
			
		||||
  will never disable the Voodoo output on a Voodoo1 or Voodoo2 display
 | 
			
		||||
  regardless of whether the fxMesa application is "current" or not. This
 | 
			
		||||
  works regardless of whether it's rendering using the window hack
 | 
			
		||||
  mentioned above or not.
 | 
			
		||||
 | 
			
		||||
- I want to run the Mesa demos on my Intel740 card using it's own OpenGL
 | 
			
		||||
  acceleration, how do I do this?
 | 
			
		||||
 | 
			
		||||
  Build GLUT standalone for use with system OpenGL and GLU drivers!
 | 
			
		||||
 | 
			
		||||
  The Command-line project supports building all test/demo programs against
 | 
			
		||||
  these drivers also! This allows you full use of GLUT on Windows using
 | 
			
		||||
  hardware accelerated OpenGL. Wheee! This includes the "3dfx/demos"
 | 
			
		||||
  directory of which only two programs will not run on "standard"
 | 
			
		||||
  opengl. Note that there are a few of the sample programs which will NOT
 | 
			
		||||
  work without Mesa as they directly call into Mesa instead of using the
 | 
			
		||||
  extension mechanism.
 | 
			
		||||
 | 
			
		||||
*** Included programs that exhibit unfortunate or bad behavior
 | 
			
		||||
 | 
			
		||||
- demos/bounce - doesn't run on high-colors screens?  It's requesting an
 | 
			
		||||
  INDEX display from GLUT and that fails on my true-color desktop. Changing
 | 
			
		||||
  this to _RGB let's the program work, but it doesn't display
 | 
			
		||||
  properly. This is probably just an idiosyncracy of my machine though, as
 | 
			
		||||
  if I test the program using GLUT for System OpenGL on my Intel740 OpenGL
 | 
			
		||||
  accelerated machine it's just hunky-dory.
 | 
			
		||||
 | 
			
		||||
- demos/glutfx - runs, but crashes on exit (but not on my Intel740 machine)
 | 
			
		||||
 | 
			
		||||
- demos/texobj - runs, but crashes on exit if ESC is pressed. Exits cleanly
 | 
			
		||||
  if the Close box on the window frame is pressed with the mouse. Go figure.
 | 
			
		||||
 | 
			
		||||
- book/aaindex - doesn't run, can't get pixel format, because it wants an
 | 
			
		||||
  INDEX display maybe (but is okay on my Intel740 machine)?
 | 
			
		||||
 | 
			
		||||
- most of the book/* demos don't respond to ESC being pressed.
 | 
			
		||||
 | 
			
		||||
- 3dfx/demos/* - all demos run, however they all crash on exit. I've traced
 | 
			
		||||
  this so far as to determine the call it's happening with. The crash comes
 | 
			
		||||
  from within Glide during the processing of the grGlideShutdown() call, as
 | 
			
		||||
  in invalid memory reference exception. I'm wondering if this is because
 | 
			
		||||
  of some state or processing not being completed before the call. Dunno,
 | 
			
		||||
  but putting grSstIdle() in just before grGlideShutdown() does NOT fix the
 | 
			
		||||
  problem.
 | 
			
		||||
 | 
			
		||||
- 3dfx/demos/tunnel2 - does not run on my system even with SLI mode
 | 
			
		||||
  disabled. Hmmmm, maybe I need to disconnect my Voodoo2 cards?
 | 
			
		||||
 | 
			
		||||
*** Important Notes and Changing Default values
 | 
			
		||||
 | 
			
		||||
- The optimizer settings have been manually reworked in both command line
 | 
			
		||||
  and DevStudio IDE files to hopefully prevent possible irrational code on
 | 
			
		||||
  the part of the code generator.  Formerly, it was configured for "/Ox",
 | 
			
		||||
  now it is configured for safer handling at a slight potential performance
 | 
			
		||||
  cost. This may not be required for Visual Studio 6 but I can't test that
 | 
			
		||||
  (yet).
 | 
			
		||||
 | 
			
		||||
- These files build with the code targeted for Pentium processors and
 | 
			
		||||
  8-byte structure padding.
 | 
			
		||||
 | 
			
		||||
- The IDE-built programs seem to be "happier" in that the command line
 | 
			
		||||
  build of the 3Dfx demo "fire" will grenade on exit (?). Otherwise pretty
 | 
			
		||||
  much everything may be built with either interface.
 | 
			
		||||
 | 
			
		||||
- The currently configured Mesa version is 3.1, and MesaDemos version is
 | 
			
		||||
  the same. To change this permanently you will need to edit NMAKE.MAK and
 | 
			
		||||
  change the lines that look like this (they start o/a line 116):
 | 
			
		||||
 | 
			
		||||
    # Currently, Mesa is at rev 3.1 ...
 | 
			
		||||
    #
 | 
			
		||||
    !IF "$(MESAVER)" == ""
 | 
			
		||||
    MESAVER=3.1
 | 
			
		||||
    !ENDIF
 | 
			
		||||
 | 
			
		||||
    # used in building all of the resource files for the Mesa DLLs
 | 
			
		||||
    #
 | 
			
		||||
    !IF "$(MESAFILEVER)" == ""
 | 
			
		||||
    MESAFILEVER=3,1,0,0
 | 
			
		||||
    !ENDIF
 | 
			
		||||
 | 
			
		||||
- Currently the build files are configured to be used from a Win32
 | 
			
		||||
  directory that is included inside the main Mesa-3.1 heirarchy.
 | 
			
		||||
 | 
			
		||||
- The build files are smart enough to find the files for the core lib, glu,
 | 
			
		||||
  glut, and the various demo programs if they are unpacked in the current
 | 
			
		||||
  Mesa-3.1 heirarchy, like this:
 | 
			
		||||
 | 
			
		||||
    \Mesa-3.1
 | 
			
		||||
    \Mesa-3.1\src
 | 
			
		||||
    \Mesa-3.1\src-glu
 | 
			
		||||
    \Mesa-3.1\src-glut
 | 
			
		||||
    \Mesa-3.1\Win32
 | 
			
		||||
    \Mesa-3.1\samples
 | 
			
		||||
    \Mesa-3.1\demos
 | 
			
		||||
    \Mesa-3.1\book
 | 
			
		||||
    \Mesa-3.1\3Dfx\demos
 | 
			
		||||
 | 
			
		||||
    ... should work.  This arose because my initial build tests for the
 | 
			
		||||
    demo files were done before MesaDemos 2.6 had been released.
 | 
			
		||||
 | 
			
		||||
- With the exception of the static link libraries generated by this file
 | 
			
		||||
  set (mesagl.lib, mesaglu.lib, mesaglut.lib) all DLLs and executables are
 | 
			
		||||
  built against the "Multithreaded DLL" runtime - this means that they
 | 
			
		||||
  require MSVCRT.DLL or MSVCRTD.DLL in the path to execute.
 | 
			
		||||
 | 
			
		||||
  ** CHANGED 8/11/98 ***
 | 
			
		||||
 | 
			
		||||
  Note also that the demos are all built aginst the "OpenGL32, GLU32, and
 | 
			
		||||
  GLUT32" and as such they are fairly agnostic wrt: building against Mesa
 | 
			
		||||
  for CPU-rendering, Mesa-for-3Dfx, Mesa-for-S3, or System OpenGL.
 | 
			
		||||
 | 
			
		||||
  If you want to build them for use on your system and your display card
 | 
			
		||||
  provides full OpenGL acceleration (Permedia, Intel740, Intergraph,
 | 
			
		||||
  whatever) then you only need to build GLUT prior to building any of the
 | 
			
		||||
  demo programs. For convenience, the GLUT project is included in each of
 | 
			
		||||
  the demo projects Workspace files for the DevStudio IDE builds BUT it is
 | 
			
		||||
  not automatically built - you still need to build it first manually.
 | 
			
		||||
 | 
			
		||||
  Note that if you have GLUT already installed on your system (gl/glut.h in
 | 
			
		||||
  yoru INCLUDE path, glut32.lib/glut32d.lib in your LIB path, and the DLL
 | 
			
		||||
  in your PATH) then you do NOT need to build GLUT prior to the test
 | 
			
		||||
  programs.
 | 
			
		||||
 | 
			
		||||
- The 3Dfx build of Mesa has primarily been tested with Quake 2 and it runs
 | 
			
		||||
  (mostly) fine on my PC (take that for what you want it)...
 | 
			
		||||
 | 
			
		||||
  ** CHANGED  8/11/98 ***
 | 
			
		||||
 | 
			
		||||
  There is still something going on that causes Glide to crash on shutdown,
 | 
			
		||||
  when I run fxMesa under Windows NT, however it does not appear to occur
 | 
			
		||||
  under Windows 9x on either Voodoo1 or Voodoo2 cards. *sigh*
 | 
			
		||||
 | 
			
		||||
- I can not test the S3 build as I have no machines available with Virge
 | 
			
		||||
  based display cards.
 | 
			
		||||
 | 
			
		||||
- The multithreaded test code is *not* built as it requires pthreads and I
 | 
			
		||||
  have as of yet spent not time trying to get that running. The latest word
 | 
			
		||||
  that I saw WRT threading support on win32 was that they are intending to
 | 
			
		||||
  support it natively within Win32 - so I'm waiting it out until they get
 | 
			
		||||
  it done.
 | 
			
		||||
 | 
			
		||||
- Similarly, the 'xdemos' are not currently built because I haven't gotten
 | 
			
		||||
  around to building the client libs for native win32 and getting it all
 | 
			
		||||
  setup for use.
 | 
			
		||||
 | 
			
		||||
*** Output Files
 | 
			
		||||
 | 
			
		||||
All final output files (DLL/LIB) are placed in the Mesa-3.1/lib directory,
 | 
			
		||||
with the exception of the fxMesaGL32 build which is placed in
 | 
			
		||||
Mesa-3./lib/FX and the executable images which are placed in their source
 | 
			
		||||
directories.
 | 
			
		||||
 | 
			
		||||
To be able to execute the various test programs, you will need to copy the
 | 
			
		||||
requisite DLL files into the same directory as the EXE files. Note that
 | 
			
		||||
most of the 3Dfx/demos/* programs WILL run with the non-FX build of Mesa -
 | 
			
		||||
just very slowly. The two programs which are hard-linked with the FX build
 | 
			
		||||
and will not run without it are "glbpaltx" which uses "gl3DfxSetPaletteEXT"
 | 
			
		||||
directly instead of via the extensions mechanism and "tunnel2" which uses
 | 
			
		||||
"fxMesaSelectCurrentBoard" API for selecting between multiple 3Dfx cards
 | 
			
		||||
installed in one system. Likewise, "paltex" directly uses the
 | 
			
		||||
"glColorTableEXT" extension and thus may not run on anything except
 | 
			
		||||
Mesa. If these applications used the proper extension mechanism they could
 | 
			
		||||
then be used on more than "just" fxMesa to good effect (for example, the
 | 
			
		||||
rest of the "3Dfx/demos" run just peachy on the Intel740 card in my test
 | 
			
		||||
machine) under WinNT.
 | 
			
		||||
 | 
			
		||||
Because I'm anal about my computer and it's organization, and I like to
 | 
			
		||||
prevent collision between builds, each of the subprojects has their own
 | 
			
		||||
intermediate file directory inside .\win32\release (for example, when
 | 
			
		||||
building mesagl.lib all of it's intermediate files will be found in
 | 
			
		||||
.\win32\release\lib.mesagl).  This makes it very easy to cleanup as you
 | 
			
		||||
only need to remove .\win32\release.
 | 
			
		||||
 | 
			
		||||
*** Okay, Enough, how do I build with this stuff already Ted!
 | 
			
		||||
 | 
			
		||||
Okay, no major calamity here. The basic way to use the project file is to
 | 
			
		||||
call it via NMAKE from the command line. The format is:
 | 
			
		||||
 | 
			
		||||
    nmake[.exe] /f nmake.mak [options] [target]
 | 
			
		||||
 | 
			
		||||
The most likely [options] values you will use may be any combination of the
 | 
			
		||||
following:
 | 
			
		||||
 | 
			
		||||
    DEBUG=1 or DEBUG=0
 | 
			
		||||
    USE_CRTDLL=1 or USE_CRTDLL=0
 | 
			
		||||
 | 
			
		||||
    Note that all three of these options are OFF by default.
 | 
			
		||||
 | 
			
		||||
The [target] includes but is not limited to the following (for full details
 | 
			
		||||
please peruse the NMAKE.MAK and NMAKE.MIF files - but be warned that
 | 
			
		||||
NMAKE.MIF is rather large and sometimes hard to follow):
 | 
			
		||||
 | 
			
		||||
    --- convenience targets ---
 | 
			
		||||
 | 
			
		||||
    all                 - builds everything
 | 
			
		||||
    libfiles            - builds all linking library files
 | 
			
		||||
    progs               - builds all executable images
 | 
			
		||||
 | 
			
		||||
    --- library files, static and dynamic ---
 | 
			
		||||
 | 
			
		||||
    mesagl              - static lib build of Mesa core.
 | 
			
		||||
    mesaglu             - static lib build of MesaGLU core.
 | 
			
		||||
    mesaglut            - static lib build of Mesa GLUT core.
 | 
			
		||||
 | 
			
		||||
    mesagl32            - dynamic lib build of Mesa core.
 | 
			
		||||
 | 
			
		||||
    mesaglu32           - dynamic lib build of GLU core, generates
 | 
			
		||||
                          GLU32.DLL and/or GLU32d.DLL.
 | 
			
		||||
 | 
			
		||||
    mesaglut32          - dynamic lib build of GLUT core, generates
 | 
			
		||||
                          GLUT32.DLL and/or GLUT32d.dll.
 | 
			
		||||
 | 
			
		||||
    --- hardware accelerated mesa builds ---
 | 
			
		||||
 | 
			
		||||
    fxmesagl32          - builds Mesa for use on top of the 3Dfx
 | 
			
		||||
                          Glide runtime libs
 | 
			
		||||
 | 
			
		||||
    s3mesagl32          - builds mesa for use on top of the S3
 | 
			
		||||
                          'S3Tk' runtime libs.
 | 
			
		||||
 | 
			
		||||
    --- executable images ---
 | 
			
		||||
 | 
			
		||||
    progs.book          - builds all programs in \book directory
 | 
			
		||||
    progs.demos         - builds all programs in \demos directory
 | 
			
		||||
    progs.samples       - builds all programs in \samples directory
 | 
			
		||||
 | 
			
		||||
        These targets generate all of the programs in their respective
 | 
			
		||||
        directories and link the executables against OpenGL32.DLL,
 | 
			
		||||
        GLU32.DLL, and GLUT32.DLL (or their debug equivalents).
 | 
			
		||||
 | 
			
		||||
    progs.3dfx.demos    - builds all programs in \3dfx\demos directory
 | 
			
		||||
 | 
			
		||||
        This target generates the 3Dfx/Demo executables, linking them
 | 
			
		||||
        against GLUT32.DLL, GLU32.DLL, OPENGL32.DLL and are thus NOT
 | 
			
		||||
        hard-bound to using Mesa per-se as you can simply NOT build the
 | 
			
		||||
        Mesa core and GLU libraries.
 | 
			
		||||
 | 
			
		||||
   --- Microsoft/SGI OpenGL-based GLUT and Demo program builds ----
 | 
			
		||||
 | 
			
		||||
   *** IMPORTANT SAFETY TIP: If you're going to build these variants of
 | 
			
		||||
       GLUT then DO NOT build any other target libraries in this package
 | 
			
		||||
       first, OR from the command line run the "nmake /f nmake.mak clean"
 | 
			
		||||
       command first!  This is because generation of the GLUT for SGI
 | 
			
		||||
       OpenGL target libraries conflicts in naming with the static build
 | 
			
		||||
       libraries of Mesa and it's supporting GLUT build.
 | 
			
		||||
 | 
			
		||||
   Currently, you may build GLUT as either GLUT32.DLL or GLUT.DLL for
 | 
			
		||||
   use running against either Microsoft or SGI OpenGL for Window,
 | 
			
		||||
   respectively.  This allows for the general use of GLUT 3.7 on Windows
 | 
			
		||||
   systems with fully compliant OpenGL.
 | 
			
		||||
 | 
			
		||||
   You can build the GLUT DLL files either with the command line by
 | 
			
		||||
   issuing either of these commands:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak glut.sysgl
 | 
			
		||||
 | 
			
		||||
        <or>
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak glut.sgigl
 | 
			
		||||
 | 
			
		||||
   OR by using the DevStudio MesaLib Worksapce build the GLUT_SGIGL or
 | 
			
		||||
   GLUT_SYSGL projects within the DevStudio IDE.
 | 
			
		||||
 | 
			
		||||
   Unfortunately, the only way to build the test programs against this
 | 
			
		||||
   build of GLUT is via the command line, and I will NOT be making
 | 
			
		||||
   duplicate demo program projects for the IDE as it's just not worth it,
 | 
			
		||||
   sorry.
 | 
			
		||||
 | 
			
		||||
   To build the test programs against either MS or SGI OpenGL, you do so
 | 
			
		||||
   via either of these two commands:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak progs.sysgl
 | 
			
		||||
 | 
			
		||||
        <or>
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak progs.sgigl
 | 
			
		||||
 | 
			
		||||
   To use the GLUT-for-system-OpenGL in your own programs, you need to do
 | 
			
		||||
   three things by way of preparation, after building GLUT of course:
 | 
			
		||||
 | 
			
		||||
         1. Copy include\gl\glut.h to somewhere in your %INCLUDE% path, one
 | 
			
		||||
            likely candidate location would be in your
 | 
			
		||||
            "DevStudio\VC\INCLUDE\GL" directory.
 | 
			
		||||
 | 
			
		||||
         2. Copy the linking libraries to somewhere in your %LIB% path, one
 | 
			
		||||
            likely candidate location would be in your "DevStudio\VC\LIB"
 | 
			
		||||
            directory. The linking libraries you need to copy are as
 | 
			
		||||
            follows:
 | 
			
		||||
 | 
			
		||||
                .\Release\GLUT32.LIB
 | 
			
		||||
                .\Release\GLUT.LIB
 | 
			
		||||
                .\Debug\GLUT32.LIB
 | 
			
		||||
                .\Debug\GLUT.LIB
 | 
			
		||||
 | 
			
		||||
        3. Copy the runtime libraries to somewhere in your %PATH%, one
 | 
			
		||||
           likely candidate location would be in WINDOWS\SYSTEM. the files
 | 
			
		||||
           that you should copy are as follows:
 | 
			
		||||
 | 
			
		||||
                .\Release\GLUT32.DLL
 | 
			
		||||
                .\Release\GLUT32.PDB
 | 
			
		||||
                .\Release\GLUT.DLL
 | 
			
		||||
                .\Release\GLUT.PDB
 | 
			
		||||
                .\Debug\GLUT32d.DLL
 | 
			
		||||
                .\Debug\GLUT32d.PDB
 | 
			
		||||
                .\Debug\GLUTd.DLL
 | 
			
		||||
                .\Debug\GLUTd.PDB
 | 
			
		||||
 | 
			
		||||
Some examples are in order ...
 | 
			
		||||
 | 
			
		||||
    ... build all dynamic-link libs using MSVCRT.DLL for C runtime:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak USE_CRTDLL=1 alldynamic
 | 
			
		||||
 | 
			
		||||
    ... To build all library variants and all test and demonstration
 | 
			
		||||
        programs with the default settings you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak all
 | 
			
		||||
 | 
			
		||||
    ... to build all static link libs and nothing else you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak allstatic
 | 
			
		||||
 | 
			
		||||
    ... to build all non-accelerated dynamic link libs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak alldynamic
 | 
			
		||||
 | 
			
		||||
    ... to build all 3Dfx targeted dynamic link libs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak allaccel
 | 
			
		||||
 | 
			
		||||
    ... to build all S3 Virge targetd dynamic link libs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak alls3
 | 
			
		||||
 | 
			
		||||
    ... to build all libraries, static and dynamic, in all versions
 | 
			
		||||
        you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak libfiles
 | 
			
		||||
 | 
			
		||||
    ... to subsequently build all demo and test programs you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak progs
 | 
			
		||||
 | 
			
		||||
    ... to cleanup all intermediate files you do this:
 | 
			
		||||
 | 
			
		||||
        nmake /f clean
 | 
			
		||||
 | 
			
		||||
You get the picture. (I hope) ;^)  You may also specify specify
 | 
			
		||||
single targets in a convenient fashion. The rule is simple, any of the
 | 
			
		||||
above named lib files, static or dynamic, may be built by providing it's
 | 
			
		||||
name on the command line as the target. Examples:
 | 
			
		||||
 | 
			
		||||
    ... to build only Mesa as OpenGL32.DLL ...
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak opengl32
 | 
			
		||||
 | 
			
		||||
    ... to build only Mesa on top of the 3Dfx Glide API ...
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak fxMesaGL32
 | 
			
		||||
              <or>
 | 
			
		||||
        nmake /f nmake.mak fxMesaGL
 | 
			
		||||
 | 
			
		||||
    ... to build only Mesa on top of the S3 Toolkit ...
 | 
			
		||||
 | 
			
		||||
        nmake /f nmake.mak s3MesaGL32
 | 
			
		||||
              <or>
 | 
			
		||||
        nmake /f nmake.mak s3mesaGL
 | 
			
		||||
 | 
			
		||||
*** Revision history for ./win32 project files
 | 
			
		||||
 | 
			
		||||
1/18/98 - initial cut submitted and included with core mesa
 | 
			
		||||
2/5/98  - fixed internal dependency within nmake.mif upon there being
 | 
			
		||||
          a $(DEVDIR) variable to make some temporary batch files
 | 
			
		||||
          dependant upon (thanks to Keven T. McDonnell for finding
 | 
			
		||||
          that there was this particular bug). I also updated the
 | 
			
		||||
          build files for 2.6beta6.
 | 
			
		||||
2/8/98  - added DevStudio workspace and project files for all lib
 | 
			
		||||
          files and some test programs. Updated readme.win32.
 | 
			
		||||
6/25/98 - initial revision for Mesa 3.0, does not include IDE files,
 | 
			
		||||
          not everything is running. *sigh*
 | 
			
		||||
7/20/98 - Mesa 3.0beta6 rev of all build files, all libs built and
 | 
			
		||||
          minimally tested, all demo programs built and minimally
 | 
			
		||||
          tested to within limits of my PC. ;^) Eveything looks
 | 
			
		||||
          MUCH better now ...
 | 
			
		||||
7/30/98 - Minor updates/edits based upon feedback from
 | 
			
		||||
          Eero Pajarre <epajarre@koti.tpo.fi>. These updates include a fix
 | 
			
		||||
          to the Mesa-on-3Dfx build such that Quake-II now runs almost
 | 
			
		||||
          properly on my system. It runs, just *very* slowly and with *no*
 | 
			
		||||
          textures. Hmmm. Doesn't make any difference whether Quake is set
 | 
			
		||||
          to use 8-bit textures or not.
 | 
			
		||||
8/13/98 - Lots of build cleanups, minor bug fixes in fxwgl.c, and
 | 
			
		||||
          compatability fix in fxapi.c for in-window rendering using 3Dfx
 | 
			
		||||
          hardware.
 | 
			
		||||
8/26/98 - Final revisions for Mesa 3 release checked
 | 
			
		||||
9/22/98 - Fixed static builds for all but fxMesaGL32 and s3MesaGL32 targets
 | 
			
		||||
9/29/98 - Reorganized FAQ information and added Added faq entry about Glide
 | 
			
		||||
          bug under NT (crash on exit) and a workaround.
 | 
			
		||||
11/21/98 - Updated files for Mesa 3.1 beta 1
 | 
			
		||||
           Updated fxMesa window-hack code
 | 
			
		||||
           Updated fxMesa resolution support to handle 1600x1200 & 1280x1024
 | 
			
		||||
7/9/99  - Rev'd for Mesa 3.1 beta 2
 | 
			
		||||
@@ -1,146 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                        WindML Driver for Mesa 4.0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Requirements
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Tornado 2 + WindML, Cumulative Patchs are recommended. 
 | 
			
		||||
  
 | 
			
		||||
I suppose you have a valid WindML installation. Double buffer hardware
 | 
			
		||||
gives better performance than double buffer software so if you can
 | 
			
		||||
compile your WindML driver with this option, just do it. I/O
 | 
			
		||||
redirection is adviced in target server.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Tested on
 | 
			
		||||
---------
 | 
			
		||||
 | 
			
		||||
During the development, my main target was a CoolMonster:
 | 
			
		||||
- Video card: CT69000
 | 
			
		||||
- CPU: PENTIUM 266MHz
 | 
			
		||||
 | 
			
		||||
and my host a Windows NT + Tornado 2.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Installation
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
1. Mesa sources must be in root directory (C:\)
 | 
			
		||||
 | 
			
		||||
2. Add the following line to your torVars.bat:
 | 
			
		||||
set MESA_BASE=C:\Mesa
 | 
			
		||||
 | 
			
		||||
OR copy the new torVars.bat in your bin path:
 | 
			
		||||
c:/Mesa/src/ugl/tornado/torVars.sample -> 
 | 
			
		||||
/mnt/nt/Tornado/host/x86-win32/bin/torVars (for example)
 | 
			
		||||
 | 
			
		||||
3. In a command prompt:
 | 
			
		||||
$ torVars
 | 
			
		||||
$ cd c:\Mesa
 | 
			
		||||
$ make -f Makefile.ugl CPU=PENTIUM
 | 
			
		||||
 | 
			
		||||
Take a long while...
 | 
			
		||||
 | 
			
		||||
5. Include all the files from ugldemos folder to build some downloadable
 | 
			
		||||
   application modules
 | 
			
		||||
 | 
			
		||||
4. Download UGL/Mesa object files on target
 | 
			
		||||
 | 
			
		||||
For example via the WindShell:
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaGL.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaUGL.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaGLU.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objGLUTshapes.o
 | 
			
		||||
ld < c:\Tornado\target\lib\objMesaOS.o
 | 
			
		||||
 | 
			
		||||
You can put the previous lines in a file and use:
 | 
			
		||||
< filename
 | 
			
		||||
 | 
			
		||||
6. Download the application modules.
 | 
			
		||||
 | 
			
		||||
7. In WindShell, run:
 | 
			
		||||
-> uglalldemos
 | 
			
		||||
 | 
			
		||||
During the show some messages will appear, it provides some useful
 | 
			
		||||
information on key management.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Coding
 | 
			
		||||
------
 | 
			
		||||
 | 
			
		||||
Sample Usage:
 | 
			
		||||
 | 
			
		||||
In addition to the usual ugl calls to initialize UGL, (may be find an
 | 
			
		||||
input driver), you must do the following to use the UGL/Mesa interface:
 | 
			
		||||
 | 
			
		||||
1. Call uglMesaCreateContext() to create a UGL/Mesa rendering context,
 | 
			
		||||
   given the display format.
 | 
			
		||||
 | 
			
		||||
2. Call uglMesaMakeCurrent() to bind the UGL/Mesa buffers to an
 | 
			
		||||
   UGL/Mesa Context and to make the context the current one.
 | 
			
		||||
 | 
			
		||||
3. Make gl* calls to render your graphics.
 | 
			
		||||
 | 
			
		||||
4. Use uglMesaSwapBuffers() when double buffering to swap front/back buffers.
 | 
			
		||||
 | 
			
		||||
5. Before the UGL is destroyed, call MesaDestroyContext().
 | 
			
		||||
 | 
			
		||||
6. Before exiting, call if required uglEventQDestroy and then
 | 
			
		||||
   uglDeinitialize();
 | 
			
		||||
 | 
			
		||||
Limitations
 | 
			
		||||
-----------
 | 
			
		||||
 | 
			
		||||
I found the following limitations in my driver :
 | 
			
		||||
 - Color Indexed management is only in 8 bits
 | 
			
		||||
 - It's possible to mix UGL/OpenGL application with a software
 | 
			
		||||
   double buffer
 | 
			
		||||
 | 
			
		||||
Modifications
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
New files in Mesa:
 | 
			
		||||
- Makefile.ugl
 | 
			
		||||
- rules.windmlmesa
 | 
			
		||||
- docs/README.UGL
 | 
			
		||||
- include/GL/uglmesa.h
 | 
			
		||||
- si-glu/Makefile.ugl
 | 
			
		||||
- src/Makefile.ugl
 | 
			
		||||
- src/ugl/torGLUTShapesInit.c
 | 
			
		||||
- src/ugl/torMesaUGLInit.c
 | 
			
		||||
- src/ugl/ugl_api.c
 | 
			
		||||
- src/ugl/ugl_dd.c
 | 
			
		||||
- src/ugl/ugl_glutshapes.c
 | 
			
		||||
- src/ugl/ugl_line.c
 | 
			
		||||
- src/ugl/ugl_span.c
 | 
			
		||||
- src/ugl/ugl_tri.c
 | 
			
		||||
- src/ugl/uglmesaP.h
 | 
			
		||||
- ugldemos/*
 | 
			
		||||
 | 
			
		||||
Modified files in Tornado 2.0:
 | 
			
		||||
- c:\Tornado\host\x86-win32\bin\torVars.bat
 | 
			
		||||
rem Command line build environments
 | 
			
		||||
set WIND_HOST_TYPE=x86-win32
 | 
			
		||||
set WIND_BASE=C:\Tornado
 | 
			
		||||
set MESA_BASE=C:\Mesa
 | 
			
		||||
set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%
 | 
			
		||||
- c:\Tornado\target\config\comps\VxWorks\01uglmesa.cdf
 | 
			
		||||
- c:\Tornado\target\h\GL\*
 | 
			
		||||
 | 
			
		||||
Todo
 | 
			
		||||
----
 | 
			
		||||
- GCC 2.96, ASM compilation
 | 
			
		||||
 | 
			
		||||
Thanks to:
 | 
			
		||||
----------
 | 
			
		||||
 | 
			
		||||
Precision Insight team for their great job around Mesa, XFree, and DRI.
 | 
			
		||||
Wind River Systems to take me as an intern.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Stephane Raimbault
 | 
			
		||||
<stephane.raimbault@windriver.com>
 | 
			
		||||
<stephane.raimbault@deesse.univ-lemans.fr>
 | 
			
		||||
 | 
			
		||||
July 24, 2001
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
 | 
			
		||||
                          Mesa Unix/X11 Information
 | 
			
		||||
                         Mesa 3.4.2 Unix/X11 Information
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -18,15 +18,21 @@ There are two ways to compile Mesa on Unix/X11 systems:
 | 
			
		||||
    the top-level Makefile and Make-config files.  There are instructions in
 | 
			
		||||
    each file.
 | 
			
		||||
 | 
			
		||||
    When finished, the Mesa libraries will be in the Mesa-x.y/lib/ directory.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
2. The new way:
 | 
			
		||||
    Type './configure' and then 'make'.  This uses GNU autoconfig.
 | 
			
		||||
    Run 'make check' to build the demos.
 | 
			
		||||
    See docs/INSTALL for more details.
 | 
			
		||||
    When finished, the Mesa libraries will be in the Mesa-x.y/src/.libs/,
 | 
			
		||||
    Mesa-x.y/si-glu/.libs, etc directories.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The top-level makefile will execute the makefiles in a number of sub-
 | 
			
		||||
directories.  When finished, the Mesa libraries will be in the Mesa-3.3/lib/
 | 
			
		||||
directory.  A few GLUT demos in the demos/ directory should be ready to run.
 | 
			
		||||
 | 
			
		||||
If you also downloaded and unpacked the demos there should be executables
 | 
			
		||||
in the "xdemos/", "samples/", and "book/" directories for you to try out.
 | 
			
		||||
 | 
			
		||||
If you have compilation problems you should try to fix them and return the
 | 
			
		||||
patches to the author.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Notes on assembly language optimizations:
 | 
			
		||||
@@ -317,4 +323,4 @@ Summary of X-related environment variables:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: README.X11,v 3.9 2002/10/29 23:42:48 brianp Exp $
 | 
			
		||||
$Id: README.X11,v 3.5.4.3 2001/05/14 19:11:32 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
@@ -19,4 +19,4 @@ see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4,v 1.2 2002/03/23 02:37:17 brianp Exp $
 | 
			
		||||
$Id: RELNOTES-3.4,v 1.1.2.2 2000/11/02 18:05:34 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
@@ -19,4 +19,4 @@ the Mesa 3.4 release.  For details, see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4.1,v 1.2 2001/05/23 14:45:01 brianp Exp $
 | 
			
		||||
$Id: RELNOTES-3.4.1,v 1.1.2.2 2001/02/07 22:54:04 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
@@ -19,4 +19,4 @@ the Mesa 3.4.1 release.  For details, see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4.2,v 1.2 2001/05/23 14:45:01 brianp Exp $
 | 
			
		||||
$Id: RELNOTES-3.4.2,v 1.1.2.2 2001/05/16 22:29:07 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
@@ -1,228 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.5 release notes
 | 
			
		||||
 | 
			
		||||
                             June 21, 2001
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.5) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
The biggest change in Mesa 3.5 is a complete overhaul of the source
 | 
			
		||||
code in order to make it more modular.  This was driven by the DRI
 | 
			
		||||
hardware drivers.  It simplifies the DRI drivers and opens the door
 | 
			
		||||
to hardware transform/clip/lighting (TCL).  Keith Whitwell can take
 | 
			
		||||
the credit for that.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Driver Support
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
The device driver interface in Mesa 3.5 has changed a lot since Mesa 3.4
 | 
			
		||||
Not all of the older Mesa drivers have been updated.  Here's the status:
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	-----------
 | 
			
		||||
XMesa (Xlib)		updated
 | 
			
		||||
OSMesa (off-screen)	updated
 | 
			
		||||
FX (3dfx Voodoo1/2)	updated
 | 
			
		||||
SVGA			updated
 | 
			
		||||
GGI			not updated
 | 
			
		||||
Windows/Win32		not updated
 | 
			
		||||
DOS/DJGPP		not updated
 | 
			
		||||
BeOS			not updated
 | 
			
		||||
Allegro			not updated
 | 
			
		||||
D3D			not updated
 | 
			
		||||
DOS			not updated
 | 
			
		||||
 | 
			
		||||
We're looking for volunteers to update the remaining drivers.  Please
 | 
			
		||||
post to the Mesa3d-dev mailing list if you can help.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLU 1.3
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
Mesa 3.5 includes the SGI Sample Implementation (SI) GLU library.
 | 
			
		||||
This version of GLU supports the GLU 1.3 specification.  The old
 | 
			
		||||
Mesa GLU library implemented the 1.1 specification.  The SI GLU
 | 
			
		||||
library should work much better.
 | 
			
		||||
 | 
			
		||||
You'll need a C++ compiler to compile the SI GLU library.  This may
 | 
			
		||||
be a problem on some systems.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Extensions
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
GL_EXT_convolution
 | 
			
		||||
	Adds image convolution to glRead/Copy/DrawPixels/TexImage.
 | 
			
		||||
 | 
			
		||||
GL_ARB_imaging
 | 
			
		||||
	This is the optional imaging subset of OpenGL 1.2.
 | 
			
		||||
	It's the GL_EXT_convolution, GL_HP_convolution_border_modes,
 | 
			
		||||
	GL_EXT_histogram, GL_EXT_color_table, GL_EXT_color_subtable
 | 
			
		||||
	GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract
 | 
			
		||||
	and GL_SGI_color_matrix extensions all rolled together.
 | 
			
		||||
	This is supported in all software renderers but not in all
 | 
			
		||||
	hardware drivers (3dfx for example).
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_compression
 | 
			
		||||
	This is supported in Mesa but only used by the 3dfx DRI drivers
 | 
			
		||||
	for Voodoo4 and later.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_add
 | 
			
		||||
	This is identical to GL_EXT_texture_env_add.
 | 
			
		||||
 | 
			
		||||
GL_NV_blend_square
 | 
			
		||||
	Adds extra blend source and dest factors which allow squaring
 | 
			
		||||
	of color values.
 | 
			
		||||
 | 
			
		||||
GL_EXT_fog_coord
 | 
			
		||||
	Allows specification of a per-vertex fog coordinate instead of
 | 
			
		||||
	having fog always computed from the eye distance.
 | 
			
		||||
 | 
			
		||||
GL_EXT_secondary_color
 | 
			
		||||
	Allows specifying the secondary (specular) color for each vertex
 | 
			
		||||
	instead of getting it only from lighting in GL_SEPARATE_SPECULAR_COLOR
 | 
			
		||||
	mode.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_combine
 | 
			
		||||
	Basically the same as GL_EXT_texture_env_combine
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_add extension
 | 
			
		||||
	Texture addition mode.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_dot3 extension
 | 
			
		||||
	Dot product texture environment.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_border_clamp
 | 
			
		||||
	Adds GL_CLAMP_TO_BORDER_ARB texture wrap mode
 | 
			
		||||
 | 
			
		||||
GL_SGIX_depth_texture, GL_SGIX_shadow and GL_SGIX_shadow_ambient
 | 
			
		||||
	Implements a shadow casting algorithm based on depth map textures
 | 
			
		||||
 | 
			
		||||
GL_SGIS_generate_mipmap
 | 
			
		||||
	Automatically generate lower mipmap images whenever the base mipmap
 | 
			
		||||
	image is changed with glTexImage, glCopyTexImage, etc.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
libOSMesa.so
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
libOSMesa.so is a new library which contains the OSMesa interface for
 | 
			
		||||
off-screen rendering.  Apps which need the OSMesa interface should link
 | 
			
		||||
with both -lOSMesa and -lGL.  This change was made so that stand-alone
 | 
			
		||||
Mesa works the same way as XFree86/DRI's libGL.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Driver Changes / Core Mesa Changes
 | 
			
		||||
-----------------------------------------
 | 
			
		||||
 | 
			
		||||
The ctx->Driver.LogicOp() function has been removed.  It used to
 | 
			
		||||
be called during state update in order to determine if the driver
 | 
			
		||||
could do glLogicOp() operations, and if not, set the SWLogicOpEnabled
 | 
			
		||||
flag.  Drivers should instead examine the LogicOp state themselves
 | 
			
		||||
and choose specialized point, line, and triangle functions appropriately,
 | 
			
		||||
or fall back to software rendering.  The Xlib driver was the only driver
 | 
			
		||||
to use this function.  And since the Xlib driver no longer draws
 | 
			
		||||
points, lines or triangles using Xlib, the LogicOp function isn't needed.
 | 
			
		||||
 | 
			
		||||
The ctx->Driver.Dither() function has been removed.  Drivers should
 | 
			
		||||
detect dither enable/disable via ctx->Driver.Enable() instead.
 | 
			
		||||
 | 
			
		||||
The ctx->Driver.IndexMask() and ctx->Driver.ColorMask() functions
 | 
			
		||||
are now just called from glIndexMask and glColorMask like the other
 | 
			
		||||
GL state-changing functions.  They are no longer called from inside
 | 
			
		||||
gl_update_state().  Also, they now return void.  The change was made
 | 
			
		||||
mostly for sake of uniformity.
 | 
			
		||||
 | 
			
		||||
The NEW_DRVSTATE[0123] flags have been removed.  They weren't being used
 | 
			
		||||
and are obsolete w.r.t. the way state updates are done in DRI drivers.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Removed obsolete gl_create_visual() and gl_destroy_visual().
 | 
			
		||||
 | 
			
		||||
Renamed functions (new namespace):
 | 
			
		||||
 | 
			
		||||
old				new
 | 
			
		||||
gl_create_framebuffer		_mesa_create_framebuffer
 | 
			
		||||
gl_destroy_framebuffer		_mesa_destroy_framebuffer
 | 
			
		||||
gl_create_context		_mesa_create_context
 | 
			
		||||
gl_destroy_context		_mesa_destroy_context
 | 
			
		||||
gl_context_initialize		_mesa_context_initialize
 | 
			
		||||
gl_copy_context			_mesa_copy_context
 | 
			
		||||
gl_make_current			_mesa_make_current
 | 
			
		||||
gl_make_current2		_mesa_make_current2
 | 
			
		||||
gl_get_current_context		_mesa_get_current_context
 | 
			
		||||
gl_flush_vb			_mesa_flush_vb
 | 
			
		||||
gl_warning			_mesa_warning
 | 
			
		||||
gl_compile_error		_mesa_compile_error
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
All the drivers have been updated, but not all of them have been
 | 
			
		||||
tested since I can't test some platforms (DOS, Windows, Allegro, etc).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
X/Mesa Driver
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
The source files for the X/Mesa driver in src/X have been renamed.
 | 
			
		||||
The xmesa[1234].c files are gone.  The new files are xm_api.c,
 | 
			
		||||
xm_dd.c, xm_line.c, xm_span.c and xm_tri.c.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Multitexture
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Eight texture units are now supported by default.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OpenGL SI related changes
 | 
			
		||||
-------------------------
 | 
			
		||||
 | 
			
		||||
In an effort to make Mesa's internal interfaces more like the OpenGL
 | 
			
		||||
SI interfaces, a number of changes have been made:
 | 
			
		||||
 | 
			
		||||
1. Importing the SI's glcore.h file which defines a number of
 | 
			
		||||
interface structures like __GLimports and __GLexports.
 | 
			
		||||
 | 
			
		||||
2. Renamed "struct gl_context" to "struct __GLcontextRec".
 | 
			
		||||
 | 
			
		||||
3. Added __glCoreCreateContext() and __glCoreNopDispatch() functions.
 | 
			
		||||
 | 
			
		||||
4. The GLcontext member Visual is no longer a pointer.
 | 
			
		||||
 | 
			
		||||
5. New file: imports.c to setup default import functions for Mesa.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
16-bit color channels
 | 
			
		||||
---------------------
 | 
			
		||||
 | 
			
		||||
There's experimental support for 16-bit color channels (64-bit pixels)
 | 
			
		||||
in Mesa 3.5.  Only the OSMesa interface can be used for 16-bit rendering.
 | 
			
		||||
Type "make linux-osmesa16" in the top-level directory to build the
 | 
			
		||||
special libOSMesa16.so library.
 | 
			
		||||
 | 
			
		||||
This hasn't been tested very thoroughly yet so please file bug reports
 | 
			
		||||
if you have trouble.
 | 
			
		||||
 | 
			
		||||
In the future I hope to implement support for 32-bit, floating point
 | 
			
		||||
color channels.
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.5,v 1.14 2001/06/20 19:02:48 brianp Exp $
 | 
			
		||||
@@ -1,163 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                           Mesa 4.0 release notes
 | 
			
		||||
 | 
			
		||||
                             October 18, 2001
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa version 4.0 signifies two things:
 | 
			
		||||
 | 
			
		||||
  1. A stabilization of the 3.5 development release
 | 
			
		||||
  2. Implementation of the OpenGL 1.3 specification
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Note that the Mesa major version number is incremented with the OpenGL
 | 
			
		||||
minor version number:
 | 
			
		||||
 | 
			
		||||
   Mesa 1.x  ==  OpenGL 1.0
 | 
			
		||||
   Mesa 2.x  ==  OpenGL 1.1
 | 
			
		||||
   Mesa 3.x  ==  OpenGL 1.2
 | 
			
		||||
   Mesa 4.x  ==  OpenGL 1.3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Features
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa 3.5 already had all the new features of OpenGL 1.3, implemented as
 | 
			
		||||
extensions.  These extensions were simply promoted to standard features:
 | 
			
		||||
 | 
			
		||||
   GL_ARB_multisample
 | 
			
		||||
   GL_ARB_multitexture
 | 
			
		||||
   GL_ARB_texture_border_clamp
 | 
			
		||||
   GL_ARB_texture_compression
 | 
			
		||||
   GL_ARB_texture_cube_map
 | 
			
		||||
   GL_ARB_texture_env_add
 | 
			
		||||
   GL_ARB_texture_env_combine
 | 
			
		||||
   GL_ARB_texture_env_dot3
 | 
			
		||||
   GL_ARB_transpose_matrix
 | 
			
		||||
 | 
			
		||||
In Mesa 4.0 the functions defined by these extensions are now available
 | 
			
		||||
without the "ARB" suffix.  For example, glLoadTransposeMatrixf() is now
 | 
			
		||||
a standard API function.  The new functions in OpenGL 1.3 and Mesa 4.0 are:
 | 
			
		||||
 | 
			
		||||
   glActiveTexture
 | 
			
		||||
   glClientActiveTexture
 | 
			
		||||
   glCompressedTexImage1D
 | 
			
		||||
   glCompressedTexImage2D
 | 
			
		||||
   glCompressedTexImage3D
 | 
			
		||||
   glCompressedTexSubImage1D
 | 
			
		||||
   glCompressedTexSubImage2D
 | 
			
		||||
   glCompressedTexSubImage3D
 | 
			
		||||
   glGetCompressedTexImage
 | 
			
		||||
   glLoadTransposeMatrixd
 | 
			
		||||
   glLoadTransposeMatrixf
 | 
			
		||||
   glMultiTexCoord1d
 | 
			
		||||
   glMultiTexCoord1dv
 | 
			
		||||
   glMultiTexCoord1f
 | 
			
		||||
   glMultiTexCoord1fv
 | 
			
		||||
   glMultiTexCoord1i
 | 
			
		||||
   glMultiTexCoord1iv
 | 
			
		||||
   glMultiTexCoord1s
 | 
			
		||||
   glMultiTexCoord1sv
 | 
			
		||||
   glMultiTexCoord2d
 | 
			
		||||
   glMultiTexCoord2dv
 | 
			
		||||
   glMultiTexCoord2f
 | 
			
		||||
   glMultiTexCoord2fv
 | 
			
		||||
   glMultiTexCoord2i
 | 
			
		||||
   glMultiTexCoord2iv
 | 
			
		||||
   glMultiTexCoord2s
 | 
			
		||||
   glMultiTexCoord2sv
 | 
			
		||||
   glMultiTexCoord3d
 | 
			
		||||
   glMultiTexCoord3dv
 | 
			
		||||
   glMultiTexCoord3f
 | 
			
		||||
   glMultiTexCoord3fv
 | 
			
		||||
   glMultiTexCoord3i
 | 
			
		||||
   glMultiTexCoord3iv
 | 
			
		||||
   glMultiTexCoord3s
 | 
			
		||||
   glMultiTexCoord3sv
 | 
			
		||||
   glMultiTexCoord4d
 | 
			
		||||
   glMultiTexCoord4dv
 | 
			
		||||
   glMultiTexCoord4f
 | 
			
		||||
   glMultiTexCoord4fv
 | 
			
		||||
   glMultiTexCoord4i
 | 
			
		||||
   glMultiTexCoord4iv
 | 
			
		||||
   glMultiTexCoord4s
 | 
			
		||||
   glMultiTexCoord4sv
 | 
			
		||||
   glMultTransposeMatrixd
 | 
			
		||||
   glMultTransposeMatrixf
 | 
			
		||||
   glSampleCoverage
 | 
			
		||||
   glSamplePass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLX 1.4 is the companion to OpenGL 1.3.  The only new features in GLX 1.4
 | 
			
		||||
are support for multisampling and the GLX_ARB_get_proc_address extension.
 | 
			
		||||
glXGetProcAddress() is the only new function in GLX 1.4.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Multisample and Texture Compression
 | 
			
		||||
-----------------------------------
 | 
			
		||||
 | 
			
		||||
The OpenGL 1.3 specification allows the multisample and texture compression
 | 
			
		||||
features to essentially be no-ops.  For example, if you query for multisample
 | 
			
		||||
support you'll find none, but the API functions work.
 | 
			
		||||
 | 
			
		||||
Similarly, texture compression is not implemented by any of the software
 | 
			
		||||
drivers but you can specify a generic compressed texture format (like
 | 
			
		||||
GL_COMPRESSED_RGBA) to glTexImage2D and it'll be accepted.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Drivers
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
 | 
			
		||||
device driver.  If the driver enables all the ARB extensions which are part
 | 
			
		||||
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
 | 
			
		||||
it'll return "1.2".
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of the drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.3
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.3
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.3
 | 
			
		||||
GGI			needs updating
 | 
			
		||||
DOS/DJGPP		needs updating
 | 
			
		||||
BeOS			needs updating
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
DOS			needs updating
 | 
			
		||||
 | 
			
		||||
Special thanks go to Karl Schultz for updating the Windows driver.
 | 
			
		||||
 | 
			
		||||
The XFree86/DRI drivers	have not yet been updated to use Mesa 4.0 as of
 | 
			
		||||
September 2001, but that should happen eventually.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Other Changes
 | 
			
		||||
-------------
 | 
			
		||||
 | 
			
		||||
See the VERSIONS file for more details about bug fixes, etc. in Mesa 4.0.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0,v 3.2 2001/10/17 14:59:21 brianp Exp $
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                          Mesa 4.0.1 release notes
 | 
			
		||||
 | 
			
		||||
                             December 17, 2001
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 4.0.1 only contains bug fixes since version 4.0.
 | 
			
		||||
 | 
			
		||||
See the docs/VERSIONS file for the list of bug fixes.
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0.1,v 1.2 2001/12/18 14:08:23 brianp Exp $
 | 
			
		||||
@@ -1,50 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                          Mesa 4.0.2 release notes
 | 
			
		||||
 | 
			
		||||
                             March 25, 2002
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 4.0.2 only contains bug fixes and a new DOS driver since version 4.0.1.
 | 
			
		||||
 | 
			
		||||
See the docs/VERSIONS file for the list of bug fixes.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Drivers
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
 | 
			
		||||
device driver.  If the driver enables all the ARB extensions which are part
 | 
			
		||||
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
 | 
			
		||||
it'll return "1.2".
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of the drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.3
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.3
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.3
 | 
			
		||||
DOS/DJGPP		implements OpenGL 1.3 (new in Mesa 4.0.2)
 | 
			
		||||
GGI			needs updating
 | 
			
		||||
BeOS			needs updating
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0.2,v 1.2 2002/03/23 02:38:39 brianp Exp $
 | 
			
		||||
@@ -1,52 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                          Mesa 4.0.3 release notes
 | 
			
		||||
 | 
			
		||||
                               June 25, 2002
 | 
			
		||||
 | 
			
		||||
                              PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Odd numbered versions (such as 3.3) designate new developmental releases.
 | 
			
		||||
Even numbered versions (such as 3.4) designate stable releases.
 | 
			
		||||
 | 
			
		||||
Mesa 4.0.3 basically just contains bug fixes version 4.0.2.
 | 
			
		||||
 | 
			
		||||
See the docs/VERSIONS file for the list of bug fixes.
 | 
			
		||||
 | 
			
		||||
The GGI driver has been updated, thanks to Filip Spacek.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Drivers
 | 
			
		||||
--------------
 | 
			
		||||
 | 
			
		||||
Mesa advertises itself as either OpenGL 1.2 or OpenGL 1.3 depending on the
 | 
			
		||||
device driver.  If the driver enables all the ARB extensions which are part
 | 
			
		||||
of OpenGL 1.3 then glGetString(GL_VERSION) will return "1.3".  Otherwise,
 | 
			
		||||
it'll return "1.2".
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of the drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.3
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.3
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.3
 | 
			
		||||
DOS/DJGPP		implements OpenGL 1.3 (new in Mesa 4.0.2)
 | 
			
		||||
GGI			implements OpenGL 1.3
 | 
			
		||||
BeOS			needs updating
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.0.3,v 1.2 2002/06/26 02:36:34 brianp Exp $
 | 
			
		||||
@@ -1,308 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                            Mesa 4.1 release notes
 | 
			
		||||
 | 
			
		||||
                               October 29, 2002
 | 
			
		||||
 | 
			
		||||
                                PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Even numbered versions (such as 4.0) designate stable releases.
 | 
			
		||||
Odd numbered versions (such as 4.1) designate new developmental releases.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Features in Mesa 4.1
 | 
			
		||||
------------------------
 | 
			
		||||
 | 
			
		||||
New extensions.  Docs at http://oss.sgi.com/projects/ogl-sample/registry/
 | 
			
		||||
 | 
			
		||||
GL_NV_vertex_program
 | 
			
		||||
 | 
			
		||||
    NVIDIA's vertex programming extension
 | 
			
		||||
 | 
			
		||||
GL_NV_vertex_program1_1
 | 
			
		||||
 | 
			
		||||
    A few features built on top of GL_NV_vertex_program
 | 
			
		||||
 | 
			
		||||
GL_ARB_window_pos
 | 
			
		||||
 | 
			
		||||
    This is the ARB-approved version of GL_MESA_window_pos
 | 
			
		||||
 | 
			
		||||
GL_ARB_depth_texture
 | 
			
		||||
 | 
			
		||||
    This is the ARB-approved version of GL_SGIX_depth_texture.
 | 
			
		||||
    It allows depth (Z buffer) data to be stored in textures.
 | 
			
		||||
    This is used by GL_ARB_shadow
 | 
			
		||||
 | 
			
		||||
GL_ARB_shadow
 | 
			
		||||
 | 
			
		||||
    Shadow mapping with depth textures.
 | 
			
		||||
    This is the ARB-approved version of GL_SGIX_shadow.
 | 
			
		||||
 | 
			
		||||
GL_ARB_shadow_ambient
 | 
			
		||||
 | 
			
		||||
    Allows one to specify the luminance of shadowed pixels.
 | 
			
		||||
    This is the ARB-approved version of GL_SGIX_shadow_ambient.
 | 
			
		||||
 | 
			
		||||
GL_EXT_shadow_funcs
 | 
			
		||||
 | 
			
		||||
    Extends the set of GL_ARB_shadow texture comparision functions to
 | 
			
		||||
    include all eight of standard OpenGL dept-test functions.
 | 
			
		||||
 | 
			
		||||
GL_ARB_point_parameters
 | 
			
		||||
 | 
			
		||||
    This is basically the same as GL_EXT_point_parameters.
 | 
			
		||||
 | 
			
		||||
GL_ARB_texture_env_crossbar
 | 
			
		||||
 | 
			
		||||
    Allows any texture combine stage to reference any texture source unit.
 | 
			
		||||
 | 
			
		||||
GL_NV_point_sprite
 | 
			
		||||
 | 
			
		||||
    For rendering points as textured quads.  Useful for particle effects.
 | 
			
		||||
 | 
			
		||||
GL_NV_texture_rectangle  (new in 4.0.4 actually)
 | 
			
		||||
 | 
			
		||||
    Allows one to use textures with sizes that are not powers of two.
 | 
			
		||||
    Note that mipmapping and several texture wrap modes are not allowed.
 | 
			
		||||
 | 
			
		||||
GL_EXT_multi_draw_arrays
 | 
			
		||||
 | 
			
		||||
    Allows arrays of vertex arrays to be rendered with one call.
 | 
			
		||||
 | 
			
		||||
GL_EXT_stencil_two_side
 | 
			
		||||
 | 
			
		||||
   Separate stencil modes for front and back-facing polygons.
 | 
			
		||||
 | 
			
		||||
GLX_SGIX_fbconfig & GLX_SGIX_pbuffer
 | 
			
		||||
 | 
			
		||||
   Off-screen rendering support.
 | 
			
		||||
 | 
			
		||||
GL_ATI_texture_mirror_once
 | 
			
		||||
 | 
			
		||||
   Adds two new texture wrap modes: GL_MIRROR_CLAMP_ATI and
 | 
			
		||||
   GL_MIRROR_CLAMP_TO_EDGE_ATI.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Driver Status
 | 
			
		||||
--------------------
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of these drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.3
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.3
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.3
 | 
			
		||||
DOS/DJGPP		implements OpenGL 1.3
 | 
			
		||||
GGI			implements OpenGL 1.3
 | 
			
		||||
BeOS			needs updating (underway)
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
DOS			needs updating
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New features in GLUT
 | 
			
		||||
--------------------
 | 
			
		||||
 | 
			
		||||
1. Frames per second printing
 | 
			
		||||
 | 
			
		||||
   GLUT now looks for an environment variable called "GLUT_FPS".  If it's
 | 
			
		||||
   set, GLUT will print out a frames/second statistic to stderr when
 | 
			
		||||
   glutSwapBuffers() is called.  By default, frames/second is computed
 | 
			
		||||
   and displayed once every 5 seconds.  You can specify a different
 | 
			
		||||
   interval (in milliseconds) when you set the env var.  For example
 | 
			
		||||
   'export GLUT_FPS=1000' or 'setenv GLUT_FPS 1000' will set the interval
 | 
			
		||||
   to one second.
 | 
			
		||||
 | 
			
		||||
   NOTE: the demo or application must call the glutInit() function for
 | 
			
		||||
   this to work.  Otherwise, the env var will be ignored.
 | 
			
		||||
 | 
			
		||||
   Finally, this feature may not be reliable in multi-window programs.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
2. glutGetProcAddress() function
 | 
			
		||||
 | 
			
		||||
   The new function:
 | 
			
		||||
 | 
			
		||||
        void *glutGetProcAddress(const char *procName)
 | 
			
		||||
 | 
			
		||||
   is a wrapper for glXGetProcAddressARB() and wglGetProcAddress().  It
 | 
			
		||||
   lets you dynamically get the address of an OpenGL function at runtime.
 | 
			
		||||
   The GLUT_API_VERSION has been bumped to 5, but I haven't bumped the
 | 
			
		||||
   GLUT version number from 3.7 since that's probably Mark Kilgard's role.
 | 
			
		||||
 | 
			
		||||
   This function should probably also be able to return the address of
 | 
			
		||||
   GLUT functions themselves, but it doesn't do that yet.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
XXX Things To Do Yet XXXX
 | 
			
		||||
-------------------------
 | 
			
		||||
 | 
			
		||||
isosurf with vertex program exhibits some missing triangles (probably
 | 
			
		||||
when recycling the vertex buffer for long prims).
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Porting Info
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
If you're porting a DRI or other driver from Mesa 4.0.x to Mesa 4.1 here
 | 
			
		||||
are some things to change:
 | 
			
		||||
 | 
			
		||||
1. ctx->Texture._ReallyEnabled is obsolete.
 | 
			
		||||
 | 
			
		||||
   Since there are now 5 texture targets (1D, 2D, 3D, cube and rect) that
 | 
			
		||||
   left room for only 6 units (6*5 < 32) in this field.
 | 
			
		||||
   This field is being replaced by ctx->Texture._EnabledUnits which has one
 | 
			
		||||
   bit per texture unit.  If the bit k of _EnabledUnits is set, that means
 | 
			
		||||
   ctx->Texture.Unit[k]._ReallyEnabled is non-zero.  You'll have to look at
 | 
			
		||||
   ctx->Texture.Unit[k]._ReallyEnabled to learn if the 1D, 2D, 3D, cube or
 | 
			
		||||
   rect texture is enabled for unit k.
 | 
			
		||||
 | 
			
		||||
   This also means that the constants TEXTURE1_*, TEXTURE2_*, etc are
 | 
			
		||||
   obsolete.
 | 
			
		||||
 | 
			
		||||
   The tokens TEXTURE0_* have been replaced as well (since there's no
 | 
			
		||||
   significance to the "0" part:
 | 
			
		||||
 | 
			
		||||
   old token           new token
 | 
			
		||||
   TEXTURE0_1D         TEXTURE_1D_BIT
 | 
			
		||||
   TEXTURE0_2D         TEXTURE_2D_BIT
 | 
			
		||||
   TEXTURE0_3D         TEXTURE_3D_BIT
 | 
			
		||||
   TEXTURE0_CUBE       TEXTURE_CUBE_BIT
 | 
			
		||||
   <none>              TEXTURE_RECT_BIT
 | 
			
		||||
 | 
			
		||||
   These tokens are only used for the ctx->Texture.Unit[i].Enabled and
 | 
			
		||||
   ctx->Texture.Unit[i]._ReallyEnabled fields.  Exactly 0 or 1 bits will
 | 
			
		||||
   be set in _ReallyEnabled at any time!
 | 
			
		||||
 | 
			
		||||
   Q: "What's the purpose of Unit[i].Enabled vs Unit[i]._ReallyEnabled?"
 | 
			
		||||
   A: The user can enable GL_TEXTURE_1D, GL_TEXTURE_2D, etc for any
 | 
			
		||||
      texure unit all at once (an unusual thing to do).
 | 
			
		||||
      OpenGL defines priorities that basically say GL_TEXTURE_2D has
 | 
			
		||||
      higher priority than GL_TEXTURE_1D, etc.  Also, just because a
 | 
			
		||||
      texture target is enabled by the user doesn't mean we'll actually
 | 
			
		||||
      use that texture!  If a texture object is incomplete (missing mip-
 | 
			
		||||
      map levels, etc) it's as if texturing is disabled for that target.
 | 
			
		||||
      The _ReallyEnabled field will have a bit set ONLY if the texture
 | 
			
		||||
      target is enabled and complete.  This spares the driver writer from
 | 
			
		||||
      examining a _lot_ of GL state to determine which texture target is
 | 
			
		||||
      to be used.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
2. Tnl tokens changes
 | 
			
		||||
 | 
			
		||||
   During the implementation of GL_NV_vertex_program some of the vertex
 | 
			
		||||
   buffer code was changed.  Specifically, the VERT_* bits defined in
 | 
			
		||||
   tnl/t_context.h have been renamed to better match the conventions of
 | 
			
		||||
   GL_NV_vertex_program.  The old names are still present but obsolete.
 | 
			
		||||
   Drivers should use the newer names.
 | 
			
		||||
 | 
			
		||||
   For example:  VERT_RGBA is now VERT_BIT_COLOR0 and
 | 
			
		||||
   VERT_SPEC_RGB is now VERT_BIT_COLOR1.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3. Read/Draw Buffer changes
 | 
			
		||||
 | 
			
		||||
   The business of setting the current read/draw buffers in Mesa 4.0.x
 | 
			
		||||
   was complicated.  It's much simpler now in Mesa 4.1.
 | 
			
		||||
 | 
			
		||||
   Here are the changes:
 | 
			
		||||
 | 
			
		||||
   - Renamed ctx->Color.DrawDestMask to ctx->Color._DrawDestMask
 | 
			
		||||
   - Removed ctx->Color.DriverDrawBuffer
 | 
			
		||||
   - Removed ctx->Pixel.DriverReadBuffer
 | 
			
		||||
   - Removed ctx->Color.MultiDrawBuffer
 | 
			
		||||
   - Removed ctx->Driver.SetDrawBuffer()
 | 
			
		||||
   - Removed swrast->Driver.SetReadBuffer().
 | 
			
		||||
   - Added ctx->Color._DrawDestMask - a bitmask of FRONT/BACK_LEFT/RIGHT_BIT
 | 
			
		||||
     values to indicate the current draw buffers.
 | 
			
		||||
   - Added ctx->Pixel._ReadSrcMask to indicate the source for pixel reading.
 | 
			
		||||
     The value is _one_ of the FRONT/BACK_LEFT/RIGHT_BIT values.
 | 
			
		||||
   - Added ctx->Driver.DrawBuffer() and ctx->Driver.ReadBuffer().
 | 
			
		||||
     These functions exactly correspond to glDrawBuffer and glReadBuffer calls.
 | 
			
		||||
     Many drivers will set ctx->Driver.DrawBuffer = _swrast_DrawBuffer and
 | 
			
		||||
     leave ctx->Draw.ReadBuffer NULL.
 | 
			
		||||
     DRI drivers should implement their own function for ctx->Driver.DrawBuffer
 | 
			
		||||
     and use it to set the current hardware drawing buffer.  You'll probably
 | 
			
		||||
     also want to check for GL_FRONT_AND_BACK mode and fall back to software.
 | 
			
		||||
     Call _swrast_DrawBuffer() too, to update the swrast state.
 | 
			
		||||
   - Added swrast->Driver.SetBuffer().
 | 
			
		||||
     This function should be implemented by all device drivers that use swrast.
 | 
			
		||||
     Mesa will call it to specify the buffer to use for span reading AND
 | 
			
		||||
     writing and point/line/triangle rendering.
 | 
			
		||||
     There should be no confusion between current read or draw buffer anymore.
 | 
			
		||||
   - Added swrast->CurrentBuffer to indicate which color buffer to read/draw.
 | 
			
		||||
     Will be FRONT_LEFT_BIT, BACK_LEFT_BIT, FRONT_RIGHT_BIT or BACK_RIGHT_BIT.
 | 
			
		||||
     This value is usually passed to swrast->Driver.SetBuffer().
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4. _mesa_create_context() changes.  This function now takes a pointer to
 | 
			
		||||
   a __GLimports object.  The __GLimports structure contains function
 | 
			
		||||
   pointers to system functions like fprintf(), malloc(), etc.
 | 
			
		||||
   The _mesa_init_default_imports() function can be used to initialize
 | 
			
		||||
   a __GLimports object.  Most device drivers (like the DRI drivers)
 | 
			
		||||
   should use this.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
5. In tnl's struct vertex_buffer, the field "ProjectedClipCoords"
 | 
			
		||||
   has been replaced by "NdcPtr" to better match the OpenGL spec's
 | 
			
		||||
   terminology.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
6. Since GL_EXT_stencil_two_side has been implemented, many of the
 | 
			
		||||
   ctx->Stencil fields are now 2-element arrays.  For example,
 | 
			
		||||
   "GLenum Ref" is now "GLenum Ref[2]"  The [0] elements are the front-face
 | 
			
		||||
   values and the [1] elements are the back-face values.
 | 
			
		||||
   ctx->Stencil.ActiveFace is 0 or 1 to indicate the current face for
 | 
			
		||||
   the glStencilOp/Func/Mask() functions.
 | 
			
		||||
   ctx->Stencil.TestTwoSide controls whether or not 1 or 2-sided stenciling
 | 
			
		||||
   is enabled.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
7. Removed ctx->Polygon._OffsetAny.  Removed ctx->Polygon.OffsetMRD.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
8. GLfloat / GLchan changes:
 | 
			
		||||
 | 
			
		||||
   - Changed ctx->Driver.ClearColor() to take GLfloat[4] instead of GLchan[4].
 | 
			
		||||
     ctx->Color.ClearColor is now GLfloat[4] too.
 | 
			
		||||
   - Changed ctx->Driver.AlphaRef() to take GLfloat instead of GLchan.
 | 
			
		||||
   - ctx->Color.AlphaRef is now GLfloat.
 | 
			
		||||
   - texObj->BorderColor is now GLfloat[4].  texObj->_BorderChan is GLchan[4].
 | 
			
		||||
 | 
			
		||||
   This is part of an effort to remove all GLchan types from core Mesa so
 | 
			
		||||
   that someday we can support 8, 16 and 32-bit color channels dynamically
 | 
			
		||||
   at runtime, instead of at compile-time.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
9. GLboolean ctx->Tranform.ClipEnabled[MAX_CLIP_PLANES] has been replaced
 | 
			
		||||
   by GLuint ctx->Transform.ClipPlanesEnabled.  The later is a bitfield.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
10. There's a new matrix_stack type in mtypes.h used for the Modelview,
 | 
			
		||||
   Projection, Color and Texcoord matrix stacks.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
11. The ctx->Current.* fields have changed a lot.  Now, there's a
 | 
			
		||||
   ctx->Current.Attrib[] array for all vertex attributes which matches
 | 
			
		||||
   the NV vertex program conventions.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-4.1,v 1.22 2002/10/29 15:06:37 brianp Exp $
 | 
			
		||||
@@ -1,85 +0,0 @@
 | 
			
		||||
 | 
			
		||||
                            Mesa 5.0 release notes
 | 
			
		||||
 | 
			
		||||
                              November 13, 2002
 | 
			
		||||
 | 
			
		||||
                                PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Introduction
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
Mesa uses an even/odd version number scheme like the Linux kernel.
 | 
			
		||||
Even-numbered versions (such as 5.0) designate stable releases.
 | 
			
		||||
Odd-numbered versions (such as 4.1) designate new developmental releases.
 | 
			
		||||
 | 
			
		||||
Mesa 5.0 is basically just a stabilization of Mesa 4.1.  To see a list of
 | 
			
		||||
bug fixes, etc. see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
New Features in Mesa 5.0
 | 
			
		||||
------------------------
 | 
			
		||||
 | 
			
		||||
Mesa 5.0 supports OpenGL 1.4.  Note Mesa's versioning convention:
 | 
			
		||||
 | 
			
		||||
   OpenGL Version    Mesa Version
 | 
			
		||||
   ------------------------------
 | 
			
		||||
        1.0             1.x
 | 
			
		||||
        1.1             2.x
 | 
			
		||||
        1.2             3.x
 | 
			
		||||
        1.3             4.x
 | 
			
		||||
        1.4             5.x
 | 
			
		||||
 | 
			
		||||
OpenGL 1.4 (and Mesa 5.0) incorporates the following OpenGL extensions as
 | 
			
		||||
standard features:
 | 
			
		||||
 | 
			
		||||
	GL_ARB_depth_texture
 | 
			
		||||
	GL_ARB_shadow
 | 
			
		||||
	GL_ARB_texture_env_crossbar
 | 
			
		||||
	GL_ARB_texture_mirror_repeat
 | 
			
		||||
	GL_ARB_window_pos
 | 
			
		||||
	GL_EXT_blend_color
 | 
			
		||||
	GL_EXT_blend_func_separate
 | 
			
		||||
	GL_EXT_blend_logic_op
 | 
			
		||||
	GL_EXT_blend_minmax
 | 
			
		||||
	GL_EXT_blend_subtract
 | 
			
		||||
	GL_EXT_fog_coord
 | 
			
		||||
	GL_EXT_multi_draw_arrays
 | 
			
		||||
	GL_EXT_point_parameters
 | 
			
		||||
	GL_EXT_secondary_color
 | 
			
		||||
	GL_EXT_stencil_wrap
 | 
			
		||||
	GL_SGIS_generate_mipmap
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Device Driver Status
 | 
			
		||||
--------------------
 | 
			
		||||
 | 
			
		||||
A number of Mesa's software drivers haven't been actively maintained for
 | 
			
		||||
some time.  We rely on volunteers to maintain many of these drivers.
 | 
			
		||||
Here's the current status of all included drivers:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Driver			Status
 | 
			
		||||
----------------------	---------------------
 | 
			
		||||
XMesa (Xlib)		implements OpenGL 1.4
 | 
			
		||||
OSMesa (off-screen)	implements OpenGL 1.4
 | 
			
		||||
FX (3dfx Voodoo1/2)	implements OpenGL 1.3
 | 
			
		||||
SVGA			implements OpenGL 1.3
 | 
			
		||||
Wind River UGL		implements OpenGL 1.3
 | 
			
		||||
Windows/Win32		implements OpenGL 1.4
 | 
			
		||||
DOS/DJGPP		implements OpenGL 1.3
 | 
			
		||||
GGI			implements OpenGL 1.3
 | 
			
		||||
DOS			implements OpenGL 1.4
 | 
			
		||||
BeOS			needs updating (underway)
 | 
			
		||||
Allegro			needs updating
 | 
			
		||||
D3D			needs updating
 | 
			
		||||
 | 
			
		||||
Note: supporting OpenGL 1.4 (vs. 1.3 or 1.2) usually only requires that the
 | 
			
		||||
driver call the _mesa_enable_1_4_extensions() function.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-5.0,v 3.2 2002/11/13 15:33:51 brianp Exp $
 | 
			
		||||
							
								
								
									
										259
									
								
								docs/VERSIONS
									
									
									
									
									
								
							
							
						
						
									
										259
									
								
								docs/VERSIONS
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
$Id: VERSIONS,v 1.118 2002/11/13 15:33:50 brianp Exp $
 | 
			
		||||
$Id: VERSIONS,v 1.38.2.46 2001/05/17 19:31:55 brianp Exp $
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mesa Version History
 | 
			
		||||
@@ -802,7 +802,6 @@ Mesa Version History
 | 
			
		||||
    Known problems:
 | 
			
		||||
	- NURBS or evaluator surfaces inside display lists don't always work
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.4.2  May 17, 2001
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- deleting the currently bound texture could cause bad problems
 | 
			
		||||
@@ -821,262 +820,6 @@ Mesa Version History
 | 
			
		||||
	- fixed a few color index mode fog bugs
 | 
			
		||||
	- fixed some bad assertions in color index mode
 | 
			
		||||
	- fixed FX line 'stipple' bug #420091
 | 
			
		||||
	- fixed stencil buffer clear width/height typo
 | 
			
		||||
	- fixed GL error glitches in gl[Client]ActiveTextureARB()
 | 
			
		||||
	- fixed Windows compilation problem in texutil.c
 | 
			
		||||
	- fixed 1/8-pixel AA triangle sampling error
 | 
			
		||||
    Changes:
 | 
			
		||||
	- optimized writing mono-colored pixel spans to X pixmaps
 | 
			
		||||
	- increased max viewport size to 2048 x 2048
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.5  June 21, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- internals of Mesa divided into modular pieces (Keith Whitwell)
 | 
			
		||||
	- 100% OpenGL 1.2 conformance (passes all conformance tests)
 | 
			
		||||
	- new AA line algorithm
 | 
			
		||||
	- GL_EXT_convolution extension
 | 
			
		||||
	- GL_ARB_imaging subset
 | 
			
		||||
	- OSMesaCreateContextExt() function
 | 
			
		||||
	- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
 | 
			
		||||
	- GL_MAX_TEXTURE_UNITS_ARB now defaults to eight
 | 
			
		||||
	- GL_EXT_fog_coord extension (Keith Whitwell)
 | 
			
		||||
	- GL_EXT_secondary_color extension (Keith Whitwell)
 | 
			
		||||
	- GL_ARB_texture_env_add extension (same as GL_EXT_texture_env_add)
 | 
			
		||||
	- GL_SGIX_depth_texture extension
 | 
			
		||||
	- GL_SGIX_shadow and GL_SGIX_shadow_ambient extensions
 | 
			
		||||
	- demos/shadowtex.c demo of GL_SGIX_depth_texture and GL_SGIX_shadow
 | 
			
		||||
	- GL_ARB_texture_env_combine extension
 | 
			
		||||
	- GL_ARB_texture_env_dot3 extension
 | 
			
		||||
	- GL_ARB_texture_border_clamp (aka GL_SGIS_texture_border_clamp)
 | 
			
		||||
	- OSMesaCreateContextExt() function
 | 
			
		||||
	- libOSMesa.so library, contains the OSMesa driver interface
 | 
			
		||||
	- GL/glxext.h header file for GLX extensions
 | 
			
		||||
	- somewhat faster software texturing, fogging, depth testing
 | 
			
		||||
	- all color-index conformance tests now pass (only 8bpp tested)
 | 
			
		||||
	- SPARC assembly language TCL optimizations (David Miller)
 | 
			
		||||
	- GL_SGIS_generate_mipmap extension
 | 
			
		||||
    Bug Fixes:
 | 
			
		||||
	- fbiRev and tmuRev were unitialized when using Glide3
 | 
			
		||||
	- fixed a few color index mode conformance failures; all pass now
 | 
			
		||||
	- now appling antialiasing coverage to alpha after texturing
 | 
			
		||||
	- colors weren't getting clamped to [0,1] before color table lookup
 | 
			
		||||
	- fixed RISC alignment errors caused by COPY_4UBV macro
 | 
			
		||||
	- drawing wide, flat-shaded lines could cause a segfault
 | 
			
		||||
	- vertices now snapped to 1/16 pixel to fix rendering of tiny triangles
 | 
			
		||||
    Changes:
 | 
			
		||||
	- SGI's Sample Implementation (SI) 1.3 GLU library replaces Mesa GLU
 | 
			
		||||
	- new libOSMesa.so library, contains the OSMesa driver interface
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0  October 22, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- Mesa 4.0 implements the OpenGL 1.3 specification
 | 
			
		||||
	- GL_IBM_rasterpos_clip extension
 | 
			
		||||
	- GL_EXT_texture_edge_clamp extension (aka GL_SGIS_texture_edge_clamp)
 | 
			
		||||
	- GL_ARB_texture_mirrored_repeat extension
 | 
			
		||||
	- WindML UGL driver (Stephane Raimbault)
 | 
			
		||||
	- added OSMESA_MAX_WIDTH/HEIGHT queries
 | 
			
		||||
	- attempted compiliation fixes for Solaris 5, 7 and 8
 | 
			
		||||
	- updated glext.h and glxext.h files
 | 
			
		||||
	- updated Windows driver (Karl Schultz)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- added some missing GLX 1.3 tokens to include/GL/glx.h
 | 
			
		||||
	- GL_COLOR_MATRIX changes weren't recognized by teximage functions
 | 
			
		||||
	- glCopyPixels with scale and bias was broken
 | 
			
		||||
	- glRasterPos with lighting could segfault
 | 
			
		||||
	- glDeleteTextures could leave a dangling pointer
 | 
			
		||||
	- Proxy textures for cube maps didn't work
 | 
			
		||||
	- fixed a number of 16-bit color channel bugs
 | 
			
		||||
	- fixed a few minor memory leaks
 | 
			
		||||
	- GLX context sharing was broken in 3.5
 | 
			
		||||
	- fixed state-update bugs in glPopClientAttrib()
 | 
			
		||||
	- fixed glDrawRangeElements() bug
 | 
			
		||||
	- fixed a glPush/PopAttrib() bug related to texture binding
 | 
			
		||||
	- flat-shaded, textured lines were broken
 | 
			
		||||
	- fixed a dangling pointer problem in the XMesa code (Chris Burghart)
 | 
			
		||||
	- lighting didn't always produce the correct alpha value
 | 
			
		||||
	- fixed 3DNow! code to not read past end of arrays (Andrew Lewycky)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.1 December 17, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- better sub-pixel sample positions for AA triangles (Ray Tice)
 | 
			
		||||
	- slightly faster blending for (GL_ZERO, GL_ONE) and (GL_ONE, GL_ZERO)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- added missing break statements in glGet*() for multisample cases
 | 
			
		||||
	- fixed uninitialized hash table mutex bug (display lists / texobjs)
 | 
			
		||||
	- fixed bad teximage error check conditional (bug 476846)
 | 
			
		||||
	- fixed demos readtex.c compilation problem on Windows (Karl Schultz)
 | 
			
		||||
	- added missing glGet() query for GL_MAX_TEXTURE_LOD_BIAS_EXT
 | 
			
		||||
	- silence some compiler warnings (gcc 2.96)
 | 
			
		||||
	- enable the #define GL_VERSION_1_3 in GL/gl.h
 | 
			
		||||
	- added GL 1.3 and GLX 1.4 entries to gl_mangle.h and glx_mangle.h
 | 
			
		||||
	- fixed glu.h typedef problem found with MSDev 6.0
 | 
			
		||||
	- build libGL.so with -Bsymbolic (fixes bug found with Chromium)
 | 
			
		||||
	- added missing 'const' to glXGetContextIDEXT() in glxext.h
 | 
			
		||||
	- fixed a few glXGetProcAddress() errors (texture compression, etc)
 | 
			
		||||
	- fixed start index bug in compiled vertex arrays (Keith)
 | 
			
		||||
	- fixed compilation problems in src/SPARC/glapi_sparc.S
 | 
			
		||||
	- fixed triangle strip "parity" bug found in VTK medical1 demo (Keith)
 | 
			
		||||
	- use glXGetProcAddressARB in GLUT to avoid extension linking problems
 | 
			
		||||
	- provoking vertex of flat-shaded, color-index triangles was wrong
 | 
			
		||||
	- fixed a few display list bugs (GLUT walker, molecule, etc) (Keith)
 | 
			
		||||
	- glTexParameter didn't flush the vertex buffer (Ray Tice)
 | 
			
		||||
	- feedback attributes for glDraw/CopyPixels and glBitmap were wrong
 | 
			
		||||
	- fixed bug in normal length caching (ParaView lighting bug)
 | 
			
		||||
	- fixed separate_specular color bug found in Chimera (18 Dec 2001)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.2  April 2, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- New DOS (DJGPP) driver written by Daniel Borca
 | 
			
		||||
	- New driver interface functions for TCL drivers (such as Radeon DRI)
 | 
			
		||||
	- GL_RENDERER string returns "Mesa Offscreen16" or "Mesa Offscreen32"
 | 
			
		||||
	  if using deep color channels
 | 
			
		||||
	- latest GL/glext.h and GL/glxext.h headers from SGI
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- GL_BLEND with non-black texture env color wasn't always correct
 | 
			
		||||
	- GL_REPLACE with GL_RGB texture format wasn't always correct (alpha)
 | 
			
		||||
	- glTexEnviv( pname != GL_TEXTURE_ENV_COLOR ) was broken
 | 
			
		||||
	- glReadPixels was sometimes mistakenly clipped by the scissor box
 | 
			
		||||
	- glDraw/ReadPixels didn't catch all the errors that they should have
 | 
			
		||||
	- Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
 | 
			
		||||
	- 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c)
 | 
			
		||||
	- Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP)
 | 
			
		||||
	- glColorMask as sometimes effecting glXSwapBuffers()
 | 
			
		||||
	- fixed a potential bug in XMesaGarbageCollect()
 | 
			
		||||
	- N threads rendering into one window didn't work reliably
 | 
			
		||||
	- glCopyPixels didn't work for deep color channels
 | 
			
		||||
	- improved 8 -> 16bit/channel texture image conversion (Gerk Huisma)
 | 
			
		||||
	- glPopAttrib() didn't correctly restore user clip planes
 | 
			
		||||
	- user clip planes failed for some perspective projections (Chromium)
 | 
			
		||||
    Known bugs:
 | 
			
		||||
	- mipmap LOD computation
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.3  June 25, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- updated GL/glext.h file (version 15)
 | 
			
		||||
	- corrected MMX blend code (Jose Fonseca)
 | 
			
		||||
	- support for software-based alpha planes in Windows driver
 | 
			
		||||
	- updated GGI driver (Filip Spacek)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- glext.h had wrong values for GL_DOT3_RGB[A]_EXT tokens
 | 
			
		||||
	- OSMesaMakeCurrent() didn't recognize buffer size changes
 | 
			
		||||
	- assorted conformance fixes for 16-bit/channel rendering
 | 
			
		||||
	- texcombine alpha subtraction mode was broken
 | 
			
		||||
	- fixed lighting bug with non-uniform scaling and display lists
 | 
			
		||||
	- fixed bug when deleting shared display lists
 | 
			
		||||
	- disabled SPARC cliptest assembly code (Mesa bug 544665)
 | 
			
		||||
	- fixed a couple Solaris compilation/link problems
 | 
			
		||||
	- blending clipped glDrawPixels didn't always work
 | 
			
		||||
	- glGetTexImage() didn't accept packed pixel types
 | 
			
		||||
	- glPixelMapu[is]v() could explode given too large of pixelmap
 | 
			
		||||
	- glGetTexParameter[if]v() didn't accept GL_TEXTURE_MAX_ANISOTROPY_EXT
 | 
			
		||||
	- glXCopyContext() could lead to segfaults
 | 
			
		||||
	- glCullFace(GL_FRONT_AND_BACK) didn't work (bug 572665)
 | 
			
		||||
    Changes:
 | 
			
		||||
	- lots of C++ (g++) code clean-ups
 | 
			
		||||
	- lots of T&L updates for the Radeon DRI driver
 | 
			
		||||
    Known bugs:
 | 
			
		||||
	- mipmap LOD computation (fixed for Mesa 4.1)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.0.4  October 3, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- GL_NV_texture_rectangle extension
 | 
			
		||||
	- updated glext.h header (version 17)
 | 
			
		||||
	- updated DOS driver (Daniel Borca)
 | 
			
		||||
	- updated BeOS R5 driver (Philippe Houdoin)
 | 
			
		||||
	- added GL_IBM_texture_mirror_repeat
 | 
			
		||||
	- glxinfo now takes -l option to print interesting OpenGL limits info
 | 
			
		||||
	- GL_MESA_ycbcr_texture extension
 | 
			
		||||
	- GL_APPLE_client_storage extension (for some DRI drivers only)
 | 
			
		||||
	- GL_MESA_pack_invert extension
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- fixed GL_LINEAR fog bug by adding clamping
 | 
			
		||||
	- fixed FP exceptions found using Alpha CPU
 | 
			
		||||
	- 3dfx MESA_GLX_FX=window (render to window) didn't work
 | 
			
		||||
	- fixed memory leak in wglCreateContest (Karl Schultz)
 | 
			
		||||
	- define GLAPIENTRY and GLAPI if undefined in glu.h
 | 
			
		||||
	- wglGetProcAddress didn't handle all API functions
 | 
			
		||||
	- when testing for OpenGL 1.2 vs 1.3, check for GL_ARB_texture_cube_map
 | 
			
		||||
	- removed GL_MAX_CONVOLUTION_WIDTH/HEIGHT from glGetInteger/Float/etc()
 | 
			
		||||
	- error checking in compressed tex image functions had some glitches
 | 
			
		||||
	- fixed AIX compile problem in src/config.c
 | 
			
		||||
	- glGetTexImage was using pixel unpacking instead of packing params
 | 
			
		||||
	- auto-mipmap generation for cube maps was incorrect
 | 
			
		||||
    Changes:
 | 
			
		||||
	- max texture units reduced to six to accomodate texture rectangles
 | 
			
		||||
	- removed unfinished GL_MESA_sprite_point extension code
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
4.1  October 29, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- GL_NV_vertex_program extension
 | 
			
		||||
	- GL_NV_vertex_program1_1 extension
 | 
			
		||||
	- GL_ARB_window_pos extension
 | 
			
		||||
	- GL_ARB_depth_texture extension
 | 
			
		||||
	- GL_ARB_shadow extension
 | 
			
		||||
	- GL_ARB_shadow_ambient extension
 | 
			
		||||
	- GL_EXT_shadow_funcs extension
 | 
			
		||||
	- GL_ARB_point_parameters extension
 | 
			
		||||
	- GL_ARB_texture_env_crossbar
 | 
			
		||||
	- GL_NV_point_sprite extension
 | 
			
		||||
	- GL_NV_texture_rectangle extension
 | 
			
		||||
	- GL_EXT_multi_draw_arrays extension
 | 
			
		||||
	- GL_EXT_stencil_two_side extension
 | 
			
		||||
	- GLX_SGIX_fbconfig and GLX_SGIX_pbuffer extensions
 | 
			
		||||
	- GL_ATI_texture_mirror_once extension (Ian Romanick)
 | 
			
		||||
	- massive overhaul/simplification of software rasterizer module,
 | 
			
		||||
	  many contributions from Klaus Niederkrueger
 | 
			
		||||
	- faster software texturing in some cases (i.e. trilinear filtering)
 | 
			
		||||
	- new OSMesaGetProcAddress() function
 | 
			
		||||
	- more blend modes implemented with MMX code (Jose Fonseca)
 | 
			
		||||
	- added glutGetProcAddress() to GLUT
 | 
			
		||||
	- added GLUT_FPS env var to compute frames/second in glutSwapBuffers()
 | 
			
		||||
	- pbinfo and pbdemo PBuffer programs
 | 
			
		||||
	- glxinfo -v prints transprent pixel info (Gerd Sussner)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- better mipmap LOD computation (prevents excessive blurriness)
 | 
			
		||||
	- OSMesaMakeCurrent() didn't recognize buffer size changes
 | 
			
		||||
	- assorted conformance fixes for 16-bit/channel rendering
 | 
			
		||||
	- texcombine alpha subtraction mode was broken
 | 
			
		||||
	- fixed some blend problems when GLchan==GLfloat (Gerk Huisma)
 | 
			
		||||
	- clamp colors to [0,inf] in OSMesa if GLchan==GLfloat (Gerk Huisma)
 | 
			
		||||
	- fixed divide by zero error in NURBS tessellator (Jon Perry)
 | 
			
		||||
	- fixed GL_LINEAR fog bug by adding clamping
 | 
			
		||||
	- fixed FP exceptions found using Alpha CPU
 | 
			
		||||
	- 3dfx/glide driver render-to-window feature was broken
 | 
			
		||||
	- added missing GLX_TRANSPARENT_RGB token to glx.h
 | 
			
		||||
	- fixed error checking related to paletted textures
 | 
			
		||||
	- fixed reference count error in glDeleteTextures (Randy Fayan)
 | 
			
		||||
    Changes:
 | 
			
		||||
	- New spec file and Python code to generate some GL dispatch files
 | 
			
		||||
	- Glide driver defaults to "no" with autoconf/automake
 | 
			
		||||
	- updated demos/stex3d with new options
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
5.0  November 13, 2002
 | 
			
		||||
    New:
 | 
			
		||||
	- OpenGL 1.4 support (glGetString(GL_VERSION) returns "1.4")
 | 
			
		||||
	- removed some overlooked debugging code
 | 
			
		||||
	- glxinfo updated to support GLX_ARB_multisample
 | 
			
		||||
	- GLUT now support GLX_ARB_multisample
 | 
			
		||||
	- updated DOS driver (Daniel Borca)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- GL_POINT and GL_LINE-mode polygons didn't obey cull state
 | 
			
		||||
	- fixed potential bug in _mesa_align_malloc/calloc()
 | 
			
		||||
	- fixed missing triangle bug when running vertex programs
 | 
			
		||||
	- fixed a few HPUX compilation problems
 | 
			
		||||
	- FX (Glide) driver didn't compile
 | 
			
		||||
	- setting GL_TEXTURE_BORDER_COLOR with glTexParameteriv() didn't work
 | 
			
		||||
	- a few EXT functions, like glGenTexturesEXT, were no-ops
 | 
			
		||||
	- a few OpenGL 1.4 functions like glFogCoord*, glBlendFuncSeparate,
 | 
			
		||||
	  glMultiDrawArrays and glMultiDrawElements were missing
 | 
			
		||||
	- glGet*(GL_ACTIVE_STENCIL_FACE_EXT) was broken
 | 
			
		||||
	- Pentium 4 Mobile was mistakenly identified as having 3DNow!
 | 
			
		||||
	- fixed one-bit error in point/line fragment Z calculation
 | 
			
		||||
	- fixed potential segfault in fakeglx code
 | 
			
		||||
	- fixed color overflow problem in DOT3 texture env mode
 | 
			
		||||
 
 | 
			
		||||
@@ -1,90 +0,0 @@
 | 
			
		||||
<HTML>
 | 
			
		||||
<HEAD>
 | 
			
		||||
  <TITLE>Index to Mesa Documentation</TITLE>
 | 
			
		||||
</HEAD>
 | 
			
		||||
 | 
			
		||||
<BODY>
 | 
			
		||||
 | 
			
		||||
<H1>Main Documentation</H1>
 | 
			
		||||
<UL>
 | 
			
		||||
<LI><A HREF="README">README</A> - general, top-level documentation
 | 
			
		||||
<LI><A HREF="INSTALL">INSTALL</A> - compilation/installation instructions
 | 
			
		||||
<LI><A HREF="VERSIONS">VERSIONS</A> - version history / change log
 | 
			
		||||
<LI><A HREF="COPYRIGHT">COPYRIGHT</A> - copyright and license information
 | 
			
		||||
<LI><A HREF="COPYING">COPYING</A> - some parts of Mesa are GPL'd
 | 
			
		||||
<LI><A HREF="CONFORM">CONFORM</A>
 | 
			
		||||
    - results of running the OpenGL conformance tests
 | 
			
		||||
<LI><A HREF="DEVINFO">DEVINFO</A> - information for Mesa developers
 | 
			
		||||
<LI><A HREF="http://www.mesa3d.org/">www.mesa3d.org</A> - Mesa website
 | 
			
		||||
</UL>
 | 
			
		||||
 | 
			
		||||
<H1>Platform and Driver Information</H1>
 | 
			
		||||
<P>
 | 
			
		||||
Be warned, some of these files may be very out of date.
 | 
			
		||||
</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
 | 
			
		||||
</UL>
 | 
			
		||||
 | 
			
		||||
<H1>Release Notes</H1>
 | 
			
		||||
<UL>
 | 
			
		||||
<LI><A HREF="RELNOTES-5.0">RELNOTES-5.0</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-4.1">RELNOTES-4.1</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-4.0.3">RELNOTES-4.0.3</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-4.0.2">RELNOTES-4.0.2</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-4.0.1">RELNOTES-4.0.1</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-4.0">RELNOTES-4.0</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.5">RELNOTES-3.5</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.4.2">RELNOTES-3.4.2</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.4.1">RELNOTES-3.4.1</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.4">RELNOTES-3.4</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.3">RELNOTES-3.3</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.2.1">RELNOTES-3.2.1</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.2">RELNOTES-3.2</A>
 | 
			
		||||
<LI><A HREF="RELNOTES-3.1">RELNOTES-3.1</A>
 | 
			
		||||
</UL>
 | 
			
		||||
 | 
			
		||||
<H1>Mesa Extension Specifications</H1>
 | 
			
		||||
<UL>
 | 
			
		||||
<LI><A HREF="MESA_agp_offset.spec">MESA_agp_offset.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_copy_sub_buffer.spec">MESA_copy_sub_buffer.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_packed_depth_stencil.spec">MESA_packed_depth_stencil.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_pack_invert.spec">MESA_pack_invert.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_pixmap_colormap.spec">MESA_pixmap_colormap.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_release_buffers.spec">MESA_release_buffers.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_resize_buffers.spec">MESA_resize_buffers.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_set_3dfx_mode.spec">MESA_set_3dfx_mode.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_sprite_point.spec">MESA_sprite_point.spec</A> (obsolete)
 | 
			
		||||
<LI><A HREF="MESA_trace.spec">MESA_trace.spec</A> (obsolete)
 | 
			
		||||
<LI><A HREF="MESA_window_pos.spec">MESA_window_pos.spec</A>
 | 
			
		||||
<LI><A HREF="MESA_ycbcr_texture.spec">MESA_ycbcr_texture.spec</A>
 | 
			
		||||
</UL>
 | 
			
		||||
 | 
			
		||||
<H1>Source Code Documentation</H1>
 | 
			
		||||
<P>
 | 
			
		||||
<A HREF="http://www.doxygen.org">Doxygen</A> is used to automatically
 | 
			
		||||
produce cross-referenced documentation from the Mesa sources.
 | 
			
		||||
This is not included in the normal Mesa distribution.
 | 
			
		||||
Download Mesa from CVS if interested.
 | 
			
		||||
</P>
 | 
			
		||||
<P>
 | 
			
		||||
<A HREF="../doxy/core/index.html">Source documentation</A>
 | 
			
		||||
</P>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</BODY>
 | 
			
		||||
</HTML>
 | 
			
		||||
							
								
								
									
										3579
									
								
								docs/subset.html
									
									
									
									
									
								
							
							
						
						
									
										3579
									
								
								docs/subset.html
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,12 +0,0 @@
 | 
			
		||||
*.tag
 | 
			
		||||
array_cache
 | 
			
		||||
core
 | 
			
		||||
core_subset
 | 
			
		||||
math
 | 
			
		||||
math_subset
 | 
			
		||||
miniglx
 | 
			
		||||
radeon_subset
 | 
			
		||||
swrast
 | 
			
		||||
swrast_setup
 | 
			
		||||
tnl
 | 
			
		||||
tnl_dd
 | 
			
		||||
@@ -1,10 +0,0 @@
 | 
			
		||||
 | 
			
		||||
This directory is for doxygen (a source code documentation system).
 | 
			
		||||
 | 
			
		||||
See http://www.doxygen.org/ for more info.
 | 
			
		||||
 | 
			
		||||
Either run 'make' (Unix) or 'doxy.bat' (Windows) to run doxygen
 | 
			
		||||
and generate souce code documentation.
 | 
			
		||||
 | 
			
		||||
Then, load either doxy/core/index.html or doxy/core_subset/index.html into
 | 
			
		||||
your web browser.
 | 
			
		||||
@@ -1,183 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa array_cache"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = NO
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = NO
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = NO
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = NO
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = NO
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/array_cache/
 | 
			
		||||
FILE_PATTERNS          = *.c \
 | 
			
		||||
                         *.h
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = YES
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = array_cache
 | 
			
		||||
HTML_HEADER            = header.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = 
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES               = core.tag=../core \
 | 
			
		||||
			 tnl.tag=../tnl \
 | 
			
		||||
			 swrast_setup.tag=../swrast_setup \
 | 
			
		||||
			 swrast.tag=../swrast \
 | 
			
		||||
			 math.tag=../math \
 | 
			
		||||
			 tnl_dd.tag=../tnl_dd
 | 
			
		||||
GENERATE_TAGFILE       = array_cache.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = YES
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,182 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa Core"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = NO
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = YES
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = YES
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = NO
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = NO
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/
 | 
			
		||||
FILE_PATTERNS          = *.c *.h
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = ../src/glapitemp.h ../src/glapioffsets.h
 | 
			
		||||
EXCLUDE_PATTERNS       = subset_*
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = YES
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = NO
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = core
 | 
			
		||||
HTML_HEADER            = header.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = YES
 | 
			
		||||
EXPAND_ONLY_PREDEF     = YES
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = ../include/
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = _HAVE_FULL_GL=1
 | 
			
		||||
EXPAND_AS_DEFINED      = _glthread_DECLARE_STATIC_MUTEX
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES		= tnl_dd.tag=../tnl_dd \
 | 
			
		||||
			 array_cache.tag=../array_cache \
 | 
			
		||||
                         math.tag=../math \
 | 
			
		||||
                         swrast.tag=../swrast \
 | 
			
		||||
                         swrast_setup.tag=../swrast_setup \
 | 
			
		||||
                         tnl.tag=../tnl
 | 
			
		||||
GENERATE_TAGFILE       = core.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = NO
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,226 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa Core"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = NO
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = YES
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = YES
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = subset
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = NO
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = NO
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/
 | 
			
		||||
FILE_PATTERNS          = \
 | 
			
		||||
			accum.h \
 | 
			
		||||
			attrib.h \
 | 
			
		||||
			blend.[ch] \
 | 
			
		||||
			buffers.[ch] \
 | 
			
		||||
			dd.h \
 | 
			
		||||
			debug.h \
 | 
			
		||||
			depth.h \
 | 
			
		||||
			dlist.h \
 | 
			
		||||
			context.[ch] \
 | 
			
		||||
			config.h \
 | 
			
		||||
			colormac.h \
 | 
			
		||||
			colortab.h \
 | 
			
		||||
			enable.h \
 | 
			
		||||
			enums.h \
 | 
			
		||||
			eval.h \
 | 
			
		||||
			extensions.h \
 | 
			
		||||
			feedback.[ch] \
 | 
			
		||||
			fog.h \
 | 
			
		||||
			get.h \
 | 
			
		||||
			glheader.h \
 | 
			
		||||
			glthread.h \
 | 
			
		||||
			hash.[ch] \
 | 
			
		||||
			hint.h \
 | 
			
		||||
			histogram.h \
 | 
			
		||||
			image.[ch] \
 | 
			
		||||
			imports.[ch] \
 | 
			
		||||
			lines.[ch] \
 | 
			
		||||
			light.h \
 | 
			
		||||
			matrix.[ch] \
 | 
			
		||||
			macros.h \
 | 
			
		||||
			mmath.h \
 | 
			
		||||
			mtypes.h \
 | 
			
		||||
			pixel.h \
 | 
			
		||||
			points.[ch] \
 | 
			
		||||
			polygon.[ch] \
 | 
			
		||||
			rastpos.[ch] \
 | 
			
		||||
			simple_list.h \
 | 
			
		||||
			state.[ch] \
 | 
			
		||||
			stencil.[ch] \
 | 
			
		||||
			subset_*.c \
 | 
			
		||||
			texformat.h \
 | 
			
		||||
			teximage.h \
 | 
			
		||||
			texstate.h \
 | 
			
		||||
			texstore.h \
 | 
			
		||||
			texobj.[ch] \
 | 
			
		||||
			texutil_tmp.h \
 | 
			
		||||
			varray.h
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = YES
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = NO
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = core_subset
 | 
			
		||||
HTML_HEADER            = header_subset.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = ../include/
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES		= \
 | 
			
		||||
			 math_subset.tag=../math_subset \
 | 
			
		||||
			 miniglx.tag=../miniglx
 | 
			
		||||
GENERATE_TAGFILE       = core_subset.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = NO
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,14 +0,0 @@
 | 
			
		||||
doxygen tnl_dd.doxy
 | 
			
		||||
doxygen array_cache.doxy
 | 
			
		||||
doxygen math.doxy
 | 
			
		||||
doxygen swrast.doxy
 | 
			
		||||
doxygen swrast_setup.doxy
 | 
			
		||||
doxygen tnl.doxy
 | 
			
		||||
doxygen core.doxy
 | 
			
		||||
echo Building again, to resolve tags
 | 
			
		||||
doxygen tnl_dd.doxy
 | 
			
		||||
doxygen array_cache.doxy
 | 
			
		||||
doxygen math.doxy
 | 
			
		||||
doxygen swrast.doxy
 | 
			
		||||
doxygen swrast_setup.doxy
 | 
			
		||||
doxygen tnl.doxy
 | 
			
		||||
@@ -1,12 +0,0 @@
 | 
			
		||||
<html><head><title>Mesa Source Code Documentation</title>
 | 
			
		||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
 | 
			
		||||
</head>
 | 
			
		||||
<body><center>
 | 
			
		||||
<a href="../core/index.html">Mesa Core</a> 
 | 
			
		||||
<a href="../array_cache/index.html">array_cache</a> 
 | 
			
		||||
<a href="../math/index.html">math</a> 
 | 
			
		||||
<a href="../swrast/index.html">swrast</a> 
 | 
			
		||||
<a href="../swrast_setup/index.html">swrast_setup</a> 
 | 
			
		||||
<a href="../tnl/index.html">tnl</a> 
 | 
			
		||||
<a href="../tnl_dd/index.html">tnl_dd</a> 
 | 
			
		||||
</center>
 | 
			
		||||
@@ -1,9 +0,0 @@
 | 
			
		||||
<html><head><title>Mesa Source Code Documentation</title>
 | 
			
		||||
<link href="doxygen.css" rel="stylesheet" type="text/css">
 | 
			
		||||
</head>
 | 
			
		||||
<body><center>
 | 
			
		||||
<a href="../core_subset/index.html">Mesa Core</a> 
 | 
			
		||||
<a href="../math_subset/index.html">math</a> 
 | 
			
		||||
<a href="../miniglx/index.html">MiniGLX</a> 
 | 
			
		||||
<a href="../radeon_subset/index.html">radeon_subset</a> 
 | 
			
		||||
</center>
 | 
			
		||||
@@ -1,44 +0,0 @@
 | 
			
		||||
default: subset
 | 
			
		||||
 | 
			
		||||
full:
 | 
			
		||||
	doxygen tnl_dd.doxy
 | 
			
		||||
	doxygen array_cache.doxy
 | 
			
		||||
	doxygen math.doxy
 | 
			
		||||
	doxygen swrast.doxy
 | 
			
		||||
	doxygen swrast_setup.doxy
 | 
			
		||||
	doxygen tnl.doxy
 | 
			
		||||
	doxygen core.doxy
 | 
			
		||||
	echo "Building again, to resolve tags"
 | 
			
		||||
	doxygen tnl_dd.doxy
 | 
			
		||||
	doxygen array_cache.doxy
 | 
			
		||||
	doxygen math.doxy
 | 
			
		||||
	doxygen swrast.doxy
 | 
			
		||||
	doxygen swrast_setup.doxy
 | 
			
		||||
	doxygen tnl.doxy
 | 
			
		||||
	doxygen core.doxy
 | 
			
		||||
 | 
			
		||||
subset:
 | 
			
		||||
	doxygen core_subset.doxy
 | 
			
		||||
	doxygen math_subset.doxy
 | 
			
		||||
	doxygen miniglx.doxy
 | 
			
		||||
	echo "Building again, to resolve tags"
 | 
			
		||||
	doxygen core_subset.doxy
 | 
			
		||||
	doxygen math_subset.doxy
 | 
			
		||||
	doxygen miniglx.doxy
 | 
			
		||||
	doxygen radeon_subset.doxy
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	rm -rf \
 | 
			
		||||
		array_cache \
 | 
			
		||||
		core \
 | 
			
		||||
		core_subset \
 | 
			
		||||
		math \
 | 
			
		||||
		math_subset \
 | 
			
		||||
		swrast \
 | 
			
		||||
		swrast_setup \
 | 
			
		||||
		tnl_dd \
 | 
			
		||||
		tnl \
 | 
			
		||||
		miniglx \
 | 
			
		||||
		radeon_subset
 | 
			
		||||
	rm -rf *.tag
 | 
			
		||||
 | 
			
		||||
@@ -1,183 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa math module"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = .
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = YES
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = YES
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = NO
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = YES
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = YES
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/math/
 | 
			
		||||
FILE_PATTERNS          = *.c \
 | 
			
		||||
                         *.h
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = NO
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = math
 | 
			
		||||
HTML_HEADER            = header.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = 
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES               = tnl_dd.tag=../tnl_dd \
 | 
			
		||||
                         core.tag=../core \
 | 
			
		||||
                         swrast.tag=../swrast \
 | 
			
		||||
                         swrast_setup.tag=../swrast_setup \
 | 
			
		||||
                         tnl.tag=../tnl \
 | 
			
		||||
                         array_cache.tag=../array_cache
 | 
			
		||||
GENERATE_TAGFILE       = math.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = YES
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,177 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa math module"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = .
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = NO
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = YES
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = NO
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = YES
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = YES
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/math/
 | 
			
		||||
FILE_PATTERNS          = m_matrix.[ch]
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = NO
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = math_subset
 | 
			
		||||
HTML_HEADER            = header_subset.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = 
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES               = core_subset.tag=../core_subset
 | 
			
		||||
GENERATE_TAGFILE       = math_subset.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = YES
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,179 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "MiniGLX"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = NO
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = YES
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = YES
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = NO
 | 
			
		||||
SHOW_INCLUDE_FILES     = NO
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = NO
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = NO
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/miniglx/ ../include/GL/miniglx.h
 | 
			
		||||
FILE_PATTERNS          = *.h *.c
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = ../src/miniglx/glapi.c
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = NO
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = miniglx
 | 
			
		||||
HTML_HEADER            = header_subset.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = ../include/
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES		= \
 | 
			
		||||
			 core_subset.tag=../core_subset \
 | 
			
		||||
                         math_subset.tag=../math_subset
 | 
			
		||||
GENERATE_TAGFILE       = miniglx.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = NO
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,203 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Radeon Subset Driver"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = NO
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = YES
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = YES
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = NO
 | 
			
		||||
SHOW_INCLUDE_FILES     = NO
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = NO
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = NO
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = \
 | 
			
		||||
			../src/drv/common/mm.c \
 | 
			
		||||
			../src/drv/common/mm.h \
 | 
			
		||||
			../src/drv/radeon/radeon_context.c \
 | 
			
		||||
			../src/drv/radeon/radeon_context.h \
 | 
			
		||||
		 	../src/drv/radeon/radeon_ioctl.c \
 | 
			
		||||
		 	../src/drv/radeon/radeon_ioctl.h \
 | 
			
		||||
		 	../src/drv/radeon/radeon_lock.c \
 | 
			
		||||
		 	../src/drv/radeon/radeon_lock.h \
 | 
			
		||||
		 	../src/drv/radeon/radeon_screen.c \
 | 
			
		||||
		 	../src/drv/radeon/radeon_screen.h \
 | 
			
		||||
		 	../src/drv/radeon/radeon_state.c \
 | 
			
		||||
		 	../src/drv/radeon/radeon_state.h \
 | 
			
		||||
		 	../src/drv/radeon/radeon_state_init.c \
 | 
			
		||||
			../src/drv/radeon/radeon_subset.h \
 | 
			
		||||
			../src/drv/radeon/radeon_subset_bitmap.c \
 | 
			
		||||
			../src/drv/radeon/radeon_subset_readpix.c \
 | 
			
		||||
			../src/drv/radeon/radeon_subset_select.c \
 | 
			
		||||
			../src/drv/radeon/radeon_subset_tex.c \
 | 
			
		||||
			../src/drv/radeon/radeon_subset_vtx.c \
 | 
			
		||||
		 	../src/drv/radeon/radeon_tcl.h \
 | 
			
		||||
		 	../src/drv/radeon/radeon_tex.h \
 | 
			
		||||
		 	../src/drv/radeon/radeon_vtxfmt.h \
 | 
			
		||||
			../src/drv/radeon/server
 | 
			
		||||
FILE_PATTERNS          = *.h *.c
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = NO
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = radeon_subset
 | 
			
		||||
HTML_HEADER            = header_subset.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = ../include/
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES		= \
 | 
			
		||||
			 core_subset.tag=../core_subset \
 | 
			
		||||
                         math_subset.tag=../math_subset \
 | 
			
		||||
                         miniglx.tag=../miniglx
 | 
			
		||||
GENERATE_TAGFILE       = radeon_subset.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = NO
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,182 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa Software Rasterization (swrast)"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = NO
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = NO
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = YES
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = YES
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = NO
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/swrast/
 | 
			
		||||
FILE_PATTERNS          = *.c *.h
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = YES
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = swrast
 | 
			
		||||
HTML_HEADER            = header.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = ../include/
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES               = core.tag=../core \
 | 
			
		||||
                         math.tag=../math \
 | 
			
		||||
                         tnl_dd.tag=../tnl_dd \
 | 
			
		||||
                         swrast_setup.tag=../swrast_setup \
 | 
			
		||||
                         tnl.tag=../tnl \
 | 
			
		||||
                         array_cache.tag=array_cache
 | 
			
		||||
GENERATE_TAGFILE       = swrast.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = NO
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,183 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa swrast_setup"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = YES
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = NO
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = NO
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = YES
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = YES
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/swrast_setup/
 | 
			
		||||
FILE_PATTERNS          = *.c \
 | 
			
		||||
                         *.h
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = YES
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = swrast_setup
 | 
			
		||||
HTML_HEADER            = header.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = 
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES               = tnl_dd.tag=../tnl_dd \
 | 
			
		||||
                         core.tag=../core \
 | 
			
		||||
                         math.tag=../math \
 | 
			
		||||
                         swrast.tag=../swrast \
 | 
			
		||||
                         tnl.tag=../tnl \
 | 
			
		||||
                         array_cache.tag=../array_cache
 | 
			
		||||
GENERATE_TAGFILE       = swrast_setup.tag
 | 
			
		||||
ALLEXTERNALS           = YES
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = YES
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
							
								
								
									
										183
									
								
								doxygen/tnl.doxy
									
									
									
									
									
								
							
							
						
						
									
										183
									
								
								doxygen/tnl.doxy
									
									
									
									
									
								
							@@ -1,183 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa Transform and Lighting (tnl)"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = YES
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = NO
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = NO
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = YES
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = YES
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = YES
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/tnl/
 | 
			
		||||
FILE_PATTERNS          = *.c \
 | 
			
		||||
                         *.h
 | 
			
		||||
RECURSIVE              = NO
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = YES
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = tnl
 | 
			
		||||
HTML_HEADER            = header.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = 
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES               = tnl_dd.tag=../tnl \
 | 
			
		||||
                         core.tag=../core \
 | 
			
		||||
                         math.tag=../math \
 | 
			
		||||
                         swrast.tag=../swrast \
 | 
			
		||||
                         swrast_setup.tag=swrast_setup \
 | 
			
		||||
                         array_cache.tag=array_cache
 | 
			
		||||
GENERATE_TAGFILE       = tnl.tag
 | 
			
		||||
ALLEXTERNALS           = YES
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = YES
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -1,182 +0,0 @@
 | 
			
		||||
# Doxyfile 0.1
 | 
			
		||||
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# General configuration options
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
PROJECT_NAME           = "Mesa tnl_dd"
 | 
			
		||||
PROJECT_NUMBER         = 
 | 
			
		||||
OUTPUT_DIRECTORY       = 
 | 
			
		||||
OUTPUT_LANGUAGE        = English
 | 
			
		||||
EXTRACT_ALL            = YES
 | 
			
		||||
EXTRACT_PRIVATE        = NO
 | 
			
		||||
EXTRACT_STATIC         = NO
 | 
			
		||||
EXTRACT_LOCAL_CLASSES  = YES
 | 
			
		||||
HIDE_UNDOC_MEMBERS     = NO
 | 
			
		||||
HIDE_UNDOC_CLASSES     = NO
 | 
			
		||||
BRIEF_MEMBER_DESC      = YES
 | 
			
		||||
REPEAT_BRIEF           = YES
 | 
			
		||||
ALWAYS_DETAILED_SEC    = NO
 | 
			
		||||
INLINE_INHERITED_MEMB  = NO
 | 
			
		||||
FULL_PATH_NAMES        = NO
 | 
			
		||||
STRIP_FROM_PATH        = 
 | 
			
		||||
INTERNAL_DOCS          = NO
 | 
			
		||||
STRIP_CODE_COMMENTS    = YES
 | 
			
		||||
CASE_SENSE_NAMES       = YES
 | 
			
		||||
SHORT_NAMES            = NO
 | 
			
		||||
HIDE_SCOPE_NAMES       = NO
 | 
			
		||||
VERBATIM_HEADERS       = YES
 | 
			
		||||
SHOW_INCLUDE_FILES     = YES
 | 
			
		||||
JAVADOC_AUTOBRIEF      = NO
 | 
			
		||||
INHERIT_DOCS           = YES
 | 
			
		||||
INLINE_INFO            = NO
 | 
			
		||||
SORT_MEMBER_DOCS       = NO
 | 
			
		||||
DISTRIBUTE_GROUP_DOC   = NO
 | 
			
		||||
TAB_SIZE               = 8
 | 
			
		||||
GENERATE_TODOLIST      = YES
 | 
			
		||||
GENERATE_TESTLIST      = YES
 | 
			
		||||
GENERATE_BUGLIST       = YES
 | 
			
		||||
ALIASES                = 
 | 
			
		||||
ENABLED_SECTIONS       = 
 | 
			
		||||
MAX_INITIALIZER_LINES  = 30
 | 
			
		||||
OPTIMIZE_OUTPUT_FOR_C  = YES
 | 
			
		||||
SHOW_USED_FILES        = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to warning and progress messages
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
QUIET                  = YES
 | 
			
		||||
WARNINGS               = YES
 | 
			
		||||
WARN_IF_UNDOCUMENTED   = YES
 | 
			
		||||
WARN_FORMAT            = 
 | 
			
		||||
WARN_LOGFILE           = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the input files
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
INPUT                  = ../src/tnl_dd/
 | 
			
		||||
FILE_PATTERNS          = *.c *.h
 | 
			
		||||
RECURSIVE              = YES
 | 
			
		||||
EXCLUDE                = 
 | 
			
		||||
EXCLUDE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_PATH           = 
 | 
			
		||||
EXAMPLE_PATTERNS       = 
 | 
			
		||||
EXAMPLE_RECURSIVE      = NO
 | 
			
		||||
IMAGE_PATH             = 
 | 
			
		||||
INPUT_FILTER           = 
 | 
			
		||||
FILTER_SOURCE_FILES    = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to source browsing
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SOURCE_BROWSER         = NO
 | 
			
		||||
INLINE_SOURCES         = NO
 | 
			
		||||
REFERENCED_BY_RELATION = YES
 | 
			
		||||
REFERENCES_RELATION    = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the alphabetical class index
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ALPHABETICAL_INDEX     = YES
 | 
			
		||||
COLS_IN_ALPHA_INDEX    = 5
 | 
			
		||||
IGNORE_PREFIX          = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the HTML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_HTML          = YES
 | 
			
		||||
HTML_OUTPUT            = tnl_dd
 | 
			
		||||
HTML_HEADER            = header.html
 | 
			
		||||
HTML_FOOTER            = 
 | 
			
		||||
HTML_STYLESHEET        = 
 | 
			
		||||
HTML_ALIGN_MEMBERS     = YES
 | 
			
		||||
GENERATE_HTMLHELP      = NO
 | 
			
		||||
GENERATE_CHI           = NO
 | 
			
		||||
BINARY_TOC             = NO
 | 
			
		||||
TOC_EXPAND             = NO
 | 
			
		||||
DISABLE_INDEX          = NO
 | 
			
		||||
ENUM_VALUES_PER_LINE   = 4
 | 
			
		||||
GENERATE_TREEVIEW      = NO
 | 
			
		||||
TREEVIEW_WIDTH         = 250
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the LaTeX output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_LATEX         = NO
 | 
			
		||||
LATEX_OUTPUT           = 
 | 
			
		||||
COMPACT_LATEX          = NO
 | 
			
		||||
PAPER_TYPE             = a4wide
 | 
			
		||||
EXTRA_PACKAGES         = 
 | 
			
		||||
LATEX_HEADER           = 
 | 
			
		||||
PDF_HYPERLINKS         = NO
 | 
			
		||||
USE_PDFLATEX           = NO
 | 
			
		||||
LATEX_BATCHMODE        = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the RTF output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_RTF           = NO
 | 
			
		||||
RTF_OUTPUT             = 
 | 
			
		||||
COMPACT_RTF            = NO
 | 
			
		||||
RTF_HYPERLINKS         = NO
 | 
			
		||||
RTF_STYLESHEET_FILE    = 
 | 
			
		||||
RTF_EXTENSIONS_FILE    = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the man page output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_MAN           = NO
 | 
			
		||||
MAN_OUTPUT             = 
 | 
			
		||||
MAN_EXTENSION          = 
 | 
			
		||||
MAN_LINKS              = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options related to the XML output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_XML           = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# configuration options for the AutoGen Definitions output
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
GENERATE_AUTOGEN_DEF   = NO
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the preprocessor   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
ENABLE_PREPROCESSING   = YES
 | 
			
		||||
MACRO_EXPANSION        = NO
 | 
			
		||||
EXPAND_ONLY_PREDEF     = NO
 | 
			
		||||
SEARCH_INCLUDES        = YES
 | 
			
		||||
INCLUDE_PATH           = 
 | 
			
		||||
INCLUDE_FILE_PATTERNS  = 
 | 
			
		||||
PREDEFINED             = 
 | 
			
		||||
EXPAND_AS_DEFINED      = 
 | 
			
		||||
SKIP_FUNCTION_MACROS   = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to external references   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
TAGFILES               = core.tag=../core \
 | 
			
		||||
                         math.tag=../math \
 | 
			
		||||
                         swrast.tag=../swrast \
 | 
			
		||||
                         swrast_setup.tag=../swrast_setup \
 | 
			
		||||
                         tnl.tag=../tnl \
 | 
			
		||||
                         array_cache.tag=array_cache
 | 
			
		||||
GENERATE_TAGFILE       = tnl_dd.tag
 | 
			
		||||
ALLEXTERNALS           = NO
 | 
			
		||||
PERL_PATH              = 
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration options related to the dot tool   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
CLASS_DIAGRAMS         = YES
 | 
			
		||||
HAVE_DOT               = NO
 | 
			
		||||
CLASS_GRAPH            = YES
 | 
			
		||||
COLLABORATION_GRAPH    = YES
 | 
			
		||||
TEMPLATE_RELATIONS     = YES
 | 
			
		||||
HIDE_UNDOC_RELATIONS   = YES
 | 
			
		||||
INCLUDE_GRAPH          = YES
 | 
			
		||||
INCLUDED_BY_GRAPH      = YES
 | 
			
		||||
GRAPHICAL_HIERARCHY    = YES
 | 
			
		||||
DOT_PATH               = 
 | 
			
		||||
DOTFILE_DIRS           = 
 | 
			
		||||
MAX_DOT_GRAPH_WIDTH    = 1024
 | 
			
		||||
MAX_DOT_GRAPH_HEIGHT   = 1024
 | 
			
		||||
GENERATE_LEGEND        = YES
 | 
			
		||||
DOT_CLEANUP            = YES
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
# Configuration::addtions related to the search engine   
 | 
			
		||||
#---------------------------------------------------------------------------
 | 
			
		||||
SEARCHENGINE           = NO
 | 
			
		||||
CGI_NAME               = 
 | 
			
		||||
CGI_URL                = 
 | 
			
		||||
DOC_URL                = 
 | 
			
		||||
DOC_ABSPATH            = 
 | 
			
		||||
BIN_ABSPATH            = 
 | 
			
		||||
EXT_DOC_PATHS          = 
 | 
			
		||||
@@ -2,42 +2,33 @@
 | 
			
		||||
 | 
			
		||||
GLincludedir = $(includedir)/GL
 | 
			
		||||
 | 
			
		||||
INC_FX = fxmesa.h
 | 
			
		||||
INC_GGI = ggimesa.h
 | 
			
		||||
INC_OSMESA = osmesa.h
 | 
			
		||||
INC_SVGA = svgamesa.h
 | 
			
		||||
INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
 | 
			
		||||
INC_GLUT = glut.h glutf90.h
 | 
			
		||||
 | 
			
		||||
if HAVE_FX
 | 
			
		||||
sel_inc_fx = $(INC_FX)
 | 
			
		||||
INC_FX = fxmesa.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_GGI
 | 
			
		||||
sel_inc_ggi = $(INC_GGI)
 | 
			
		||||
INC_GGI = ggimesa.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_OSMESA
 | 
			
		||||
sel_inc_osmesa = $(INC_OSMESA)
 | 
			
		||||
INC_OSMESA = osmesa.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_SVGA
 | 
			
		||||
sel_inc_svga = $(INC_SVGA)
 | 
			
		||||
INC_SVGA = svgamesa.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if HAVE_X11
 | 
			
		||||
sel_inc_x11 = $(INC_X11)
 | 
			
		||||
INC_X11 = glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
if NEED_GLUT
 | 
			
		||||
sel_inc_glut = $(INC_GLUT)
 | 
			
		||||
INC_GLUT = glut.h
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
 | 
			
		||||
	vms_x_fix.h wmesa.h \
 | 
			
		||||
	$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
 | 
			
		||||
EXTRA_DIST = fxmesa.h ggimesa.h osmesa.h svgamesa.h \
 | 
			
		||||
	glx.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
 | 
			
		||||
 | 
			
		||||
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
 | 
			
		||||
	$(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
 | 
			
		||||
	$(sel_inc_x11) $(sel_inc_glut)
 | 
			
		||||
include $(top_srcdir)/common_rules.make
 | 
			
		||||
	$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,79 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  5.0
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Permission is hereby granted, free of charge, to any person obtaining a
 | 
			
		||||
 * copy of this software and associated documentation files (the "Software"),
 | 
			
		||||
 * 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * DOS/DJGPP device driver v1.2 for Mesa 4.1
 | 
			
		||||
 *
 | 
			
		||||
 *  Copyright (C) 2002 - Borca Daniel
 | 
			
		||||
 *  Email : dborca@yahoo.com
 | 
			
		||||
 *  Web   : http://www.geocities.com/dborca
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef DMESA_H_included
 | 
			
		||||
#define DMESA_H_included
 | 
			
		||||
 | 
			
		||||
#define DMESA_MAJOR_VERSION 5
 | 
			
		||||
#define DMESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
typedef struct dmesa_context *DMesaContext;
 | 
			
		||||
typedef struct dmesa_visual *DMesaVisual;
 | 
			
		||||
typedef struct dmesa_buffer *DMesaBuffer;
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
DMesaVisual DMesaCreateVisual (GLint width, GLint height,
 | 
			
		||||
                               GLint colDepth,
 | 
			
		||||
                               GLboolean dbFlag,
 | 
			
		||||
                               GLint depthSize,
 | 
			
		||||
                               GLint stencilSize,
 | 
			
		||||
                               GLint accumSize);
 | 
			
		||||
 | 
			
		||||
void DMesaDestroyVisual (DMesaVisual v);
 | 
			
		||||
 | 
			
		||||
DMesaBuffer DMesaCreateBuffer (DMesaVisual visual,
 | 
			
		||||
                               GLint xpos, GLint ypos,
 | 
			
		||||
                               GLint width, GLint height);
 | 
			
		||||
 | 
			
		||||
void DMesaDestroyBuffer (DMesaBuffer b);
 | 
			
		||||
 | 
			
		||||
DMesaContext DMesaCreateContext (DMesaVisual visual, DMesaContext share);
 | 
			
		||||
 | 
			
		||||
void DMesaDestroyContext (DMesaContext c);
 | 
			
		||||
 | 
			
		||||
GLboolean DMesaViewport (DMesaBuffer b,
 | 
			
		||||
                         GLint xpos, GLint ypos,
 | 
			
		||||
                         GLint width, GLint height);
 | 
			
		||||
 | 
			
		||||
GLboolean DMesaMakeCurrent (DMesaContext c, DMesaBuffer b);
 | 
			
		||||
 | 
			
		||||
void DMesaSwapBuffers (DMesaBuffer b);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
/* $Id: fxmesa.h,v 1.4 2001/09/23 16:06:13 brianp Exp $ */
 | 
			
		||||
/* $Id: fxmesa.h,v 1.2 1999/11/24 18:44:53 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 * Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Copyright (C) 1995-1999  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
@@ -40,8 +40,8 @@ extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define FXMESA_MAJOR_VERSION 4
 | 
			
		||||
#define FXMESA_MINOR_VERSION 0
 | 
			
		||||
#define FXMESA_MAJOR_VERSION 3
 | 
			
		||||
#define FXMESA_MINOR_VERSION 3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,10 @@
 | 
			
		||||
/* $Id: ggimesa.h,v 1.4 2002/06/10 15:16:44 brianp Exp $ */
 | 
			
		||||
/* $Id: ggimesa.h,v 1.3 2000/02/09 19:03:28 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library GGI bindings (GGIGL [giggle])
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 * Copyright (C) 1998  Uwe Maurer
 | 
			
		||||
 * Copyrigth (C) 2001 Filip Spacek
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
@@ -26,59 +25,34 @@
 | 
			
		||||
#ifndef GGIMESA_H
 | 
			
		||||
#define GGIMESA_H
 | 
			
		||||
 | 
			
		||||
#define GGIMESA_MAJOR_VERSION 4
 | 
			
		||||
#define GGIMESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
#define GGIMESA_MAJOR_VERSION 3
 | 
			
		||||
#define GGIMESA_MINOR_VERSION 3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <ggi/ggi.h>
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
  
 | 
			
		||||
typedef struct ggi_mesa_context *ggi_mesa_context_t;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize Mesa GGI extension
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaInit(void);
 | 
			
		||||
/*
 | 
			
		||||
 * Clean up Mesa GGI exension
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaExit(void);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Attach Mesa GGI extension to the visual 'vis'
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaAttach(ggi_visual_t vis);
 | 
			
		||||
/*
 | 
			
		||||
 * Detach Mesa GGI extension from the visual 'vis'
 | 
			
		||||
 */
 | 
			
		||||
int ggiMesaDetach(ggi_visual_t vis);
 | 
			
		||||
typedef struct ggi_mesa_context *GGIMesaContext;
 | 
			
		||||
 | 
			
		||||
int ggiMesaExtendVisual(ggi_visual_t vis, GLboolean alpha_flag,
 | 
			
		||||
			GLboolean stereo_flag, GLint depth_size,
 | 
			
		||||
			GLint stencil_size, GLint accum_red_size,
 | 
			
		||||
			GLint accum_green_size, GLint accum_blue_size,
 | 
			
		||||
			GLint accum_alpha_size, GLint num_samples);
 | 
			
		||||
#include <ggi/ggi.h>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create a new context capable of displaying on the visual vis.
 | 
			
		||||
 */
 | 
			
		||||
ggi_mesa_context_t ggiMesaCreateContext(ggi_visual_t vis);
 | 
			
		||||
/*
 | 
			
		||||
 * Destroy the context 'ctx'
 | 
			
		||||
 */
 | 
			
		||||
void ggiMesaDestroyContext(ggi_mesa_context_t ctx);
 | 
			
		||||
extern GGIMesaContext GGIMesaCreateContext(void);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Make context 'ctx' the current context and bind it to visual 'vis'.
 | 
			
		||||
 * Note that the context must have been created with respect to that visual.
 | 
			
		||||
 */
 | 
			
		||||
void ggiMesaMakeCurrent(ggi_mesa_context_t ctx, ggi_visual_t vis);
 | 
			
		||||
extern void GGIMesaDestroyContext(GGIMesaContext ctx);
 | 
			
		||||
 | 
			
		||||
void ggiMesaSwapBuffers(void);
 | 
			
		||||
extern void GGIMesaMakeCurrent(GGIMesaContext ctx);
 | 
			
		||||
 | 
			
		||||
extern GGIMesaContext GGIMesaGetCurrentContext(void);
 | 
			
		||||
 | 
			
		||||
extern void GGIMesaSwapBuffers(void);
 | 
			
		||||
 | 
			
		||||
extern int GGIMesaSetVisual(GGIMesaContext ctx, ggi_visual_t vis,
 | 
			
		||||
			    GLboolean rgb_flag, GLboolean db_flag);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										870
									
								
								include/GL/gl.h
									
									
									
									
									
								
							
							
						
						
									
										870
									
								
								include/GL/gl.h
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										2980
									
								
								include/GL/glext.h
									
									
									
									
									
								
							
							
						
						
									
										2980
									
								
								include/GL/glext.h
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										819
									
								
								include/GL/glu.h
									
									
									
									
									
								
							
							
						
						
									
										819
									
								
								include/GL/glu.h
									
									
									
									
									
								
							@@ -1,335 +1,534 @@
 | 
			
		||||
/*
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: This software was created using the
 | 
			
		||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
 | 
			
		||||
** not been independently verified as being compliant with the OpenGL(R)
 | 
			
		||||
** version 1.2.1 Specification.
 | 
			
		||||
*/
 | 
			
		||||
/* $Id: glu.h,v 1.22.4.1 2000/10/26 15:32:46 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
 * License as published by the Free Software Foundation; either
 | 
			
		||||
 * version 2 of the License, or (at your option) any later version.
 | 
			
		||||
 *
 | 
			
		||||
 * This library is distributed in the hope that it will be useful,
 | 
			
		||||
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 | 
			
		||||
 * Library General Public License for more details.
 | 
			
		||||
 *
 | 
			
		||||
 * You should have received a copy of the GNU Library General Public
 | 
			
		||||
 * License along with this library; if not, write to the Free
 | 
			
		||||
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef GLU_H
 | 
			
		||||
#define GLU_H
 | 
			
		||||
 | 
			
		||||
#ifndef __glu_h__
 | 
			
		||||
#define __glu_h__
 | 
			
		||||
 | 
			
		||||
#if defined(USE_MGL_NAMESPACE)
 | 
			
		||||
#include "glu_mangle.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
 | 
			
		||||
#ifndef GLAPIENTRY
 | 
			
		||||
#define GLAPIENTRY
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLAPI
 | 
			
		||||
#define GLAPI
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
/* Extensions */
 | 
			
		||||
#define GLU_EXT_object_space_tess          1
 | 
			
		||||
#define GLU_EXT_nurbs_tessellator          1
 | 
			
		||||
 | 
			
		||||
/* Boolean */
 | 
			
		||||
#define GLU_FALSE                          0
 | 
			
		||||
#define GLU_TRUE                           1
 | 
			
		||||
 | 
			
		||||
/* Version */
 | 
			
		||||
#define GLU_VERSION_1_1                    1
 | 
			
		||||
#define GLU_VERSION_1_2                    1
 | 
			
		||||
#define GLU_VERSION_1_3                    1
 | 
			
		||||
 | 
			
		||||
/* StringName */
 | 
			
		||||
#define GLU_VERSION                        100800
 | 
			
		||||
#define GLU_EXTENSIONS                     100801
 | 
			
		||||
 | 
			
		||||
/* ErrorCode */
 | 
			
		||||
#define GLU_INVALID_ENUM                   100900
 | 
			
		||||
#define GLU_INVALID_VALUE                  100901
 | 
			
		||||
#define GLU_OUT_OF_MEMORY                  100902
 | 
			
		||||
#define GLU_INVALID_OPERATION              100904
 | 
			
		||||
 | 
			
		||||
/* NurbsDisplay */
 | 
			
		||||
/*      GLU_FILL */
 | 
			
		||||
#define GLU_OUTLINE_POLYGON                100240
 | 
			
		||||
#define GLU_OUTLINE_PATCH                  100241
 | 
			
		||||
 | 
			
		||||
/* NurbsCallback */
 | 
			
		||||
#define GLU_NURBS_ERROR                    100103
 | 
			
		||||
#define GLU_ERROR                          100103
 | 
			
		||||
#define GLU_NURBS_BEGIN                    100164
 | 
			
		||||
#define GLU_NURBS_BEGIN_EXT                100164
 | 
			
		||||
#define GLU_NURBS_VERTEX                   100165
 | 
			
		||||
#define GLU_NURBS_VERTEX_EXT               100165
 | 
			
		||||
#define GLU_NURBS_NORMAL                   100166
 | 
			
		||||
#define GLU_NURBS_NORMAL_EXT               100166
 | 
			
		||||
#define GLU_NURBS_COLOR                    100167
 | 
			
		||||
#define GLU_NURBS_COLOR_EXT                100167
 | 
			
		||||
#define GLU_NURBS_TEXTURE_COORD            100168
 | 
			
		||||
#define GLU_NURBS_TEX_COORD_EXT            100168
 | 
			
		||||
#define GLU_NURBS_END                      100169
 | 
			
		||||
#define GLU_NURBS_END_EXT                  100169
 | 
			
		||||
#define GLU_NURBS_BEGIN_DATA               100170
 | 
			
		||||
#define GLU_NURBS_BEGIN_DATA_EXT           100170
 | 
			
		||||
#define GLU_NURBS_VERTEX_DATA              100171
 | 
			
		||||
#define GLU_NURBS_VERTEX_DATA_EXT          100171
 | 
			
		||||
#define GLU_NURBS_NORMAL_DATA              100172
 | 
			
		||||
#define GLU_NURBS_NORMAL_DATA_EXT          100172
 | 
			
		||||
#define GLU_NURBS_COLOR_DATA               100173
 | 
			
		||||
#define GLU_NURBS_COLOR_DATA_EXT           100173
 | 
			
		||||
#define GLU_NURBS_TEXTURE_COORD_DATA       100174
 | 
			
		||||
#define GLU_NURBS_TEX_COORD_DATA_EXT       100174
 | 
			
		||||
#define GLU_NURBS_END_DATA                 100175
 | 
			
		||||
#define GLU_NURBS_END_DATA_EXT             100175
 | 
			
		||||
 | 
			
		||||
/* NurbsError */
 | 
			
		||||
#define GLU_NURBS_ERROR1                   100251
 | 
			
		||||
#define GLU_NURBS_ERROR2                   100252
 | 
			
		||||
#define GLU_NURBS_ERROR3                   100253
 | 
			
		||||
#define GLU_NURBS_ERROR4                   100254
 | 
			
		||||
#define GLU_NURBS_ERROR5                   100255
 | 
			
		||||
#define GLU_NURBS_ERROR6                   100256
 | 
			
		||||
#define GLU_NURBS_ERROR7                   100257
 | 
			
		||||
#define GLU_NURBS_ERROR8                   100258
 | 
			
		||||
#define GLU_NURBS_ERROR9                   100259
 | 
			
		||||
#define GLU_NURBS_ERROR10                  100260
 | 
			
		||||
#define GLU_NURBS_ERROR11                  100261
 | 
			
		||||
#define GLU_NURBS_ERROR12                  100262
 | 
			
		||||
#define GLU_NURBS_ERROR13                  100263
 | 
			
		||||
#define GLU_NURBS_ERROR14                  100264
 | 
			
		||||
#define GLU_NURBS_ERROR15                  100265
 | 
			
		||||
#define GLU_NURBS_ERROR16                  100266
 | 
			
		||||
#define GLU_NURBS_ERROR17                  100267
 | 
			
		||||
#define GLU_NURBS_ERROR18                  100268
 | 
			
		||||
#define GLU_NURBS_ERROR19                  100269
 | 
			
		||||
#define GLU_NURBS_ERROR20                  100270
 | 
			
		||||
#define GLU_NURBS_ERROR21                  100271
 | 
			
		||||
#define GLU_NURBS_ERROR22                  100272
 | 
			
		||||
#define GLU_NURBS_ERROR23                  100273
 | 
			
		||||
#define GLU_NURBS_ERROR24                  100274
 | 
			
		||||
#define GLU_NURBS_ERROR25                  100275
 | 
			
		||||
#define GLU_NURBS_ERROR26                  100276
 | 
			
		||||
#define GLU_NURBS_ERROR27                  100277
 | 
			
		||||
#define GLU_NURBS_ERROR28                  100278
 | 
			
		||||
#define GLU_NURBS_ERROR29                  100279
 | 
			
		||||
#define GLU_NURBS_ERROR30                  100280
 | 
			
		||||
#define GLU_NURBS_ERROR31                  100281
 | 
			
		||||
#define GLU_NURBS_ERROR32                  100282
 | 
			
		||||
#define GLU_NURBS_ERROR33                  100283
 | 
			
		||||
#define GLU_NURBS_ERROR34                  100284
 | 
			
		||||
#define GLU_NURBS_ERROR35                  100285
 | 
			
		||||
#define GLU_NURBS_ERROR36                  100286
 | 
			
		||||
#define GLU_NURBS_ERROR37                  100287
 | 
			
		||||
 | 
			
		||||
/* NurbsProperty */
 | 
			
		||||
#define GLU_AUTO_LOAD_MATRIX               100200
 | 
			
		||||
#define GLU_CULLING                        100201
 | 
			
		||||
#define GLU_SAMPLING_TOLERANCE             100203
 | 
			
		||||
#define GLU_DISPLAY_MODE                   100204
 | 
			
		||||
#define GLU_PARAMETRIC_TOLERANCE           100202
 | 
			
		||||
#define GLU_SAMPLING_METHOD                100205
 | 
			
		||||
#define GLU_U_STEP                         100206
 | 
			
		||||
#define GLU_V_STEP                         100207
 | 
			
		||||
#define GLU_NURBS_MODE                     100160
 | 
			
		||||
#define GLU_NURBS_MODE_EXT                 100160
 | 
			
		||||
#define GLU_NURBS_TESSELLATOR              100161
 | 
			
		||||
#define GLU_NURBS_TESSELLATOR_EXT          100161
 | 
			
		||||
#define GLU_NURBS_RENDERER                 100162
 | 
			
		||||
#define GLU_NURBS_RENDERER_EXT             100162
 | 
			
		||||
 | 
			
		||||
/* NurbsSampling */
 | 
			
		||||
#define GLU_OBJECT_PARAMETRIC_ERROR        100208
 | 
			
		||||
#define GLU_OBJECT_PARAMETRIC_ERROR_EXT    100208
 | 
			
		||||
#define GLU_OBJECT_PATH_LENGTH             100209
 | 
			
		||||
#define GLU_OBJECT_PATH_LENGTH_EXT         100209
 | 
			
		||||
#define GLU_PATH_LENGTH                    100215
 | 
			
		||||
#define GLU_PARAMETRIC_ERROR               100216
 | 
			
		||||
#define GLU_DOMAIN_DISTANCE                100217
 | 
			
		||||
 | 
			
		||||
/* NurbsTrim */
 | 
			
		||||
#define GLU_MAP1_TRIM_2                    100210
 | 
			
		||||
#define GLU_MAP1_TRIM_3                    100211
 | 
			
		||||
 | 
			
		||||
/* QuadricDrawStyle */
 | 
			
		||||
#define GLU_POINT                          100010
 | 
			
		||||
#define GLU_LINE                           100011
 | 
			
		||||
#define GLU_FILL                           100012
 | 
			
		||||
#define GLU_SILHOUETTE                     100013
 | 
			
		||||
 | 
			
		||||
/* QuadricCallback */
 | 
			
		||||
/*      GLU_ERROR */
 | 
			
		||||
 | 
			
		||||
/* QuadricNormal */
 | 
			
		||||
#define GLU_SMOOTH                         100000
 | 
			
		||||
#define GLU_FLAT                           100001
 | 
			
		||||
#define GLU_NONE                           100002
 | 
			
		||||
 | 
			
		||||
/* QuadricOrientation */
 | 
			
		||||
#define GLU_OUTSIDE                        100020
 | 
			
		||||
#define GLU_INSIDE                         100021
 | 
			
		||||
 | 
			
		||||
/* TessCallback */
 | 
			
		||||
#define GLU_TESS_BEGIN                     100100
 | 
			
		||||
#define GLU_BEGIN                          100100
 | 
			
		||||
#define GLU_TESS_VERTEX                    100101
 | 
			
		||||
#define GLU_VERTEX                         100101
 | 
			
		||||
#define GLU_TESS_END                       100102
 | 
			
		||||
#define GLU_END                            100102
 | 
			
		||||
#define GLU_TESS_ERROR                     100103
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG                 100104
 | 
			
		||||
#define GLU_EDGE_FLAG                      100104
 | 
			
		||||
#define GLU_TESS_COMBINE                   100105
 | 
			
		||||
#define GLU_TESS_BEGIN_DATA                100106
 | 
			
		||||
#define GLU_TESS_VERTEX_DATA               100107
 | 
			
		||||
#define GLU_TESS_END_DATA                  100108
 | 
			
		||||
#define GLU_TESS_ERROR_DATA                100109
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG_DATA            100110
 | 
			
		||||
#define GLU_TESS_COMBINE_DATA              100111
 | 
			
		||||
 | 
			
		||||
/* TessContour */
 | 
			
		||||
#define GLU_CW                             100120
 | 
			
		||||
#define GLU_CCW                            100121
 | 
			
		||||
#define GLU_INTERIOR                       100122
 | 
			
		||||
#define GLU_EXTERIOR                       100123
 | 
			
		||||
#define GLU_UNKNOWN                        100124
 | 
			
		||||
 | 
			
		||||
/* TessProperty */
 | 
			
		||||
#define GLU_TESS_WINDING_RULE              100140
 | 
			
		||||
#define GLU_TESS_BOUNDARY_ONLY             100141
 | 
			
		||||
#define GLU_TESS_TOLERANCE                 100142
 | 
			
		||||
 | 
			
		||||
/* TessError */
 | 
			
		||||
#define GLU_TESS_ERROR1                    100151
 | 
			
		||||
#define GLU_TESS_ERROR2                    100152
 | 
			
		||||
#define GLU_TESS_ERROR3                    100153
 | 
			
		||||
#define GLU_TESS_ERROR4                    100154
 | 
			
		||||
#define GLU_TESS_ERROR5                    100155
 | 
			
		||||
#define GLU_TESS_ERROR6                    100156
 | 
			
		||||
#define GLU_TESS_ERROR7                    100157
 | 
			
		||||
#define GLU_TESS_ERROR8                    100158
 | 
			
		||||
#define GLU_TESS_MISSING_BEGIN_POLYGON     100151
 | 
			
		||||
#define GLU_TESS_MISSING_BEGIN_CONTOUR     100152
 | 
			
		||||
#define GLU_TESS_MISSING_END_POLYGON       100153
 | 
			
		||||
#define GLU_TESS_MISSING_END_CONTOUR       100154
 | 
			
		||||
#define GLU_TESS_COORD_TOO_LARGE           100155
 | 
			
		||||
#define GLU_TESS_NEED_COMBINE_CALLBACK     100156
 | 
			
		||||
 | 
			
		||||
/* TessWinding */
 | 
			
		||||
#define GLU_TESS_WINDING_ODD               100130
 | 
			
		||||
#define GLU_TESS_WINDING_NONZERO           100131
 | 
			
		||||
#define GLU_TESS_WINDING_POSITIVE          100132
 | 
			
		||||
#define GLU_TESS_WINDING_NEGATIVE          100133
 | 
			
		||||
#define GLU_TESS_WINDING_ABS_GEQ_TWO       100134
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
class GLUnurbs;
 | 
			
		||||
class GLUquadric;
 | 
			
		||||
class GLUtesselator;
 | 
			
		||||
	/* to facilitate clean DLL building ... */
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
 | 
			
		||||
#	if defined(_MSC_VER) && defined(BUILD_GLU32) /* tag specify we're building mesa as a DLL */
 | 
			
		||||
#		define GLUAPI __declspec(dllexport)
 | 
			
		||||
#	elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
 | 
			
		||||
#		define GLUAPI __declspec(dllimport)
 | 
			
		||||
#	else /* for use with static link lib build of Win32 edition only */
 | 
			
		||||
#		define GLUAPI extern
 | 
			
		||||
#	endif /* _STATIC_MESA support */
 | 
			
		||||
#	define GLCALLBACK __stdcall
 | 
			
		||||
#	define GLCALLBACKP __stdcall *
 | 
			
		||||
#else
 | 
			
		||||
typedef struct GLUnurbs GLUnurbs;
 | 
			
		||||
typedef struct GLUquadric GLUquadric;
 | 
			
		||||
typedef struct GLUtesselator GLUtesselator;
 | 
			
		||||
#	define GLUAPI extern
 | 
			
		||||
#	define GLCALLBACK
 | 
			
		||||
#	define GLCALLBACKP *
 | 
			
		||||
#endif /* WIN32 / CYGWIN bracket */
 | 
			
		||||
 | 
			
		||||
/* compatability guard so we don't need to change client code */
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
 | 
			
		||||
#	define CALLBACK GLCALLBACK
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef GLUnurbs GLUnurbsObj;
 | 
			
		||||
typedef GLUquadric GLUquadricObj;
 | 
			
		||||
typedef GLUtesselator GLUtesselatorObj;
 | 
			
		||||
typedef GLUtesselator GLUtriangulatorObj;
 | 
			
		||||
 | 
			
		||||
#define GLU_TESS_MAX_COORD 1.0e150
 | 
			
		||||
#ifdef macintosh
 | 
			
		||||
	#pragma enumsalwaysint on
 | 
			
		||||
	#if PRAGMA_IMPORT_SUPPORTED
 | 
			
		||||
	#pragma import on
 | 
			
		||||
	#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* Internal convenience typedefs */
 | 
			
		||||
typedef void (GLAPIENTRY *_GLUfuncptr)();
 | 
			
		||||
#ifndef GLUAPI
 | 
			
		||||
#define GLUAPI
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLAPIENTRY
 | 
			
		||||
#define GLAPIENTRY
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLCALLBACK
 | 
			
		||||
#define GLCALLBACK
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define GLU_VERSION_1_1			1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define GLU_TRUE			1
 | 
			
		||||
#define GLU_FALSE			0
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Normal vectors */
 | 
			
		||||
#define GLU_SMOOTH			100000
 | 
			
		||||
#define GLU_FLAT			100001
 | 
			
		||||
#define GLU_NONE			100002
 | 
			
		||||
 | 
			
		||||
/* Quadric draw styles */
 | 
			
		||||
#define GLU_POINT			100010
 | 
			
		||||
#define GLU_LINE			100011
 | 
			
		||||
#define GLU_FILL			100012
 | 
			
		||||
#define GLU_SILHOUETTE			100013
 | 
			
		||||
 | 
			
		||||
/* Quadric orientation */
 | 
			
		||||
#define GLU_OUTSIDE			100020
 | 
			
		||||
#define GLU_INSIDE			100021
 | 
			
		||||
 | 
			
		||||
/* Tessellator */
 | 
			
		||||
#define GLU_TESS_BEGIN			100100
 | 
			
		||||
#define GLU_TESS_VERTEX			100101
 | 
			
		||||
#define GLU_TESS_END			100102
 | 
			
		||||
#define GLU_TESS_ERROR			100103
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG		100104
 | 
			
		||||
#define GLU_TESS_COMBINE		100105
 | 
			
		||||
 | 
			
		||||
#define GLU_TESS_BEGIN_DATA		100106
 | 
			
		||||
#define GLU_TESS_VERTEX_DATA		100107
 | 
			
		||||
#define GLU_TESS_END_DATA		100108
 | 
			
		||||
#define GLU_TESS_ERROR_DATA		100109
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG_DATA		100110
 | 
			
		||||
#define GLU_TESS_COMBINE_DATA		100111
 | 
			
		||||
 | 
			
		||||
/* Winding rules */
 | 
			
		||||
#define GLU_TESS_WINDING_ODD		100130
 | 
			
		||||
#define GLU_TESS_WINDING_NONZERO	100131
 | 
			
		||||
#define GLU_TESS_WINDING_POSITIVE	100132
 | 
			
		||||
#define GLU_TESS_WINDING_NEGATIVE	100133
 | 
			
		||||
#define GLU_TESS_WINDING_ABS_GEQ_TWO	100134
 | 
			
		||||
 | 
			
		||||
/* Tessellation properties */
 | 
			
		||||
#define GLU_TESS_WINDING_RULE		100140
 | 
			
		||||
#define GLU_TESS_BOUNDARY_ONLY		100141
 | 
			
		||||
#define GLU_TESS_TOLERANCE		100142
 | 
			
		||||
 | 
			
		||||
/* Tessellation errors */
 | 
			
		||||
#define GLU_TESS_ERROR1			100151  /* Missing gluBeginPolygon */
 | 
			
		||||
#define GLU_TESS_ERROR2			100152  /* Missing gluBeginContour */
 | 
			
		||||
#define GLU_TESS_ERROR3			100153  /* Missing gluEndPolygon */
 | 
			
		||||
#define GLU_TESS_ERROR4			100154  /* Missing gluEndContour */
 | 
			
		||||
#define GLU_TESS_ERROR5			100155  /* */
 | 
			
		||||
#define GLU_TESS_ERROR6			100156  /* */
 | 
			
		||||
#define GLU_TESS_ERROR7			100157  /* */
 | 
			
		||||
#define GLU_TESS_ERROR8			100158  /* */
 | 
			
		||||
 | 
			
		||||
/* NURBS */
 | 
			
		||||
#define GLU_AUTO_LOAD_MATRIX		100200
 | 
			
		||||
#define GLU_CULLING			100201
 | 
			
		||||
#define GLU_PARAMETRIC_TOLERANCE	100202
 | 
			
		||||
#define GLU_SAMPLING_TOLERANCE		100203
 | 
			
		||||
#define GLU_DISPLAY_MODE		100204
 | 
			
		||||
#define GLU_SAMPLING_METHOD		100205
 | 
			
		||||
#define GLU_U_STEP			100206
 | 
			
		||||
#define GLU_V_STEP			100207
 | 
			
		||||
 | 
			
		||||
#define GLU_PATH_LENGTH			100215
 | 
			
		||||
#define GLU_PARAMETRIC_ERROR		100216
 | 
			
		||||
#define GLU_DOMAIN_DISTANCE		100217
 | 
			
		||||
 | 
			
		||||
#define GLU_MAP1_TRIM_2			100210
 | 
			
		||||
#define GLU_MAP1_TRIM_3			100211
 | 
			
		||||
 | 
			
		||||
#define GLU_OUTLINE_POLYGON		100240
 | 
			
		||||
#define GLU_OUTLINE_PATCH		100241
 | 
			
		||||
 | 
			
		||||
#define GLU_NURBS_ERROR1	100251   /* spline order un-supported */
 | 
			
		||||
#define GLU_NURBS_ERROR2	100252   /* too few knots */
 | 
			
		||||
#define GLU_NURBS_ERROR3	100253   /* valid knot range is empty */
 | 
			
		||||
#define GLU_NURBS_ERROR4	100254   /* decreasing knot sequence */
 | 
			
		||||
#define GLU_NURBS_ERROR5	100255   /* knot multiplicity > spline order */
 | 
			
		||||
#define GLU_NURBS_ERROR6	100256   /* endcurve() must follow bgncurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR7	100257   /* bgncurve() must precede endcurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR8	100258   /* ctrlarray or knot vector is NULL */
 | 
			
		||||
#define GLU_NURBS_ERROR9 	100259   /* can't draw pwlcurves */
 | 
			
		||||
#define GLU_NURBS_ERROR10	100260   /* missing gluNurbsCurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR11	100261   /* missing gluNurbsSurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR12	100262   /* endtrim() must precede endsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR13	100263   /* bgnsurface() must precede endsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR14	100264   /* curve of improper type passed as trim curve */
 | 
			
		||||
#define GLU_NURBS_ERROR15	100265   /* bgnsurface() must precede bgntrim() */
 | 
			
		||||
#define GLU_NURBS_ERROR16	100266   /* endtrim() must follow bgntrim() */
 | 
			
		||||
#define GLU_NURBS_ERROR17	100267   /* bgntrim() must precede endtrim()*/
 | 
			
		||||
#define GLU_NURBS_ERROR18	100268   /* invalid or missing trim curve*/
 | 
			
		||||
#define GLU_NURBS_ERROR19	100269   /* bgntrim() must precede pwlcurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR20	100270   /* pwlcurve referenced twice*/
 | 
			
		||||
#define GLU_NURBS_ERROR21	100271   /* pwlcurve and nurbscurve mixed */
 | 
			
		||||
#define GLU_NURBS_ERROR22	100272   /* improper usage of trim data type */
 | 
			
		||||
#define GLU_NURBS_ERROR23	100273   /* nurbscurve referenced twice */
 | 
			
		||||
#define GLU_NURBS_ERROR24	100274   /* nurbscurve and pwlcurve mixed */
 | 
			
		||||
#define GLU_NURBS_ERROR25	100275   /* nurbssurface referenced twice */
 | 
			
		||||
#define GLU_NURBS_ERROR26	100276   /* invalid property */
 | 
			
		||||
#define GLU_NURBS_ERROR27	100277   /* endsurface() must follow bgnsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR28	100278   /* intersecting or misoriented trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR29	100279   /* intersecting trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR30	100280   /* UNUSED */
 | 
			
		||||
#define GLU_NURBS_ERROR31	100281   /* unconnected trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR32	100282   /* unknown knot error */
 | 
			
		||||
#define GLU_NURBS_ERROR33	100283   /* negative vertex count encountered */
 | 
			
		||||
#define GLU_NURBS_ERROR34	100284   /* negative byte-stride */
 | 
			
		||||
#define GLU_NURBS_ERROR35	100285   /* unknown type descriptor */
 | 
			
		||||
#define GLU_NURBS_ERROR36	100286   /* null control point reference */
 | 
			
		||||
#define GLU_NURBS_ERROR37	100287   /* duplicate point on pwlcurve */
 | 
			
		||||
 | 
			
		||||
/* GLU 1.3 and later */
 | 
			
		||||
#define GLU_NURBS_MODE		100160
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Errors */
 | 
			
		||||
#define GLU_INVALID_ENUM		100900
 | 
			
		||||
#define GLU_INVALID_VALUE		100901
 | 
			
		||||
#define GLU_OUT_OF_MEMORY		100902
 | 
			
		||||
#define GLU_INCOMPATIBLE_GL_VERSION	100903
 | 
			
		||||
 | 
			
		||||
/* GLU 1.1 and later */
 | 
			
		||||
#define GLU_VERSION			100800
 | 
			
		||||
#define GLU_EXTENSIONS			100801
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*** GLU 1.0 tessellation  ***/
 | 
			
		||||
 | 
			
		||||
/* Contour types */
 | 
			
		||||
#define GLU_CW				100120
 | 
			
		||||
#define GLU_CCW				100121
 | 
			
		||||
#define GLU_INTERIOR			100122
 | 
			
		||||
#define GLU_EXTERIOR			100123
 | 
			
		||||
#define GLU_UNKNOWN			100124
 | 
			
		||||
 | 
			
		||||
/* Tessellator */
 | 
			
		||||
#define GLU_BEGIN			GLU_TESS_BEGIN
 | 
			
		||||
#define GLU_VERTEX			GLU_TESS_VERTEX
 | 
			
		||||
#define GLU_END				GLU_TESS_END
 | 
			
		||||
#define GLU_ERROR			GLU_TESS_ERROR
 | 
			
		||||
#define GLU_EDGE_FLAG			GLU_TESS_EDGE_FLAG
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__)
 | 
			
		||||
    /* The BeOS does something funky and makes these typedefs in one
 | 
			
		||||
     * of its system headers.
 | 
			
		||||
     */
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
#if defined GLU_VERSION_1_2
 | 
			
		||||
    typedef struct GLUquadric GLUquadricObj;
 | 
			
		||||
    typedef struct GLUnurbs GLUnurbsObj;
 | 
			
		||||
    /* FIXME: We need to implement the other 1.3 typedefs - GH */
 | 
			
		||||
    typedef struct GLUtesselator GLUtesselator;
 | 
			
		||||
    typedef GLUtesselator GLUtriangulatorObj;
 | 
			
		||||
#else
 | 
			
		||||
    /* GLU 1.1 and older */
 | 
			
		||||
    typedef struct GLUquadric GLUquadricObj;
 | 
			
		||||
    typedef struct GLUtriangulatorObj GLUtriangulatorObj;
 | 
			
		||||
    typedef struct GLUnurbs GLUnurbsObj;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
 | 
			
		||||
#pragma export on
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Miscellaneous functions
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
 | 
			
		||||
                                  GLdouble centerx, GLdouble centery,
 | 
			
		||||
                                  GLdouble centerz,
 | 
			
		||||
                                  GLdouble upx, GLdouble upy, GLdouble upz );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluOrtho2D( GLdouble left, GLdouble right,
 | 
			
		||||
                                   GLdouble bottom, GLdouble top );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPerspective( GLdouble fovy, GLdouble aspect,
 | 
			
		||||
                                       GLdouble zNear, GLdouble zFar );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPickMatrix( GLdouble x, GLdouble y,
 | 
			
		||||
                                      GLdouble width, GLdouble height,
 | 
			
		||||
                                      const GLint viewport[4] );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluProject( GLdouble objx, GLdouble objy, GLdouble objz,
 | 
			
		||||
                                    const GLdouble modelMatrix[16],
 | 
			
		||||
                                    const GLdouble projMatrix[16],
 | 
			
		||||
                                    const GLint viewport[4],
 | 
			
		||||
                                    GLdouble *winx, GLdouble *winy,
 | 
			
		||||
                                    GLdouble *winz );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
 | 
			
		||||
                                      GLdouble winz,
 | 
			
		||||
                                      const GLdouble modelMatrix[16],
 | 
			
		||||
                                      const GLdouble projMatrix[16],
 | 
			
		||||
                                      const GLint viewport[4],
 | 
			
		||||
                                      GLdouble *objx, GLdouble *objy,
 | 
			
		||||
                                      GLdouble *objz );
 | 
			
		||||
 | 
			
		||||
GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Mipmapping and image scaling
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluScaleImage( GLenum format,
 | 
			
		||||
                                       GLsizei widthin, GLsizei heightin,
 | 
			
		||||
                                       GLenum typein, const void *datain,
 | 
			
		||||
                                       GLsizei widthout, GLsizei heightout,
 | 
			
		||||
                                       GLenum typeout, void *dataout );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluBuild1DMipmaps( GLenum target, GLint components,
 | 
			
		||||
                                           GLsizei width, GLenum format,
 | 
			
		||||
                                           GLenum type, const void *data );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluBuild2DMipmaps( GLenum target, GLint components,
 | 
			
		||||
                                           GLsizei width, GLsizei height,
 | 
			
		||||
                                           GLenum format,
 | 
			
		||||
                                           GLenum type, const void *data );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Quadrics
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLUquadricObj* GLAPIENTRY gluNewQuadric( void );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteQuadric( GLUquadricObj *state );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricDrawStyle( GLUquadricObj *quadObject,
 | 
			
		||||
                                            GLenum drawStyle );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricOrientation( GLUquadricObj *quadObject,
 | 
			
		||||
                                              GLenum orientation );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricNormals( GLUquadricObj *quadObject,
 | 
			
		||||
                                          GLenum normals );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricTexture( GLUquadricObj *quadObject,
 | 
			
		||||
                                          GLboolean textureCoords );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
 | 
			
		||||
                                           GLenum which,
 | 
			
		||||
                                           void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluCylinder( GLUquadricObj *qobj,
 | 
			
		||||
                                    GLdouble baseRadius,
 | 
			
		||||
                                    GLdouble topRadius,
 | 
			
		||||
                                    GLdouble height,
 | 
			
		||||
                                    GLint slices, GLint stacks );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluSphere( GLUquadricObj *qobj,
 | 
			
		||||
                                  GLdouble radius,
 | 
			
		||||
                                  GLint slices, GLint stacks );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDisk( GLUquadricObj *qobj,
 | 
			
		||||
                                GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
                                GLint slices, GLint loops );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPartialDisk( GLUquadricObj *qobj,
 | 
			
		||||
                                       GLdouble innerRadius,
 | 
			
		||||
                                       GLdouble outerRadius, GLint slices,
 | 
			
		||||
                                       GLint loops, GLdouble startAngle,
 | 
			
		||||
                                       GLdouble sweepAngle );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Nurbs
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLUnurbsObj* GLAPIENTRY gluNewNurbsRenderer( void );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteNurbsRenderer( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluLoadSamplingMatrices( GLUnurbsObj *nobj,
 | 
			
		||||
                                                const GLfloat modelMatrix[16],
 | 
			
		||||
                                                const GLfloat projMatrix[16],
 | 
			
		||||
                                                const GLint viewport[4] );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsProperty( GLUnurbsObj *nobj, GLenum property,
 | 
			
		||||
                                         GLfloat value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluGetNurbsProperty( GLUnurbsObj *nobj, GLenum property,
 | 
			
		||||
                                            GLfloat *value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginCurve( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndCurve( GLUnurbsObj * nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsCurve( GLUnurbsObj *nobj, GLint nknots,
 | 
			
		||||
                                      GLfloat *knot, GLint stride,
 | 
			
		||||
                                      GLfloat *ctlarray, GLint order,
 | 
			
		||||
                                      GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginSurface( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndSurface( GLUnurbsObj * nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
 | 
			
		||||
                                        GLint sknot_count, GLfloat *sknot,
 | 
			
		||||
                                        GLint tknot_count, GLfloat *tknot,
 | 
			
		||||
                                        GLint s_stride, GLint t_stride,
 | 
			
		||||
                                        GLfloat *ctlarray,
 | 
			
		||||
                                        GLint sorder, GLint torder,
 | 
			
		||||
                                        GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginTrim( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndTrim( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPwlCurve( GLUnurbsObj *nobj, GLint count,
 | 
			
		||||
                                    GLfloat *array,
 | 
			
		||||
                                    GLint stride, GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsCallback( GLUnurbsObj *nobj, GLenum which,
 | 
			
		||||
                                         void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * Polygon tessellation
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef GLU_VERSION_1_2
 | 
			
		||||
 | 
			
		||||
GLUAPI GLUtesselator* GLAPIENTRY gluNewTess( void );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteTess( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessBeginPolygon( GLUtesselator *tobj,
 | 
			
		||||
					    void *polygon_data );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessBeginContour( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessVertex( GLUtesselator *tobj, GLdouble coords[3],
 | 
			
		||||
				      void *vertex_data );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessEndContour( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessEndPolygon( GLUtesselator *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessProperty( GLUtesselator *tobj, GLenum which,
 | 
			
		||||
					GLdouble value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessNormal( GLUtesselator *tobj, GLdouble x,
 | 
			
		||||
				      GLdouble y, GLdouble z );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessCallback( GLUtesselator *tobj, GLenum which,
 | 
			
		||||
					void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluGetTessProperty( GLUtesselator *tobj, GLenum which,
 | 
			
		||||
					   GLdouble *value );
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
GLUAPI GLUtriangulatorObj* GLAPIENTRY gluNewTess( void );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessCallback( GLUtriangulatorObj *tobj, GLenum which,
 | 
			
		||||
                                        void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteTess( GLUtriangulatorObj *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginPolygon( GLUtriangulatorObj *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndPolygon( GLUtriangulatorObj *tobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNextContour( GLUtriangulatorObj *tobj, GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluTessVertex( GLUtriangulatorObj *tobj, GLdouble v[3],
 | 
			
		||||
                                      void *data );
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * New functions in GLU 1.1
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * GLU 1.3 functions
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifdef GLU_VERSION_1_3
 | 
			
		||||
 | 
			
		||||
GLUAPI GLboolean GLAPIENTRY
 | 
			
		||||
gluCheckExtension( const char *extName, const GLubyte *extString );
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
 | 
			
		||||
#pragma export off
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef macintosh
 | 
			
		||||
	#pragma enumsalwaysint reset
 | 
			
		||||
	#if PRAGMA_IMPORT_SUPPORTED
 | 
			
		||||
	#pragma import off
 | 
			
		||||
	#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginCurve (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginPolygon (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginSurface (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluBeginTrim (GLUnurbs* nurb);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild1DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLenum format, GLenum type, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild2DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmapLevels (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLint level, GLint base, GLint max, const void *data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluBuild3DMipmaps (GLenum target, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY gluCheckExtension (const GLubyte *extName, const GLubyte *extString);
 | 
			
		||||
GLAPI void GLAPIENTRY gluCylinder (GLUquadric* quad, GLdouble base, GLdouble top, GLdouble height, GLint slices, GLint stacks);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDeleteNurbsRenderer (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDeleteQuadric (GLUquadric* quad);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDeleteTess (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndCurve (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndPolygon (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndSurface (GLUnurbs* nurb);
 | 
			
		||||
GLAPI void GLAPIENTRY gluEndTrim (GLUnurbs* nurb);
 | 
			
		||||
GLAPI const GLubyte * GLAPIENTRY gluErrorString (GLenum error);
 | 
			
		||||
GLAPI void GLAPIENTRY gluGetNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat* data);
 | 
			
		||||
GLAPI const GLubyte * GLAPIENTRY gluGetString (GLenum name);
 | 
			
		||||
GLAPI void GLAPIENTRY gluGetTessProperty (GLUtesselator* tess, GLenum which, GLdouble* data);
 | 
			
		||||
GLAPI void GLAPIENTRY gluLoadSamplingMatrices (GLUnurbs* nurb, const GLfloat *model, const GLfloat *perspective, const GLint *view);
 | 
			
		||||
GLAPI void GLAPIENTRY gluLookAt (GLdouble eyeX, GLdouble eyeY, GLdouble eyeZ, GLdouble centerX, GLdouble centerY, GLdouble centerZ, GLdouble upX, GLdouble upY, GLdouble upZ);
 | 
			
		||||
GLAPI GLUnurbs* GLAPIENTRY gluNewNurbsRenderer (void);
 | 
			
		||||
GLAPI GLUquadric* GLAPIENTRY gluNewQuadric (void);
 | 
			
		||||
GLAPI GLUtesselator* GLAPIENTRY gluNewTess (void);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNextContour (GLUtesselator* tess, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCallback (GLUnurbs* nurb, GLenum which, _GLUfuncptr CallBackFunc);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCallbackData (GLUnurbs* nurb, GLvoid* userData);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCallbackDataEXT (GLUnurbs* nurb, GLvoid* userData);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsCurve (GLUnurbs* nurb, GLint knotCount, GLfloat *knots, GLint stride, GLfloat *control, GLint order, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsProperty (GLUnurbs* nurb, GLenum property, GLfloat value);
 | 
			
		||||
GLAPI void GLAPIENTRY gluNurbsSurface (GLUnurbs* nurb, GLint sKnotCount, GLfloat* sKnots, GLint tKnotCount, GLfloat* tKnots, GLint sStride, GLint tStride, GLfloat* control, GLint sOrder, GLint tOrder, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluOrtho2D (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPartialDisk (GLUquadric* quad, GLdouble inner, GLdouble outer, GLint slices, GLint loops, GLdouble start, GLdouble sweep);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPerspective (GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPickMatrix (GLdouble x, GLdouble y, GLdouble delX, GLdouble delY, GLint *viewport);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluProject (GLdouble objX, GLdouble objY, GLdouble objZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* winX, GLdouble* winY, GLdouble* winZ);
 | 
			
		||||
GLAPI void GLAPIENTRY gluPwlCurve (GLUnurbs* nurb, GLint count, GLfloat* data, GLint stride, GLenum type);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricCallback (GLUquadric* quad, GLenum which, _GLUfuncptr CallBackFunc);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricDrawStyle (GLUquadric* quad, GLenum draw);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricNormals (GLUquadric* quad, GLenum normal);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricOrientation (GLUquadric* quad, GLenum orientation);
 | 
			
		||||
GLAPI void GLAPIENTRY gluQuadricTexture (GLUquadric* quad, GLboolean texture);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluScaleImage (GLenum format, GLsizei wIn, GLsizei hIn, GLenum typeIn, const void *dataIn, GLsizei wOut, GLsizei hOut, GLenum typeOut, GLvoid* dataOut);
 | 
			
		||||
GLAPI void GLAPIENTRY gluSphere (GLUquadric* quad, GLdouble radius, GLint slices, GLint stacks);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessBeginContour (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessBeginPolygon (GLUtesselator* tess, GLvoid* data);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessCallback (GLUtesselator* tess, GLenum which, _GLUfuncptr CallBackFunc);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessEndContour (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessEndPolygon (GLUtesselator* tess);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessNormal (GLUtesselator* tess, GLdouble valueX, GLdouble valueY, GLdouble valueZ);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessProperty (GLUtesselator* tess, GLenum which, GLdouble data);
 | 
			
		||||
GLAPI void GLAPIENTRY gluTessVertex (GLUtesselator* tess, GLdouble *location, GLvoid* data);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluUnProject (GLdouble winX, GLdouble winY, GLdouble winZ, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble* objX, GLdouble* objY, GLdouble* objZ);
 | 
			
		||||
GLAPI GLint GLAPIENTRY gluUnProject4 (GLdouble winX, GLdouble winY, GLdouble winZ, GLdouble clipW, const GLdouble *model, const GLdouble *proj, const GLint *view, GLdouble nearVal, GLdouble farVal, GLdouble* objX, GLdouble* objY, GLdouble* objZ, GLdouble* objW);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* __glu_h__ */
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glu_mangle.h,v 1.3 2001/09/20 22:18:47 kschultz Exp $ */
 | 
			
		||||
/* $Id: glu_mangle.h,v 1.2 1999/09/10 02:08:19 gareth Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -23,9 +23,6 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: glu_mangle.h,v $
 | 
			
		||||
 * Revision 1.3  2001/09/20 22:18:47  kschultz
 | 
			
		||||
 * add mangling for new entry points
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/09/10 02:08:19  gareth
 | 
			
		||||
 * Added GLU 1.3 tessellation (except winding rule code).
 | 
			
		||||
 *
 | 
			
		||||
@@ -95,11 +92,5 @@
 | 
			
		||||
#define gluNextContour mgluNextContour
 | 
			
		||||
#define gluEndPolygon mgluEndPolygon
 | 
			
		||||
#define gluGetString mgluGetString
 | 
			
		||||
#define gluBuild1DMipmapLevels mgluBuild1DMipmapLevels
 | 
			
		||||
#define gluBuild2DMipmapLevels mgluBuild2DMipmapLevels
 | 
			
		||||
#define gluBuild3DMipmapLevels mgluBuild3DMipmapLevels
 | 
			
		||||
#define gluBuild3DMipmaps mgluBuild3DMipmaps
 | 
			
		||||
#define gluCheckExtension mgluCheckExtension
 | 
			
		||||
#define gluUnProject4 mgluUnProject4
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -223,11 +223,9 @@ WGLAPI int   GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
 video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
 | 
			
		||||
 glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
 | 
			
		||||
 glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
 | 
			
		||||
 | 
			
		||||
 GLUT_API_VERSION=5  glutGetProcAddress (added by BrianP)
 | 
			
		||||
**/
 | 
			
		||||
#ifndef GLUT_API_VERSION  /* allow this to be overriden */
 | 
			
		||||
#define GLUT_API_VERSION		5
 | 
			
		||||
#define GLUT_API_VERSION		3
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -663,9 +661,6 @@ GLUTAPI int GLUTAPIENTRY glutExtensionSupported(const char *name);
 | 
			
		||||
GLUTAPI int GLUTAPIENTRY glutGetModifiers(void);
 | 
			
		||||
GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type);
 | 
			
		||||
#endif
 | 
			
		||||
#if (GLUT_API_VERSION >= 5)
 | 
			
		||||
GLUTAPI void * GLUTAPIENTRY glutGetProcAddress(const char *procName);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/* GLUT font sub-API */
 | 
			
		||||
GLUTAPI void GLUTAPIENTRY glutBitmapCharacter(void *font, int character);
 | 
			
		||||
 
 | 
			
		||||
@@ -3,8 +3,8 @@
 | 
			
		||||
 | 
			
		||||
/* Copyright (c) Mark J. Kilgard & Willam F. Mitchell, 1998. */
 | 
			
		||||
 | 
			
		||||
/* This program is freely distributable without licensing fees 
 | 
			
		||||
   and is provided without guarantee or warrantee expressed or 
 | 
			
		||||
/* This program is freely distributable without licensing fees
 | 
			
		||||
   and is provided without guarantee or warrantee expressed or
 | 
			
		||||
   implied. This program is -not- in the public domain. */
 | 
			
		||||
 | 
			
		||||
/* This header provides the binding interface for William Mitchell's
 | 
			
		||||
@@ -75,7 +75,7 @@ typedef void (GLUTCALLBACK *GLUTmenuStatusFCB) (int *, int *, int *);
 | 
			
		||||
typedef void (GLUTCALLBACK *GLUTidleFCB) (void);
 | 
			
		||||
 | 
			
		||||
/* Functions that set and return Fortran callback functions. */
 | 
			
		||||
GLUTAPI void* APIENTRY __glutGetFCB(int which);
 | 
			
		||||
GLUTAPI void APIENTRY __glutSetFCB(int which, void *func);
 | 
			
		||||
extern void* GLUTAPIENTRY __glutGetFCB(int which);
 | 
			
		||||
extern void GLUTAPIENTRY __glutSetFCB(int which, void *func);
 | 
			
		||||
 | 
			
		||||
#endif  /* __glutf90_h__ */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: glx.h,v 1.38.4.1 2003/02/23 19:37:15 keithw Exp $ */
 | 
			
		||||
/* $Id: glx.h,v 1.22.4.1 2000/11/25 18:52:02 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.1
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 1999-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"),
 | 
			
		||||
@@ -30,7 +30,6 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __VMS
 | 
			
		||||
#include <GL/vms_x_fix.h>
 | 
			
		||||
# ifdef __cplusplus
 | 
			
		||||
/* VMS Xlib.h gives problems with C++.
 | 
			
		||||
 * this avoids a bunch of trivial warnings */
 | 
			
		||||
@@ -44,11 +43,11 @@
 | 
			
		||||
#pragma message enable nosimpint
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(USE_MGL_NAMESPACE)
 | 
			
		||||
#include <GL/glx_mangle.h>
 | 
			
		||||
#include "glx_mangle.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -60,7 +59,6 @@ extern "C" {
 | 
			
		||||
#define GLX_VERSION_1_1		1
 | 
			
		||||
#define GLX_VERSION_1_2		1
 | 
			
		||||
#define GLX_VERSION_1_3		1
 | 
			
		||||
#define GLX_VERSION_1_4		1
 | 
			
		||||
 | 
			
		||||
#define GLX_EXTENSION_NAME   "GLX"
 | 
			
		||||
 | 
			
		||||
@@ -126,10 +124,7 @@ extern "C" {
 | 
			
		||||
#define GLX_MAX_PBUFFER_HEIGHT		0x8017
 | 
			
		||||
#define GLX_MAX_PBUFFER_PIXELS		0x8018
 | 
			
		||||
#define GLX_PRESERVED_CONTENTS		0x801B
 | 
			
		||||
#define GLX_LARGEST_PBUFFER		0x801C
 | 
			
		||||
#define GLX_WIDTH			0x801D
 | 
			
		||||
#define GLX_HEIGHT			0x801E
 | 
			
		||||
#define GLX_EVENT_MASK			0x801F
 | 
			
		||||
#define GLX_LARGEST_BUFFER		0x801C
 | 
			
		||||
#define GLX_DRAWABLE_TYPE		0x8010
 | 
			
		||||
#define GLX_FBCONFIG_ID			0x8013
 | 
			
		||||
#define GLX_VISUAL_ID			0x800B
 | 
			
		||||
@@ -141,6 +136,7 @@ extern "C" {
 | 
			
		||||
#define GLX_FRONT_RIGHT_BUFFER_BIT	0x00000002
 | 
			
		||||
#define GLX_BACK_LEFT_BUFFER_BIT	0x00000004
 | 
			
		||||
#define GLX_BACK_RIGHT_BUFFER_BIT	0x00000008
 | 
			
		||||
#define GLX_AUX_BUFFERS_BIT		0x00000010
 | 
			
		||||
#define GLX_DEPTH_BUFFER_BIT		0x00000020
 | 
			
		||||
#define GLX_STENCIL_BUFFER_BIT		0x00000040
 | 
			
		||||
#define GLX_ACCUM_BUFFER_BIT		0x00000080
 | 
			
		||||
@@ -154,35 +150,23 @@ extern "C" {
 | 
			
		||||
#define GLX_STATIC_COLOR		0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE			0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY			0x8007
 | 
			
		||||
#define GLX_TRANSPARENT_RGB		0x8008
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX		0x8009
 | 
			
		||||
#define GLX_RGBA_TYPE			0x8014
 | 
			
		||||
#define GLX_COLOR_INDEX_TYPE		0x8015
 | 
			
		||||
#define GLX_COLOR_INDEX_BIT		0x00000002
 | 
			
		||||
#define GLX_RGBA_BIT			0x00000001
 | 
			
		||||
#define GLX_SCREEN			0x800C
 | 
			
		||||
#define GLX_PBUFFER_CLOBBER_MASK	0x08000000
 | 
			
		||||
#define GLX_DAMAGED			0x8020
 | 
			
		||||
#define GLX_SAVED			0x8021
 | 
			
		||||
#define GLX_WINDOW			0x8022
 | 
			
		||||
#define GLX_PBUFFER			0x8023
 | 
			
		||||
#define GLX_PBUFFER_HEIGHT              0x8040
 | 
			
		||||
#define GLX_PBUFFER_WIDTH               0x8041
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * GLX 1.4 and later:
 | 
			
		||||
 */
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS              0x186a0 /*100000*/
 | 
			
		||||
#define GLX_SAMPLES                     0x186a1 /*100001*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct __GLXcontextRec *GLXContext;
 | 
			
		||||
typedef void * GLXContext;
 | 
			
		||||
typedef XID GLXPixmap;
 | 
			
		||||
typedef XID GLXDrawable;
 | 
			
		||||
/* GLX 1.3 and later */
 | 
			
		||||
typedef struct __GLXFBConfigRec *GLXFBConfig;
 | 
			
		||||
typedef void * GLXFBConfig;
 | 
			
		||||
typedef XID GLXFBConfigID;
 | 
			
		||||
typedef XID GLXContextID;
 | 
			
		||||
typedef XID GLXWindow;
 | 
			
		||||
@@ -294,15 +278,12 @@ extern void glXGetSelectedEvent( Display *dpy, GLXDrawable drawable,
 | 
			
		||||
                                 unsigned long *mask );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* GLX 1.4 and later */
 | 
			
		||||
extern void (*glXGetProcAddress(const GLubyte *procname))( void );
 | 
			
		||||
 | 
			
		||||
/*#ifndef GLX_GLXEXT_LEGACY*/
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_GLXEXT_LEGACY
 | 
			
		||||
/*#include <GL/glxext.h>*/
 | 
			
		||||
 | 
			
		||||
#include <GL/glxext.h>
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
/*#else*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@@ -432,7 +413,7 @@ extern Bool glXReleaseBuffersMESA( Display *dpy, GLXDrawable d );
 | 
			
		||||
#define GLX_3DFX_WINDOW_MODE_MESA       0x1
 | 
			
		||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA   0x2
 | 
			
		||||
 | 
			
		||||
extern Bool glXSet3DfxModeMESA( int mode );
 | 
			
		||||
extern GLboolean glXSet3DfxModeMESA( GLint mode );
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_MESA_set_3dfx_mode */
 | 
			
		||||
 | 
			
		||||
@@ -450,39 +431,7 @@ extern void (*glXGetProcAddressARB(const GLubyte *procName))();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_GLXEXT_LEGACY */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 ** The following aren't in glxext.h yet.
 | 
			
		||||
 **/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ???. GLX_NV_vertex_array_range
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GLX_NV_vertex_array_range
 | 
			
		||||
#define GLX_NV_vertex_array_range
 | 
			
		||||
 | 
			
		||||
extern void *glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
 | 
			
		||||
extern void glXFreeMemoryNV(GLvoid *pointer);
 | 
			
		||||
typedef void * ( * PFNGLXALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
 | 
			
		||||
typedef void ( * PFNGLXFREEMEMORYNVPROC) (GLvoid *pointer);
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_NV_vertex_array_range */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * ???. GLX_MESA_agp_offset
 | 
			
		||||
 */ 
 | 
			
		||||
#ifndef GLX_MESA_agp_offset
 | 
			
		||||
#define GLX_MESA_agp_offset 1
 | 
			
		||||
 | 
			
		||||
extern GLuint glXGetAGPOffsetMESA(const GLvoid *pointer);
 | 
			
		||||
typedef GLuint (* PFNGLXGETAGPOFFSETMESAPROC) (const GLvoid *pointer);
 | 
			
		||||
 | 
			
		||||
#endif /* GLX_MESA_agp_offset */
 | 
			
		||||
/*#endif*/ /* GLX_GLXEXT_LEGACY */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: glx_mangle.h,v 1.2 2001/11/09 22:01:02 brianp Exp $ */
 | 
			
		||||
/* $Id: glx_mangle.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.1
 | 
			
		||||
 * Version:  3.0
 | 
			
		||||
 * Copyright (C) 1995-1998  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
@@ -21,6 +21,25 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: glx_mangle.h,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/06/21 22:01:00  brianp
 | 
			
		||||
 * added #ifndef GLX_MANGLE_H stuff, video sync extension functions
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/03/26 02:44:53  brianp
 | 
			
		||||
 * removed ^M characters
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/03/17 02:41:19  brianp
 | 
			
		||||
 * updated by Randy Frank
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/20 05:04:45  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MANGLE_H
 | 
			
		||||
#define GLX_MANGLE_H
 | 
			
		||||
 | 
			
		||||
@@ -50,8 +69,4 @@
 | 
			
		||||
#define glXGetVideoSyncSGI mglXGetVideoSyncSGI
 | 
			
		||||
#define glXWaitVideoSyncSGI mglXWaitVideoSyncSGI
 | 
			
		||||
 | 
			
		||||
/* GLX 1.4 */
 | 
			
		||||
#define glXGetProcAddress mglXGetProcAddress
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,607 +0,0 @@
 | 
			
		||||
#ifndef __glxext_h_
 | 
			
		||||
#define __glxext_h_
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: This software was created using the
 | 
			
		||||
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
 | 
			
		||||
** not been independently verified as being compliant with the OpenGL(R)
 | 
			
		||||
** version 1.2.1 Specification.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
 | 
			
		||||
#define WIN32_LEAN_AND_MEAN 1
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef APIENTRY
 | 
			
		||||
#define APIENTRY
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef GLAPI
 | 
			
		||||
#define GLAPI extern
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
/* Header file version number, required by OpenGL ABI for Linux */
 | 
			
		||||
/* glxext.h last updated 2002/03/22 */
 | 
			
		||||
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
 | 
			
		||||
#define GLX_GLXEXT_VERSION 5
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_3
 | 
			
		||||
#define GLX_WINDOW_BIT                     0x00000001
 | 
			
		||||
#define GLX_PIXMAP_BIT                     0x00000002
 | 
			
		||||
#define GLX_PBUFFER_BIT                    0x00000004
 | 
			
		||||
#define GLX_RGBA_BIT                       0x00000001
 | 
			
		||||
#define GLX_COLOR_INDEX_BIT                0x00000002
 | 
			
		||||
#define GLX_PBUFFER_CLOBBER_MASK           0x08000000
 | 
			
		||||
#define GLX_FRONT_LEFT_BUFFER_BIT          0x00000001
 | 
			
		||||
#define GLX_FRONT_RIGHT_BUFFER_BIT         0x00000002
 | 
			
		||||
#define GLX_BACK_LEFT_BUFFER_BIT           0x00000004
 | 
			
		||||
#define GLX_BACK_RIGHT_BUFFER_BIT          0x00000008
 | 
			
		||||
#define GLX_AUX_BUFFERS_BIT                0x00000010
 | 
			
		||||
#define GLX_DEPTH_BUFFER_BIT               0x00000020
 | 
			
		||||
#define GLX_STENCIL_BUFFER_BIT             0x00000040
 | 
			
		||||
#define GLX_ACCUM_BUFFER_BIT               0x00000080
 | 
			
		||||
#define GLX_CONFIG_CAVEAT                  0x20
 | 
			
		||||
#define GLX_X_VISUAL_TYPE                  0x22
 | 
			
		||||
#define GLX_TRANSPARENT_TYPE               0x23
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_VALUE        0x24
 | 
			
		||||
#define GLX_TRANSPARENT_RED_VALUE          0x25
 | 
			
		||||
#define GLX_TRANSPARENT_GREEN_VALUE        0x26
 | 
			
		||||
#define GLX_TRANSPARENT_BLUE_VALUE         0x27
 | 
			
		||||
#define GLX_TRANSPARENT_ALPHA_VALUE        0x28
 | 
			
		||||
#define GLX_DONT_CARE                      0xFFFFFFFF
 | 
			
		||||
#define GLX_NONE                           0x8000
 | 
			
		||||
#define GLX_SLOW_CONFIG                    0x8001
 | 
			
		||||
#define GLX_TRUE_COLOR                     0x8002
 | 
			
		||||
#define GLX_DIRECT_COLOR                   0x8003
 | 
			
		||||
#define GLX_PSEUDO_COLOR                   0x8004
 | 
			
		||||
#define GLX_STATIC_COLOR                   0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE                     0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY                    0x8007
 | 
			
		||||
#define GLX_TRANSPARENT_RGB                0x8008
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX              0x8009
 | 
			
		||||
#define GLX_VISUAL_ID                      0x800B
 | 
			
		||||
#define GLX_SCREEN                         0x800C
 | 
			
		||||
#define GLX_NON_CONFORMANT_CONFIG          0x800D
 | 
			
		||||
#define GLX_DRAWABLE_TYPE                  0x8010
 | 
			
		||||
#define GLX_RENDER_TYPE                    0x8011
 | 
			
		||||
#define GLX_X_RENDERABLE                   0x8012
 | 
			
		||||
#define GLX_FBCONFIG_ID                    0x8013
 | 
			
		||||
#define GLX_RGBA_TYPE                      0x8014
 | 
			
		||||
#define GLX_COLOR_INDEX_TYPE               0x8015
 | 
			
		||||
#define GLX_MAX_PBUFFER_WIDTH              0x8016
 | 
			
		||||
#define GLX_MAX_PBUFFER_HEIGHT             0x8017
 | 
			
		||||
#define GLX_MAX_PBUFFER_PIXELS             0x8018
 | 
			
		||||
#define GLX_PRESERVED_CONTENTS             0x801B
 | 
			
		||||
#define GLX_LARGEST_PBUFFER                0x801C
 | 
			
		||||
#define GLX_WIDTH                          0x801D
 | 
			
		||||
#define GLX_HEIGHT                         0x801E
 | 
			
		||||
#define GLX_EVENT_MASK                     0x801F
 | 
			
		||||
#define GLX_DAMAGED                        0x8020
 | 
			
		||||
#define GLX_SAVED                          0x8021
 | 
			
		||||
#define GLX_WINDOW                         0x8022
 | 
			
		||||
#define GLX_PBUFFER                        0x8023
 | 
			
		||||
#define GLX_PBUFFER_HEIGHT                 0x8040
 | 
			
		||||
#define GLX_PBUFFER_WIDTH                  0x8041
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_4
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS                 100000
 | 
			
		||||
#define GLX_SAMPLES                        100001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_get_proc_address
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_multisample
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_ARB             100000
 | 
			
		||||
#define GLX_SAMPLES_ARB                    100001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_multisample
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_SGIS            100000
 | 
			
		||||
#define GLX_SAMPLES_SGIS                   100001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_visual_info
 | 
			
		||||
#define GLX_X_VISUAL_TYPE_EXT              0x22
 | 
			
		||||
#define GLX_TRANSPARENT_TYPE_EXT           0x23
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_VALUE_EXT    0x24
 | 
			
		||||
#define GLX_TRANSPARENT_RED_VALUE_EXT      0x25
 | 
			
		||||
#define GLX_TRANSPARENT_GREEN_VALUE_EXT    0x26
 | 
			
		||||
#define GLX_TRANSPARENT_BLUE_VALUE_EXT     0x27
 | 
			
		||||
#define GLX_TRANSPARENT_ALPHA_VALUE_EXT    0x28
 | 
			
		||||
#define GLX_NONE_EXT                       0x8000
 | 
			
		||||
#define GLX_TRUE_COLOR_EXT                 0x8002
 | 
			
		||||
#define GLX_DIRECT_COLOR_EXT               0x8003
 | 
			
		||||
#define GLX_PSEUDO_COLOR_EXT               0x8004
 | 
			
		||||
#define GLX_STATIC_COLOR_EXT               0x8005
 | 
			
		||||
#define GLX_GRAY_SCALE_EXT                 0x8006
 | 
			
		||||
#define GLX_STATIC_GRAY_EXT                0x8007
 | 
			
		||||
#define GLX_TRANSPARENT_RGB_EXT            0x8008
 | 
			
		||||
#define GLX_TRANSPARENT_INDEX_EXT          0x8009
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_swap_control
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_video_sync
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_make_current_read
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_source
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_visual_rating
 | 
			
		||||
#define GLX_VISUAL_CAVEAT_EXT              0x20
 | 
			
		||||
#define GLX_SLOW_VISUAL_EXT                0x8001
 | 
			
		||||
#define GLX_NON_CONFORMANT_VISUAL_EXT      0x800D
 | 
			
		||||
/* reuse GLX_NONE_EXT */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_import_context
 | 
			
		||||
#define GLX_SHARE_CONTEXT_EXT              0x800A
 | 
			
		||||
#define GLX_VISUAL_ID_EXT                  0x800B
 | 
			
		||||
#define GLX_SCREEN_EXT                     0x800C
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_fbconfig
 | 
			
		||||
#define GLX_WINDOW_BIT_SGIX                0x00000001
 | 
			
		||||
#define GLX_PIXMAP_BIT_SGIX                0x00000002
 | 
			
		||||
#define GLX_RGBA_BIT_SGIX                  0x00000001
 | 
			
		||||
#define GLX_COLOR_INDEX_BIT_SGIX           0x00000002
 | 
			
		||||
#define GLX_DRAWABLE_TYPE_SGIX             0x8010
 | 
			
		||||
#define GLX_RENDER_TYPE_SGIX               0x8011
 | 
			
		||||
#define GLX_X_RENDERABLE_SGIX              0x8012
 | 
			
		||||
#define GLX_FBCONFIG_ID_SGIX               0x8013
 | 
			
		||||
#define GLX_RGBA_TYPE_SGIX                 0x8014
 | 
			
		||||
#define GLX_COLOR_INDEX_TYPE_SGIX          0x8015
 | 
			
		||||
/* reuse GLX_SCREEN_EXT */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_pbuffer
 | 
			
		||||
#define GLX_PBUFFER_BIT_SGIX               0x00000004
 | 
			
		||||
#define GLX_BUFFER_CLOBBER_MASK_SGIX       0x08000000
 | 
			
		||||
#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX     0x00000001
 | 
			
		||||
#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX    0x00000002
 | 
			
		||||
#define GLX_BACK_LEFT_BUFFER_BIT_SGIX      0x00000004
 | 
			
		||||
#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX     0x00000008
 | 
			
		||||
#define GLX_AUX_BUFFERS_BIT_SGIX           0x00000010
 | 
			
		||||
#define GLX_DEPTH_BUFFER_BIT_SGIX          0x00000020
 | 
			
		||||
#define GLX_STENCIL_BUFFER_BIT_SGIX        0x00000040
 | 
			
		||||
#define GLX_ACCUM_BUFFER_BIT_SGIX          0x00000080
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_BIT_SGIX        0x00000100
 | 
			
		||||
#define GLX_MAX_PBUFFER_WIDTH_SGIX         0x8016
 | 
			
		||||
#define GLX_MAX_PBUFFER_HEIGHT_SGIX        0x8017
 | 
			
		||||
#define GLX_MAX_PBUFFER_PIXELS_SGIX        0x8018
 | 
			
		||||
#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX     0x8019
 | 
			
		||||
#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX    0x801A
 | 
			
		||||
#define GLX_PRESERVED_CONTENTS_SGIX        0x801B
 | 
			
		||||
#define GLX_LARGEST_PBUFFER_SGIX           0x801C
 | 
			
		||||
#define GLX_WIDTH_SGIX                     0x801D
 | 
			
		||||
#define GLX_HEIGHT_SGIX                    0x801E
 | 
			
		||||
#define GLX_EVENT_MASK_SGIX                0x801F
 | 
			
		||||
#define GLX_DAMAGED_SGIX                   0x8020
 | 
			
		||||
#define GLX_SAVED_SGIX                     0x8021
 | 
			
		||||
#define GLX_WINDOW_SGIX                    0x8022
 | 
			
		||||
#define GLX_PBUFFER_SGIX                   0x8023
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_cushion
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_resize
 | 
			
		||||
#define GLX_SYNC_FRAME_SGIX                0x00000000
 | 
			
		||||
#define GLX_SYNC_SWAP_SGIX                 0x00000001
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_dmbuffer
 | 
			
		||||
#define GLX_DIGITAL_MEDIA_PBUFFER_SGIX     0x8024
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_swap_group
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_swap_barrier
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_blended_overlay
 | 
			
		||||
#define GLX_BLENDED_RGBA_SGIS              0x8025
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_shared_multisample
 | 
			
		||||
#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026
 | 
			
		||||
#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SUN_get_transparent_index
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_3DFX_multisample
 | 
			
		||||
#define GLX_SAMPLE_BUFFERS_3DFX            0x8050
 | 
			
		||||
#define GLX_SAMPLES_3DFX                   0x8051
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_copy_sub_buffer
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_pixmap_colormap
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_release_buffers
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_set_3dfx_mode
 | 
			
		||||
#define GLX_3DFX_WINDOW_MODE_MESA          0x1
 | 
			
		||||
#define GLX_3DFX_FULLSCREEN_MODE_MESA      0x2
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_visual_select_group
 | 
			
		||||
#define GLX_VISUAL_SELECT_GROUP_SGIX       0x8028
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_swap_method
 | 
			
		||||
#define GLX_SWAP_METHOD_OML                0x8060
 | 
			
		||||
#define GLX_SWAP_EXCHANGE_OML              0x8061
 | 
			
		||||
#define GLX_SWAP_COPY_OML                  0x8062
 | 
			
		||||
#define GLX_SWAP_UNDEFINED_OML             0x8063
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_sync_control
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_get_proc_address
 | 
			
		||||
typedef void (*__GLXextFuncPtr)(void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_source
 | 
			
		||||
typedef XID GLXVideoSourceSGIX;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_fbconfig
 | 
			
		||||
typedef XID GLXFBConfigIDSGIX;
 | 
			
		||||
typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_pbuffer
 | 
			
		||||
typedef XID GLXPbufferSGIX;
 | 
			
		||||
typedef struct {
 | 
			
		||||
    int type;
 | 
			
		||||
    unsigned long serial;	  /* # of last request processed by server */
 | 
			
		||||
    Bool send_event;		  /* true if this came for SendEvent request */
 | 
			
		||||
    Display *display;		  /* display the event was read from */
 | 
			
		||||
    GLXDrawable drawable;	  /* i.d. of Drawable */
 | 
			
		||||
    int event_type;		  /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */
 | 
			
		||||
    int draw_type;		  /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */
 | 
			
		||||
    unsigned int mask;	  /* mask indicating which buffers are affected*/
 | 
			
		||||
    int x, y;
 | 
			
		||||
    int width, height;
 | 
			
		||||
    int count;		  /* if nonzero, at least this many more */
 | 
			
		||||
} GLXBufferClobberEventSGIX;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_3
 | 
			
		||||
#define GLX_VERSION_1_3 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXFBConfig * glXGetFBConfigs (Display *, int, int *);
 | 
			
		||||
extern GLXFBConfig * glXChooseFBConfig (Display *, int, const int *, int *);
 | 
			
		||||
extern int glXGetFBConfigAttrib (Display *, GLXFBConfig, int, int *);
 | 
			
		||||
extern XVisualInfo * glXGetVisualFromFBConfig (Display *, GLXFBConfig);
 | 
			
		||||
extern GLXWindow glXCreateWindow (Display *, GLXFBConfig, Window, const int *);
 | 
			
		||||
extern void glXDestroyWindow (Display *, GLXWindow);
 | 
			
		||||
extern GLXPixmap glXCreatePixmap (Display *, GLXFBConfig, Pixmap, const int *);
 | 
			
		||||
extern void glXDestroyPixmap (Display *, GLXPixmap);
 | 
			
		||||
extern GLXPbuffer glXCreatePbuffer (Display *, GLXFBConfig, const int *);
 | 
			
		||||
extern void glXDestroyPbuffer (Display *, GLXPbuffer);
 | 
			
		||||
extern void glXQueryDrawable (Display *, GLXDrawable, int, unsigned int *);
 | 
			
		||||
extern GLXContext glXCreateNewContext (Display *, GLXFBConfig, int, GLXContext, Bool);
 | 
			
		||||
extern Bool glXMakeContextCurrent (Display *, GLXDrawable, GLXDrawable, GLXContext);
 | 
			
		||||
extern GLXDrawable glXGetCurrentReadDrawable (void);
 | 
			
		||||
extern Display * glXGetCurrentDisplay (void);
 | 
			
		||||
extern int glXQueryContext (Display *, GLXContext, int, int *);
 | 
			
		||||
extern void glXSelectEvent (Display *, GLXDrawable, unsigned long);
 | 
			
		||||
extern void glXGetSelectedEvent (Display *, GLXDrawable, unsigned long *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXFBConfig * ( * PFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
 | 
			
		||||
typedef GLXFBConfig * ( * PFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
 | 
			
		||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
 | 
			
		||||
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
 | 
			
		||||
typedef GLXWindow ( * PFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
 | 
			
		||||
typedef GLXPixmap ( * PFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
 | 
			
		||||
typedef GLXPbuffer ( * PFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
 | 
			
		||||
typedef void ( * PFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
 | 
			
		||||
typedef GLXContext ( * PFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
 | 
			
		||||
typedef Bool ( * PFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
 | 
			
		||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLEPROC) (void);
 | 
			
		||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYPROC) (void);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
 | 
			
		||||
typedef void ( * PFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
 | 
			
		||||
typedef void ( * PFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_VERSION_1_4
 | 
			
		||||
#define GLX_VERSION_1_4 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern __GLXextFuncPtr glXGetProcAddress (const GLubyte *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSPROC) (const GLubyte *procName);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_get_proc_address
 | 
			
		||||
#define GLX_ARB_get_proc_address 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_ARB_multisample
 | 
			
		||||
#define GLX_ARB_multisample 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIS_multisample
 | 
			
		||||
#define GLX_SGIS_multisample 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_visual_info
 | 
			
		||||
#define GLX_EXT_visual_info 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_swap_control
 | 
			
		||||
#define GLX_SGI_swap_control 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXSwapIntervalSGI (int);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_video_sync
 | 
			
		||||
#define GLX_SGI_video_sync 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXGetVideoSyncSGI (unsigned int *);
 | 
			
		||||
extern int glXWaitVideoSyncSGI (int, int, unsigned int *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int *count);
 | 
			
		||||
typedef int ( * PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int *count);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_make_current_read
 | 
			
		||||
#define GLX_SGI_make_current_read 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXMakeCurrentReadSGI (Display *, GLXDrawable, GLXDrawable, GLXContext);
 | 
			
		||||
extern GLXDrawable glXGetCurrentReadDrawableSGI (void);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXMAKECURRENTREADSGIPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
 | 
			
		||||
typedef GLXDrawable ( * PFNGLXGETCURRENTREADDRAWABLESGIPROC) (void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef _VL_H
 | 
			
		||||
#ifndef GLX_SGIX_video_source
 | 
			
		||||
#define GLX_SGIX_video_source 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXVideoSourceSGIX glXCreateGLXVideoSourceSGIX (Display *, int, VLServer, VLPath, int, VLNode);
 | 
			
		||||
extern void glXDestroyGLXVideoSourceSGIX (Display *, GLXVideoSourceSGIX);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXVideoSourceSGIX ( * PFNGLXCREATEGLXVIDEOSOURCESGIXPROC) (Display *display, int screen, VLServer server, VLPath path, int nodeClass, VLNode drainNode);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYGLXVIDEOSOURCESGIXPROC) (Display *dpy, GLXVideoSourceSGIX glxvideosource);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* _VL_H */
 | 
			
		||||
#ifndef GLX_EXT_visual_rating
 | 
			
		||||
#define GLX_EXT_visual_rating 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_EXT_import_context
 | 
			
		||||
#define GLX_EXT_import_context 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Display * glXGetCurrentDisplayEXT (void);
 | 
			
		||||
extern int glXQueryContextInfoEXT (Display *, GLXContext, int, int *);
 | 
			
		||||
extern GLXContextID glXGetContextIDEXT (const GLXContext);
 | 
			
		||||
extern GLXContext glXImportContextEXT (Display *, GLXContextID);
 | 
			
		||||
extern void glXFreeContextEXT (Display *, GLXContext);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Display * ( * PFNGLXGETCURRENTDISPLAYEXTPROC) (void);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCONTEXTINFOEXTPROC) (Display *dpy, GLXContext context, int attribute, int *value);
 | 
			
		||||
typedef GLXContextID ( * PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context);
 | 
			
		||||
typedef GLXContext ( * PFNGLXIMPORTCONTEXTEXTPROC) (Display *dpy, GLXContextID contextID);
 | 
			
		||||
typedef void ( * PFNGLXFREECONTEXTEXTPROC) (Display *dpy, GLXContext context);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_fbconfig
 | 
			
		||||
#define GLX_SGIX_fbconfig 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXGetFBConfigAttribSGIX (Display *, GLXFBConfigSGIX, int, int *);
 | 
			
		||||
extern GLXFBConfigSGIX * glXChooseFBConfigSGIX (Display *, int, int *, int *);
 | 
			
		||||
extern GLXPixmap glXCreateGLXPixmapWithConfigSGIX (Display *, GLXFBConfigSGIX, Pixmap);
 | 
			
		||||
extern GLXContext glXCreateContextWithConfigSGIX (Display *, GLXFBConfigSGIX, int, GLXContext, Bool);
 | 
			
		||||
extern XVisualInfo * glXGetVisualFromFBConfigSGIX (Display *, GLXFBConfigSGIX);
 | 
			
		||||
extern GLXFBConfigSGIX glXGetFBConfigFromVisualSGIX (Display *, XVisualInfo *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int attribute, int *value);
 | 
			
		||||
typedef GLXFBConfigSGIX * ( * PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display *dpy, int screen, int *attrib_list, int *nelements);
 | 
			
		||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, Pixmap pixmap);
 | 
			
		||||
typedef GLXContext ( * PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct);
 | 
			
		||||
typedef XVisualInfo * ( * PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display *dpy, GLXFBConfigSGIX config);
 | 
			
		||||
typedef GLXFBConfigSGIX ( * PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display *dpy, XVisualInfo *vis);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_pbuffer
 | 
			
		||||
#define GLX_SGIX_pbuffer 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXPbufferSGIX glXCreateGLXPbufferSGIX (Display *, GLXFBConfigSGIX, unsigned int, unsigned int, int *);
 | 
			
		||||
extern void glXDestroyGLXPbufferSGIX (Display *, GLXPbufferSGIX);
 | 
			
		||||
extern int glXQueryGLXPbufferSGIX (Display *, GLXPbufferSGIX, int, unsigned int *);
 | 
			
		||||
extern void glXSelectEventSGIX (Display *, GLXDrawable, unsigned long);
 | 
			
		||||
extern void glXGetSelectedEventSGIX (Display *, GLXDrawable, unsigned long *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXPbufferSGIX ( * PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
 | 
			
		||||
typedef void ( * PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf);
 | 
			
		||||
typedef int ( * PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int *value);
 | 
			
		||||
typedef void ( * PFNGLXSELECTEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long mask);
 | 
			
		||||
typedef void ( * PFNGLXGETSELECTEDEVENTSGIXPROC) (Display *dpy, GLXDrawable drawable, unsigned long *mask);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGI_cushion
 | 
			
		||||
#define GLX_SGI_cushion 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXCushionSGI (Display *, Window, float);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXCUSHIONSGIPROC) (Display *dpy, Window window, float cushion);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_video_resize
 | 
			
		||||
#define GLX_SGIX_video_resize 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern int glXBindChannelToWindowSGIX (Display *, int, int, Window);
 | 
			
		||||
extern int glXChannelRectSGIX (Display *, int, int, int, int, int, int);
 | 
			
		||||
extern int glXQueryChannelRectSGIX (Display *, int, int, int *, int *, int *, int *);
 | 
			
		||||
extern int glXQueryChannelDeltasSGIX (Display *, int, int, int *, int *, int *, int *);
 | 
			
		||||
extern int glXChannelRectSyncSGIX (Display *, int, int, GLenum);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef int ( * PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display *display, int screen, int channel, Window window);
 | 
			
		||||
typedef int ( * PFNGLXCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int x, int y, int w, int h);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCHANNELRECTSGIXPROC) (Display *display, int screen, int channel, int *dx, int *dy, int *dw, int *dh);
 | 
			
		||||
typedef int ( * PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display *display, int screen, int channel, int *x, int *y, int *w, int *h);
 | 
			
		||||
typedef int ( * PFNGLXCHANNELRECTSYNCSGIXPROC) (Display *display, int screen, int channel, GLenum synctype);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef _DM_BUFFER_H_
 | 
			
		||||
#ifndef GLX_SGIX_dmbuffer
 | 
			
		||||
#define GLX_SGIX_dmbuffer 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXAssociateDMPbufferSGIX (Display *, GLXPbufferSGIX, DMparams *, DMbuffer);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXASSOCIATEDMPBUFFERSGIXPROC) (Display *dpy, GLXPbufferSGIX pbuffer, DMparams *params, DMbuffer dmbuffer);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* _DM_BUFFER_H_ */
 | 
			
		||||
#ifndef GLX_SGIX_swap_group
 | 
			
		||||
#define GLX_SGIX_swap_group 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXJoinSwapGroupSGIX (Display *, GLXDrawable, GLXDrawable);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXJOINSWAPGROUPSGIXPROC) (Display *dpy, GLXDrawable drawable, GLXDrawable member);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_swap_barrier
 | 
			
		||||
#define GLX_SGIX_swap_barrier 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXBindSwapBarrierSGIX (Display *, GLXDrawable, int);
 | 
			
		||||
extern Bool glXQueryMaxSwapBarriersSGIX (Display *, int, int *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXBINDSWAPBARRIERSGIXPROC) (Display *dpy, GLXDrawable drawable, int barrier);
 | 
			
		||||
typedef Bool ( * PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display *dpy, int screen, int *max);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SUN_get_transparent_index
 | 
			
		||||
#define GLX_SUN_get_transparent_index 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Status glXGetTransparentIndexSUN (Display *, Window, Window, long *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display *dpy, Window overlay, Window underlay, long *pTransparentIndex);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_copy_sub_buffer
 | 
			
		||||
#define GLX_MESA_copy_sub_buffer 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern void glXCopySubBufferMESA (Display *, GLXDrawable, int, int, int, int);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef void ( * PFNGLXCOPYSUBBUFFERMESAPROC) (Display *dpy, GLXDrawable drawable, int x, int y, int width, int height);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_pixmap_colormap
 | 
			
		||||
#define GLX_MESA_pixmap_colormap 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern GLXPixmap glXCreateGLXPixmapMESA (Display *, XVisualInfo *, Pixmap, Colormap);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef GLXPixmap ( * PFNGLXCREATEGLXPIXMAPMESAPROC) (Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_release_buffers
 | 
			
		||||
#define GLX_MESA_release_buffers 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXReleaseBuffersMESA (Display *, GLXDrawable);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXRELEASEBUFFERSMESAPROC) (Display *dpy, GLXDrawable drawable);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_MESA_set_3dfx_mode
 | 
			
		||||
#define GLX_MESA_set_3dfx_mode 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXSet3DfxModeMESA (int);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXSET3DFXMODEMESAPROC) (int mode);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_SGIX_visual_select_group
 | 
			
		||||
#define GLX_SGIX_visual_select_group 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_swap_method
 | 
			
		||||
#define GLX_OML_swap_method 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(__STDC_VERSION__)
 | 
			
		||||
#if __STDC_VERSION__ >= 199901L
 | 
			
		||||
/* Include ISO C99 integer types for OML_sync_control; need a better test */
 | 
			
		||||
#include <inttypes.h>
 | 
			
		||||
 | 
			
		||||
#ifndef GLX_OML_sync_control
 | 
			
		||||
#define GLX_OML_sync_control 1
 | 
			
		||||
#ifdef GLX_GLXEXT_PROTOTYPES
 | 
			
		||||
extern Bool glXGetSyncValuesOML (Display *, GLXDrawable, int64_t *, int64_t *, int64_t *);
 | 
			
		||||
extern Bool glXGetMscRateOML (Display *, GLXDrawable, int32_t *, int32_t *);
 | 
			
		||||
extern int64_t glXSwapBuffersMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t);
 | 
			
		||||
extern Bool glXWaitForMscOML (Display *, GLXDrawable, int64_t, int64_t, int64_t, int64_t *, int64_t *, int64_t *);
 | 
			
		||||
extern Bool glXWaitForSbcOML (Display *, GLXDrawable, int64_t, int64_t *, int64_t *, int64_t *);
 | 
			
		||||
#endif /* GLX_GLXEXT_PROTOTYPES */
 | 
			
		||||
typedef Bool ( * PFNGLXGETSYNCVALUESOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t *ust, int64_t *msc, int64_t *sbc);
 | 
			
		||||
typedef Bool ( * PFNGLXGETMSCRATEOMLPROC) (Display *dpy, GLXDrawable drawable, int32_t *numerator, int32_t *denominator);
 | 
			
		||||
typedef int64_t ( * PFNGLXSWAPBUFFERSMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder);
 | 
			
		||||
typedef Bool ( * PFNGLXWAITFORMSCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t *ust, int64_t *msc, int64_t *sbc);
 | 
			
		||||
typedef Bool ( * PFNGLXWAITFORSBCOMLPROC) (Display *dpy, GLXDrawable drawable, int64_t target_sbc, int64_t *ust, int64_t *msc, int64_t *sbc);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* C99 version test */
 | 
			
		||||
#endif /* STDC test */
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,424 +0,0 @@
 | 
			
		||||
#ifndef __gl_core_h_
 | 
			
		||||
#define __gl_core_h_
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: The application programming interfaces
 | 
			
		||||
** established by SGI in conjunction with the Original Code are The
 | 
			
		||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
 | 
			
		||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
 | 
			
		||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
 | 
			
		||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
 | 
			
		||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
 | 
			
		||||
** published by SGI, but has not been independently verified as being
 | 
			
		||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
 | 
			
		||||
**
 | 
			
		||||
** $Date: 2001/01/08 03:56:53 $ $Revision: 1.1 $
 | 
			
		||||
** $Header: /home/krh/git/sync/mesa-cvs-repo/Mesa/include/GL/internal/Attic/glcore-new.h,v 1.1 2001/01/08 03:56:53 keithw Exp $
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifdef XFree86LOADER
 | 
			
		||||
#include "xf86_ansic.h"
 | 
			
		||||
#else
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct __GLcontextRec __GLcontext;
 | 
			
		||||
typedef struct __GLinterfaceRec __GLinterface;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This file defines the interface between the GL core and the surrounding
 | 
			
		||||
** "operating system" that supports it (currently the GLX or WGL extensions).
 | 
			
		||||
**
 | 
			
		||||
** Members (data and function pointers) are documented as imported or
 | 
			
		||||
** exported according to how they are used by the core rendering functions.
 | 
			
		||||
** Imported members are initialized by the "operating system" and used by
 | 
			
		||||
** the core functions.  Exported members are initialized by the core functions
 | 
			
		||||
** and used by the "operating system".
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Mode and limit information for a context.  This information is
 | 
			
		||||
** kept around in the context so that values can be used during
 | 
			
		||||
** command execution, and for returning information about the
 | 
			
		||||
** context to the application.
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLcontextModesRec {
 | 
			
		||||
    GLboolean rgbMode;
 | 
			
		||||
    GLboolean colorIndexMode;
 | 
			
		||||
    GLboolean doubleBufferMode;
 | 
			
		||||
    GLboolean stereoMode;
 | 
			
		||||
 | 
			
		||||
    GLboolean haveAccumBuffer;
 | 
			
		||||
    GLboolean haveDepthBuffer;
 | 
			
		||||
    GLboolean haveStencilBuffer;
 | 
			
		||||
 | 
			
		||||
    GLint redBits, greenBits, blueBits, alphaBits;	/* bits per comp */
 | 
			
		||||
    GLuint redMask, greenMask, blueMask, alphaMask;
 | 
			
		||||
    GLint rgbBits;		/* total bits for rgb */
 | 
			
		||||
    GLint indexBits;		/* total bits for colorindex */
 | 
			
		||||
 | 
			
		||||
    GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
 | 
			
		||||
    GLint depthBits;
 | 
			
		||||
    GLint stencilBits;
 | 
			
		||||
 | 
			
		||||
    GLint numAuxBuffers;
 | 
			
		||||
 | 
			
		||||
    GLint level;
 | 
			
		||||
 | 
			
		||||
    GLint pixmapMode;
 | 
			
		||||
} __GLcontextModes;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Structure used for allocating and freeing drawable private memory.
 | 
			
		||||
** (like software buffers, for example).
 | 
			
		||||
**
 | 
			
		||||
** The memory allocation routines are provided by the surrounding
 | 
			
		||||
** "operating system" code, and they are to be used for allocating
 | 
			
		||||
** software buffers and things which are associated with the drawable,
 | 
			
		||||
** and used by any context which draws to that drawable.  There are
 | 
			
		||||
** separate memory allocation functions for drawables and contexts
 | 
			
		||||
** since drawables and contexts can be created and destroyed independently
 | 
			
		||||
** of one another, and the "operating system" may want to use separate
 | 
			
		||||
** allocation arenas for each.
 | 
			
		||||
**
 | 
			
		||||
** The freePrivate function is filled in by the core routines when they
 | 
			
		||||
** allocates software buffers, and stick them in "private".  The freePrivate
 | 
			
		||||
** function will destroy anything allocated to this drawable (to be called
 | 
			
		||||
** when the drawable is destroyed).
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
 | 
			
		||||
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
 | 
			
		||||
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
 | 
			
		||||
 | 
			
		||||
typedef struct __GLregionRectRec {
 | 
			
		||||
    /* lower left (inside the rectangle) */
 | 
			
		||||
    GLint x0, y0;
 | 
			
		||||
    /* upper right (outside the rectangle) */
 | 
			
		||||
    GLint x1, y1;
 | 
			
		||||
} __GLregionRect;
 | 
			
		||||
 | 
			
		||||
struct __GLdrawableRegionRec {
 | 
			
		||||
    GLint numRects;
 | 
			
		||||
    __GLregionRect *rects;
 | 
			
		||||
    __GLregionRect boundingRect;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/* masks for the buffers */
 | 
			
		||||
#define __GL_FRONT_BUFFER_MASK		0x00000001
 | 
			
		||||
#define	__GL_FRONT_LEFT_BUFFER_MASK	0x00000001
 | 
			
		||||
#define	__GL_FRONT_RIGHT_BUFFER_MASK	0x00000002
 | 
			
		||||
#define	__GL_BACK_BUFFER_MASK		0x00000004
 | 
			
		||||
#define __GL_BACK_LEFT_BUFFER_MASK	0x00000004
 | 
			
		||||
#define __GL_BACK_RIGHT_BUFFER_MASK	0x00000008
 | 
			
		||||
#define	__GL_ACCUM_BUFFER_MASK		0x00000010
 | 
			
		||||
#define	__GL_DEPTH_BUFFER_MASK		0x00000020
 | 
			
		||||
#define	__GL_STENCIL_BUFFER_MASK	0x00000040
 | 
			
		||||
#define	__GL_AUX_BUFFER_MASK(i)		(0x0000080 << (i))
 | 
			
		||||
 | 
			
		||||
#define __GL_ALL_BUFFER_MASK		0xffffffff
 | 
			
		||||
 | 
			
		||||
/* what Resize routines return if resize resorted to fallback case */
 | 
			
		||||
#define __GL_BUFFER_FALLBACK	0x10
 | 
			
		||||
 | 
			
		||||
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				      __GLdrawablePrivate *glPriv, GLint bits);
 | 
			
		||||
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				  __GLdrawablePrivate *glPriv, GLint bits,
 | 
			
		||||
				  __GLbufFallbackInitFn back);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** A drawable buffer
 | 
			
		||||
**
 | 
			
		||||
** This data structure describes the context side of a drawable.  
 | 
			
		||||
**
 | 
			
		||||
** According to the spec there could be multiple contexts bound to the same
 | 
			
		||||
** drawable at the same time (from different threads).  In order to avoid
 | 
			
		||||
** multiple-access conflicts, locks are used to serialize access.  When a
 | 
			
		||||
** thread needs to access (read or write) a member of the drawable, it takes
 | 
			
		||||
** a lock first.  Some of the entries in the drawable are treated "mostly
 | 
			
		||||
** constant", so we take the freedom of allowing access to them without
 | 
			
		||||
** taking a lock (for optimization reasons).
 | 
			
		||||
**
 | 
			
		||||
** For more details regarding locking, see buffers.h in the GL core
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawableBufferRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Buffer dimensions
 | 
			
		||||
    */
 | 
			
		||||
    GLint width, height, depth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer base address
 | 
			
		||||
    */
 | 
			
		||||
    void *base;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer size (in bytes)
 | 
			
		||||
    */
 | 
			
		||||
    GLuint size;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Size (in bytes) of each element in the framebuffer
 | 
			
		||||
    */
 | 
			
		||||
    GLuint elementSize;
 | 
			
		||||
    GLuint elementSizeLog2;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Element skip from one scanline to the next.
 | 
			
		||||
    ** If the buffer is part of another buffer (for example, fullscreen
 | 
			
		||||
    ** front buffer), outerWidth is the width of that buffer.
 | 
			
		||||
    */
 | 
			
		||||
    GLint outerWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** outerWidth * elementSize
 | 
			
		||||
    */
 | 
			
		||||
    GLint byteWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Allocation/deallocation is done based on this handle.  A handle
 | 
			
		||||
    ** is conceptually different from the framebuffer 'base'.
 | 
			
		||||
    */
 | 
			
		||||
    void *handle;
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    GLboolean (*resize)(__GLdrawableBuffer *buf,
 | 
			
		||||
			GLint x, GLint y, GLuint width, GLuint height, 
 | 
			
		||||
			__GLdrawablePrivate *glPriv, GLuint bufferMask);
 | 
			
		||||
    void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
 | 
			
		||||
    		GLuint val, GLint x, GLint y, GLint w, GLint h);
 | 
			
		||||
    void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
    void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* private */
 | 
			
		||||
    void *other;	/* implementation private data */
 | 
			
		||||
    __GLbufMainInitFn mainInit;
 | 
			
		||||
    __GLbufFallbackInitFn fallbackInit;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The context side of the drawable private
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawablePrivateRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable Modes
 | 
			
		||||
    */
 | 
			
		||||
    __GLcontextModes *modes;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable size
 | 
			
		||||
    */
 | 
			
		||||
    GLuint width, height;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Origin in screen coordinates of the drawable
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOrigin, yOrigin;
 | 
			
		||||
#ifdef __GL_ALIGNED_BUFFERS
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable offset from screen origin
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOffset, yOffset;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Alignment restriction
 | 
			
		||||
    */
 | 
			
		||||
    GLint xAlignment, yAlignment;
 | 
			
		||||
#endif
 | 
			
		||||
    /*
 | 
			
		||||
    ** Should we invert the y axis?
 | 
			
		||||
    */
 | 
			
		||||
    GLint yInverted;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Mask specifying which buffers are renderable by the hw
 | 
			
		||||
    */
 | 
			
		||||
    GLuint accelBufferMask;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** the buffers themselves
 | 
			
		||||
    */
 | 
			
		||||
    __GLdrawableBuffer frontBuffer;
 | 
			
		||||
    __GLdrawableBuffer backBuffer;
 | 
			
		||||
    __GLdrawableBuffer accumBuffer;
 | 
			
		||||
    __GLdrawableBuffer depthBuffer;
 | 
			
		||||
    __GLdrawableBuffer stencilBuffer;
 | 
			
		||||
#if __GL_NUMBER_OF_AUX_BUFFERS > 0
 | 
			
		||||
    __GLdrawableBuffer *auxBuffer;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    __GLdrawableRegion ownershipRegion;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Lock for the drawable private structure
 | 
			
		||||
    */
 | 
			
		||||
    void *lock;
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
    /* lock debugging info */
 | 
			
		||||
    int lockRefCount;
 | 
			
		||||
    int lockLine[10];
 | 
			
		||||
    char *lockFile[10];
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    void *(*malloc)(size_t size);
 | 
			
		||||
    void *(*calloc)(size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(void *addr);
 | 
			
		||||
 | 
			
		||||
    GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			     GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*setClipRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    GLboolean (*resize)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*getDrawableSize)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			    GLint *x, GLint *y, GLuint *width, GLuint *height);
 | 
			
		||||
 | 
			
		||||
    void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
 | 
			
		||||
    void (*unlockDP)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
    void *wsPriv;	/* pointer to the window system DrawablePrivate */
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
    void (*freePrivate)(__GLdrawablePrivate *);
 | 
			
		||||
 | 
			
		||||
    /* client data */
 | 
			
		||||
    void *other;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Macros to lock/unlock the drawable private
 | 
			
		||||
*/
 | 
			
		||||
#if defined(DEBUG)
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc) \
 | 
			
		||||
    (*(glPriv)->lockDP)(glPriv,gc); \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
 | 
			
		||||
    (glPriv)->lockRefCount++
 | 
			
		||||
#define __GL_UNLOCK_DP(glPriv) \
 | 
			
		||||
    (glPriv)->lockRefCount--; \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
 | 
			
		||||
    (*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#else /* DEBUG */
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc)		(*(glPriv)->lockDP)(glPriv,gc)
 | 
			
		||||
#define	__GL_UNLOCK_DP(glPriv)		(*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#endif /* DEBUG */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are imported by the GL from the surrounding
 | 
			
		||||
** "operating system".  Math functions are not considered part of the
 | 
			
		||||
** "operating system".
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLimportsRec {
 | 
			
		||||
    /* Memory management */
 | 
			
		||||
    void * (*malloc)(__GLcontext *gc, size_t size);
 | 
			
		||||
    void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(__GLcontext *gc, void *addr);
 | 
			
		||||
 | 
			
		||||
    /* Error handling */
 | 
			
		||||
    void (*warning)(__GLcontext *gc, char *fmt);
 | 
			
		||||
    void (*fatal)(__GLcontext *gc, char *fmt);
 | 
			
		||||
 | 
			
		||||
    /* other system calls */
 | 
			
		||||
    char *(CAPI *getenv)(__GLcontext *gc, const char *var);
 | 
			
		||||
    int (CAPI *atoi)(__GLcontext *gc, const char *str);
 | 
			
		||||
    int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...);
 | 
			
		||||
    void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode);
 | 
			
		||||
    int (CAPI *fclose)(__GLcontext *gc, void *stream);
 | 
			
		||||
    int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface management */
 | 
			
		||||
    __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Pointer to the window system context */
 | 
			
		||||
    void *wscx;
 | 
			
		||||
 | 
			
		||||
    /* Operating system dependent data goes here */
 | 
			
		||||
    void *other;
 | 
			
		||||
} __GLimports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are exported by the GL to the surrounding "operating
 | 
			
		||||
** system" so that it can manage multiple GL context's.
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLexportsRec {
 | 
			
		||||
    /* Context management (return GL_FALSE on failure) */
 | 
			
		||||
    GLboolean (*destroyContext)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*loseCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*makeCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare);
 | 
			
		||||
    GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask);
 | 
			
		||||
    GLboolean (*forceCurrent)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface notification callbacks */
 | 
			
		||||
    GLboolean (*notifyResize)(__GLcontext *gc);
 | 
			
		||||
    void (*notifyDestroy)(__GLcontext *gc);
 | 
			
		||||
    void (*notifySwapBuffers)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Dispatch table override control for external agents like libGLS */
 | 
			
		||||
    struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc);
 | 
			
		||||
    void (*beginDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
    void (*endDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
} __GLexports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This must be the first member of a __GLcontext structure.  This is the
 | 
			
		||||
** only part of a context that is exposed to the outside world; everything
 | 
			
		||||
** else is opaque.
 | 
			
		||||
*/
 | 
			
		||||
struct __GLinterfaceRec {
 | 
			
		||||
    __GLimports imports;
 | 
			
		||||
    __GLexports exports;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *);
 | 
			
		||||
extern void __glCoreNopDispatch(void);
 | 
			
		||||
 | 
			
		||||
#endif /* __gl_core_h_ */
 | 
			
		||||
@@ -1,431 +0,0 @@
 | 
			
		||||
/* $XFree86: xc/lib/GL/include/GL/internal/glcore.h,v 1.7 2001/03/25 05:32:00 tsi Exp $ */
 | 
			
		||||
#ifndef __gl_core_h_
 | 
			
		||||
#define __gl_core_h_
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** License Applicability. Except to the extent portions of this file are
 | 
			
		||||
** made subject to an alternative license as permitted in the SGI Free
 | 
			
		||||
** Software License B, Version 1.1 (the "License"), the contents of this
 | 
			
		||||
** file are subject only to the provisions of the License. You may not use
 | 
			
		||||
** this file except in compliance with the License. You may obtain a copy
 | 
			
		||||
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
 | 
			
		||||
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
 | 
			
		||||
** 
 | 
			
		||||
** http://oss.sgi.com/projects/FreeB
 | 
			
		||||
** 
 | 
			
		||||
** Note that, as provided in the License, the Software is distributed on an
 | 
			
		||||
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
 | 
			
		||||
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
 | 
			
		||||
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
 | 
			
		||||
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
 | 
			
		||||
** 
 | 
			
		||||
** Original Code. The Original Code is: OpenGL Sample Implementation,
 | 
			
		||||
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 | 
			
		||||
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 | 
			
		||||
** Copyright in any portions created by third parties is as indicated
 | 
			
		||||
** elsewhere herein. All Rights Reserved.
 | 
			
		||||
** 
 | 
			
		||||
** Additional Notice Provisions: The application programming interfaces
 | 
			
		||||
** established by SGI in conjunction with the Original Code are The
 | 
			
		||||
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
 | 
			
		||||
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
 | 
			
		||||
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
 | 
			
		||||
** Window System(R) (Version 1.3), released October 19, 1998. This software
 | 
			
		||||
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
 | 
			
		||||
** published by SGI, but has not been independently verified as being
 | 
			
		||||
** compliant with the OpenGL(R) version 1.2.1 Specification.
 | 
			
		||||
**
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef XFree86LOADER
 | 
			
		||||
#include <sys/types.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define GL_CORE_SGI  1
 | 
			
		||||
#define GL_CORE_MESA 2
 | 
			
		||||
 | 
			
		||||
typedef struct __GLcontextRec __GLcontext;
 | 
			
		||||
typedef struct __GLinterfaceRec __GLinterface;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This file defines the interface between the GL core and the surrounding
 | 
			
		||||
** "operating system" that supports it (currently the GLX or WGL extensions).
 | 
			
		||||
**
 | 
			
		||||
** Members (data and function pointers) are documented as imported or
 | 
			
		||||
** exported according to how they are used by the core rendering functions.
 | 
			
		||||
** Imported members are initialized by the "operating system" and used by
 | 
			
		||||
** the core functions.  Exported members are initialized by the core functions
 | 
			
		||||
** and used by the "operating system".
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Mode and limit information for a context.  This information is
 | 
			
		||||
 * kept around in the context so that values can be used during
 | 
			
		||||
 * command execution, and for returning information about the
 | 
			
		||||
 * context to the application.
 | 
			
		||||
 */
 | 
			
		||||
typedef struct __GLcontextModesRec {
 | 
			
		||||
    GLboolean rgbMode;
 | 
			
		||||
    GLboolean colorIndexMode;
 | 
			
		||||
    GLboolean doubleBufferMode;
 | 
			
		||||
    GLboolean stereoMode;
 | 
			
		||||
 | 
			
		||||
    GLboolean haveAccumBuffer;
 | 
			
		||||
    GLboolean haveDepthBuffer;
 | 
			
		||||
    GLboolean haveStencilBuffer;
 | 
			
		||||
 | 
			
		||||
    GLint redBits, greenBits, blueBits, alphaBits;	/* bits per comp */
 | 
			
		||||
    GLuint redMask, greenMask, blueMask, alphaMask;
 | 
			
		||||
    GLint rgbBits;		/* total bits for rgb */
 | 
			
		||||
    GLint indexBits;		/* total bits for colorindex */
 | 
			
		||||
 | 
			
		||||
    GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
 | 
			
		||||
    GLint depthBits;
 | 
			
		||||
    GLint stencilBits;
 | 
			
		||||
 | 
			
		||||
    GLint numAuxBuffers;
 | 
			
		||||
 | 
			
		||||
    GLint level;
 | 
			
		||||
 | 
			
		||||
    GLint pixmapMode;
 | 
			
		||||
} __GLcontextModes;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Structure used for allocating and freeing drawable private memory.
 | 
			
		||||
** (like software buffers, for example).
 | 
			
		||||
**
 | 
			
		||||
** The memory allocation routines are provided by the surrounding
 | 
			
		||||
** "operating system" code, and they are to be used for allocating
 | 
			
		||||
** software buffers and things which are associated with the drawable,
 | 
			
		||||
** and used by any context which draws to that drawable.  There are
 | 
			
		||||
** separate memory allocation functions for drawables and contexts
 | 
			
		||||
** since drawables and contexts can be created and destroyed independently
 | 
			
		||||
** of one another, and the "operating system" may want to use separate
 | 
			
		||||
** allocation arenas for each.
 | 
			
		||||
**
 | 
			
		||||
** The freePrivate function is filled in by the core routines when they
 | 
			
		||||
** allocates software buffers, and stick them in "private".  The freePrivate
 | 
			
		||||
** function will destroy anything allocated to this drawable (to be called
 | 
			
		||||
** when the drawable is destroyed).
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLdrawableRegionRec __GLdrawableRegion;
 | 
			
		||||
typedef struct __GLdrawableBufferRec __GLdrawableBuffer;
 | 
			
		||||
typedef struct __GLdrawablePrivateRec __GLdrawablePrivate;
 | 
			
		||||
 | 
			
		||||
typedef struct __GLregionRectRec {
 | 
			
		||||
    /* lower left (inside the rectangle) */
 | 
			
		||||
    GLint x0, y0;
 | 
			
		||||
    /* upper right (outside the rectangle) */
 | 
			
		||||
    GLint x1, y1;
 | 
			
		||||
} __GLregionRect;
 | 
			
		||||
 | 
			
		||||
struct __GLdrawableRegionRec {
 | 
			
		||||
    GLint numRects;
 | 
			
		||||
    __GLregionRect *rects;
 | 
			
		||||
    __GLregionRect boundingRect;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/* masks for the buffers */
 | 
			
		||||
#define __GL_FRONT_BUFFER_MASK		0x00000001
 | 
			
		||||
#define	__GL_FRONT_LEFT_BUFFER_MASK	0x00000001
 | 
			
		||||
#define	__GL_FRONT_RIGHT_BUFFER_MASK	0x00000002
 | 
			
		||||
#define	__GL_BACK_BUFFER_MASK		0x00000004
 | 
			
		||||
#define __GL_BACK_LEFT_BUFFER_MASK	0x00000004
 | 
			
		||||
#define __GL_BACK_RIGHT_BUFFER_MASK	0x00000008
 | 
			
		||||
#define	__GL_ACCUM_BUFFER_MASK		0x00000010
 | 
			
		||||
#define	__GL_DEPTH_BUFFER_MASK		0x00000020
 | 
			
		||||
#define	__GL_STENCIL_BUFFER_MASK	0x00000040
 | 
			
		||||
#define	__GL_AUX_BUFFER_MASK(i)		(0x0000080 << (i))
 | 
			
		||||
 | 
			
		||||
#define __GL_ALL_BUFFER_MASK		0xffffffff
 | 
			
		||||
 | 
			
		||||
/* what Resize routines return if resize resorted to fallback case */
 | 
			
		||||
#define __GL_BUFFER_FALLBACK	0x10
 | 
			
		||||
 | 
			
		||||
typedef void (*__GLbufFallbackInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				      __GLdrawablePrivate *glPriv, GLint bits);
 | 
			
		||||
typedef void (*__GLbufMainInitFn)(__GLdrawableBuffer *buf, 
 | 
			
		||||
				  __GLdrawablePrivate *glPriv, GLint bits,
 | 
			
		||||
				  __GLbufFallbackInitFn back);
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** A drawable buffer
 | 
			
		||||
**
 | 
			
		||||
** This data structure describes the context side of a drawable.  
 | 
			
		||||
**
 | 
			
		||||
** According to the spec there could be multiple contexts bound to the same
 | 
			
		||||
** drawable at the same time (from different threads).  In order to avoid
 | 
			
		||||
** multiple-access conflicts, locks are used to serialize access.  When a
 | 
			
		||||
** thread needs to access (read or write) a member of the drawable, it takes
 | 
			
		||||
** a lock first.  Some of the entries in the drawable are treated "mostly
 | 
			
		||||
** constant", so we take the freedom of allowing access to them without
 | 
			
		||||
** taking a lock (for optimization reasons).
 | 
			
		||||
**
 | 
			
		||||
** For more details regarding locking, see buffers.h in the GL core
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawableBufferRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Buffer dimensions
 | 
			
		||||
    */
 | 
			
		||||
    GLint width, height, depth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer base address
 | 
			
		||||
    */
 | 
			
		||||
    void *base;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Framebuffer size (in bytes)
 | 
			
		||||
    */
 | 
			
		||||
    GLuint size;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Size (in bytes) of each element in the framebuffer
 | 
			
		||||
    */
 | 
			
		||||
    GLuint elementSize;
 | 
			
		||||
    GLuint elementSizeLog2;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Element skip from one scanline to the next.
 | 
			
		||||
    ** If the buffer is part of another buffer (for example, fullscreen
 | 
			
		||||
    ** front buffer), outerWidth is the width of that buffer.
 | 
			
		||||
    */
 | 
			
		||||
    GLint outerWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** outerWidth * elementSize
 | 
			
		||||
    */
 | 
			
		||||
    GLint byteWidth;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Allocation/deallocation is done based on this handle.  A handle
 | 
			
		||||
    ** is conceptually different from the framebuffer 'base'.
 | 
			
		||||
    */
 | 
			
		||||
    void *handle;
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    GLboolean (*resize)(__GLdrawableBuffer *buf,
 | 
			
		||||
			GLint x, GLint y, GLuint width, GLuint height, 
 | 
			
		||||
			__GLdrawablePrivate *glPriv, GLuint bufferMask);
 | 
			
		||||
    void (*lock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*unlock)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*fill)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv,
 | 
			
		||||
    		GLuint val, GLint x, GLint y, GLint w, GLint h);
 | 
			
		||||
    void (*free)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
    void (*freePrivate)(__GLdrawableBuffer *buf, __GLdrawablePrivate *glPriv);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* private */
 | 
			
		||||
    void *other;	/* implementation private data */
 | 
			
		||||
    __GLbufMainInitFn mainInit;
 | 
			
		||||
    __GLbufFallbackInitFn fallbackInit;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The context side of the drawable private
 | 
			
		||||
*/
 | 
			
		||||
struct __GLdrawablePrivateRec {
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable Modes
 | 
			
		||||
    */
 | 
			
		||||
    __GLcontextModes *modes;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable size
 | 
			
		||||
    */
 | 
			
		||||
    GLuint width, height;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Origin in screen coordinates of the drawable
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOrigin, yOrigin;
 | 
			
		||||
#ifdef __GL_ALIGNED_BUFFERS
 | 
			
		||||
    /*
 | 
			
		||||
    ** Drawable offset from screen origin
 | 
			
		||||
    */
 | 
			
		||||
    GLint xOffset, yOffset;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Alignment restriction
 | 
			
		||||
    */
 | 
			
		||||
    GLint xAlignment, yAlignment;
 | 
			
		||||
#endif
 | 
			
		||||
    /*
 | 
			
		||||
    ** Should we invert the y axis?
 | 
			
		||||
    */
 | 
			
		||||
    GLint yInverted;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Mask specifying which buffers are renderable by the hw
 | 
			
		||||
    */
 | 
			
		||||
    GLuint accelBufferMask;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** the buffers themselves
 | 
			
		||||
    */
 | 
			
		||||
    __GLdrawableBuffer frontBuffer;
 | 
			
		||||
    __GLdrawableBuffer backBuffer;
 | 
			
		||||
    __GLdrawableBuffer accumBuffer;
 | 
			
		||||
    __GLdrawableBuffer depthBuffer;
 | 
			
		||||
    __GLdrawableBuffer stencilBuffer;
 | 
			
		||||
#if defined(__GL_NUMBER_OF_AUX_BUFFERS) && (__GL_NUMBER_OF_AUX_BUFFERS > 0)
 | 
			
		||||
    __GLdrawableBuffer *auxBuffer;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    __GLdrawableRegion ownershipRegion;
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
    ** Lock for the drawable private structure
 | 
			
		||||
    */
 | 
			
		||||
    void *lock;
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
    /* lock debugging info */
 | 
			
		||||
    int lockRefCount;
 | 
			
		||||
    int lockLine[10];
 | 
			
		||||
    char *lockFile[10];
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* imported */
 | 
			
		||||
    void *(*malloc)(size_t size);
 | 
			
		||||
    void *(*calloc)(size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(void *addr);
 | 
			
		||||
 | 
			
		||||
    GLboolean (*addSwapRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			     GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*setClipRect)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			GLint x, GLint y, GLsizei width, GLsizei height);
 | 
			
		||||
    void (*updateClipRegion)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    GLboolean (*resize)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
    void (*getDrawableSize)(__GLdrawablePrivate *glPriv, 
 | 
			
		||||
			    GLint *x, GLint *y, GLuint *width, GLuint *height);
 | 
			
		||||
 | 
			
		||||
    void (*lockDP)(__GLdrawablePrivate *glPriv, __GLcontext *gc);
 | 
			
		||||
    void (*unlockDP)(__GLdrawablePrivate *glPriv);
 | 
			
		||||
 | 
			
		||||
    /* exported */
 | 
			
		||||
#if 0 /* disable, just like in __GLimportsRec */
 | 
			
		||||
    void *wsPriv;	/* pointer to the window system DrawablePrivate */
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
    void *privatePtr;
 | 
			
		||||
#else
 | 
			
		||||
    void *private;
 | 
			
		||||
#endif
 | 
			
		||||
    void (*freePrivate)(__GLdrawablePrivate *);
 | 
			
		||||
 | 
			
		||||
    /* client data */
 | 
			
		||||
    void *other;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Macros to lock/unlock the drawable private
 | 
			
		||||
*/
 | 
			
		||||
#if defined(DEBUG)
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc) \
 | 
			
		||||
    (*(glPriv)->lockDP)(glPriv,gc); \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = __LINE__; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = __FILE__; \
 | 
			
		||||
    (glPriv)->lockRefCount++
 | 
			
		||||
#define __GL_UNLOCK_DP(glPriv) \
 | 
			
		||||
    (glPriv)->lockRefCount--; \
 | 
			
		||||
    (glPriv)->lockLine[(glPriv)->lockRefCount] = 0; \
 | 
			
		||||
    (glPriv)->lockFile[(glPriv)->lockRefCount] = NULL; \
 | 
			
		||||
    (*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#else /* DEBUG */
 | 
			
		||||
#define __GL_LOCK_DP(glPriv,gc)		(*(glPriv)->lockDP)(glPriv,gc)
 | 
			
		||||
#define	__GL_UNLOCK_DP(glPriv)		(*(glPriv)->unlockDP)(glPriv)
 | 
			
		||||
#endif /* DEBUG */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are imported by the GL from the surrounding
 | 
			
		||||
** "operating system".  Math functions are not considered part of the
 | 
			
		||||
** "operating system".
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLimportsRec {
 | 
			
		||||
    /* Memory management */
 | 
			
		||||
    void * (*malloc)(__GLcontext *gc, size_t size);
 | 
			
		||||
    void *(*calloc)(__GLcontext *gc, size_t numElem, size_t elemSize);
 | 
			
		||||
    void *(*realloc)(__GLcontext *gc, void *oldAddr, size_t newSize);
 | 
			
		||||
    void (*free)(__GLcontext *gc, void *addr);
 | 
			
		||||
 | 
			
		||||
    /* Error handling */
 | 
			
		||||
    void (*warning)(__GLcontext *gc, char *fmt);
 | 
			
		||||
    void (*fatal)(__GLcontext *gc, char *fmt);
 | 
			
		||||
 | 
			
		||||
    /* other system calls */
 | 
			
		||||
    char *(CAPI *getenv)(__GLcontext *gc, const char *var);
 | 
			
		||||
    int (CAPI *atoi)(__GLcontext *gc, const char *str);
 | 
			
		||||
    int (CAPI *sprintf)(__GLcontext *gc, char *str, const char *fmt, ...);
 | 
			
		||||
    void *(CAPI *fopen)(__GLcontext *gc, const char *path, const char *mode);
 | 
			
		||||
    int (CAPI *fclose)(__GLcontext *gc, void *stream);
 | 
			
		||||
    int (CAPI *fprintf)(__GLcontext *gc, void *stream, const char *fmt, ...);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface management */
 | 
			
		||||
    __GLdrawablePrivate *(*getDrawablePrivate)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
   /* At some point, this field got removed from the XFree86 glcore.h file.
 | 
			
		||||
    * we're removing it here to prevent interop problems. (Brian)
 | 
			
		||||
    */
 | 
			
		||||
    /* Pointer to the window system context */
 | 
			
		||||
    void *wscx;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /* Operating system dependent data goes here */
 | 
			
		||||
    void *other;
 | 
			
		||||
} __GLimports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** Procedures which are exported by the GL to the surrounding "operating
 | 
			
		||||
** system" so that it can manage multiple GL context's.
 | 
			
		||||
*/
 | 
			
		||||
typedef struct __GLexportsRec {
 | 
			
		||||
    /* Context management (return GL_FALSE on failure) */
 | 
			
		||||
    GLboolean (*destroyContext)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*loseCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*makeCurrent)(__GLcontext *gc);
 | 
			
		||||
    GLboolean (*shareContext)(__GLcontext *gc, __GLcontext *gcShare);
 | 
			
		||||
    GLboolean (*copyContext)(__GLcontext *dst, const __GLcontext *src, GLuint mask);
 | 
			
		||||
    GLboolean (*forceCurrent)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Drawing surface notification callbacks */
 | 
			
		||||
    GLboolean (*notifyResize)(__GLcontext *gc);
 | 
			
		||||
    void (*notifyDestroy)(__GLcontext *gc);
 | 
			
		||||
    void (*notifySwapBuffers)(__GLcontext *gc);
 | 
			
		||||
 | 
			
		||||
    /* Dispatch table override control for external agents like libGLS */
 | 
			
		||||
    struct __GLdispatchStateRec* (*dispatchExec)(__GLcontext *gc);
 | 
			
		||||
    void (*beginDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
    void (*endDispatchOverride)(__GLcontext *gc);
 | 
			
		||||
} __GLexports;
 | 
			
		||||
 | 
			
		||||
/************************************************************************/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** This must be the first member of a __GLcontext structure.  This is the
 | 
			
		||||
** only part of a context that is exposed to the outside world; everything
 | 
			
		||||
** else is opaque.
 | 
			
		||||
*/
 | 
			
		||||
struct __GLinterfaceRec {
 | 
			
		||||
    __GLimports imports;
 | 
			
		||||
    __GLexports exports;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
extern __GLcontext *__glCoreCreateContext(__GLimports *, __GLcontextModes *);
 | 
			
		||||
extern void __glCoreNopDispatch(void);
 | 
			
		||||
 | 
			
		||||
#endif /* __gl_core_h_ */
 | 
			
		||||
@@ -1,125 +1,124 @@
 | 
			
		||||
/* $Id: mesa_wgl.h,v 1.6 2001/05/07 13:58:00 gareth Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999  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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* prototypes for the Mesa WGL functions */
 | 
			
		||||
/* relocated here so that I could make GLUT get them properly */
 | 
			
		||||
 | 
			
		||||
#define _mesa_wgl_h_
 | 
			
		||||
 | 
			
		||||
#ifndef _mesa_wgl_h_
 | 
			
		||||
#define _mesa_wgl_h_
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <gl/gl.h>
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
 | 
			
		||||
#  if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
 | 
			
		||||
#    define GLAPI __declspec(dllexport)
 | 
			
		||||
#    define WGLAPI __declspec(dllexport)
 | 
			
		||||
#  elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
 | 
			
		||||
#    define GLAPI __declspec(dllimport)
 | 
			
		||||
#    define WGLAPI __declspec(dllimport)
 | 
			
		||||
#  else /* for use with static link lib build of Win32 edition only */
 | 
			
		||||
#    define GLAPI extern
 | 
			
		||||
#    define WGLAPI __declspec(dllimport)
 | 
			
		||||
#  endif /* _STATIC_MESA support */
 | 
			
		||||
#  define GLAPIENTRY __stdcall
 | 
			
		||||
#else
 | 
			
		||||
/* non-Windows compilation */
 | 
			
		||||
#  define GLAPI extern
 | 
			
		||||
#  define GLAPIENTRY
 | 
			
		||||
#endif /* WIN32 / CYGWIN32 bracket */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
 | 
			
		||||
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
 | 
			
		||||
#	ifdef UNICODE
 | 
			
		||||
#		define wglUseFontBitmaps  wglUseFontBitmapsW
 | 
			
		||||
#		define wglUseFontOutlines  wglUseFontOutlinesW
 | 
			
		||||
#	else
 | 
			
		||||
#		define wglUseFontBitmaps  wglUseFontBitmapsA
 | 
			
		||||
#		define wglUseFontOutlines  wglUseFontOutlinesA
 | 
			
		||||
#	endif /* !UNICODE */
 | 
			
		||||
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
 | 
			
		||||
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
 | 
			
		||||
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
 | 
			
		||||
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
 | 
			
		||||
#  pragma warning( push )
 | 
			
		||||
#  pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapBuffers(HDC hdc);
 | 
			
		||||
WGLAPI HDC   GLAPIENTRY wglGetCurrentDC(void);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
 | 
			
		||||
WGLAPI PROC  GLAPIENTRY wglGetProcAddress(const char*);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetPixelFormat(HDC hdc);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglShareLists(HGLRC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SwapBuffers(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY GetPixelFormat(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( pop )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* _mesa_wgl_h_ */
 | 
			
		||||
/* $Id: mesa_wgl.h,v 1.5.4.1 2000/11/20 17:31:51 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.1
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999  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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* prototypes for the Mesa WGL functions */
 | 
			
		||||
/* relocated here so that I could make GLUT get them properly */
 | 
			
		||||
 | 
			
		||||
#ifndef _mesa_wgl_h_
 | 
			
		||||
#define _mesa_wgl_h_
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <gl/gl.h>
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
 | 
			
		||||
#  if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
 | 
			
		||||
#    define GLAPI __declspec(dllexport)
 | 
			
		||||
#    define WGLAPI __declspec(dllexport)
 | 
			
		||||
#  elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
 | 
			
		||||
#    define GLAPI __declspec(dllimport)
 | 
			
		||||
#    define WGLAPI __declspec(dllimport)
 | 
			
		||||
#  else /* for use with static link lib build of Win32 edition only */
 | 
			
		||||
#    define GLAPI extern
 | 
			
		||||
#    define WGLAPI __declspec(dllimport)
 | 
			
		||||
#  endif /* _STATIC_MESA support */
 | 
			
		||||
#  define GLAPIENTRY __stdcall
 | 
			
		||||
#else
 | 
			
		||||
/* non-Windows compilation */
 | 
			
		||||
#  define GLAPI extern
 | 
			
		||||
#  define GLAPIENTRY
 | 
			
		||||
#endif /* WIN32 / CYGWIN32 bracket */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
 | 
			
		||||
#ifndef _GNU_H_WINDOWS32_FUNCTIONS
 | 
			
		||||
#	ifdef UNICODE
 | 
			
		||||
#		define wglUseFontBitmaps  wglUseFontBitmapsW
 | 
			
		||||
#		define wglUseFontOutlines  wglUseFontOutlinesW
 | 
			
		||||
#	else
 | 
			
		||||
#		define wglUseFontBitmaps  wglUseFontBitmapsA
 | 
			
		||||
#		define wglUseFontOutlines  wglUseFontOutlinesA
 | 
			
		||||
#	endif /* !UNICODE */
 | 
			
		||||
#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
 | 
			
		||||
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
 | 
			
		||||
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
 | 
			
		||||
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( disable : 4615 ) /* pragma warning : unknown user warning type*/
 | 
			
		||||
#  pragma warning( push )
 | 
			
		||||
#  pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapBuffers(HDC hdc);
 | 
			
		||||
WGLAPI HDC   GLAPIENTRY wglGetCurrentDC(void);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
 | 
			
		||||
WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
 | 
			
		||||
WGLAPI PROC  GLAPIENTRY wglGetProcAddress(const char*);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDeleteContext(HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglGetPixelFormat(HDC hdc);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglShareLists(HGLRC, HGLRC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SwapBuffers(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
WGLAPI int   GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
 | 
			
		||||
WGLAPI int   GLAPIENTRY GetPixelFormat(HDC);
 | 
			
		||||
WGLAPI int   GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
 | 
			
		||||
 | 
			
		||||
#ifdef _MSC_VER
 | 
			
		||||
#  pragma warning( pop )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* _mesa_wgl_h_ */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: osmesa.h,v 1.10 2002/04/04 16:58:04 brianp Exp $ */
 | 
			
		||||
/* $Id: osmesa.h,v 1.5 2000/03/28 16:59:39 rjfrank Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.1
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 1999-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"),
 | 
			
		||||
@@ -59,12 +59,11 @@ extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define OSMESA_MAJOR_VERSION 4
 | 
			
		||||
#define OSMESA_MINOR_VERSION 1
 | 
			
		||||
#define OSMESA_PATCH_VERSION 0
 | 
			
		||||
#define OSMESA_MAJOR_VERSION 3
 | 
			
		||||
#define OSMESA_MINOR_VERSION 3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -78,7 +77,6 @@ extern "C" {
 | 
			
		||||
#define OSMESA_ARGB		0x2
 | 
			
		||||
#define OSMESA_RGB		GL_RGB
 | 
			
		||||
#define OSMESA_BGR		0x4
 | 
			
		||||
#define OSMESA_RGB_565		0x5
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@@ -96,8 +94,6 @@ extern "C" {
 | 
			
		||||
#define OSMESA_HEIGHT		0x21
 | 
			
		||||
#define OSMESA_FORMAT		0x22
 | 
			
		||||
#define OSMESA_TYPE		0x23
 | 
			
		||||
#define OSMESA_MAX_WIDTH	0x24  /* new in 4.0 */
 | 
			
		||||
#define OSMESA_MAX_HEIGHT	0x25  /* new in 4.0 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct osmesa_context *OSMesaContext;
 | 
			
		||||
@@ -118,31 +114,18 @@ typedef struct osmesa_context *OSMesaContext;
 | 
			
		||||
 *                     display lists.  NULL indicates no sharing.
 | 
			
		||||
 * Return:  an OSMesaContext or 0 if error
 | 
			
		||||
 */
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY
 | 
			
		||||
OSMesaCreateContext( GLenum format, OSMesaContext sharelist );
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY OSMesaCreateContext( GLenum format,
 | 
			
		||||
                                                    OSMesaContext sharelist );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create an Off-Screen Mesa rendering context and specify desired
 | 
			
		||||
 * size of depth buffer, stencil buffer and accumulation buffer.
 | 
			
		||||
 * If you specify zero for depthBits, stencilBits, accumBits you
 | 
			
		||||
 * can save some memory.
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 3.5
 | 
			
		||||
 */
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY
 | 
			
		||||
OSMesaCreateContextExt( GLenum format, GLint depthBits, GLint stencilBits,
 | 
			
		||||
                        GLint accumBits, OSMesaContext sharelist);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Destroy an Off-Screen Mesa rendering context.
 | 
			
		||||
 *
 | 
			
		||||
 * Input:  ctx - the context to destroy
 | 
			
		||||
 */
 | 
			
		||||
GLAPI void GLAPIENTRY
 | 
			
		||||
OSMesaDestroyContext( OSMesaContext ctx );
 | 
			
		||||
GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -173,9 +156,9 @@ OSMesaDestroyContext( OSMesaContext ctx );
 | 
			
		||||
 *          invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
 | 
			
		||||
 *          width>internal limit or height>internal limit.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY
 | 
			
		||||
OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
 | 
			
		||||
                   GLsizei width, GLsizei height );
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
 | 
			
		||||
                                              void *buffer, GLenum type,
 | 
			
		||||
                                              GLsizei width, GLsizei height );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -183,8 +166,7 @@ OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
 | 
			
		||||
/*
 | 
			
		||||
 * Return the current Off-Screen Mesa rendering context handle.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY
 | 
			
		||||
OSMesaGetCurrentContext( void );
 | 
			
		||||
GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -201,8 +183,7 @@ OSMesaGetCurrentContext( void );
 | 
			
		||||
 *
 | 
			
		||||
 * New in version 2.0.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI void GLAPIENTRY
 | 
			
		||||
OSMesaPixelStore( GLint pname, GLint value );
 | 
			
		||||
GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -217,8 +198,7 @@ OSMesaPixelStore( GLint pname, GLint value );
 | 
			
		||||
 *                 OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction
 | 
			
		||||
 *         value - pointer to integer in which to return result.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI void GLAPIENTRY
 | 
			
		||||
OSMesaGetIntegerv( GLint pname, GLint *value );
 | 
			
		||||
GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -232,10 +212,10 @@ OSMesaGetIntegerv( GLint pname, GLint *value );
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 2.4.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY
 | 
			
		||||
OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
 | 
			
		||||
                      GLint *bytesPerValue, void **buffer );
 | 
			
		||||
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY OSMesaGetDepthBuffer( OSMesaContext c,
 | 
			
		||||
                                                 GLint *width, GLint *height,
 | 
			
		||||
                                                 GLint *bytesPerValue,
 | 
			
		||||
                                                 void **buffer );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@@ -248,19 +228,10 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 3.3.
 | 
			
		||||
 */
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY
 | 
			
		||||
OSMesaGetColorBuffer( OSMesaContext c, GLint *width, GLint *height,
 | 
			
		||||
                      GLint *format, void **buffer );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Return pointer to the named function.
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 4.1
 | 
			
		||||
 */
 | 
			
		||||
GLAPI void * GLAPIENTRY
 | 
			
		||||
OSMesaGetProcAddress( const char *funcName );
 | 
			
		||||
GLAPI GLboolean GLAPIENTRY OSMesaGetColorBuffer( OSMesaContext c,
 | 
			
		||||
                                                 GLint *width, GLint *height,
 | 
			
		||||
                                                 GLint *format,
 | 
			
		||||
                                                 void **buffer );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
/* $Id: svgamesa.h,v 1.6 2001/09/23 16:06:13 brianp Exp $ */
 | 
			
		||||
/* $Id: svgamesa.h,v 1.4 2000/02/09 19:03:28 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 * Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
@@ -52,8 +52,8 @@
 | 
			
		||||
#define SVGAMESA_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define SVGAMESA_MAJOR_VERSION 4
 | 
			
		||||
#define SVGAMESA_MINOR_VERSION 0
 | 
			
		||||
#define SVGAMESA_MAJOR_VERSION 3
 | 
			
		||||
#define SVGAMESA_MINOR_VERSION 3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
 
 | 
			
		||||
@@ -1,45 +0,0 @@
 | 
			
		||||
/* uglglutshapes.h - Public header GLUT Shapes */
 | 
			
		||||
 | 
			
		||||
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
 | 
			
		||||
 | 
			
		||||
/* This program is freely distributable without licensing fees  and is
 | 
			
		||||
   provided without guarantee or warrantee expressed or  implied. This
 | 
			
		||||
   program is -not- in the public domain. */
 | 
			
		||||
 | 
			
		||||
#ifndef GLUTSHAPES_H
 | 
			
		||||
#define GLUTSHAPES_H
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/gl.h>  
 | 
			
		||||
 | 
			
		||||
void glutWireSphere (GLdouble radius, GLint slices, GLint stacks);
 | 
			
		||||
void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks);
 | 
			
		||||
void glutWireCone (GLdouble base, GLdouble height,
 | 
			
		||||
		   GLint slices, GLint stacks);
 | 
			
		||||
void glutSolidCone (GLdouble base, GLdouble height,
 | 
			
		||||
		    GLint slices, GLint stacks);
 | 
			
		||||
void glutWireCube (GLdouble size);
 | 
			
		||||
void glutSolidCube (GLdouble size);
 | 
			
		||||
void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
		    GLint sides, GLint rings);
 | 
			
		||||
void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
		     GLint sides, GLint rings);
 | 
			
		||||
void glutWireDodecahedron (void);
 | 
			
		||||
void glutSolidDodecahedron (void);
 | 
			
		||||
void glutWireOctahedron (void);
 | 
			
		||||
void glutSolidOctahedron (void);
 | 
			
		||||
void glutWireTetrahedron (void);
 | 
			
		||||
void glutSolidTetrahedron (void);
 | 
			
		||||
void glutWireIcosahedron (void);
 | 
			
		||||
void glutSolidIcosahedron (void);
 | 
			
		||||
void glutWireTeapot (GLdouble size);
 | 
			
		||||
void glutSolidTeapot (GLdouble size);
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,155 +0,0 @@
 | 
			
		||||
/* uglmesa.h - Public header UGL/Mesa */
 | 
			
		||||
 | 
			
		||||
/* Copyright (C) 2001 by Wind River Systems, Inc */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.0
 | 
			
		||||
 *
 | 
			
		||||
 * The MIT License
 | 
			
		||||
 * 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
 | 
			
		||||
 * THE AUTHORS OR COPYRIGHT 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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Author:
 | 
			
		||||
 * Stephane Raimbault <stephane.raimbault@windriver.com> 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef UGLMESA_H
 | 
			
		||||
#define UGLMESA_H
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define UGL_MESA_MAJOR_VERSION 4
 | 
			
		||||
#define UGL_MESA_MINOR_VERSION 0
 | 
			
		||||
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
#include <ugl/ugl.h>
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Values for display mode of uglMesaCreateContext ()
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * With these mask values, it's possible to test double buffer mode
 | 
			
		||||
 * with UGL_MESA_DOUBLE mask
 | 
			
		||||
 *
 | 
			
		||||
 * SINGLE  0000 0001
 | 
			
		||||
 * DOUBLE  0000 0110
 | 
			
		||||
 * -  SOFT 0000 0010
 | 
			
		||||
 * -  HARD 0000 0100
 | 
			
		||||
 * WINDML  0001 0000
 | 
			
		||||
 *
 | 
			
		||||
 * 
 | 
			
		||||
 */
 | 
			
		||||
#define UGL_MESA_SINGLE            0x01
 | 
			
		||||
#define UGL_MESA_DOUBLE            0x06
 | 
			
		||||
#define UGL_MESA_DOUBLE_SOFTWARE   0x02
 | 
			
		||||
#define UGL_MESA_DOUBLE_HARDWARE   0x04
 | 
			
		||||
    
 | 
			
		||||
#define UGL_MESA_WINDML_EXCLUSIVE  0x10
 | 
			
		||||
 | 
			
		||||
#define UGL_MESA_FULLSCREEN_WIDTH  0x0
 | 
			
		||||
#define UGL_MESA_FULLSCREEN_HEIGHT 0x0
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * uglMesaPixelStore() parameters:
 | 
			
		||||
 */
 | 
			
		||||
    
 | 
			
		||||
#define UGL_MESA_ROW_LENGTH	   0x20
 | 
			
		||||
#define UGL_MESA_Y_UP              0x21
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
 * Accepted by uglMesaGetIntegerv:
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#define UGL_MESA_LEFT_X		        0x01
 | 
			
		||||
#define UGL_MESA_TOP_Y		        0x02    
 | 
			
		||||
#define UGL_MESA_WIDTH		        0x03
 | 
			
		||||
#define UGL_MESA_HEIGHT		        0x04
 | 
			
		||||
#define UGL_MESA_DISPLAY_WIDTH          0x05
 | 
			
		||||
#define UGL_MESA_DISPLAY_HEIGHT         0x06
 | 
			
		||||
#define UGL_MESA_COLOR_FORMAT	        0x07
 | 
			
		||||
#define UGL_MESA_COLOR_MODEL            0x08
 | 
			
		||||
#define UGL_MESA_PIXEL_FORMAT           0x09
 | 
			
		||||
#define UGL_MESA_TYPE		        0x0A
 | 
			
		||||
#define UGL_MESA_RGB		        0x0B
 | 
			
		||||
#define UGL_MESA_COLOR_INDEXED          0x0C
 | 
			
		||||
#define UGL_MESA_SINGLE_BUFFER          0x0D
 | 
			
		||||
#define UGL_MESA_DOUBLE_BUFFER          0x0E
 | 
			
		||||
#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
 | 
			
		||||
#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
 | 
			
		||||
    
 | 
			
		||||
/*
 | 
			
		||||
 * typedefs
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
typedef struct uglMesaContext * UGL_MESA_CONTEXT;
 | 
			
		||||
    
 | 
			
		||||
UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
 | 
			
		||||
					  UGL_MESA_CONTEXT share_list);
 | 
			
		||||
 | 
			
		||||
UGL_MESA_CONTEXT  uglMesaCreateNewContextExt (GLenum mode,
 | 
			
		||||
					      GLint depth_bits,
 | 
			
		||||
					      GLint stencil_bits,
 | 
			
		||||
					      GLint accum_red_bits,
 | 
			
		||||
					      GLint accum_green_bits,
 | 
			
		||||
					      GLint accum_blue_bits,
 | 
			
		||||
					      GLint accum_alpha_bits,
 | 
			
		||||
					      UGL_MESA_CONTEXT share_list);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
 | 
			
		||||
				     GLsizei left, GLsizei top,
 | 
			
		||||
				     GLsizei width, GLsizei height);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
 | 
			
		||||
 | 
			
		||||
void uglMesaDestroyContext (void);
 | 
			
		||||
 | 
			
		||||
UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
 | 
			
		||||
 | 
			
		||||
void uglMesaSwapBuffers (void);
 | 
			
		||||
 | 
			
		||||
void uglMesaPixelStore (GLint pname, GLint value);
 | 
			
		||||
 | 
			
		||||
void uglMesaGetIntegerv (GLint pname, GLint *value);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
 | 
			
		||||
				 GLint *bytesPerValue, void **buffer);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
 | 
			
		||||
				 GLint *format, void **buffer);
 | 
			
		||||
 | 
			
		||||
GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
 | 
			
		||||
			   GLfloat green, GLfloat blue);
 | 
			
		||||
  
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: wmesa.h,v 1.2 2002/04/23 18:23:32 kschultz Exp $ */
 | 
			
		||||
/* $Id: wmesa.h,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -24,17 +24,8 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: wmesa.h,v $
 | 
			
		||||
 * Revision 1.2  2002/04/23 18:23:32  kschultz
 | 
			
		||||
 * Fix up alpha buffer handling for Windows.
 | 
			
		||||
 * - add two new Pixel Format Descriptors that do not have alpha bits to
 | 
			
		||||
 * mirror the two that do.
 | 
			
		||||
 * - add logic to wglChoosePixelFormat to match PFD's with respect to alpha.
 | 
			
		||||
 * - Create/clear software alpha buffer as required.
 | 
			
		||||
 * Now a wgl or GLUT program can control the creation of a software alpha
 | 
			
		||||
 * buffer via the PFD or GLUT parms, respectively.
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/01/03 02:54:45  brianp
 | 
			
		||||
 * updated per Ted Jump
 | 
			
		||||
@@ -110,17 +101,13 @@ typedef struct wmesa_context *WMesaContext;
 | 
			
		||||
 *                    GL_FALSE = color index mode
 | 
			
		||||
 *         db_flag - GL_TRUE = double-buffered,
 | 
			
		||||
 *                   GL_FALSE = single buffered
 | 
			
		||||
 *         alpha_flag - GL_TRUE = create software alpha buffer,
 | 
			
		||||
 *                      GL_FALSE = no software alpha buffer
 | 
			
		||||
 *
 | 
			
		||||
 * Note: Indexed mode requires double buffering under Windows.
 | 
			
		||||
 *
 | 
			
		||||
 * Return:  a WMesa_context or NULL if error.
 | 
			
		||||
 */
 | 
			
		||||
extern WMesaContext WMesaCreateContext(HWND hWnd,HPALETTE* pPal,
 | 
			
		||||
                                       GLboolean rgb_flag,
 | 
			
		||||
                                       GLboolean db_flag,
 | 
			
		||||
                                       GLboolean alpha_flag);
 | 
			
		||||
                                       GLboolean rgb_flag,GLboolean db_flag);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: xmesa.h,v 1.14 2002/10/05 03:03:37 brianp Exp $ */
 | 
			
		||||
/* $Id: xmesa.h,v 1.8.4.1 2000/11/02 18:08:28 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  4.1
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * Copyright (C) 1999-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"),
 | 
			
		||||
@@ -58,6 +58,7 @@ and create a window, you must do the following to use the X/Mesa interface:
 | 
			
		||||
 | 
			
		||||
8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext.
 | 
			
		||||
 | 
			
		||||
See the demos/xdemo.c and xmesa1.c files for examples.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -66,14 +67,12 @@ and create a window, you must do the following to use the X/Mesa interface:
 | 
			
		||||
#ifndef XMESA_H
 | 
			
		||||
#define XMESA_H
 | 
			
		||||
 | 
			
		||||
#ifdef __VMS
 | 
			
		||||
#include <GL/vms_x_fix.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef XFree86Server
 | 
			
		||||
#include "xmesa_xf86.h"
 | 
			
		||||
#else
 | 
			
		||||
@@ -89,8 +88,8 @@ extern struct Library *XLibBase;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define XMESA_MAJOR_VERSION 4
 | 
			
		||||
#define XMESA_MINOR_VERSION 1
 | 
			
		||||
#define XMESA_MAJOR_VERSION 3
 | 
			
		||||
#define XMESA_MINOR_VERSION 4
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -365,25 +364,6 @@ extern GLboolean XMesaSetFXmode( GLint mode );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Reallocate the back/depth/stencil/accum/etc/ buffers associated with
 | 
			
		||||
 * buffer <b> if its size has changed.
 | 
			
		||||
 *
 | 
			
		||||
 * New in Mesa 4.0.2
 | 
			
		||||
 */
 | 
			
		||||
extern void XMesaResizeBuffers( XMesaBuffer b );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create a pbuffer.
 | 
			
		||||
 * New in Mesa 4.1
 | 
			
		||||
 */
 | 
			
		||||
extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
 | 
			
		||||
                                      unsigned int width, unsigned int height);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@ class SampleGLWindow : public BWindow
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
   SampleGLWindow(BRect frame, uint32 type);
 | 
			
		||||
   virtual bool   QuitRequested() { be_app->PostMessage(B_QUIT_REQUESTED); return true; }
 | 
			
		||||
   virtual bool   QuitRequested() { return true; }
 | 
			
		||||
   
 | 
			
		||||
private:
 | 
			
		||||
   SampleGLView   *theView;
 | 
			
		||||
@@ -135,7 +135,7 @@ void SampleGLView::gInit(void)
 | 
			
		||||
   use_stipple_mode = GL_FALSE;
 | 
			
		||||
   use_smooth_mode = GL_TRUE;
 | 
			
		||||
   linesize = 2;
 | 
			
		||||
   pointsize = 6;
 | 
			
		||||
   pointsize = 4;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -147,46 +147,35 @@ void SampleGLView::gDraw(void)
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT);
 | 
			
		||||
   glLineWidth(linesize);
 | 
			
		||||
   
 | 
			
		||||
/*
 | 
			
		||||
 | 
			
		||||
   if (use_stipple_mode) {
 | 
			
		||||
      glEnable(GL_LINE_STIPPLE);
 | 
			
		||||
   } else {
 | 
			
		||||
      glDisable(GL_LINE_STIPPLE);
 | 
			
		||||
   }
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_POINT_SMOOTH);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
   if (use_smooth_mode) {
 | 
			
		||||
      glEnable(GL_LINE_SMOOTH);
 | 
			
		||||
      glEnable(GL_BLEND);
 | 
			
		||||
   } else {
 | 
			
		||||
      glDisable(GL_LINE_SMOOTH);
 | 
			
		||||
      glDisable(GL_BLEND);
 | 
			
		||||
   }
 | 
			
		||||
   
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   
 | 
			
		||||
   glPointSize(pointsize);         // Set size for point
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < 360; i += 5) {
 | 
			
		||||
      glRotatef(5.0, 0,0,1);         // Rotate right 5 degrees
 | 
			
		||||
 | 
			
		||||
	  if (use_smooth_mode) {
 | 
			
		||||
		glEnable(GL_LINE_SMOOTH);
 | 
			
		||||
	    glEnable(GL_BLEND);
 | 
			
		||||
	   } else {
 | 
			
		||||
	      glDisable(GL_LINE_SMOOTH);
 | 
			
		||||
	      glDisable(GL_BLEND);
 | 
			
		||||
	   }
 | 
			
		||||
 | 
			
		||||
      glColor3f(1.0, 1.0, 0.0);      // Set color for line
 | 
			
		||||
      glBegin(GL_LINE_STRIP);         // And create the line
 | 
			
		||||
      	glVertex3fv(pntA);
 | 
			
		||||
      	glVertex3fv(pntB);
 | 
			
		||||
      glVertex3fv(pntA);
 | 
			
		||||
      glVertex3fv(pntB);
 | 
			
		||||
      glEnd();
 | 
			
		||||
 | 
			
		||||
      glDisable(GL_POINT_SMOOTH);
 | 
			
		||||
      glDisable(GL_BLEND);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
      glPointSize(pointsize);         // Set size for point
 | 
			
		||||
      glColor3f(0.0, 1.0, 0.0);      // Set color for point
 | 
			
		||||
      glBegin(GL_POINTS);
 | 
			
		||||
      	glVertex3fv(pntA);         // Draw point at one end
 | 
			
		||||
      	glVertex3fv(pntB);         // Draw point at other end
 | 
			
		||||
      glVertex3fv(pntA);         // Draw point at one end
 | 
			
		||||
      glVertex3fv(pntB);         // Draw point at other end
 | 
			
		||||
      glEnd();
 | 
			
		||||
   }
 | 
			
		||||
   
 | 
			
		||||
 
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
 | 
			
		||||
PROGS = gears \
 | 
			
		||||
	glinfo \
 | 
			
		||||
	texobj \
 | 
			
		||||
	isosurf \
 | 
			
		||||
	bounce \
 | 
			
		||||
	terrain
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
 | 
			
		||||
.SUFFIXES:
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# make executable from .c file:
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	gcc -I../include -I../util -g $< -L../lib -lglut -lGL -lGLU -lm -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
default: $(PROGS)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
clean:
 | 
			
		||||
	-rm -f *.o *~ $(PROGS)
 | 
			
		||||
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# $Id: Makefile.BeOS-R4,v 1.14 2001/02/20 17:04:52 brianp Exp $
 | 
			
		||||
# $Id: Makefile.BeOS-R4,v 1.12 2000/06/27 16:54:18 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.5
 | 
			
		||||
# Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
# Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Makefile for GLUT-based demo programs for BeOS R4
 | 
			
		||||
@@ -43,7 +43,6 @@ PROGS = bounce \
 | 
			
		||||
	readpix \
 | 
			
		||||
	reflect \
 | 
			
		||||
	renormal \
 | 
			
		||||
	shadowtex \
 | 
			
		||||
	spectex \
 | 
			
		||||
	stex3d \
 | 
			
		||||
	teapot \
 | 
			
		||||
@@ -65,7 +64,7 @@ PROGS = bounce \
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.20 2001/08/21 05:42:11 gareth Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.14 2000/06/27 16:54:18 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.5
 | 
			
		||||
# Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
# Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 | 
			
		||||
# Makefile for GLUT-based demo programs for Unix/X11
 | 
			
		||||
 | 
			
		||||
@@ -14,8 +14,6 @@ LIBDIR = ../lib
 | 
			
		||||
 | 
			
		||||
GL_LIBS = -L$(LIBDIR) -lglut -lGLU -lGL $(APP_LIB_DEPS)
 | 
			
		||||
 | 
			
		||||
OSMESA_LIBS = -L$(LIBDIR) -lglut -lOSMesa -lGLU -lGL $(APP_LIB_DEPS)
 | 
			
		||||
 | 
			
		||||
LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
 | 
			
		||||
 | 
			
		||||
PROGS = bounce \
 | 
			
		||||
@@ -44,7 +42,6 @@ PROGS = bounce \
 | 
			
		||||
	readpix \
 | 
			
		||||
	reflect \
 | 
			
		||||
	renormal \
 | 
			
		||||
	shadowtex \
 | 
			
		||||
	spectex \
 | 
			
		||||
	stex3d \
 | 
			
		||||
	teapot \
 | 
			
		||||
@@ -65,14 +62,9 @@ PROGS = bounce \
 | 
			
		||||
.SUFFIXES:
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# make executable from .c file:
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
# special case: need the -lOSMesa library:
 | 
			
		||||
osdemo: osdemo.c
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
@@ -86,17 +78,8 @@ clean:
 | 
			
		||||
realclean:
 | 
			
		||||
	-rm $(PROGS)
 | 
			
		||||
	-rm *.o *~
 | 
			
		||||
	-rm readtex.[ch]
 | 
			
		||||
 | 
			
		||||
targets: readtex.c readtex.h $(PROGS)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
readtex.c:
 | 
			
		||||
	cp ../util/readtex.c .
 | 
			
		||||
 | 
			
		||||
readtex.h:
 | 
			
		||||
	cp ../util/readtex.c .
 | 
			
		||||
 | 
			
		||||
targets: $(PROGS)
 | 
			
		||||
 | 
			
		||||
# execute all programs
 | 
			
		||||
exec: $(PROGS)
 | 
			
		||||
@@ -109,3 +92,4 @@ exec: $(PROGS)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
include ../Make-config
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
# $Id: Makefile.cygnus,v 1.12 2000/12/24 22:53:54 pesco Exp $
 | 
			
		||||
# $Id: Makefile.cygnus,v 1.11 2000/06/27 16:54:18 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
@@ -66,7 +66,7 @@ PROGS = bounce \
 | 
			
		||||
.SUFFIXES: .c
 | 
			
		||||
 | 
			
		||||
.c: $(LIB_DEP)
 | 
			
		||||
	$(CC) -I$(INCDIR) -I../util $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
	$(CC) -I$(INCDIR) $(CFLAGS) $< $(GL_LIBS) -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 
 | 
			
		||||
@@ -1,130 +0,0 @@
 | 
			
		||||
# $Id: Makefile.win,v 1.7 2002/01/16 00:48:43 kschultz Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.5
 | 
			
		||||
# Copyright (C) 1995-2001  Brian Paul
 | 
			
		||||
 | 
			
		||||
# Makefile for GLUT-based demo programs for Windows
 | 
			
		||||
 | 
			
		||||
!include <win32.mak>
 | 
			
		||||
 | 
			
		||||
##### MACROS #####
 | 
			
		||||
 | 
			
		||||
TOP    = ..
 | 
			
		||||
INCDIR = ..\include
 | 
			
		||||
LIBDIR = ..\lib
 | 
			
		||||
 | 
			
		||||
PROGS = anisotropic \
 | 
			
		||||
	bounce \
 | 
			
		||||
	clearspd \
 | 
			
		||||
	cubemap \
 | 
			
		||||
	drawpix \
 | 
			
		||||
	fire \
 | 
			
		||||
	gamma \
 | 
			
		||||
	gears \
 | 
			
		||||
	geartrain \
 | 
			
		||||
	glinfo \
 | 
			
		||||
	gloss \
 | 
			
		||||
	gltestperf \
 | 
			
		||||
	glutfx \
 | 
			
		||||
	isosurf \
 | 
			
		||||
	ipers \
 | 
			
		||||
	lodbias \
 | 
			
		||||
	morph3d \
 | 
			
		||||
	multiarb \
 | 
			
		||||
	occlude \
 | 
			
		||||
	osdemo \
 | 
			
		||||
	paltex \
 | 
			
		||||
	pixeltex \
 | 
			
		||||
	pointblast \
 | 
			
		||||
	ray \
 | 
			
		||||
	readpix \
 | 
			
		||||
	reflect \
 | 
			
		||||
	renormal \
 | 
			
		||||
	shadowtex \
 | 
			
		||||
	spectex \
 | 
			
		||||
	stex3d \
 | 
			
		||||
	teapot \
 | 
			
		||||
	terrain \
 | 
			
		||||
	tessdemo \
 | 
			
		||||
	texcyl \
 | 
			
		||||
	texdown \
 | 
			
		||||
	texenv \
 | 
			
		||||
	texobj \
 | 
			
		||||
	trispd \
 | 
			
		||||
	tunnel \
 | 
			
		||||
	tunnel2 \
 | 
			
		||||
	winpos
 | 
			
		||||
 | 
			
		||||
SRCS = \
 | 
			
		||||
	bounce.c \
 | 
			
		||||
	clearspd.c \
 | 
			
		||||
	cubemap.c \
 | 
			
		||||
	drawpix.c \
 | 
			
		||||
	fire.c \
 | 
			
		||||
	gamma.c \
 | 
			
		||||
	gears.c \
 | 
			
		||||
	geartrain.c \
 | 
			
		||||
	glinfo.c \
 | 
			
		||||
	gloss.c \
 | 
			
		||||
	gltestperf.c \
 | 
			
		||||
	glutfx.c \
 | 
			
		||||
	isosurf.c \
 | 
			
		||||
	lodbias.c \
 | 
			
		||||
	morph3d.c \
 | 
			
		||||
	multiarb.c \
 | 
			
		||||
	occlude.c \
 | 
			
		||||
	paltex.c \
 | 
			
		||||
	pixeltex.c \
 | 
			
		||||
	pointblast.c \
 | 
			
		||||
	ray.c \
 | 
			
		||||
	readpix.c \
 | 
			
		||||
	reflect.c \
 | 
			
		||||
	renormal.c \
 | 
			
		||||
	shadowtex.c \
 | 
			
		||||
	spectex.c \
 | 
			
		||||
	stex3d.c \
 | 
			
		||||
	teapot.c \
 | 
			
		||||
	terrain.c \
 | 
			
		||||
	tessdemo.c \
 | 
			
		||||
	texcyl.c \
 | 
			
		||||
	texdown.c \
 | 
			
		||||
	texenv.c \
 | 
			
		||||
	texobj.c \
 | 
			
		||||
	trispd.c \
 | 
			
		||||
	tunnel.c \
 | 
			
		||||
	tunnel2.c \
 | 
			
		||||
	winpos.c
 | 
			
		||||
 | 
			
		||||
CXXSRCS = \
 | 
			
		||||
	rain.cxx
 | 
			
		||||
 | 
			
		||||
OSMESASRCS = osdemo.c
 | 
			
		||||
IPERSSRCS = ipers.c
 | 
			
		||||
IPERSEXES = $(IPERSSRCS:.c=.exe)
 | 
			
		||||
!include "../mesawin32.mak"
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
clean::
 | 
			
		||||
 | 
			
		||||
clobber::
 | 
			
		||||
	@del readtex.c readtex.h
 | 
			
		||||
 | 
			
		||||
$(EXES) : $*.obj readtex.c readtex.h
 | 
			
		||||
	@echo $@
 | 
			
		||||
	$(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS)
 | 
			
		||||
 | 
			
		||||
$(OSMESAEXES) : $*.obj
 | 
			
		||||
	@echo $@
 | 
			
		||||
	$(link) $(lcommon) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) $(EXTRALIBS)
 | 
			
		||||
 | 
			
		||||
$(IPERSEXES) : $*.obj
 | 
			
		||||
	@echo $@
 | 
			
		||||
	$(link) -out:$@ $* /LIBPATH:$(LIBDIR) $(LIBS) winmm.lib
 | 
			
		||||
 | 
			
		||||
readtex.c:
 | 
			
		||||
	-copy ..\util\readtex.c .
 | 
			
		||||
 | 
			
		||||
readtex.h:
 | 
			
		||||
	-copy ..\util\readtex.h .
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: bounce.c,v 1.3.8.2 2003/03/22 08:40:35 keithw Exp $ */
 | 
			
		||||
/* $Id: bounce.c,v 1.2.4.1 2000/08/16 20:36:32 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Bouncing ball demo.
 | 
			
		||||
@@ -33,8 +33,8 @@ GLfloat Xmin = -4.0, Xmax = 4.0;
 | 
			
		||||
GLfloat Ymin = -3.8, Ymax = 4.0;
 | 
			
		||||
GLfloat G = -0.1;
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
draw_ball(void)
 | 
			
		||||
static GLuint 
 | 
			
		||||
make_ball(void)
 | 
			
		||||
{
 | 
			
		||||
  GLuint list;
 | 
			
		||||
  GLfloat a, b;
 | 
			
		||||
@@ -43,9 +43,9 @@ draw_ball(void)
 | 
			
		||||
  GLuint color;
 | 
			
		||||
  GLfloat x, y, z;
 | 
			
		||||
 | 
			
		||||
/*   list = glGenLists(1); */
 | 
			
		||||
  list = glGenLists(1);
 | 
			
		||||
 | 
			
		||||
/*   glNewList(list, GL_COMPILE); */
 | 
			
		||||
  glNewList(list, GL_COMPILE);
 | 
			
		||||
 | 
			
		||||
  color = 0;
 | 
			
		||||
  for (a = -90.0; a + da <= 90.0; a += da) {
 | 
			
		||||
@@ -54,10 +54,10 @@ draw_ball(void)
 | 
			
		||||
    for (b = 0.0; b <= 360.0; b += db) {
 | 
			
		||||
 | 
			
		||||
      if (color) {
 | 
			
		||||
/* 	glIndexi(RED); */
 | 
			
		||||
	glIndexi(RED);
 | 
			
		||||
        glColor3f(1, 0, 0);
 | 
			
		||||
      } else {
 | 
			
		||||
/* 	glIndexi(WHITE); */
 | 
			
		||||
	glIndexi(WHITE);
 | 
			
		||||
        glColor3f(1, 1, 1);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -77,12 +77,11 @@ draw_ball(void)
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
/*   glEndList(); */
 | 
			
		||||
  glEndList();
 | 
			
		||||
 | 
			
		||||
/*   return list; */
 | 
			
		||||
  return list;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void 
 | 
			
		||||
reshape(int width, int height)
 | 
			
		||||
{
 | 
			
		||||
@@ -111,19 +110,19 @@ draw(void)
 | 
			
		||||
 | 
			
		||||
  glClear(GL_COLOR_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
/*   glIndexi(CYAN); */
 | 
			
		||||
  glIndexi(CYAN);
 | 
			
		||||
  glColor3f(0, 1, 1);
 | 
			
		||||
  glBegin(GL_LINES);
 | 
			
		||||
  for (i = -5; i <= 5; i++) {
 | 
			
		||||
    glVertex2f(i, -5);
 | 
			
		||||
    glVertex2f(i, 5);
 | 
			
		||||
    glVertex2i(i, -5);
 | 
			
		||||
    glVertex2i(i, 5);
 | 
			
		||||
  }
 | 
			
		||||
  for (i = -5; i <= 5; i++) {
 | 
			
		||||
    glVertex2f(-5, i);
 | 
			
		||||
    glVertex2f(5, i);
 | 
			
		||||
    glVertex2i(-5, i);
 | 
			
		||||
    glVertex2i(5, i);
 | 
			
		||||
  }
 | 
			
		||||
  for (i = -5; i <= 5; i++) {
 | 
			
		||||
    glVertex2f(i, -5);
 | 
			
		||||
    glVertex2i(i, -5);
 | 
			
		||||
    glVertex2f(i * 1.15, -5.9);
 | 
			
		||||
  }
 | 
			
		||||
  glVertex2f(-5.3, -5.35);
 | 
			
		||||
@@ -139,8 +138,7 @@ draw(void)
 | 
			
		||||
  glRotatef(90.0, 1.0, 0.0, 0.0);
 | 
			
		||||
  glRotatef(Zrot, 0.0, 0.0, 1.0);
 | 
			
		||||
 | 
			
		||||
/*   glCallList(Ball); */
 | 
			
		||||
  draw_ball();
 | 
			
		||||
  glCallList(Ball);
 | 
			
		||||
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
 | 
			
		||||
@@ -200,7 +198,7 @@ int main(int argc, char *argv[])
 | 
			
		||||
     glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
  glutCreateWindow("Bounce");
 | 
			
		||||
/*   Ball = make_ball(); */
 | 
			
		||||
  Ball = make_ball();
 | 
			
		||||
  glCullFace(GL_BACK);
 | 
			
		||||
  glEnable(GL_CULL_FACE);
 | 
			
		||||
  glDisable(GL_DITHER);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,33 @@
 | 
			
		||||
/* $Id: clearspd.c,v 1.5 2002/10/31 12:38:32 keithw Exp $ */
 | 
			
		||||
/* $Id: clearspd.c,v 1.2 2000/04/10 16:25:15 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Simple GLUT program to measure glClear() and glutSwapBuffers() speed.
 | 
			
		||||
 * Brian Paul  February 15, 1997  This file in public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: clearspd.c,v $
 | 
			
		||||
 * Revision 1.2  2000/04/10 16:25:15  brianp
 | 
			
		||||
 * fixed visual selection and reporting results
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/03/28 18:18:33  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/03/18 08:16:34  joukj
 | 
			
		||||
 *
 | 
			
		||||
 *     cmpstr needs string.h to included to avoid warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/06/29 02:38:30  brianp
 | 
			
		||||
 * removed unneeded includes
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
@@ -48,25 +71,18 @@ static void Display( void )
 | 
			
		||||
         glClear( BufferMask );
 | 
			
		||||
         glutSwapBuffers();
 | 
			
		||||
      }
 | 
			
		||||
      glFinish();
 | 
			
		||||
      t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      t0 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
 | 
			
		||||
      for (i=0;i<Loops;i++) {
 | 
			
		||||
         glClear( BufferMask );
 | 
			
		||||
         glFlush();
 | 
			
		||||
      }
 | 
			
		||||
      glFinish();
 | 
			
		||||
      t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
 | 
			
		||||
      glutSwapBuffers();
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* NOTE: If clearspd doesn't map it's window immediately on
 | 
			
		||||
    * starting, swaps will be istantaneous, so this will send Loops
 | 
			
		||||
    * towards infinity.  When a window is finally mapped, it may be
 | 
			
		||||
    * minutes before the first call to glutSwapBuffers, making it look
 | 
			
		||||
    * like there's a driver bug.
 | 
			
		||||
    */
 | 
			
		||||
   if (t1-t0 < MinPeriod) {
 | 
			
		||||
      /* Next time do more clears to get longer elapsed time */
 | 
			
		||||
      Loops *= 2;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: cubemap.c,v 1.4 2002/10/25 17:20:26 brianp Exp $ */
 | 
			
		||||
/* $Id: cubemap.c,v 1.3 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * GL_ARB_texture_cube_map demo
 | 
			
		||||
@@ -36,100 +36,25 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "GL/glut.h"
 | 
			
		||||
#include "../util/readtex.c" /* a hack */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLfloat Xrot = 0, Yrot = 0;
 | 
			
		||||
static GLfloat EyeDist = 10;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void draw_skybox( void )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat eps1 = 0.99;
 | 
			
		||||
   const GLfloat br = 20.0; /* box radius */
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_QUADS);
 | 
			
		||||
 | 
			
		||||
   /* +X side */
 | 
			
		||||
   glTexCoord3f(1.0, -eps1, -eps1);  glVertex3f(br, -br, -br);
 | 
			
		||||
   glTexCoord3f(1.0, -eps1,  eps1);  glVertex3f(br, -br,  br);
 | 
			
		||||
   glTexCoord3f(1.0,  eps1,  eps1);  glVertex3f(br,  br,  br);
 | 
			
		||||
   glTexCoord3f(1.0,  eps1, -eps1);  glVertex3f(br,  br, -br);
 | 
			
		||||
 | 
			
		||||
   /* -X side */
 | 
			
		||||
   glTexCoord3f(-1.0,  eps1, -eps1);  glVertex3f(-br,  br, -br);
 | 
			
		||||
   glTexCoord3f(-1.0,  eps1,  eps1);  glVertex3f(-br,  br,  br);
 | 
			
		||||
   glTexCoord3f(-1.0, -eps1,  eps1);  glVertex3f(-br, -br,  br);
 | 
			
		||||
   glTexCoord3f(-1.0, -eps1, -eps1);  glVertex3f(-br, -br, -br);
 | 
			
		||||
 | 
			
		||||
   /* +Y side */
 | 
			
		||||
   glTexCoord3f(-eps1, 1.0, -eps1);  glVertex3f(-br,  br, -br);
 | 
			
		||||
   glTexCoord3f(-eps1, 1.0,  eps1);  glVertex3f(-br,  br,  br);
 | 
			
		||||
   glTexCoord3f( eps1, 1.0,  eps1);  glVertex3f( br,  br,  br);
 | 
			
		||||
   glTexCoord3f( eps1, 1.0, -eps1);  glVertex3f( br,  br, -br);
 | 
			
		||||
 | 
			
		||||
   /* -Y side */
 | 
			
		||||
   glTexCoord3f(-eps1, -1.0, -eps1);  glVertex3f(-br, -br, -br);
 | 
			
		||||
   glTexCoord3f(-eps1, -1.0,  eps1);  glVertex3f(-br, -br,  br);
 | 
			
		||||
   glTexCoord3f( eps1, -1.0,  eps1);  glVertex3f( br, -br,  br);
 | 
			
		||||
   glTexCoord3f( eps1, -1.0, -eps1);  glVertex3f( br, -br, -br);
 | 
			
		||||
 | 
			
		||||
   /* +Z side */
 | 
			
		||||
   glTexCoord3f( eps1, -eps1, 1.0);  glVertex3f( br, -br, br);
 | 
			
		||||
   glTexCoord3f(-eps1, -eps1, 1.0);  glVertex3f(-br, -br, br);
 | 
			
		||||
   glTexCoord3f(-eps1,  eps1, 1.0);  glVertex3f(-br,  br, br);
 | 
			
		||||
   glTexCoord3f( eps1,  eps1, 1.0);  glVertex3f( br,  br, br);
 | 
			
		||||
 | 
			
		||||
   /* -Z side */
 | 
			
		||||
   glTexCoord3f( eps1,  eps1, -1.0);  glVertex3f( br,  br, -br);
 | 
			
		||||
   glTexCoord3f(-eps1,  eps1, -1.0);  glVertex3f(-br,  br, -br);
 | 
			
		||||
   glTexCoord3f(-eps1, -eps1, -1.0);  glVertex3f(-br, -br, -br);
 | 
			
		||||
   glTexCoord3f( eps1, -eps1, -1.0);  glVertex3f( br, -br, -br);
 | 
			
		||||
 | 
			
		||||
   glEnd();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void draw( void )
 | 
			
		||||
{
 | 
			
		||||
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
   glPushMatrix(); /*MODELVIEW*/
 | 
			
		||||
      glTranslatef( 0.0, 0.0, -EyeDist );
 | 
			
		||||
 | 
			
		||||
      /* skybox */
 | 
			
		||||
      glDisable(GL_TEXTURE_GEN_S);
 | 
			
		||||
      glDisable(GL_TEXTURE_GEN_T);
 | 
			
		||||
      glDisable(GL_TEXTURE_GEN_R);
 | 
			
		||||
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
      glPushMatrix();
 | 
			
		||||
         glRotatef(Xrot, 1, 0, 0);
 | 
			
		||||
         glRotatef(Yrot, 0, 1, 0);
 | 
			
		||||
         draw_skybox();
 | 
			
		||||
      glPopMatrix();
 | 
			
		||||
 | 
			
		||||
      /* sphere */
 | 
			
		||||
      glMatrixMode(GL_TEXTURE);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glRotatef(-Yrot, 0, 1, 0);
 | 
			
		||||
      glRotatef(-Xrot, 1, 0, 0);
 | 
			
		||||
 | 
			
		||||
      glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
      glEnable(GL_TEXTURE_GEN_T);
 | 
			
		||||
      glEnable(GL_TEXTURE_GEN_R);
 | 
			
		||||
      glutSolidSphere(2.0, 20, 20);
 | 
			
		||||
 | 
			
		||||
      glLoadIdentity(); /* texture */
 | 
			
		||||
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   glMatrixMode(GL_TEXTURE);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glRotatef(Xrot, 1, 0, 0);
 | 
			
		||||
   glRotatef(Yrot, 0, 1, 0);
 | 
			
		||||
   glutSolidSphere(2.0, 20, 20);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
}
 | 
			
		||||
@@ -137,8 +62,7 @@ static void draw( void )
 | 
			
		||||
 | 
			
		||||
static void idle(void)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat t = 0.05 * glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
   Yrot = t;
 | 
			
		||||
   Yrot += 5.0;
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -157,6 +81,9 @@ static void set_mode(GLuint mode)
 | 
			
		||||
      glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_ARB);
 | 
			
		||||
      printf("GL_NORMAL_MAP_ARB mode\n");
 | 
			
		||||
   }
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_T);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_R);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -178,16 +105,6 @@ static void key(unsigned char k, int x, int y)
 | 
			
		||||
         mode = !mode;
 | 
			
		||||
         set_mode(mode);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'z':
 | 
			
		||||
         EyeDist -= 0.5;
 | 
			
		||||
         if (EyeDist < 6.0)
 | 
			
		||||
            EyeDist = 6.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'Z':
 | 
			
		||||
         EyeDist += 0.5;
 | 
			
		||||
         if (EyeDist > 90.0)
 | 
			
		||||
            EyeDist = 90;
 | 
			
		||||
         break;
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
   }
 | 
			
		||||
@@ -197,15 +114,15 @@ static void key(unsigned char k, int x, int y)
 | 
			
		||||
 | 
			
		||||
static void specialkey(int key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat step = 5;
 | 
			
		||||
   GLfloat step = 10;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case GLUT_KEY_UP:
 | 
			
		||||
         Xrot += step;
 | 
			
		||||
         Xrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_DOWN:
 | 
			
		||||
         Xrot -= step;
 | 
			
		||||
         Xrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_LEFT:
 | 
			
		||||
         Yrot -= step;
 | 
			
		||||
@@ -221,17 +138,17 @@ static void specialkey(int key, int x, int y)
 | 
			
		||||
/* new window size or exposure */
 | 
			
		||||
static void reshape(int width, int height)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat ar = (float) width / (float) height;
 | 
			
		||||
   glViewport(0, 0, (GLint)width, (GLint)height);
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum( -2.0*ar, 2.0*ar, -2.0, 2.0, 4.0, 100.0 );
 | 
			
		||||
   glFrustum( -2.0, 2.0, -2.0, 2.0, 6.0, 20.0 );
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef( 0.0, 0.0, -8.0 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void init_checkers( void )
 | 
			
		||||
static void init( void )
 | 
			
		||||
{
 | 
			
		||||
#define CUBE_TEX_SIZE 64
 | 
			
		||||
   GLubyte image[CUBE_TEX_SIZE][CUBE_TEX_SIZE][3];
 | 
			
		||||
@@ -254,6 +171,16 @@ static void init_checkers( void )
 | 
			
		||||
 | 
			
		||||
   GLint i, j, f;
 | 
			
		||||
 | 
			
		||||
   /* check for extension */
 | 
			
		||||
   {
 | 
			
		||||
      char *exten = (char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
      if (!strstr(exten, "GL_ARB_texture_cube_map")) {
 | 
			
		||||
         printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
 | 
			
		||||
         exit(0);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
 | 
			
		||||
   /* make colored checkerboard cube faces */
 | 
			
		||||
@@ -276,102 +203,18 @@ static void init_checkers( void )
 | 
			
		||||
      glTexImage2D(targets[f], 0, GL_RGB, CUBE_TEX_SIZE, CUBE_TEX_SIZE, 0,
 | 
			
		||||
                   GL_RGB, GL_UNSIGNED_BYTE, image);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void load(GLenum target, const char *filename,
 | 
			
		||||
                 GLboolean flipTB, GLboolean flipLR)
 | 
			
		||||
{
 | 
			
		||||
   GLint w, h;
 | 
			
		||||
   GLenum format;
 | 
			
		||||
   GLubyte *img = LoadRGBImage( filename, &w, &h, &format );
 | 
			
		||||
   if (!img) {
 | 
			
		||||
      printf("Error: couldn't load texture image %s\n", filename);
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
   assert(format == GL_RGB);
 | 
			
		||||
 | 
			
		||||
   /* <sigh> the way the texture cube mapping works, we have to flip
 | 
			
		||||
    * images to make things look right.
 | 
			
		||||
    */
 | 
			
		||||
   if (flipTB) {
 | 
			
		||||
      const int stride = 3 * w;
 | 
			
		||||
      GLubyte temp[3*1024];
 | 
			
		||||
      int i;
 | 
			
		||||
      for (i = 0; i < h / 2; i++) {
 | 
			
		||||
         memcpy(temp, img + i * stride, stride);
 | 
			
		||||
         memcpy(img + i * stride, img + (h - i - 1) * stride, stride);
 | 
			
		||||
         memcpy(img + (h - i - 1) * stride, temp, stride);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   if (flipLR) {
 | 
			
		||||
      const int stride = 3 * w;
 | 
			
		||||
      GLubyte temp[3];
 | 
			
		||||
      GLubyte *row;
 | 
			
		||||
      int i, j;
 | 
			
		||||
      for (i = 0; i < h; i++) {
 | 
			
		||||
         row = img + i * stride;
 | 
			
		||||
         for (j = 0; j < w / 2; j++) {
 | 
			
		||||
            int k = w - j - 1;
 | 
			
		||||
            temp[0] = row[j*3+0];
 | 
			
		||||
            temp[1] = row[j*3+1];
 | 
			
		||||
            temp[2] = row[j*3+2];
 | 
			
		||||
            row[j*3+0] = row[k*3+0];
 | 
			
		||||
            row[j*3+1] = row[k*3+1];
 | 
			
		||||
            row[j*3+2] = row[k*3+2];
 | 
			
		||||
            row[k*3+0] = temp[0];
 | 
			
		||||
            row[k*3+1] = temp[1];
 | 
			
		||||
            row[k*3+2] = temp[2];
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   gluBuild2DMipmaps(target, GL_RGB, w, h, format, GL_UNSIGNED_BYTE, img);
 | 
			
		||||
   free(img);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void load_envmaps(void)
 | 
			
		||||
{
 | 
			
		||||
   load(GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, "right.rgb", GL_TRUE, GL_FALSE);
 | 
			
		||||
   load(GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB, "left.rgb", GL_TRUE, GL_FALSE);
 | 
			
		||||
   load(GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB, "top.rgb", GL_FALSE, GL_TRUE);
 | 
			
		||||
   load(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB, "bottom.rgb", GL_FALSE, GL_TRUE);
 | 
			
		||||
   load(GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB, "front.rgb", GL_TRUE, GL_FALSE);
 | 
			
		||||
   load(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB, "back.rgb", GL_TRUE, GL_FALSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void init( GLboolean useImageFiles )
 | 
			
		||||
{
 | 
			
		||||
   GLenum filter;
 | 
			
		||||
 | 
			
		||||
   /* check for extension */
 | 
			
		||||
   {
 | 
			
		||||
      char *exten = (char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
      if (!strstr(exten, "GL_ARB_texture_cube_map")) {
 | 
			
		||||
         printf("Sorry, this demo requires GL_ARB_texture_cube_map\n");
 | 
			
		||||
         exit(0);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   printf("GL_RENDERER: %s\n", (char *) glGetString(GL_RENDERER));
 | 
			
		||||
 | 
			
		||||
   if (useImageFiles) {
 | 
			
		||||
      load_envmaps();
 | 
			
		||||
      filter = GL_LINEAR;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      init_checkers();
 | 
			
		||||
      filter = GL_NEAREST;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, filter);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, filter);
 | 
			
		||||
#if 1
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
#else
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
#endif
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_CUBE_MAP_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_CUBE_MAP_ARB);
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   glClearColor(.3, .3, .3, 0);
 | 
			
		||||
   glColor3f( 1.0, 1.0, 1.0 );
 | 
			
		||||
@@ -386,21 +229,16 @@ static void usage(void)
 | 
			
		||||
   printf("  SPACE - toggle animation\n");
 | 
			
		||||
   printf("  CURSOR KEYS - rotation\n");
 | 
			
		||||
   printf("  m - toggle texgen reflection mode\n");
 | 
			
		||||
   printf("  z/Z - change viewing distance\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(600, 500);
 | 
			
		||||
   glutInitWindowSize(300, 300);
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
 | 
			
		||||
   glutCreateWindow("Texture Cube Maping");
 | 
			
		||||
 | 
			
		||||
   if (argc > 1 && strcmp(argv[1] , "-i") == 0)
 | 
			
		||||
      init( 1 );
 | 
			
		||||
   else
 | 
			
		||||
      init( 0 );
 | 
			
		||||
   init();
 | 
			
		||||
   glutReshapeFunc( reshape );
 | 
			
		||||
   glutKeyboardFunc( key );
 | 
			
		||||
   glutSpecialFunc( specialkey );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
# Makefile for GLUT-based demo programs for VMS
 | 
			
		||||
# Makefile for core library for VMS
 | 
			
		||||
# contributed by Jouk Jansen  joukj@crys.chem.uva.nl
 | 
			
		||||
 | 
			
		||||
# Last revision : 3 May 1999
 | 
			
		||||
 | 
			
		||||
.first
 | 
			
		||||
	define gl [-.include.gl]
 | 
			
		||||
@@ -9,55 +9,172 @@
 | 
			
		||||
 | 
			
		||||
##### MACROS #####
 | 
			
		||||
 | 
			
		||||
INCDIR = ([-.include],[-.util])
 | 
			
		||||
CFLAGS = /include=$(INCDIR)/prefix=all/name=(as_is,short)
 | 
			
		||||
VPATH = RCS
 | 
			
		||||
 | 
			
		||||
.ifdef SHARE
 | 
			
		||||
GL_LIBS = $(XLIBS)
 | 
			
		||||
.else
 | 
			
		||||
GL_LIBS = [-.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS)
 | 
			
		||||
.endif
 | 
			
		||||
INCDIR = [-.include]
 | 
			
		||||
LIBDIR = [-.lib]
 | 
			
		||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
 | 
			
		||||
 | 
			
		||||
LIB_DEP = [-.lib]$(GL_LIB) [-.lib]$(GLU_LIB) [-.lib]$(GLUT_LIB)
 | 
			
		||||
CORE_SOURCES = aatriangle.c accum.c alpha.c alphabuf.c attrib.c \
 | 
			
		||||
bitmap.c blend.c buffers.c clip.c colortab.c context.c copypix.c depth.c \
 | 
			
		||||
dispatch.c \
 | 
			
		||||
dlist.c drawpix.c enable.c eval.c feedback.c fog.c \
 | 
			
		||||
get.c hash.c hint.c image.c imaging.c light.c lines.c logic.c masking.c matrix.c \
 | 
			
		||||
mem.c glapi.c glapinoop.c \
 | 
			
		||||
mmath.c pb.c pixel.c points.c polygon.c \
 | 
			
		||||
quads.c rastpos.c readpix.c rect.c scissor.c shade.c span.c \
 | 
			
		||||
stencil.c teximage.c texobj.c texstate.c texture.c translate.c triangle.c \
 | 
			
		||||
varray.c winpos.c vb.c vbcull.c vbfill.c vbrender.c vbxform.c xform.c \
 | 
			
		||||
zoom.c bbox.c cva.c vector.c vbindirect.c config.c enums.c extensions.c \
 | 
			
		||||
pipeline.c stages.c state.c vertices.c [.x86]x86.c
 | 
			
		||||
 | 
			
		||||
PROGS = bounce.exe;,clearspd.exe;,drawpix.exe;,gamma.exe;,gears.exe;,\
 | 
			
		||||
	glinfo.exe;,glutfx.exe;,isosurf.exe;,morph3d.exe;,osdemo.exe;,\
 | 
			
		||||
	paltex.exe;,pointblast.exe;,reflect.exe;,spectex.exe;,stex3d.exe;,\
 | 
			
		||||
	tessdemo.exe;,texcyl.exe;,texobj.exe;,trispd.exe;,winpos.exe;
 | 
			
		||||
DRIVER_SOURCES = [.x]glxapi.c [.x]fakeglx.c [.x]xfonts.c \
 | 
			
		||||
[.x]xmesa1.c [.x]xmesa2.c [.x]xmesa3.c [.x]xmesa4.c \
 | 
			
		||||
[.osmesa]osmesa.c \
 | 
			
		||||
[.svga]svgamesa.c \
 | 
			
		||||
[.fx]fxapi.c [.fx]fxdd.c [.fx]fxddtex.c [.fx]fxvsetup.c [.fx]fxsetup.c \
 | 
			
		||||
[.fx]fxtrifuncs.c [.fx]fxclip.c [.fx]fxfastpath.c [.fx]fxpipeline.c\
 | 
			
		||||
[.fx]fxrender.c [.fx]fxtexman.c [.fx]fxddspan.c [.fx]fxcva.c [.fx]fxsanity.c\
 | 
			
		||||
[.fx]fxglidew.c
 | 
			
		||||
 | 
			
		||||
ASM_SOURCES =
 | 
			
		||||
 | 
			
		||||
OBJECTS =aatriangle.obj,\
 | 
			
		||||
accum.obj,alpha.obj,alphabuf.obj,attrib.obj,\
 | 
			
		||||
bitmap.obj,blend.obj,buffers.obj,clip.obj,colortab.obj,context.obj,copypix.obj,depth.obj,\
 | 
			
		||||
dlist.obj,drawpix.obj,enable.obj,eval.obj,feedback.obj,fog.obj
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OBJECTS3=get.obj,hash.obj,hint.obj,image.obj,light.obj,lines.obj,logic.obj,masking.obj,\
 | 
			
		||||
matrix.obj,glapi.obj,glapinoop.obj,dispatch.obj,imaging.obj,mem.obj,\
 | 
			
		||||
mmath.obj,pb.obj,pixel.obj,points.obj
 | 
			
		||||
 | 
			
		||||
OBJECTS7=polygon.obj,\
 | 
			
		||||
quads.obj,rastpos.obj,readpix.obj,rect.obj,scissor.obj,shade.obj,span.obj,\
 | 
			
		||||
pixeltex.obj
 | 
			
		||||
 | 
			
		||||
OBJECTS4=stencil.obj,teximage.obj,texobj.obj,texstate.obj,texture.obj,translate.obj,\
 | 
			
		||||
triangle.obj,varray.obj,winpos.obj,vb.obj,vbcull.obj,vbfill.obj,vbrender.obj
 | 
			
		||||
 | 
			
		||||
OBJECTS6=vbxform.obj,xform.obj,zoom.obj,bbox.obj,cva.obj,vector.obj,vbindirect.obj,\
 | 
			
		||||
	config.obj,enums.obj,extensions.obj,pipeline.obj,stages.obj,state.obj,\
 | 
			
		||||
	vertices.obj,[.x86]x86.obj
 | 
			
		||||
 | 
			
		||||
OBJECTS2=[.x]glxapi.obj,[.x]fakeglx.obj,[.x]xfonts.obj,\
 | 
			
		||||
[.x]xmesa1.obj,[.x]xmesa2.obj,[.x]xmesa3.obj,[.x]xmesa4.obj,\
 | 
			
		||||
[.osmesa]osmesa.obj,\
 | 
			
		||||
[.svga]svgamesa.obj
 | 
			
		||||
 | 
			
		||||
OBJECTS5=[.fx]fxapi.obj,[.fx]fxdd.obj,[.fx]fxddtex.obj,[.fx]fxvsetup.obj,\
 | 
			
		||||
[.fx]fxsetup.obj,[.fx]fxclip.obj,[.fx]fxfastpath.obj,[.fx]fxpipeline.obj
 | 
			
		||||
 | 
			
		||||
OBJECTS8=[.fx]fxtrifuncs.obj,[.fx]fxsanity.obj,[.fx]fxglidew.obj,\
 | 
			
		||||
[.fx]fxrender.obj,[.fx]fxtexman.obj,[.fx]fxddspan.obj,[.fx]fxcva.obj
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
.obj.exe :
 | 
			
		||||
	cxxlink $(MMS$TARGET_NAME),$(GL_LIBS)
 | 
			
		||||
 | 
			
		||||
VERSION=Mesa V3.1
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
default :
 | 
			
		||||
	$(MMS)$(MMSQUALIFIERS) $(PROGS)
 | 
			
		||||
# Make the library
 | 
			
		||||
$(LIBDIR)$(GL_LIB) : $(OBJECTS),$(OBJECTS2) $(OBJECTS3) $(OBJECTS4)\
 | 
			
		||||
	$(OBJECTS5) $(OBJECTS8) $(OBJECTS7) $(OBJECTS6)
 | 
			
		||||
.ifdef SHARE
 | 
			
		||||
  @ WRITE_ SYS$OUTPUT "  generating mesagl1.opt"
 | 
			
		||||
  @ OPEN_/WRITE FILE  mesagl1.opt
 | 
			
		||||
  @ WRITE_ FILE "!"
 | 
			
		||||
  @ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)" 
 | 
			
		||||
  @ WRITE_ FILE "!"
 | 
			
		||||
  @ WRITE_ FILE "IDENTIFICATION=""$(VERSION)"""
 | 
			
		||||
  @ WRITE_ FILE "GSMATCH=LEQUAL,3,1
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS3)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS4)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS7)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS6)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS2)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS5)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS8)"
 | 
			
		||||
  @ WRITE_ FILE "SYS$SHARE:DECW$XEXTLIBSHR/SHARE"
 | 
			
		||||
  @ WRITE_ FILE "SYS$SHARE:DECW$XLIBSHR/SHARE"
 | 
			
		||||
  @ CLOSE_ FILE
 | 
			
		||||
  @ WRITE_ SYS$OUTPUT "  generating mesagl.map ..."
 | 
			
		||||
  @ LINK_/NODEB/NOSHARE/NOEXE/MAP=mesagl.map/FULL mesagl1.opt/OPT
 | 
			
		||||
  @ WRITE_ SYS$OUTPUT "  analyzing mesagl.map ..."
 | 
			
		||||
  @ @[-.vms]ANALYZE_MAP.COM mesagl.map mesagl.opt
 | 
			
		||||
  @ WRITE_ SYS$OUTPUT "  linking $(GL_LIB) ..."
 | 
			
		||||
  @ LINK_/NODEB/SHARE=$(GL_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
 | 
			
		||||
.else
 | 
			
		||||
  @ $(MAKELIB) $(GL_LIB) $(OBJECTS)
 | 
			
		||||
  @ library $(GL_LIB) $(OBJECTS2)
 | 
			
		||||
  @ library $(GL_LIB) $(OBJECTS3)
 | 
			
		||||
  @ library $(GL_LIB) $(OBJECTS4)
 | 
			
		||||
  @ library $(GL_LIB) $(OBJECTS5)
 | 
			
		||||
  @ library $(GL_LIB) $(OBJECTS8)
 | 
			
		||||
  @ library $(GL_LIB) $(OBJECTS7)
 | 
			
		||||
  @ library $(GL_LIB) $(OBJECTS6)
 | 
			
		||||
.endif
 | 
			
		||||
  @ rename $(GL_LIB)* $(LIBDIR)
 | 
			
		||||
 | 
			
		||||
clean :
 | 
			
		||||
	purge
 | 
			
		||||
	delete *.obj;*
 | 
			
		||||
 | 
			
		||||
realclean :
 | 
			
		||||
	delete $(PROGS)
 | 
			
		||||
	delete *.obj;*
 | 
			
		||||
aatriangle.obj : aatriangle.c
 | 
			
		||||
 | 
			
		||||
bounce.exe; : bounce.obj $(LIB_DEP)
 | 
			
		||||
clearspd.exe; : clearspd.obj $(LIB_DEP)
 | 
			
		||||
drawpix.exe; : drawpix.obj $(LIB_DEP)
 | 
			
		||||
gamma.exe; : gamma.obj $(LIB_DEP)
 | 
			
		||||
gears.exe; : gears.obj $(LIB_DEP)
 | 
			
		||||
glinfo.exe; : glinfo.obj $(LIB_DEP)
 | 
			
		||||
glutfx.exe; : glutfx.obj $(LIB_DEP)
 | 
			
		||||
isosurf.exe; : isosurf.obj $(LIB_DEP)
 | 
			
		||||
morph3d.exe; : morph3d.obj $(LIB_DEP)
 | 
			
		||||
osdemo.exe; : osdemo.obj $(LIB_DEP)
 | 
			
		||||
paltex.exe; : paltex.obj $(LIB_DEP)
 | 
			
		||||
pointblast.exe; : pointblast.obj $(LIB_DEP)
 | 
			
		||||
reflect.exe; : reflect.obj $(LIB_DEP)
 | 
			
		||||
spectex.exe; : spectex.obj $(LIB_DEP)
 | 
			
		||||
stex3d.exe; : stex3d.obj $(LIB_DEP)
 | 
			
		||||
tessdemo.exe; : tessdemo.obj $(LIB_DEP)
 | 
			
		||||
texcyl.exe; : texcyl.obj $(LIB_DEP)
 | 
			
		||||
texobj.exe; : texobj.obj $(LIB_DEP)
 | 
			
		||||
trispd.exe; : trispd.obj $(LIB_DEP)
 | 
			
		||||
winpos.exe; : winpos.obj $(LIB_DEP)
 | 
			
		||||
triangle.obj : triangle.c
 | 
			
		||||
 | 
			
		||||
pixeltex.obj : pixeltex.c
 | 
			
		||||
 | 
			
		||||
[.x86]x86.obj : [.x86]x86.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x86]x86.obj [.x86]x86.c
 | 
			
		||||
[.x]glxapi.obj : [.x]glxapi.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x]glxapi.obj [.x]glxapi.c
 | 
			
		||||
[.x]fakeglx.obj : [.x]fakeglx.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x]fakeglx.obj [.x]fakeglx.c
 | 
			
		||||
[.x]xfonts.obj : [.x]xfonts.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x]xfonts.obj [.x]xfonts.c
 | 
			
		||||
[.x]xmesa1.obj : [.x]xmesa1.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x]xmesa1.obj [.x]xmesa1.c
 | 
			
		||||
[.x]xmesa2.obj : [.x]xmesa2.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x]xmesa2.obj [.x]xmesa2.c
 | 
			
		||||
[.x]xmesa3.obj : [.x]xmesa3.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x]xmesa3.obj [.x]xmesa3.c
 | 
			
		||||
[.x]xmesa4.obj : [.x]xmesa4.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.x]xmesa4.obj [.x]xmesa4.c
 | 
			
		||||
[.osmesa]osmesa.obj : [.osmesa]osmesa.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.osmesa]osmesa.obj [.osmesa]osmesa.c
 | 
			
		||||
[.svga]svgamesa.obj : [.svga]svgamesa.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.svga]svgamesa.obj [.svga]svgamesa.c
 | 
			
		||||
[.fx]fxapi.obj : [.fx]fxapi.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxapi.obj [.fx]fxapi.c
 | 
			
		||||
[.fx]fxclip.obj : [.fx]fxclip.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxclip.obj [.fx]fxclip.c
 | 
			
		||||
[.fx]fxcva.obj : [.fx]fxcva.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxcva.obj [.fx]fxcva.c
 | 
			
		||||
[.fx]fxdd.obj : [.fx]fxdd.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxdd.obj [.fx]fxdd.c
 | 
			
		||||
[.fx]fxddtex.obj : [.fx]fxddtex.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxddtex.obj [.fx]fxddtex.c
 | 
			
		||||
[.fx]fxfastpath.obj : [.fx]fxfastpath.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxfastpath.obj [.fx]fxfastpath.c
 | 
			
		||||
[.fx]fxpipeline.obj : [.fx]fxpipeline.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxpipeline.obj [.fx]fxpipeline.c
 | 
			
		||||
[.fx]fxsanity.obj : [.fx]fxsanity.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxsanity.obj [.fx]fxsanity.c
 | 
			
		||||
[.fx]fxvsetup.obj : [.fx]fxvsetup.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxvsetup.obj [.fx]fxvsetup.c
 | 
			
		||||
[.fx]fxsetup.obj : [.fx]fxsetup.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxsetup.obj [.fx]fxsetup.c
 | 
			
		||||
[.fx]fxtrifuncs.obj : [.fx]fxtrifuncs.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxtrifuncs.obj [.fx]fxtrifuncs.c
 | 
			
		||||
[.fx]fxrender.obj : [.fx]fxrender.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxrender.obj [.fx]fxrender.c
 | 
			
		||||
[.fx]fxtexman.obj : [.fx]fxtexman.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxtexman.obj [.fx]fxtexman.c
 | 
			
		||||
[.fx]fxddspan.obj : [.fx]fxddspan.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxddspan.obj [.fx]fxddspan.c
 | 
			
		||||
[.fx]fxglidew.obj : [.fx]fxglidew.c
 | 
			
		||||
	$(CC) $(CFLAGS) /obj=[.fx]fxglidew.obj [.fx]fxglidew.c
 | 
			
		||||
 | 
			
		||||
.include mms_depend.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: drawpix.c,v 1.8 2002/07/12 15:54:02 brianp Exp $ */
 | 
			
		||||
/* $Id: drawpix.c,v 1.3 1999/10/28 18:23:29 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * glDrawPixels demo/test/benchmark
 | 
			
		||||
@@ -6,12 +6,38 @@
 | 
			
		||||
 * Brian Paul   September 25, 1997  This file is in the public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: drawpix.c,v $
 | 
			
		||||
 * Revision 1.3  1999/10/28 18:23:29  brianp
 | 
			
		||||
 * minor changes to Usage() function
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/10/21 22:13:58  brianp
 | 
			
		||||
 * added f key to toggle front/back drawing
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/03/28 18:18:33  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/11/05 04:34:04  brianp
 | 
			
		||||
 * moved image files to ../images/ directory
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/02/22 16:43:17  brianp
 | 
			
		||||
 * added a few casts to silence compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
#include "../util/readtex.c"  /* a hack, I know */
 | 
			
		||||
 | 
			
		||||
#define IMAGE_FILE "../images/girl.rgb"
 | 
			
		||||
 | 
			
		||||
@@ -23,11 +49,9 @@ static int Xpos, Ypos;
 | 
			
		||||
static int SkipPixels, SkipRows;
 | 
			
		||||
static int DrawWidth, DrawHeight;
 | 
			
		||||
static int Scissor = 0;
 | 
			
		||||
static int Fog = 0;
 | 
			
		||||
static GLfloat Zpos = -1.0;
 | 
			
		||||
static float Xzoom, Yzoom;
 | 
			
		||||
static GLboolean DrawFront = GL_FALSE;
 | 
			
		||||
static GLboolean Dither = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Reset( void )
 | 
			
		||||
@@ -37,8 +61,6 @@ static void Reset( void )
 | 
			
		||||
   DrawHeight = ImgHeight;
 | 
			
		||||
   SkipPixels = SkipRows = 0;
 | 
			
		||||
   Scissor = 0;
 | 
			
		||||
   Fog = 0;
 | 
			
		||||
   Zpos = -1.0;
 | 
			
		||||
   Xzoom = Yzoom = 1.0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -51,7 +73,7 @@ static void Display( void )
 | 
			
		||||
   glRasterPos2i(Xpos, Ypos);
 | 
			
		||||
#else
 | 
			
		||||
   /* This allows negative raster positions: */
 | 
			
		||||
   glRasterPos3f(0, 0, Zpos);
 | 
			
		||||
   glRasterPos2i(0, 0);
 | 
			
		||||
   glBitmap(0, 0, 0, 0, Xpos, Ypos, NULL);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -63,13 +85,9 @@ static void Display( void )
 | 
			
		||||
   if (Scissor)
 | 
			
		||||
      glEnable(GL_SCISSOR_TEST);
 | 
			
		||||
 | 
			
		||||
   if (Fog)
 | 
			
		||||
      glEnable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   glDrawPixels(DrawWidth, DrawHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_SCISSOR_TEST);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   if (!DrawFront)
 | 
			
		||||
      glutSwapBuffers();
 | 
			
		||||
@@ -89,8 +107,6 @@ static void Benchmark( void )
 | 
			
		||||
   glPixelZoom( Xzoom, Yzoom );
 | 
			
		||||
   if (Scissor)
 | 
			
		||||
      glEnable(GL_SCISSOR_TEST);
 | 
			
		||||
   if (Fog)
 | 
			
		||||
      glEnable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   if (DrawFront)
 | 
			
		||||
      glDrawBuffer(GL_FRONT);
 | 
			
		||||
@@ -108,7 +124,6 @@ static void Benchmark( void )
 | 
			
		||||
 | 
			
		||||
   /* GL clean-up */
 | 
			
		||||
   glDisable(GL_SCISSOR_TEST);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
   /* Results */
 | 
			
		||||
   seconds = (double) (endTime - startTime) / 1000.0;
 | 
			
		||||
@@ -123,7 +138,7 @@ static void Reshape( int width, int height )
 | 
			
		||||
   glViewport( 0, 0, width, height );
 | 
			
		||||
   glMatrixMode( GL_PROJECTION );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glOrtho( 0.0, width, 0.0, height, 0.0, 2.0 );
 | 
			
		||||
   glOrtho( 0.0, width, 0.0, height, -1.0, 1.0 );
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
 | 
			
		||||
@@ -139,13 +154,6 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
      case ' ':
 | 
			
		||||
         Reset();
 | 
			
		||||
         break;
 | 
			
		||||
      case 'd':
 | 
			
		||||
         Dither = !Dither;
 | 
			
		||||
         if (Dither)
 | 
			
		||||
            glEnable(GL_DITHER);
 | 
			
		||||
         else
 | 
			
		||||
            glDisable(GL_DITHER);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'w':
 | 
			
		||||
         if (DrawWidth > 0)
 | 
			
		||||
            DrawWidth--;
 | 
			
		||||
@@ -189,21 +197,9 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
      case 'Y':
 | 
			
		||||
         Yzoom += 0.1;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'z':
 | 
			
		||||
         Zpos -= 0.1;
 | 
			
		||||
         printf("RasterPos Z = %g\n", Zpos);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'Z':
 | 
			
		||||
         Zpos += 0.1;
 | 
			
		||||
         printf("RasterPos Z = %g\n", Zpos);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'b':
 | 
			
		||||
         Benchmark();
 | 
			
		||||
         break;
 | 
			
		||||
      case 'F':
 | 
			
		||||
         Fog = !Fog;
 | 
			
		||||
         printf("Fog %d\n", Fog);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'f':
 | 
			
		||||
         DrawFront = !DrawFront;
 | 
			
		||||
         if (DrawFront)
 | 
			
		||||
@@ -244,8 +240,6 @@ static void SpecialKey( int key, int x, int y )
 | 
			
		||||
 | 
			
		||||
static void Init( GLboolean ciMode )
 | 
			
		||||
{
 | 
			
		||||
   static const GLfloat fogColor[4] = {0, 1, 0, 0};
 | 
			
		||||
 | 
			
		||||
   printf("GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
 | 
			
		||||
   printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
 | 
			
		||||
 | 
			
		||||
@@ -257,7 +251,7 @@ static void Init( GLboolean ciMode )
 | 
			
		||||
 | 
			
		||||
   if (ciMode) {
 | 
			
		||||
      /* Convert RGB image to grayscale */
 | 
			
		||||
      GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight );
 | 
			
		||||
      GLubyte *indexImage = malloc( ImgWidth * ImgHeight );
 | 
			
		||||
      GLint i;
 | 
			
		||||
      for (i=0; i<ImgWidth*ImgHeight; i++) {
 | 
			
		||||
         int gray = Image[i*3] + Image[i*3+1] + Image[i*3+2];
 | 
			
		||||
@@ -278,11 +272,6 @@ static void Init( GLboolean ciMode )
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ROW_LENGTH, ImgWidth);
 | 
			
		||||
 | 
			
		||||
   glFogi(GL_FOG_MODE, GL_LINEAR);
 | 
			
		||||
   glFogf(GL_FOG_START, 0);
 | 
			
		||||
   glFogf(GL_FOG_END, 2);
 | 
			
		||||
   glFogfv(GL_FOG_COLOR, fogColor);
 | 
			
		||||
 | 
			
		||||
   Reset();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -306,10 +295,6 @@ static void Usage(void)
 | 
			
		||||
   printf("           r  Decrease GL_UNPACK_SKIP_ROWS*\n");
 | 
			
		||||
   printf("           R  Increase GL_UNPACK_SKIP_ROWS*\n");
 | 
			
		||||
   printf("           s  Toggle GL_SCISSOR_TEST\n");
 | 
			
		||||
   printf("           F  Toggle GL_FOG\n");
 | 
			
		||||
   printf("           z  Decrease RasterPos Z\n");
 | 
			
		||||
   printf("           Z  Increase RasterPos Z\n");
 | 
			
		||||
   
 | 
			
		||||
   printf("           f  Toggle front/back buffer drawing\n");
 | 
			
		||||
   printf("           b  Benchmark test\n");
 | 
			
		||||
   printf("         ESC  Exit\n");
 | 
			
		||||
@@ -333,7 +318,7 @@ int main( int argc, char *argv[] )
 | 
			
		||||
   if (ciMode)
 | 
			
		||||
      glutInitDisplayMode( GLUT_INDEX | GLUT_DOUBLE );
 | 
			
		||||
   else
 | 
			
		||||
      glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
 | 
			
		||||
      glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
#include "../util/readtex.c"
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
@@ -71,10 +71,7 @@ static int fullscreen = 1;
 | 
			
		||||
static int WIDTH = 640;
 | 
			
		||||
static int HEIGHT = 480;
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
static GLint NiceFog = 1;
 | 
			
		||||
 | 
			
		||||
#define FRAME 50
 | 
			
		||||
#define DIMP 20.0
 | 
			
		||||
#define DIMTP 16.0
 | 
			
		||||
 | 
			
		||||
@@ -139,6 +136,21 @@ static float v = 0.0;
 | 
			
		||||
static float alpha = -90.0;
 | 
			
		||||
static float beta = 90.0;
 | 
			
		||||
 | 
			
		||||
static float
 | 
			
		||||
gettime(void)
 | 
			
		||||
{
 | 
			
		||||
   static clock_t told = 0;
 | 
			
		||||
   clock_t tnew, ris;
 | 
			
		||||
 | 
			
		||||
   tnew = clock();
 | 
			
		||||
 | 
			
		||||
   ris = tnew - told;
 | 
			
		||||
 | 
			
		||||
   told = tnew;
 | 
			
		||||
 | 
			
		||||
   return (ris / (float) CLOCKS_PER_SEC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static float
 | 
			
		||||
vrnd(void)
 | 
			
		||||
{
 | 
			
		||||
@@ -257,13 +269,6 @@ calcposobs(void)
 | 
			
		||||
   dir[2] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
 | 
			
		||||
   dir[1] = cos(beta * M_PI / 180.0);
 | 
			
		||||
 | 
			
		||||
   if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
 | 
			
		||||
      dir[0] = 0;
 | 
			
		||||
   if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
 | 
			
		||||
      dir[1] = 0;
 | 
			
		||||
   if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
 | 
			
		||||
      dir[2] = 0;
 | 
			
		||||
 | 
			
		||||
   obs[0] += v * dir[0];
 | 
			
		||||
   obs[1] += v * dir[1];
 | 
			
		||||
   obs[2] += v * dir[2];
 | 
			
		||||
@@ -382,16 +387,13 @@ dojoy(void)
 | 
			
		||||
static void
 | 
			
		||||
drawfire(void)
 | 
			
		||||
{
 | 
			
		||||
   static char frbuf[80] = "";
 | 
			
		||||
   static int count = 0;
 | 
			
		||||
   static char frbuf[80];
 | 
			
		||||
   int j;
 | 
			
		||||
   float fr;
 | 
			
		||||
 | 
			
		||||
   dojoy();
 | 
			
		||||
 | 
			
		||||
   if (NiceFog)
 | 
			
		||||
      glHint(GL_FOG_HINT, GL_NICEST);
 | 
			
		||||
   else
 | 
			
		||||
      glHint(GL_FOG_HINT, GL_DONT_CARE);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
   if (fog)
 | 
			
		||||
@@ -414,7 +416,6 @@ drawfire(void)
 | 
			
		||||
   glEnable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, groundid);
 | 
			
		||||
#if 1
 | 
			
		||||
   glBegin(GL_QUADS);
 | 
			
		||||
   glTexCoord2fv(qt[0]);
 | 
			
		||||
   glVertex3fv(q[0]);
 | 
			
		||||
@@ -425,26 +426,6 @@ drawfire(void)
 | 
			
		||||
   glTexCoord2fv(qt[3]);
 | 
			
		||||
   glVertex3fv(q[3]);
 | 
			
		||||
   glEnd();
 | 
			
		||||
#else
 | 
			
		||||
   /* Subdivide the ground into a bunch of quads.  This improves fog
 | 
			
		||||
    * if GL_FOG_HINT != GL_NICEST
 | 
			
		||||
    */
 | 
			
		||||
   {
 | 
			
		||||
      float x, y;
 | 
			
		||||
      float dx = 1.0, dy = 1.0;
 | 
			
		||||
      glBegin(GL_QUADS);
 | 
			
		||||
      for (y = -DIMP; y < DIMP; y += 1.0) {
 | 
			
		||||
         for (x = -DIMP; x < DIMP; x += 1.0) {
 | 
			
		||||
            glTexCoord2f(0, 0);   glVertex3f(x, 0, y);
 | 
			
		||||
            glTexCoord2f(1, 0);   glVertex3f(x+dx, 0, y);
 | 
			
		||||
            glTexCoord2f(1, 1);   glVertex3f(x+dx, 0, y+dy);
 | 
			
		||||
            glTexCoord2f(0, 1);   glVertex3f(x, 0, y+dy);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      glEnd();
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_ALPHA_TEST);
 | 
			
		||||
   glAlphaFunc(GL_GEQUAL, 0.9);
 | 
			
		||||
@@ -487,6 +468,11 @@ drawfire(void)
 | 
			
		||||
   }
 | 
			
		||||
   glEnd();
 | 
			
		||||
 | 
			
		||||
   if ((count % FRAME) == 0) {
 | 
			
		||||
      fr = gettime();
 | 
			
		||||
      sprintf(frbuf, "Frame rate: %f", FRAME / fr);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glDisable(GL_ALPHA_TEST);
 | 
			
		||||
   glDisable(GL_DEPTH_TEST);
 | 
			
		||||
@@ -513,24 +499,7 @@ drawfire(void)
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      if (t - T0 >= 2000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         GLfloat fps = Frames / seconds;
 | 
			
		||||
         sprintf(frbuf, "Frame rate: %f", fps);
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
idle(void)
 | 
			
		||||
{
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
   count++;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -551,7 +520,6 @@ special(int key, int x, int y)
 | 
			
		||||
      beta += 2.0;
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@@ -599,12 +567,7 @@ key(unsigned char key, int x, int y)
 | 
			
		||||
      fullscreen = (!fullscreen);
 | 
			
		||||
      break;
 | 
			
		||||
#endif
 | 
			
		||||
   case 'n':
 | 
			
		||||
      NiceFog = !NiceFog;
 | 
			
		||||
      printf("NiceFog %d\n", NiceFog);
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@@ -660,7 +623,7 @@ inittextures(void)
 | 
			
		||||
 | 
			
		||||
      if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 4, 128, 128, GL_RGBA,
 | 
			
		||||
				      GL_UNSIGNED_BYTE, (GLvoid *) (tex)))) {
 | 
			
		||||
	 fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
 | 
			
		||||
	 fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
 | 
			
		||||
	 exit(-1);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
@@ -708,6 +671,8 @@ main(int ac, char **av)
 | 
			
		||||
 | 
			
		||||
   /* Default settings */
 | 
			
		||||
 | 
			
		||||
   WIDTH = 640;
 | 
			
		||||
   HEIGHT = 480;
 | 
			
		||||
   np = 800;
 | 
			
		||||
   eject_r = 0.1;
 | 
			
		||||
   dt = 0.015;
 | 
			
		||||
@@ -751,8 +716,11 @@ main(int ac, char **av)
 | 
			
		||||
   glFogi(GL_FOG_MODE, GL_EXP);
 | 
			
		||||
   glFogfv(GL_FOG_COLOR, fogcolor);
 | 
			
		||||
   glFogf(GL_FOG_DENSITY, 0.1);
 | 
			
		||||
#ifdef FX
 | 
			
		||||
   glHint(GL_FOG_HINT, GL_NICEST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   p = (part *) malloc(sizeof(part) * np);
 | 
			
		||||
   p = malloc(sizeof(part) * np);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < np; i++)
 | 
			
		||||
      setnewpart(&p[i]);
 | 
			
		||||
@@ -762,7 +730,7 @@ main(int ac, char **av)
 | 
			
		||||
   glutKeyboardFunc(key);
 | 
			
		||||
   glutSpecialFunc(special);
 | 
			
		||||
   glutDisplayFunc(drawfire);
 | 
			
		||||
   glutIdleFunc(idle);
 | 
			
		||||
   glutIdleFunc(drawfire);
 | 
			
		||||
   glutReshapeFunc(reshape);
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
/* $Id: gamma.c,v 1.3 2002/04/22 16:03:37 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/* $Id: gamma.c,v 1.2 2000/03/18 01:13:29 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/* Draw test patterns to help determine correct gamma value for a display.
 | 
			
		||||
   When the intensities of the inner squares nearly match the intensities
 | 
			
		||||
@@ -22,6 +23,22 @@
 | 
			
		||||
 | 
			
		||||
/* Conversion to GLUT by Mark J. Kilgard */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: gamma.c,v $
 | 
			
		||||
 * Revision 1.2  2000/03/18 01:13:29  brianp
 | 
			
		||||
 * colors were computed incorrectly (Hans Nelles)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1999/06/19 01:35:38  brianp
 | 
			
		||||
 * merged in Kai Schuetz's RGB changes
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: gears.c,v 1.6.12.1 2003/02/23 19:25:07 keithw Exp $ */
 | 
			
		||||
/* $Id: gears.c,v 1.6 2000/04/06 02:22:59 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 3-D gear wheels.  This program is in the public domain.
 | 
			
		||||
@@ -59,7 +59,7 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
 | 
			
		||||
 | 
			
		||||
  glShadeModel(GL_FLAT);
 | 
			
		||||
 | 
			
		||||
/*   glNormal3f(0.0, 0.0, 1.0); */
 | 
			
		||||
  glNormal3f(0.0, 0.0, 1.0);
 | 
			
		||||
 | 
			
		||||
  /* draw front face */
 | 
			
		||||
  glBegin(GL_QUAD_STRIP);
 | 
			
		||||
@@ -87,7 +87,7 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
 | 
			
		||||
  }
 | 
			
		||||
  glEnd();
 | 
			
		||||
 | 
			
		||||
/*   glNormal3f(0.0, 0.0, -1.0); */
 | 
			
		||||
  glNormal3f(0.0, 0.0, -1.0);
 | 
			
		||||
 | 
			
		||||
  /* draw back face */
 | 
			
		||||
  glBegin(GL_QUAD_STRIP);
 | 
			
		||||
@@ -127,18 +127,18 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
 | 
			
		||||
    len = sqrt(u * u + v * v);
 | 
			
		||||
    u /= len;
 | 
			
		||||
    v /= len;
 | 
			
		||||
/*     glNormal3f(v, -u, 0.0); */
 | 
			
		||||
    glNormal3f(v, -u, 0.0);
 | 
			
		||||
    glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5);
 | 
			
		||||
    glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5);
 | 
			
		||||
/*     glNormal3f(cos(angle), sin(angle), 0.0); */
 | 
			
		||||
    glNormal3f(cos(angle), sin(angle), 0.0);
 | 
			
		||||
    glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5);
 | 
			
		||||
    glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5);
 | 
			
		||||
    u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da);
 | 
			
		||||
    v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da);
 | 
			
		||||
/*     glNormal3f(v, -u, 0.0); */
 | 
			
		||||
    glNormal3f(v, -u, 0.0);
 | 
			
		||||
    glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5);
 | 
			
		||||
    glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5);
 | 
			
		||||
/*     glNormal3f(cos(angle), sin(angle), 0.0); */
 | 
			
		||||
    glNormal3f(cos(angle), sin(angle), 0.0);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5);
 | 
			
		||||
@@ -149,11 +149,10 @@ gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
 | 
			
		||||
  glShadeModel(GL_SMOOTH);
 | 
			
		||||
 | 
			
		||||
  /* draw inside radius cylinder */
 | 
			
		||||
  glColor3f( .5, .5, .5 );
 | 
			
		||||
  glBegin(GL_QUAD_STRIP);
 | 
			
		||||
  for (i = 0; i <= teeth; i++) {
 | 
			
		||||
    angle = i * 2.0 * M_PI / teeth;
 | 
			
		||||
/*     glNormal3f(-cos(angle), -sin(angle), 0.0); */
 | 
			
		||||
    glNormal3f(-cos(angle), -sin(angle), 0.0);
 | 
			
		||||
    glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5);
 | 
			
		||||
    glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5);
 | 
			
		||||
  }
 | 
			
		||||
@@ -168,11 +167,6 @@ static GLfloat angle = 0.0;
 | 
			
		||||
static void
 | 
			
		||||
draw(void)
 | 
			
		||||
{
 | 
			
		||||
  static GLfloat red[4] = {0.8, 0.1, 0.0, 1.0};
 | 
			
		||||
  static GLfloat green[4] = {0.0, 0.8, 0.2, 1.0};
 | 
			
		||||
  static GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0};
 | 
			
		||||
 | 
			
		||||
  glClearColor( 1,0,1,1 );
 | 
			
		||||
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
  glPushMatrix();
 | 
			
		||||
@@ -183,23 +177,19 @@ draw(void)
 | 
			
		||||
    glPushMatrix();
 | 
			
		||||
      glTranslatef(-3.0, -2.0, 0.0);
 | 
			
		||||
      glRotatef(angle, 0.0, 0.0, 1.0);
 | 
			
		||||
      glColor3fv( red);
 | 
			
		||||
      gear(1.0, 4.0, 1.0, 20, 0.7);
 | 
			
		||||
      glCallList(gear1);
 | 
			
		||||
    glPopMatrix();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    glPushMatrix();
 | 
			
		||||
      glTranslatef(3.1, -2.0, 0.0);
 | 
			
		||||
      glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0);
 | 
			
		||||
      glColor3fv( green);
 | 
			
		||||
      gear(0.5, 2.0, 2.0, 10, 0.7);
 | 
			
		||||
      glCallList(gear2);
 | 
			
		||||
    glPopMatrix();
 | 
			
		||||
 | 
			
		||||
    glPushMatrix();
 | 
			
		||||
      glTranslatef(-3.1, 4.2, 0.0);
 | 
			
		||||
      glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0);
 | 
			
		||||
      glColor3fv( blue);
 | 
			
		||||
      gear(1.3, 2.0, 0.5, 10, 0.7);
 | 
			
		||||
      glCallList(gear3);
 | 
			
		||||
    glPopMatrix();
 | 
			
		||||
 | 
			
		||||
  glPopMatrix();
 | 
			
		||||
@@ -294,15 +284,37 @@ static void
 | 
			
		||||
init(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
  static GLfloat pos[4] = {5.0, 5.0, 10.0, 0.0};
 | 
			
		||||
  static GLfloat red[4] = {0.8, 0.1, 0.0, 1.0};
 | 
			
		||||
  static GLfloat green[4] = {0.0, 0.8, 0.2, 1.0};
 | 
			
		||||
  static GLfloat blue[4] = {0.2, 0.2, 1.0, 1.0};
 | 
			
		||||
  GLint i;
 | 
			
		||||
 | 
			
		||||
/*   glLightfv(GL_LIGHT0, GL_POSITION, pos); */
 | 
			
		||||
   glEnable(GL_CULL_FACE); 
 | 
			
		||||
/*   glEnable(GL_LIGHTING); */
 | 
			
		||||
/*   glEnable(GL_LIGHT0); */
 | 
			
		||||
/*   glEnable(GL_DEPTH_TEST); */
 | 
			
		||||
  glLightfv(GL_LIGHT0, GL_POSITION, pos);
 | 
			
		||||
  glEnable(GL_CULL_FACE);
 | 
			
		||||
  glEnable(GL_LIGHTING);
 | 
			
		||||
  glEnable(GL_LIGHT0);
 | 
			
		||||
  glEnable(GL_DEPTH_TEST);
 | 
			
		||||
 | 
			
		||||
/*   glEnable(GL_NORMALIZE); */
 | 
			
		||||
  /* make the gears */
 | 
			
		||||
  gear1 = glGenLists(1);
 | 
			
		||||
  glNewList(gear1, GL_COMPILE);
 | 
			
		||||
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red);
 | 
			
		||||
  gear(1.0, 4.0, 1.0, 20, 0.7);
 | 
			
		||||
  glEndList();
 | 
			
		||||
 | 
			
		||||
  gear2 = glGenLists(1);
 | 
			
		||||
  glNewList(gear2, GL_COMPILE);
 | 
			
		||||
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green);
 | 
			
		||||
  gear(0.5, 2.0, 2.0, 10, 0.7);
 | 
			
		||||
  glEndList();
 | 
			
		||||
 | 
			
		||||
  gear3 = glGenLists(1);
 | 
			
		||||
  glNewList(gear3, GL_COMPILE);
 | 
			
		||||
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue);
 | 
			
		||||
  gear(1.3, 2.0, 0.5, 10, 0.7);
 | 
			
		||||
  glEndList();
 | 
			
		||||
 | 
			
		||||
  glEnable(GL_NORMALIZE);
 | 
			
		||||
 | 
			
		||||
  for ( i=1; i<argc; i++ ) {
 | 
			
		||||
    if (strcmp(argv[i], "-info")==0) {
 | 
			
		||||
@@ -333,7 +345,7 @@ int main(int argc, char *argv[])
 | 
			
		||||
  glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
 | 
			
		||||
 | 
			
		||||
  glutInitWindowPosition(0, 0);
 | 
			
		||||
  glutInitWindowSize(900, 900);
 | 
			
		||||
  glutInitWindowSize(300, 300);
 | 
			
		||||
  glutCreateWindow("Gears");
 | 
			
		||||
  init(argc, argv);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: geartrain.c,v 1.8 2001/10/04 19:14:26 kschultz Exp $ */
 | 
			
		||||
/* $Id: geartrain.c,v 1.6 2000/04/06 02:22:59 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * GearTrain Simulator * Version:  1.00
 | 
			
		||||
@@ -32,9 +32,7 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
 | 
			
		||||
#ifndef min
 | 
			
		||||
#define min(x, y) ( x < y ? x : y )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef M_PI
 | 
			
		||||
#define M_PI 3.14159265
 | 
			
		||||
@@ -44,7 +42,7 @@ typedef GLfloat TDA[4];
 | 
			
		||||
TDA background;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
struct AXLE
 | 
			
		||||
struct AXLE 
 | 
			
		||||
  {
 | 
			
		||||
    char name[20];
 | 
			
		||||
      GLint id;
 | 
			
		||||
@@ -59,7 +57,7 @@ struct AXLE
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
struct GEAR
 | 
			
		||||
struct GEAR 
 | 
			
		||||
  {
 | 
			
		||||
    char name[20];
 | 
			
		||||
    char type[7];
 | 
			
		||||
@@ -81,7 +79,7 @@ struct GEAR
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
struct BELT
 | 
			
		||||
struct BELT 
 | 
			
		||||
  {
 | 
			
		||||
    char name[20];
 | 
			
		||||
      GLint id;
 | 
			
		||||
@@ -101,23 +99,18 @@ int number_of_belts;
 | 
			
		||||
 | 
			
		||||
char Buf1[256], Buf2[256], Buf3[256], Buf4[256], Buf5[256];
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef _WIN32
 | 
			
		||||
static void
 | 
			
		||||
strset (char buf[], char ch)
 | 
			
		||||
static void 
 | 
			
		||||
strset (char buf[], char ch) 
 | 
			
		||||
{
 | 
			
		||||
    int i;
 | 
			
		||||
    for (i = 0; i < strlen (buf); i++)
 | 
			
		||||
      buf[i] = ch;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Clear_Buffers ()
 | 
			
		||||
static void 
 | 
			
		||||
Clear_Buffers () 
 | 
			
		||||
{
 | 
			
		||||
    strset (Buf1, 0);
 | 
			
		||||
    strset (Buf2, 0);
 | 
			
		||||
@@ -127,8 +120,8 @@ Clear_Buffers ()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
LoadTriplet (TDA A)
 | 
			
		||||
static void 
 | 
			
		||||
LoadTriplet (TDA A) 
 | 
			
		||||
{
 | 
			
		||||
    Clear_Buffers ();
 | 
			
		||||
    fscanf (mainfile, "%s %s %s %s", Buf1, Buf2, Buf3, Buf4);
 | 
			
		||||
@@ -138,8 +131,8 @@ LoadTriplet (TDA A)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
LoadReal (float *a)
 | 
			
		||||
static void 
 | 
			
		||||
LoadReal (float *a) 
 | 
			
		||||
{
 | 
			
		||||
    Clear_Buffers ();
 | 
			
		||||
    fscanf (mainfile, "%s %s", Buf1, Buf2);
 | 
			
		||||
@@ -147,8 +140,8 @@ LoadReal (float *a)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
LoadInteger (int *a)
 | 
			
		||||
static void 
 | 
			
		||||
LoadInteger (int *a) 
 | 
			
		||||
{
 | 
			
		||||
    Clear_Buffers ();
 | 
			
		||||
    fscanf (mainfile, "%s %s", Buf1, Buf2);
 | 
			
		||||
@@ -156,8 +149,8 @@ LoadInteger (int *a)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
LoadText (char *a)
 | 
			
		||||
static void 
 | 
			
		||||
LoadText (char *a) 
 | 
			
		||||
{
 | 
			
		||||
    Clear_Buffers ();
 | 
			
		||||
    fscanf (mainfile, "%s %s", Buf1, Buf2);
 | 
			
		||||
@@ -165,11 +158,11 @@ LoadText (char *a)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
getdata (char filename[])
 | 
			
		||||
static void 
 | 
			
		||||
getdata (char filename[]) 
 | 
			
		||||
{
 | 
			
		||||
    int gear_count = 0, axle_count = 0, belt_count = 0, i;
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    mainfile = fopen (filename, "r");
 | 
			
		||||
    if (!mainfile) {
 | 
			
		||||
       printf("Error: couldn't open %s\n", filename);
 | 
			
		||||
@@ -188,92 +181,92 @@ getdata (char filename[])
 | 
			
		||||
 | 
			
		||||
	if (!(strcmp (Buf1, "BACKGROUND")))
 | 
			
		||||
	  LoadTriplet (background);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "ANAME")))
 | 
			
		||||
	{
 | 
			
		||||
	    LoadText (a[axle_count].name);
 | 
			
		||||
	    axle_count++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "ARADIUS")))
 | 
			
		||||
	  LoadReal (&a[axle_count - 1].radius);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "AAXIS")))
 | 
			
		||||
	  LoadInteger (&a[axle_count - 1].axis);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "ACOLOR")))
 | 
			
		||||
	  LoadTriplet (a[axle_count - 1].color);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "APOSITION")))
 | 
			
		||||
	  LoadTriplet (a[axle_count - 1].position);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "ALENGTH")))
 | 
			
		||||
	  LoadReal (&a[axle_count - 1].length);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "AMOTORED")))
 | 
			
		||||
	  LoadInteger (&a[axle_count - 1].motored);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "AANGULARVELOCITY")))
 | 
			
		||||
	  LoadReal (&a[axle_count - 1].angular_velocity);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "ADIRECTION")))
 | 
			
		||||
	  LoadInteger (&a[axle_count - 1].direction);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GNAME")))
 | 
			
		||||
	{
 | 
			
		||||
	    LoadText (g[gear_count].name);
 | 
			
		||||
	    gear_count++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GTYPE")))
 | 
			
		||||
	  LoadText (g[gear_count - 1].type);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GFACE")))
 | 
			
		||||
	  LoadInteger (&g[gear_count - 1].face);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GRADIUS")))
 | 
			
		||||
	  LoadReal (&g[gear_count - 1].radius);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GWIDTH")))
 | 
			
		||||
	  LoadReal (&g[gear_count - 1].width);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GTEETH")))
 | 
			
		||||
	  LoadInteger (&g[gear_count - 1].teeth);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GTOOTHDEPTH")))
 | 
			
		||||
	  LoadReal (&g[gear_count - 1].tooth_depth);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GCOLOR")))
 | 
			
		||||
	  LoadTriplet (g[gear_count - 1].color);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GAXLE")))
 | 
			
		||||
	  LoadText (g[gear_count - 1].axle_name);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GPOSITION")))
 | 
			
		||||
	  LoadInteger (&g[gear_count - 1].relative_position);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "BELTNAME")))
 | 
			
		||||
	{
 | 
			
		||||
	    LoadText (b[belt_count].name);
 | 
			
		||||
	    belt_count++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GEAR1NAME")))
 | 
			
		||||
	  LoadText (b[belt_count - 1].gear1_name);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (!(strcmp (Buf1, "GEAR2NAME")))
 | 
			
		||||
	  LoadText (b[belt_count - 1].gear2_name);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    while (Buf1[0] != 0);
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
    {
 | 
			
		||||
	g[i].axis = -1;
 | 
			
		||||
	g[i].direction = 0;
 | 
			
		||||
	g[i].angular_velocity = 0.0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    number_of_gears = gear_count;
 | 
			
		||||
    number_of_axles = axle_count;
 | 
			
		||||
    number_of_belts = belt_count;
 | 
			
		||||
@@ -281,12 +274,12 @@ getdata (char filename[])
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
axle (GLint j, GLfloat radius, GLfloat length)
 | 
			
		||||
static void 
 | 
			
		||||
axle (GLint j, GLfloat radius, GLfloat length) 
 | 
			
		||||
{
 | 
			
		||||
    GLfloat angle, rad, incr = 10.0 * M_PI / 180.0;
 | 
			
		||||
 | 
			
		||||
    /* draw main cylinder */
 | 
			
		||||
    
 | 
			
		||||
    /* draw main cylinder */ 
 | 
			
		||||
    glBegin (GL_QUADS);
 | 
			
		||||
    for (angle = 0.0; angle < 360.0; angle += 5.0)
 | 
			
		||||
    {
 | 
			
		||||
@@ -298,8 +291,8 @@ axle (GLint j, GLfloat radius, GLfloat length)
 | 
			
		||||
	glVertex3f (radius * cos (rad + incr), radius * sin (rad + incr), length / 2);
 | 
			
		||||
    }
 | 
			
		||||
    glEnd ();
 | 
			
		||||
 | 
			
		||||
    /* draw front face */
 | 
			
		||||
  
 | 
			
		||||
    /* draw front face */ 
 | 
			
		||||
    glNormal3f (0.0, 0.0, 1.0);
 | 
			
		||||
    glBegin (GL_TRIANGLES);
 | 
			
		||||
    for (angle = 0.0; angle < 360.0; angle += 5.0)
 | 
			
		||||
@@ -311,8 +304,8 @@ axle (GLint j, GLfloat radius, GLfloat length)
 | 
			
		||||
	glVertex3f (0.0, 0.0, length / 2);
 | 
			
		||||
    }
 | 
			
		||||
    glEnd ();
 | 
			
		||||
 | 
			
		||||
    /* draw back face */
 | 
			
		||||
    
 | 
			
		||||
    /* draw back face */ 
 | 
			
		||||
    glNormal3f (0.0, 0.0, -1.0);
 | 
			
		||||
    glBegin (GL_TRIANGLES);
 | 
			
		||||
    for (angle = 0.0; angle <= 360.0; angle += 5.0)
 | 
			
		||||
@@ -328,9 +321,9 @@ axle (GLint j, GLfloat radius, GLfloat length)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
      GLint teeth, GLfloat tooth_depth)
 | 
			
		||||
static void 
 | 
			
		||||
gear (GLint j, char type[], GLfloat radius, GLfloat width, 
 | 
			
		||||
      GLint teeth, GLfloat tooth_depth) 
 | 
			
		||||
{
 | 
			
		||||
    GLint i;
 | 
			
		||||
    GLfloat r1, r2;
 | 
			
		||||
@@ -340,7 +333,7 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
 | 
			
		||||
    r1 = radius - tooth_depth;
 | 
			
		||||
    r2 = radius;
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    da = 2.0 * M_PI / teeth / 4.0;
 | 
			
		||||
    if (!g[j].face)
 | 
			
		||||
    {
 | 
			
		||||
@@ -353,7 +346,7 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
	n = 1.0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* draw front face */
 | 
			
		||||
    /* draw front face */ 
 | 
			
		||||
    if (!(strcmp (type, "NORMAL")))
 | 
			
		||||
    {
 | 
			
		||||
	glNormal3f (0.0, 0.0, 1.0 * n);
 | 
			
		||||
@@ -382,8 +375,8 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
	}
 | 
			
		||||
	glEnd ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /* draw front sides of teeth */
 | 
			
		||||
  
 | 
			
		||||
    /* draw front sides of teeth */ 
 | 
			
		||||
    if (!(strcmp (type, "NORMAL")))
 | 
			
		||||
    {
 | 
			
		||||
	glNormal3f (0.0, 0.0, 1.0 * n);
 | 
			
		||||
@@ -399,10 +392,10 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
	}
 | 
			
		||||
	glEnd ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    glNormal3f (0.0, 0.0, -1.0 * n);
 | 
			
		||||
 | 
			
		||||
    /* draw back face */
 | 
			
		||||
  
 | 
			
		||||
    /* draw back face */ 
 | 
			
		||||
    glBegin (GL_QUAD_STRIP);
 | 
			
		||||
    for (i = 0; i <= teeth; i++)
 | 
			
		||||
    {
 | 
			
		||||
@@ -413,8 +406,8 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
	glVertex3f (0.0, 0.0, -width * fraction);
 | 
			
		||||
    }
 | 
			
		||||
    glEnd ();
 | 
			
		||||
 | 
			
		||||
    /* draw back sides of teeth */
 | 
			
		||||
  
 | 
			
		||||
    /* draw back sides of teeth */ 
 | 
			
		||||
    glNormal3f (0.0, 0.0, -1.0 * n);
 | 
			
		||||
    glBegin (GL_QUADS);
 | 
			
		||||
    da = 2.0 * M_PI / teeth / 4.0;
 | 
			
		||||
@@ -427,16 +420,16 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
	glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction);
 | 
			
		||||
    }
 | 
			
		||||
    glEnd ();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /* draw outward faces of teeth */
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    /* draw outward faces of teeth */ 
 | 
			
		||||
    if (!(strcmp (type, "NORMAL")))
 | 
			
		||||
    {
 | 
			
		||||
	glBegin (GL_QUAD_STRIP);
 | 
			
		||||
	for (i = 0; i < teeth; i++)
 | 
			
		||||
	{
 | 
			
		||||
	    angle = i * 2.0 * M_PI / teeth;
 | 
			
		||||
 | 
			
		||||
	    
 | 
			
		||||
	    glVertex3f (r1 * cos (angle), r1 * sin (angle), width * fraction);
 | 
			
		||||
	    glVertex3f (r1 * cos (angle), r1 * sin (angle), -width * fraction);
 | 
			
		||||
	    u = r2 * cos (angle + da) - r1 * cos (angle);
 | 
			
		||||
@@ -485,27 +478,27 @@ gear (GLint j, char type[], GLfloat radius, GLfloat width,
 | 
			
		||||
	    glNormal3f (cos (angle), sin (angle), n);
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    glVertex3f (r1 * cos (0), r1 * sin (0), width * fraction);
 | 
			
		||||
    glVertex3f (r1 * cos (0), r1 * sin (0), -width * fraction);
 | 
			
		||||
    glEnd ();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
belt (struct GEAR g1, struct GEAR g2)
 | 
			
		||||
static void 
 | 
			
		||||
belt (struct GEAR g1, struct GEAR g2) 
 | 
			
		||||
{
 | 
			
		||||
    GLfloat D, alpha, phi, angle, incr, width;
 | 
			
		||||
    GLint indexes[3] =
 | 
			
		||||
    {
 | 
			
		||||
       0, 0, 0
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    GLfloat col[3] =
 | 
			
		||||
    {
 | 
			
		||||
       0.0, 0.0, 0.0
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    width = min (g1.width, g2.width);
 | 
			
		||||
    D = sqrt (pow (g1.position[0] - g2.position[0], 2) + pow (g1.position[1] - g2.position[1], 2) + pow (g1.position[2] - g2.position[2], 2));
 | 
			
		||||
    alpha = acos ((g2.position[0] - g1.position[0]) / D);
 | 
			
		||||
@@ -552,11 +545,11 @@ belt (struct GEAR g1, struct GEAR g2)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
axle_find (char axle_name[])
 | 
			
		||||
static int 
 | 
			
		||||
axle_find (char axle_name[]) 
 | 
			
		||||
{
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    for (i = 0; i < number_of_axles; i++)
 | 
			
		||||
    {
 | 
			
		||||
	if (!(strcmp (axle_name, a[i].name)))
 | 
			
		||||
@@ -566,11 +559,11 @@ axle_find (char axle_name[])
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int
 | 
			
		||||
gear_find (char gear_name[])
 | 
			
		||||
static int 
 | 
			
		||||
gear_find (char gear_name[]) 
 | 
			
		||||
{
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
    {
 | 
			
		||||
	if (!(strcmp (gear_name, g[i].name)))
 | 
			
		||||
@@ -580,13 +573,13 @@ gear_find (char gear_name[])
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
process ()
 | 
			
		||||
static void 
 | 
			
		||||
process () 
 | 
			
		||||
{
 | 
			
		||||
    GLfloat x, y, z, D, dist;
 | 
			
		||||
    GLint axle_index, i, j, g1, g2, k;
 | 
			
		||||
    char error[80];
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
    {
 | 
			
		||||
	x = 0.0;
 | 
			
		||||
@@ -606,12 +599,12 @@ process ()
 | 
			
		||||
           y = 1.0;
 | 
			
		||||
        else
 | 
			
		||||
           z = 1.0;
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	g[i].position[0] = a[axle_index].position[0] + x * g[i].relative_position;
 | 
			
		||||
	g[i].position[1] = a[axle_index].position[1] + y * g[i].relative_position;
 | 
			
		||||
	g[i].position[2] = a[axle_index].position[2] + z * g[i].relative_position;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    for (k = 0; k < number_of_axles; k++)
 | 
			
		||||
    {
 | 
			
		||||
	for (i = 0; i < number_of_gears - 1; i++)
 | 
			
		||||
@@ -624,11 +617,11 @@ process ()
 | 
			
		||||
		    if (D < 1.1 * (g[i].radius - g[i].tooth_depth + g[j].radius - g[j].tooth_depth))
 | 
			
		||||
		    {
 | 
			
		||||
			printf (error, "Gear %s and %s are too close to each other.", g[i].name, g[j].name);
 | 
			
		||||
 | 
			
		||||
		      
 | 
			
		||||
                        /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
 | 
			
		||||
			exit (1);
 | 
			
		||||
		    }
 | 
			
		||||
 | 
			
		||||
		  
 | 
			
		||||
		    if (g[i].axis == 0)
 | 
			
		||||
		    {
 | 
			
		||||
			dist = g[i].position[0] - g[j].position[0];
 | 
			
		||||
@@ -639,9 +632,9 @@ process ()
 | 
			
		||||
		    }
 | 
			
		||||
		    else
 | 
			
		||||
                       dist = g[i].position[2] - g[j].position[2];
 | 
			
		||||
 | 
			
		||||
		  
 | 
			
		||||
		    dist = fabs (dist);
 | 
			
		||||
 | 
			
		||||
		    
 | 
			
		||||
		    if (dist < (g[i].width / 2 + g[j].width / 2))
 | 
			
		||||
		    {
 | 
			
		||||
			if ((g[i].motored) && (!(g[j].motored)) && (D < 0.95 * (g[i].radius + g[j].radius)))
 | 
			
		||||
@@ -653,13 +646,13 @@ process ()
 | 
			
		||||
                                /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
 | 
			
		||||
				exit (1);
 | 
			
		||||
			    }
 | 
			
		||||
 | 
			
		||||
			  
 | 
			
		||||
			    g[j].motored = (a[axle_index].motored = 1);
 | 
			
		||||
			    g[j].direction = (a[axle_index].direction = -g[i].direction);
 | 
			
		||||
			    a[axle_index].angular_velocity = g[i].angular_velocity * g[i].teeth / g[j].teeth;
 | 
			
		||||
			    g[j].angular_velocity = (a[axle_index].angular_velocity *= g[i].radius / g[j].radius);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		      
 | 
			
		||||
			if ((!(g[i].motored)) && (g[j].motored) && (D < 0.95 * (g[i].radius + g[j].radius)))
 | 
			
		||||
			{
 | 
			
		||||
			    axle_index = axle_find (g[i].axle_name);
 | 
			
		||||
@@ -669,16 +662,16 @@ process ()
 | 
			
		||||
                                /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
 | 
			
		||||
				exit (1);
 | 
			
		||||
			    }
 | 
			
		||||
 | 
			
		||||
			  
 | 
			
		||||
			    g[i].motored = (a[axle_index].motored = 1);
 | 
			
		||||
			    g[i].direction = (a[axle_index].direction = -g[j].direction);
 | 
			
		||||
			    a[axle_index].angular_velocity = g[j].angular_velocity * g[j].teeth / g[i].teeth;
 | 
			
		||||
			    g[i].angular_velocity = (a[axle_index].angular_velocity *= g[j].radius / g[i].radius);
 | 
			
		||||
 | 
			
		||||
			  
 | 
			
		||||
			}
 | 
			
		||||
		    }
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	      
 | 
			
		||||
		if (!(strcmp (g[i].type, g[j].type)) && (!(strcmp (g[i].type, "BEVEL"))) && ((strcmp (g[i].axle_name, g[j].axle_name) != 0)) && (g[i].axis != g[j].axis))
 | 
			
		||||
		{
 | 
			
		||||
		    D = sqrt (pow (g[i].position[0] - g[j].position[0], 2) + pow (g[i].position[1] - g[j].position[1], 2) + pow (g[i].position[2] - g[j].position[2], 2));
 | 
			
		||||
@@ -696,8 +689,8 @@ process ()
 | 
			
		||||
			a[axle_index].angular_velocity = g[i].angular_velocity * g[i].teeth / g[j].teeth;
 | 
			
		||||
			g[j].angular_velocity = (a[axle_index].angular_velocity *= g[i].radius / g[j].radius);
 | 
			
		||||
		    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		  
 | 
			
		||||
		    
 | 
			
		||||
		    if ((!(g[i].motored)) && (g[j].motored) && (D < 0.95 * sqrt (g[i].radius * g[i].radius + g[j].radius * g[j].radius)))
 | 
			
		||||
		    {
 | 
			
		||||
			axle_index = axle_find (g[i].axle_name);
 | 
			
		||||
@@ -715,7 +708,7 @@ process ()
 | 
			
		||||
		}
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
	{
 | 
			
		||||
	    axle_index = axle_find (g[i].axle_name);
 | 
			
		||||
@@ -726,7 +719,7 @@ process ()
 | 
			
		||||
		g[i].angular_velocity = a[axle_index].angular_velocity;
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	for (i = 0; i < number_of_belts; i++)
 | 
			
		||||
	{
 | 
			
		||||
	    g1 = gear_find (b[i].gear1_name);
 | 
			
		||||
@@ -738,7 +731,7 @@ process ()
 | 
			
		||||
                /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
 | 
			
		||||
		exit (1);
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	  
 | 
			
		||||
	    if ((g[g1].axis == g[g2].axis) && (!strcmp (g[g1].type, g[g2].type)) && (!strcmp (g[g1].type, "NORMAL")))
 | 
			
		||||
	    {
 | 
			
		||||
	      /*
 | 
			
		||||
@@ -749,7 +742,7 @@ process ()
 | 
			
		||||
	         MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);
 | 
			
		||||
	         exit(1);
 | 
			
		||||
	         }
 | 
			
		||||
              */
 | 
			
		||||
              */ 
 | 
			
		||||
               if (g[g1].axis == 0)
 | 
			
		||||
                  {
 | 
			
		||||
		    dist = g[g1].position[0] - g[g2].position[0];
 | 
			
		||||
@@ -760,16 +753,16 @@ process ()
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
                   dist = g[g1].position[2] - g[g2].position[2];
 | 
			
		||||
 | 
			
		||||
	      
 | 
			
		||||
		dist = fabs (dist);
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
		if (dist > (g[g1].width / 2 + g[g2].width / 2))
 | 
			
		||||
		{
 | 
			
		||||
		    printf (error, "Belt %s invalid.", b[i].name);
 | 
			
		||||
                    /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
 | 
			
		||||
		    exit (1);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	      
 | 
			
		||||
		if (dist < (g[g1].width / 2 + g[g2].width / 2))
 | 
			
		||||
		{
 | 
			
		||||
		    if (D < g[g1].radius + g[g2].radius)
 | 
			
		||||
@@ -778,7 +771,7 @@ process ()
 | 
			
		||||
                        /*MessageBox(NULL,error,windowName,MB_ICONEXCLAMATION|MB_OK);*/
 | 
			
		||||
			exit (1);
 | 
			
		||||
		    }
 | 
			
		||||
 | 
			
		||||
		  
 | 
			
		||||
		    if ((g[g1].motored) && (!(g[g2].motored)))
 | 
			
		||||
		    {
 | 
			
		||||
			axle_index = axle_find (g[g2].axle_name);
 | 
			
		||||
@@ -786,7 +779,7 @@ process ()
 | 
			
		||||
			g[g2].direction = (a[axle_index].direction = g[g1].direction);
 | 
			
		||||
			g[g2].angular_velocity = (a[axle_index].angular_velocity = g[g1].angular_velocity * g[g1].radius / g[g2].radius);
 | 
			
		||||
		    }
 | 
			
		||||
 | 
			
		||||
		  
 | 
			
		||||
		    if ((!(g[g1].motored)) && (g[g2].motored))
 | 
			
		||||
		    {
 | 
			
		||||
			axle_index = axle_find (g[g1].axle_name);
 | 
			
		||||
@@ -797,7 +790,7 @@ process ()
 | 
			
		||||
		}
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
	{
 | 
			
		||||
	    axle_index = axle_find (g[i].axle_name);
 | 
			
		||||
@@ -816,20 +809,20 @@ process ()
 | 
			
		||||
GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 10.0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
draw (void)
 | 
			
		||||
static void 
 | 
			
		||||
draw (void) 
 | 
			
		||||
{
 | 
			
		||||
    int i;
 | 
			
		||||
    GLfloat x, y, z;
 | 
			
		||||
    int index;
 | 
			
		||||
 | 
			
		||||
    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    glPushMatrix ();
 | 
			
		||||
    glRotatef (view_rotx, 1.0, 0.0, 0.0);
 | 
			
		||||
    glRotatef (view_roty, 0.0, 1.0, 0.0);
 | 
			
		||||
    glRotatef (view_rotz, 0.0, 0.0, 1.0);
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
    {
 | 
			
		||||
	x = 0.0;
 | 
			
		||||
@@ -844,15 +837,15 @@ draw (void)
 | 
			
		||||
           x = 1.0;
 | 
			
		||||
        else
 | 
			
		||||
           z = 1.0;
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (z != 1.0)
 | 
			
		||||
           glRotatef (90.0, x, y, z);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	glRotatef (g[i].direction * g[i].angle, 0.0, 0.0, 1.0);
 | 
			
		||||
	glCallList (g[i].id);
 | 
			
		||||
	glPopMatrix ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    for (i = 0; i < number_of_axles; i++)
 | 
			
		||||
    {
 | 
			
		||||
	x = 0.0;
 | 
			
		||||
@@ -869,11 +862,11 @@ draw (void)
 | 
			
		||||
 | 
			
		||||
	if (z != 1.0)
 | 
			
		||||
           glRotatef (90.0, x, y, z);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	glCallList (a[i].id);
 | 
			
		||||
	glPopMatrix ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    for (i = 0; i < number_of_belts; i++)
 | 
			
		||||
    {
 | 
			
		||||
	x = 0.0;
 | 
			
		||||
@@ -888,35 +881,23 @@ draw (void)
 | 
			
		||||
           x = 1.0;
 | 
			
		||||
        else
 | 
			
		||||
           z = 1.0;
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	if (z != 1.0)
 | 
			
		||||
           glRotatef (90.0, x, y, z);
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
	glCallList (b[i].id);
 | 
			
		||||
	glPopMatrix ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    glPopMatrix ();
 | 
			
		||||
    glutSwapBuffers ();
 | 
			
		||||
 | 
			
		||||
    {
 | 
			
		||||
	GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
	Frames++;
 | 
			
		||||
	if (t - T0 >= 5000) {
 | 
			
		||||
	    GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
	    GLfloat fps = Frames / seconds;
 | 
			
		||||
	    printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
 | 
			
		||||
	    T0 = t;
 | 
			
		||||
	    Frames = 0;
 | 
			
		||||
	}
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
idle (void)
 | 
			
		||||
static void 
 | 
			
		||||
idle (void) 
 | 
			
		||||
{
 | 
			
		||||
    int i;
 | 
			
		||||
    for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
@@ -927,9 +908,9 @@ idle (void)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* change view angle, exit upon ESC */
 | 
			
		||||
static void
 | 
			
		||||
key (unsigned char k, int x, int y)
 | 
			
		||||
/* change view angle, exit upon ESC */ 
 | 
			
		||||
static void 
 | 
			
		||||
key (unsigned char k, int x, int y) 
 | 
			
		||||
{
 | 
			
		||||
    switch (k)
 | 
			
		||||
    {
 | 
			
		||||
@@ -959,9 +940,9 @@ key (unsigned char k, int x, int y)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* new window size or exposure */
 | 
			
		||||
static void
 | 
			
		||||
reshape (int width, int height)
 | 
			
		||||
/* new window size or exposure */ 
 | 
			
		||||
static void 
 | 
			
		||||
reshape (int width, int height) 
 | 
			
		||||
{
 | 
			
		||||
    glViewport (0, 0, (GLint) width, (GLint) height);
 | 
			
		||||
    glMatrixMode (GL_PROJECTION);
 | 
			
		||||
@@ -976,7 +957,7 @@ reshape (int width, int height)
 | 
			
		||||
	GLfloat h = (GLfloat) height / (GLfloat) width;
 | 
			
		||||
	glFrustum (-1.0, 1.0, -h, h, 5.0, 60.0);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    glMatrixMode (GL_MODELVIEW);
 | 
			
		||||
    glLoadIdentity ();
 | 
			
		||||
    glTranslatef (0.0, 0.0, -40.0);
 | 
			
		||||
@@ -985,8 +966,8 @@ reshape (int width, int height)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
init (void)
 | 
			
		||||
static void 
 | 
			
		||||
init (void) 
 | 
			
		||||
{
 | 
			
		||||
    GLfloat matShine = 20.00F;
 | 
			
		||||
    GLfloat light0Pos[4] =
 | 
			
		||||
@@ -994,19 +975,19 @@ init (void)
 | 
			
		||||
       0.70F, 0.70F, 1.25F, 0.50F
 | 
			
		||||
    };
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    glClearColor (background[0], background[1], background[2], 1.0F);
 | 
			
		||||
    glClearIndex ((GLfloat) 0.0);
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    glMaterialf (GL_FRONT_AND_BACK, GL_SHININESS, matShine);
 | 
			
		||||
    glLightfv (GL_LIGHT0, GL_POSITION, light0Pos);
 | 
			
		||||
    glEnable (GL_LIGHT0);
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    glEnable (GL_LIGHTING);
 | 
			
		||||
    glEnable (GL_DEPTH_TEST);
 | 
			
		||||
    for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
      g[i].angle = 0.0;
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    for (i = 0; i < number_of_gears; i++)
 | 
			
		||||
    {
 | 
			
		||||
	g[i].id = glGenLists (1);
 | 
			
		||||
@@ -1016,7 +997,7 @@ init (void)
 | 
			
		||||
	gear (i, g[i].type, g[i].radius, g[i].width, g[i].teeth, g[i].tooth_depth);
 | 
			
		||||
	glEndList ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    for (i = 0; i < number_of_axles; i++)
 | 
			
		||||
    {
 | 
			
		||||
	a[i].id = glGenLists (1);
 | 
			
		||||
@@ -1026,7 +1007,7 @@ init (void)
 | 
			
		||||
	axle (i, a[i].radius, a[i].length);
 | 
			
		||||
	glEndList ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    for (i = 0; i < number_of_belts; i++)
 | 
			
		||||
    {
 | 
			
		||||
	b[i].id = glGenLists (1);
 | 
			
		||||
@@ -1034,14 +1015,14 @@ init (void)
 | 
			
		||||
	belt (g[gear_find (b[i].gear1_name)], g[gear_find (b[i].gear2_name)]);
 | 
			
		||||
	glEndList ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
    glEnable (GL_COLOR_MATERIAL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main (int argc, char *argv[])
 | 
			
		||||
int 
 | 
			
		||||
main (int argc, char *argv[]) 
 | 
			
		||||
{
 | 
			
		||||
    char *file;
 | 
			
		||||
 | 
			
		||||
@@ -1053,14 +1034,14 @@ main (int argc, char *argv[])
 | 
			
		||||
    glutInitWindowPosition (0, 0);
 | 
			
		||||
    glutInitWindowSize(640,480);
 | 
			
		||||
    glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    if (glutCreateWindow ("Gear Train Simulation") == GL_FALSE)
 | 
			
		||||
      exit (1);
 | 
			
		||||
 | 
			
		||||
    getdata (file);
 | 
			
		||||
    process ();
 | 
			
		||||
    init ();
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    glutDisplayFunc (draw);
 | 
			
		||||
    glutReshapeFunc (reshape);
 | 
			
		||||
    glutKeyboardFunc (key);
 | 
			
		||||
@@ -1068,3 +1049,4 @@ main (int argc, char *argv[])
 | 
			
		||||
    glutMainLoop ();
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glinfo.c,v 1.2 2002/04/22 16:03:37 brianp Exp $ */
 | 
			
		||||
/* $Id: glinfo.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Print GL, GLU and GLUT version and extension info
 | 
			
		||||
@@ -8,6 +8,23 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: glinfo.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/02/02 04:45:49  brianp
 | 
			
		||||
 * include stdio.h before glut.h
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/02/22 16:42:54  brianp
 | 
			
		||||
 * added casts to prevent compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: gloss.c,v 1.6 2000/12/24 22:53:54 pesco Exp $ */
 | 
			
		||||
/* $Id: gloss.c,v 1.4.4.1 2000/08/29 21:17:25 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Specular reflection demo.  The specular highlight is modulated by
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
#include "../util/readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define SPECULAR_TEXTURE_FILE "../images/reflect.rgb"
 | 
			
		||||
#define BASE_TEXTURE_FILE "../images/tile.rgb"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glutfx.c,v 1.3 2002/04/22 16:03:37 brianp Exp $ */
 | 
			
		||||
/* $Id: glutfx.c,v 1.2 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Example of how one might use GLUT with the 3Dfx driver in full-screen mode.
 | 
			
		||||
@@ -14,6 +14,25 @@
 | 
			
		||||
 * Brian Paul   This file is in the public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: glutfx.c,v $
 | 
			
		||||
 * Revision 1.2  2000/06/27 17:04:43  brianp
 | 
			
		||||
 * fixed compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1999/03/28 18:18:33  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/06/29 02:37:30  brianp
 | 
			
		||||
 * minor changes for Windows (Ted Jump)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -11,14 +11,14 @@
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
 | 
			
		||||
#if defined (WIN32)|| defined(_WIN32)
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <mmsystem.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
#include "../util/readtex.c"
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
@@ -28,9 +28,6 @@ static int fullscreen = 1;
 | 
			
		||||
static int WIDTH = 640;
 | 
			
		||||
static int HEIGHT = 480;
 | 
			
		||||
 | 
			
		||||
static GLint T0;
 | 
			
		||||
static GLint Frames;
 | 
			
		||||
 | 
			
		||||
#define MAX_LOD 9
 | 
			
		||||
 | 
			
		||||
#define TEX_SKY_WIDTH 256
 | 
			
		||||
@@ -186,7 +183,7 @@ inittextures(void)
 | 
			
		||||
       (gluerr =
 | 
			
		||||
	gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TEX_SKY_WIDTH, TEX_SKY_HEIGHT,
 | 
			
		||||
			  GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) (tsky)))) {
 | 
			
		||||
      fprintf(stderr, "GLULib%s\n", (char *) gluErrorString(gluerr));
 | 
			
		||||
      fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
 | 
			
		||||
      exit(-1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
@@ -198,6 +195,21 @@ inittextures(void)
 | 
			
		||||
   glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static float
 | 
			
		||||
gettime(void)
 | 
			
		||||
{
 | 
			
		||||
   static clock_t told = 0;
 | 
			
		||||
   clock_t tnew, ris;
 | 
			
		||||
 | 
			
		||||
   tnew = clock();
 | 
			
		||||
 | 
			
		||||
   ris = tnew - told;
 | 
			
		||||
 | 
			
		||||
   told = tnew;
 | 
			
		||||
 | 
			
		||||
   return (ris / (float) CLOCKS_PER_SEC);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
calcposobs(void)
 | 
			
		||||
{
 | 
			
		||||
@@ -205,13 +217,6 @@ calcposobs(void)
 | 
			
		||||
   dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
 | 
			
		||||
   dir[2] = cos(beta * M_PI / 180.0);
 | 
			
		||||
 | 
			
		||||
   if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
 | 
			
		||||
      dir[0] = 0;
 | 
			
		||||
   if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
 | 
			
		||||
      dir[1] = 0;
 | 
			
		||||
   if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
 | 
			
		||||
      dir[2] = 0;
 | 
			
		||||
 | 
			
		||||
   obs[0] += v * dir[0];
 | 
			
		||||
   obs[1] += v * dir[1];
 | 
			
		||||
   obs[2] += v * dir[2];
 | 
			
		||||
@@ -539,10 +544,11 @@ drawipers(int depth, int from)
 | 
			
		||||
static void
 | 
			
		||||
draw(void)
 | 
			
		||||
{
 | 
			
		||||
   static char frbuf[80] = "";
 | 
			
		||||
   static int count = 0;
 | 
			
		||||
   static char frbuf[80];
 | 
			
		||||
   static GLfloat alpha = 0.0f;
 | 
			
		||||
   static GLfloat beta = 0.0f;
 | 
			
		||||
   static float fr = 0.0;
 | 
			
		||||
   float fr;
 | 
			
		||||
 | 
			
		||||
   dojoy();
 | 
			
		||||
 | 
			
		||||
@@ -604,9 +610,10 @@ draw(void)
 | 
			
		||||
 | 
			
		||||
   /* Help Screen */
 | 
			
		||||
 | 
			
		||||
   fr = gettime();
 | 
			
		||||
   sprintf(frbuf,
 | 
			
		||||
	   "Frame rate: %0.2f   LOD: %d   Tot. poly.: %d   Poly/sec: %.1f",
 | 
			
		||||
	   fr, LODbias, totpoly, totpoly * fr);
 | 
			
		||||
	   1.0 / fr, LODbias, totpoly, totpoly / fr);
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
@@ -637,16 +644,7 @@ draw(void)
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      if (t - T0 >= 2000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         fr = Frames / seconds;
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   count++;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
/* $Id: isosurf.c,v 1.15.4.3 2003/04/07 22:27:23 keithw Exp $ */
 | 
			
		||||
/* $Id: isosurf.c,v 1.6 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Display an isosurface of 3-D wind speed volume.
 | 
			
		||||
 * Display an isosurface of 3-D wind speed volume.  
 | 
			
		||||
 *
 | 
			
		||||
 * Command line options:
 | 
			
		||||
 *    -info      print GL implementation information
 | 
			
		||||
@@ -30,47 +30,69 @@
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#undef CLIP_MASK
 | 
			
		||||
#endif
 | 
			
		||||
#define GL_GLEXT_LEGACY
 | 
			
		||||
#include "GL/glut.h"
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"   
 | 
			
		||||
#include "../util/readtex.c"   /* I know, this is a hack.  KW: me too. */
 | 
			
		||||
#define TEXTURE_FILE "../images/reflect.rgb"
 | 
			
		||||
 | 
			
		||||
#define POINT_FILTER	0x00000008
 | 
			
		||||
#define LINEAR_FILTER	0x00000010
 | 
			
		||||
#define SHADE_SMOOTH	0x00002000
 | 
			
		||||
#define SHADE_FLAT	0x00004000
 | 
			
		||||
#define TRIANGLES	0x00008000
 | 
			
		||||
#define STRIPS		0x00010000
 | 
			
		||||
#define POINTS		0x00020000
 | 
			
		||||
#define QUIT		0x01000000
 | 
			
		||||
#define GLINFO		0x02000000
 | 
			
		||||
#define LIT                 0x1
 | 
			
		||||
#define UNLIT               0x2
 | 
			
		||||
#define TEXTURE             0x4
 | 
			
		||||
#define NO_TEXTURE          0x8
 | 
			
		||||
#define REFLECT             0x10
 | 
			
		||||
#define NO_REFLECT          0x20
 | 
			
		||||
#define POINT_FILTER        0x40
 | 
			
		||||
#define LINEAR_FILTER       0x80
 | 
			
		||||
#define GLVERTEX           0x100
 | 
			
		||||
#define DRAW_ARRAYS         0x200 /* or draw_elts, if compiled */
 | 
			
		||||
#define ARRAY_ELT           0x400
 | 
			
		||||
#define COMPILED            0x800
 | 
			
		||||
#define IMMEDIATE           0x1000
 | 
			
		||||
#define SHADE_SMOOTH        0x2000
 | 
			
		||||
#define SHADE_FLAT          0x4000
 | 
			
		||||
#define TRIANGLES           0x8000
 | 
			
		||||
#define STRIPS              0x10000
 | 
			
		||||
#define USER_CLIP           0x20000
 | 
			
		||||
#define NO_USER_CLIP        0x40000
 | 
			
		||||
#define MATERIALS           0x80000
 | 
			
		||||
#define NO_MATERIALS        0x100000
 | 
			
		||||
#define FOG                 0x200000
 | 
			
		||||
#define NO_FOG              0x400000
 | 
			
		||||
#define QUIT                0x800000
 | 
			
		||||
#define DISPLAYLIST         0x1000000
 | 
			
		||||
#define GLINFO              0x2000000
 | 
			
		||||
#define STIPPLE             0x4000000
 | 
			
		||||
#define NO_STIPPLE          0x8000000
 | 
			
		||||
 | 
			
		||||
#define PRIMITIVE_MASK		(TRIANGLES|STRIPS|POINTS)
 | 
			
		||||
#define SHADE_MASK		(SHADE_SMOOTH|SHADE_FLAT)
 | 
			
		||||
#define LIGHT_MASK  (LIT|UNLIT)
 | 
			
		||||
#define TEXTURE_MASK (TEXTURE|NO_TEXTURE)
 | 
			
		||||
#define REFLECT_MASK (REFLECT|NO_REFLECT)
 | 
			
		||||
#define FILTER_MASK (POINT_FILTER|LINEAR_FILTER)
 | 
			
		||||
#define RENDER_STYLE_MASK (GLVERTEX|DRAW_ARRAYS|ARRAY_ELT)
 | 
			
		||||
#define COMPILED_MASK (COMPILED|IMMEDIATE|DISPLAYLIST)
 | 
			
		||||
#define MATERIAL_MASK (MATERIALS|NO_MATERIALS)
 | 
			
		||||
#define PRIMITIVE_MASK (TRIANGLES|STRIPS)
 | 
			
		||||
#define CLIP_MASK (USER_CLIP|NO_USER_CLIP)
 | 
			
		||||
#define SHADE_MASK (SHADE_SMOOTH|SHADE_FLAT)
 | 
			
		||||
#define FOG_MASK (FOG|NO_FOG)
 | 
			
		||||
#define STIPPLE_MASK (STIPPLE|NO_STIPPLE)
 | 
			
		||||
 | 
			
		||||
#define MAXVERTS 10000
 | 
			
		||||
static GLint maxverts = MAXVERTS;
 | 
			
		||||
static float data[MAXVERTS][6];
 | 
			
		||||
static float compressed_data[MAXVERTS][6];
 | 
			
		||||
static float expanded_data[MAXVERTS*3][6];
 | 
			
		||||
static GLuint indices[MAXVERTS];
 | 
			
		||||
static GLuint tri_indices[MAXVERTS*3];
 | 
			
		||||
static GLuint strip_indices[MAXVERTS];
 | 
			
		||||
static GLfloat col[100][4];
 | 
			
		||||
static GLint numverts, num_tri_verts, numuniq;
 | 
			
		||||
 | 
			
		||||
static GLfloat xrot;
 | 
			
		||||
static GLfloat yrot;
 | 
			
		||||
static GLfloat dist;
 | 
			
		||||
static GLfloat dist = -6;
 | 
			
		||||
static GLint state, allowed = ~0;
 | 
			
		||||
static GLboolean doubleBuffer = GL_TRUE;
 | 
			
		||||
static GLdouble plane[4];
 | 
			
		||||
static GLuint surf1, dlist_state;
 | 
			
		||||
static GLdouble plane[4] = {1.0, 0.0, -1.0, 0.0};
 | 
			
		||||
static GLuint surf1;
 | 
			
		||||
 | 
			
		||||
static GLboolean PrintInfo = GL_FALSE;
 | 
			
		||||
 | 
			
		||||
@@ -88,6 +110,9 @@ static GLubyte halftone[] = {
 | 
			
		||||
   0x55, 0x55, 0x55, 0x55, 0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
 | 
			
		||||
   0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55};
 | 
			
		||||
 | 
			
		||||
/* forward decl */
 | 
			
		||||
int BuildList( int mode );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void read_surface( char *filename )
 | 
			
		||||
{
 | 
			
		||||
@@ -100,7 +125,7 @@ static void read_surface( char *filename )
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   numverts = 0;
 | 
			
		||||
   while (!feof(f) && numverts<maxverts) {
 | 
			
		||||
   while (!feof(f) && numverts<MAXVERTS) {
 | 
			
		||||
      fscanf( f, "%f %f %f  %f %f %f",
 | 
			
		||||
	      &data[numverts][0], &data[numverts][1], &data[numverts][2],
 | 
			
		||||
	      &data[numverts][3], &data[numverts][4], &data[numverts][5] );
 | 
			
		||||
@@ -114,11 +139,6 @@ static void read_surface( char *filename )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void print_flags( const char *msg, GLuint flags ) 
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
struct data_idx {
 | 
			
		||||
   float *data;
 | 
			
		||||
@@ -160,7 +180,7 @@ int (*(compare[7]))( const void *a, const void *b ) =
 | 
			
		||||
 | 
			
		||||
#define VEC_ELT(f, s, i)  (float *)(((char *)f) + s * i)
 | 
			
		||||
 | 
			
		||||
static int sort_axis( int axis,
 | 
			
		||||
static int sort_axis( int axis, 
 | 
			
		||||
		      int vec_size,
 | 
			
		||||
		      int vec_stride,
 | 
			
		||||
		      struct data_idx *indices,
 | 
			
		||||
@@ -172,27 +192,27 @@ static int sort_axis( int axis,
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
 | 
			
		||||
   if (finish-start > 2)
 | 
			
		||||
   if (finish-start > 2) 
 | 
			
		||||
   {
 | 
			
		||||
      qsort( indices+start, finish-start, sizeof(*indices), compare[axis] );
 | 
			
		||||
   }
 | 
			
		||||
   else if (indices[start].data[axis] > indices[start+1].data[axis])
 | 
			
		||||
   } 
 | 
			
		||||
   else if (indices[start].data[axis] > indices[start+1].data[axis]) 
 | 
			
		||||
   {
 | 
			
		||||
      struct data_idx tmp = indices[start];
 | 
			
		||||
      indices[start] = indices[start+1];
 | 
			
		||||
      indices[start+1] = tmp;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
	 
 | 
			
		||||
   if (axis == vec_size-1) {
 | 
			
		||||
      for (i = start ; i < finish ; ) {
 | 
			
		||||
	 float max = indices[i].data[axis] + fudge;
 | 
			
		||||
	 float *dest = VEC_ELT(out, vec_stride, uniq);
 | 
			
		||||
	 int j;
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
	 for (j = 0 ; j < vec_size ; j++)
 | 
			
		||||
	    dest[j] = indices[i].data[j];
 | 
			
		||||
 | 
			
		||||
	 for ( ; i < finish && max >= indices[i].data[axis]; i++)
 | 
			
		||||
	 for ( ; i < finish && max >= indices[i].data[axis]; i++) 
 | 
			
		||||
	    indices[i].uniq_idx = uniq;
 | 
			
		||||
 | 
			
		||||
	 uniq++;
 | 
			
		||||
@@ -207,7 +227,7 @@ static int sort_axis( int axis,
 | 
			
		||||
	    int k;
 | 
			
		||||
 | 
			
		||||
	    indices[i].uniq_idx = uniq;
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
	    for (k = 0 ; k < vec_size ; k++)
 | 
			
		||||
	       dest[k] = indices[i].data[k];
 | 
			
		||||
 | 
			
		||||
@@ -224,7 +244,7 @@ static int sort_axis( int axis,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void extract_indices1( const struct data_idx *in, unsigned int *out,
 | 
			
		||||
static void extract_indices1( const struct data_idx *in, unsigned int *out, 
 | 
			
		||||
			      int n )
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
@@ -246,13 +266,13 @@ static void compactify_arrays(void)
 | 
			
		||||
      ind[i].data = data[i];
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   numuniq = sort_axis(0,
 | 
			
		||||
		       sizeof(compressed_data[0])/sizeof(float),
 | 
			
		||||
   numuniq = sort_axis(0, 
 | 
			
		||||
		       sizeof(compressed_data[0])/sizeof(float), 
 | 
			
		||||
		       sizeof(compressed_data[0]),
 | 
			
		||||
		       ind,
 | 
			
		||||
		       0,
 | 
			
		||||
		       numverts,
 | 
			
		||||
		       (float *)compressed_data,
 | 
			
		||||
		       ind, 
 | 
			
		||||
		       0, 
 | 
			
		||||
		       numverts, 
 | 
			
		||||
		       (float *)compressed_data, 
 | 
			
		||||
		       0,
 | 
			
		||||
		       1e-6);
 | 
			
		||||
 | 
			
		||||
@@ -262,20 +282,6 @@ static void compactify_arrays(void)
 | 
			
		||||
   free( ind );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void expand_arrays(void) 
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
   int parity = 0;
 | 
			
		||||
   for (i = 2 ; i < numverts ; i++, parity ^= 1) {
 | 
			
		||||
      int v0 = i-2+parity;
 | 
			
		||||
      int v1 = i-1-parity;
 | 
			
		||||
      int v2 = i;
 | 
			
		||||
      memcpy( expanded_data[(i-2)*3+0], data[v0], sizeof(data[0]) );
 | 
			
		||||
      memcpy( expanded_data[(i-2)*3+1], data[v1], sizeof(data[0]) );
 | 
			
		||||
      memcpy( expanded_data[(i-2)*3+2], data[v2], sizeof(data[0]) );
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static float myrand( float max )
 | 
			
		||||
{
 | 
			
		||||
   return max*rand()/(RAND_MAX+1.0);
 | 
			
		||||
@@ -286,12 +292,12 @@ static void make_tri_indices( void )
 | 
			
		||||
{
 | 
			
		||||
   unsigned int *v = tri_indices;
 | 
			
		||||
   unsigned int parity = 0;
 | 
			
		||||
   int i, j;
 | 
			
		||||
   unsigned int i, j;
 | 
			
		||||
 | 
			
		||||
   for (j=2;j<numverts;j++,parity^=1) {
 | 
			
		||||
      if (parity) {
 | 
			
		||||
	 *v++ = indices[j-1];
 | 
			
		||||
	 *v++ = indices[j-2];
 | 
			
		||||
	 *v++ = indices[j-2]; 
 | 
			
		||||
	 *v++ = indices[j];
 | 
			
		||||
      } else {
 | 
			
		||||
	 *v++ = indices[j-2];
 | 
			
		||||
@@ -299,7 +305,7 @@ static void make_tri_indices( void )
 | 
			
		||||
	 *v++ = indices[j];
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
   num_tri_verts = v - tri_indices;
 | 
			
		||||
   printf("num_tri_verts: %d\n", num_tri_verts);
 | 
			
		||||
 | 
			
		||||
@@ -309,55 +315,124 @@ static void make_tri_indices( void )
 | 
			
		||||
      col[j][1] = myrand(1);
 | 
			
		||||
      col[j][0] = myrand(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < numverts ; i++)
 | 
			
		||||
      strip_indices[i] = i;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#define MIN(x,y) (x < y) ? x : y
 | 
			
		||||
 | 
			
		||||
static void draw_surface( unsigned int with_state )
 | 
			
		||||
static void draw_surface( int with_state )
 | 
			
		||||
{
 | 
			
		||||
   GLint i, j;
 | 
			
		||||
   
 | 
			
		||||
   GLuint i, j;
 | 
			
		||||
 | 
			
		||||
   switch (with_state & (PRIMITIVE_MASK)) {
 | 
			
		||||
   switch (with_state & (COMPILED_MASK|RENDER_STYLE_MASK|PRIMITIVE_MASK)) {
 | 
			
		||||
#ifdef GL_EXT_vertex_array
 | 
			
		||||
 | 
			
		||||
   case (0|TRIANGLES):
 | 
			
		||||
   case (COMPILED|DRAW_ARRAYS|STRIPS):
 | 
			
		||||
      glDrawElements( GL_TRIANGLE_STRIP, numverts, GL_UNSIGNED_INT, indices );
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   case (COMPILED|ARRAY_ELT|STRIPS):
 | 
			
		||||
      glBegin( GL_TRIANGLE_STRIP );
 | 
			
		||||
      for (i = 0 ; i < numverts ; i++) 
 | 
			
		||||
	 glArrayElement( indices[i] );      
 | 
			
		||||
      glEnd();
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case (COMPILED|DRAW_ARRAYS|TRIANGLES):
 | 
			
		||||
   case (IMMEDIATE|DRAW_ARRAYS|TRIANGLES):
 | 
			
		||||
      if (with_state & MATERIALS) {
 | 
			
		||||
	 for (j = i = 0 ; i < num_tri_verts ; i += 600, j++) {
 | 
			
		||||
	    GLuint nr = MIN(num_tri_verts-i, 600);
 | 
			
		||||
	    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, col[j]);
 | 
			
		||||
	    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, col[j]);
 | 
			
		||||
	    glDrawElements( GL_TRIANGLES, nr, GL_UNSIGNED_INT, tri_indices+i );
 | 
			
		||||
	 }
 | 
			
		||||
      } else {
 | 
			
		||||
	 glDrawElements( GL_TRIANGLES, num_tri_verts, GL_UNSIGNED_INT, 
 | 
			
		||||
			 tri_indices );
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
      /* Uses the original arrays (including duplicate elements):
 | 
			
		||||
       */
 | 
			
		||||
   case (IMMEDIATE|DRAW_ARRAYS|STRIPS):
 | 
			
		||||
      glDrawArraysEXT( GL_TRIANGLE_STRIP, 0, numverts );
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
      /* Uses the original arrays (including duplicate elements):
 | 
			
		||||
       */
 | 
			
		||||
   case (IMMEDIATE|ARRAY_ELT|STRIPS):
 | 
			
		||||
      glBegin( GL_TRIANGLE_STRIP );
 | 
			
		||||
      for (i = 0 ; i < numverts ; i++)
 | 
			
		||||
	 glArrayElement( i );
 | 
			
		||||
      glEnd();
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case (IMMEDIATE|ARRAY_ELT|TRIANGLES):
 | 
			
		||||
   case (COMPILED|ARRAY_ELT|TRIANGLES):
 | 
			
		||||
      if (with_state & MATERIALS) {
 | 
			
		||||
	 for (j = i = 0 ; i < num_tri_verts ; i += 600, j++) {
 | 
			
		||||
	    GLuint nr = MIN(num_tri_verts-i, 600);
 | 
			
		||||
	    GLuint k;
 | 
			
		||||
	    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, col[j]);
 | 
			
		||||
	    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, col[j]);
 | 
			
		||||
	    glBegin( GL_TRIANGLES );
 | 
			
		||||
	    for (k = 0 ; k < nr ; k++)
 | 
			
		||||
	       glArrayElement( tri_indices[i+k] );
 | 
			
		||||
	    glEnd();
 | 
			
		||||
	 }
 | 
			
		||||
      } else {
 | 
			
		||||
	 glBegin( GL_TRIANGLES );
 | 
			
		||||
	 for (i = 0 ; i < num_tri_verts ; i++)
 | 
			
		||||
	    glArrayElement( tri_indices[i] );
 | 
			
		||||
	       
 | 
			
		||||
	 glEnd();
 | 
			
		||||
      }	 
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case (IMMEDIATE|GLVERTEX|TRIANGLES):
 | 
			
		||||
      if (with_state & MATERIALS) {
 | 
			
		||||
	 for (j = i = 0 ; i < num_tri_verts ; i += 600, j++) {
 | 
			
		||||
	    GLuint nr = MIN(num_tri_verts-i, 600);
 | 
			
		||||
	    GLuint k;
 | 
			
		||||
	    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, col[j]);
 | 
			
		||||
	    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, col[j]);
 | 
			
		||||
	    glBegin( GL_TRIANGLES );
 | 
			
		||||
	    for (k = 0 ; k < nr ; k++) {
 | 
			
		||||
	       glNormal3fv( &compressed_data[tri_indices[i+k]][3] );
 | 
			
		||||
	       glVertex3fv( &compressed_data[tri_indices[i+k]][0] );
 | 
			
		||||
	    }
 | 
			
		||||
	    glEnd();
 | 
			
		||||
	 }
 | 
			
		||||
      } else {
 | 
			
		||||
	 glBegin( GL_TRIANGLES );
 | 
			
		||||
	 for (i = 0 ; i < num_tri_verts ; i++) {
 | 
			
		||||
	    glColor3fv( &compressed_data[tri_indices[i]][3] );
 | 
			
		||||
	    glNormal3fv( &compressed_data[tri_indices[i]][3] );
 | 
			
		||||
	    glVertex3fv( &compressed_data[tri_indices[i]][0] );
 | 
			
		||||
	 }
 | 
			
		||||
	 glEnd();
 | 
			
		||||
      }	 
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case (0|POINTS):
 | 
			
		||||
      /* Renders all points, but not in strip order...  Shouldn't be a
 | 
			
		||||
       * problem, but people may be confused as to why points are so
 | 
			
		||||
       * much faster in this demo...  And why cva doesn't help them...
 | 
			
		||||
   case (DISPLAYLIST|GLVERTEX|STRIPS):
 | 
			
		||||
      if (!surf1)
 | 
			
		||||
	 surf1 = BuildList( GL_COMPILE_AND_EXECUTE );
 | 
			
		||||
      else
 | 
			
		||||
	 glCallList(surf1);
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      /* Uses the original arrays (including duplicate elements):
 | 
			
		||||
       */
 | 
			
		||||
      glBegin( GL_POINTS );
 | 
			
		||||
      for ( i = 0 ; i < numuniq ; i++ ) {
 | 
			
		||||
         glColor3fv( &compressed_data[i][3] );
 | 
			
		||||
         glVertex3fv( &compressed_data[i][0] );
 | 
			
		||||
      }
 | 
			
		||||
      glEnd();
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   case (0|STRIPS):
 | 
			
		||||
   default:
 | 
			
		||||
      glBegin( GL_TRIANGLE_STRIP );
 | 
			
		||||
      for (i=0;i<numverts;i++) {
 | 
			
		||||
         glColor3fv( &data[i][0] );
 | 
			
		||||
         glNormal3fv( &data[i][3] );
 | 
			
		||||
         glVertex3fv( &data[i][0] );
 | 
			
		||||
      }
 | 
			
		||||
      glEnd();
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   default:
 | 
			
		||||
      fprintf(stderr, "unimplemented mode %x...\n", 
 | 
			
		||||
	      (with_state & (PRIMITIVE_MASK)));
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -368,9 +443,17 @@ static void Display(void)
 | 
			
		||||
    glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
 | 
			
		||||
    draw_surface( state );
 | 
			
		||||
    glFlush();
 | 
			
		||||
    if (doubleBuffer) glutSwapBuffers();
 | 
			
		||||
    if (doubleBuffer) glutSwapBuffers();    
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int BuildList( int mode )
 | 
			
		||||
{
 | 
			
		||||
   int rv = glGenLists(1);
 | 
			
		||||
   glNewList(rv, mode );
 | 
			
		||||
   draw_surface( IMMEDIATE|GLVERTEX|STRIPS );
 | 
			
		||||
   glEndList();
 | 
			
		||||
   return rv;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* KW: only do this when necessary, so CVA can re-use results.
 | 
			
		||||
 */
 | 
			
		||||
@@ -428,30 +511,31 @@ static void InitMaterials(void)
 | 
			
		||||
    static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0};
 | 
			
		||||
    static float lmodel_twoside[] = {GL_FALSE};
 | 
			
		||||
 | 
			
		||||
/*     glLightfv(GL_LIGHT0, GL_AMBIENT, ambient); */
 | 
			
		||||
/*     glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse); */
 | 
			
		||||
/*     glLightfv(GL_LIGHT0, GL_POSITION, position0); */
 | 
			
		||||
/*     glEnable(GL_LIGHT0); */
 | 
			
		||||
    glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
 | 
			
		||||
    glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
 | 
			
		||||
    glLightfv(GL_LIGHT0, GL_POSITION, position0);
 | 
			
		||||
    glEnable(GL_LIGHT0);
 | 
			
		||||
    
 | 
			
		||||
    glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
 | 
			
		||||
    glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
 | 
			
		||||
    glLightfv(GL_LIGHT1, GL_POSITION, position1);
 | 
			
		||||
    glEnable(GL_LIGHT1);
 | 
			
		||||
    
 | 
			
		||||
    glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
 | 
			
		||||
    glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
 | 
			
		||||
 | 
			
		||||
/*     glLightfv(GL_LIGHT1, GL_AMBIENT, ambient); */
 | 
			
		||||
/*     glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse); */
 | 
			
		||||
/*     glLightfv(GL_LIGHT1, GL_POSITION, position1); */
 | 
			
		||||
/*     glEnable(GL_LIGHT1); */
 | 
			
		||||
    glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_mat_shininess);
 | 
			
		||||
    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_mat_specular);
 | 
			
		||||
    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, front_mat_diffuse);
 | 
			
		||||
 | 
			
		||||
/*     glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient); */
 | 
			
		||||
/*     glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside); */
 | 
			
		||||
 | 
			
		||||
/*     glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_mat_shininess); */
 | 
			
		||||
/*     glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_mat_specular); */
 | 
			
		||||
/*     glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, front_mat_diffuse); */
 | 
			
		||||
 | 
			
		||||
/*     glPolygonStipple (halftone); */
 | 
			
		||||
    glPolygonStipple (halftone);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define UPDATE(o,n,mask) (o&=~mask, o|=n&mask)
 | 
			
		||||
#define CHANGED(o,n,mask) ((n&mask) && (n&mask) != (o&mask) )
 | 
			
		||||
#define CHANGED(o,n,mask) ((n&mask) && \
 | 
			
		||||
                           (n&mask) != (o&mask) ? UPDATE(o,n,mask) : 0)
 | 
			
		||||
 | 
			
		||||
static void ModeMenu(int m)
 | 
			
		||||
{
 | 
			
		||||
@@ -459,7 +543,7 @@ static void ModeMenu(int m)
 | 
			
		||||
 | 
			
		||||
   if (!m) return;
 | 
			
		||||
 | 
			
		||||
   if (m==QUIT)
 | 
			
		||||
   if (m==QUIT) 
 | 
			
		||||
      exit(0);
 | 
			
		||||
 | 
			
		||||
   if (m==GLINFO) {
 | 
			
		||||
@@ -469,8 +553,24 @@ static void ModeMenu(int m)
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (CHANGED(state, m, FILTER_MASK)) {
 | 
			
		||||
      if (m & LINEAR_FILTER) {
 | 
			
		||||
	 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
	 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
      } else {
 | 
			
		||||
	 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
	 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (CHANGED(state, m, LIGHT_MASK)) {
 | 
			
		||||
      if (m & LIT)
 | 
			
		||||
	 glEnable(GL_LIGHTING);
 | 
			
		||||
      else
 | 
			
		||||
	 glDisable(GL_LIGHTING);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (CHANGED(state, m, SHADE_MASK)) {
 | 
			
		||||
      UPDATE(state, m, SHADE_MASK);
 | 
			
		||||
      if (m & SHADE_SMOOTH)
 | 
			
		||||
	 glShadeModel(GL_SMOOTH);
 | 
			
		||||
      else
 | 
			
		||||
@@ -478,12 +578,91 @@ static void ModeMenu(int m)
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   if (m & (PRIMITIVE_MASK)) {
 | 
			
		||||
      UPDATE(state, m, (PRIMITIVE_MASK));
 | 
			
		||||
   if (CHANGED(state, m, TEXTURE_MASK)) {
 | 
			
		||||
      if (m & TEXTURE) 
 | 
			
		||||
	 glEnable(GL_TEXTURE_2D);
 | 
			
		||||
      else
 | 
			
		||||
	 glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (CHANGED(state, m, REFLECT_MASK)) {
 | 
			
		||||
      if (m & REFLECT) {
 | 
			
		||||
	 glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
	 glEnable(GL_TEXTURE_GEN_T);
 | 
			
		||||
      } else {
 | 
			
		||||
	 glDisable(GL_TEXTURE_GEN_S);
 | 
			
		||||
	 glDisable(GL_TEXTURE_GEN_T);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (CHANGED(state, m, CLIP_MASK)) {
 | 
			
		||||
      if (m & USER_CLIP) {
 | 
			
		||||
	 glEnable(GL_CLIP_PLANE0);
 | 
			
		||||
      } else {
 | 
			
		||||
	 glDisable(GL_CLIP_PLANE0);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (CHANGED(state, m, FOG_MASK)) {
 | 
			
		||||
      if (m & FOG) 
 | 
			
		||||
      {
 | 
			
		||||
	 glEnable(GL_FOG);
 | 
			
		||||
	 printf("FOG enable\n");
 | 
			
		||||
      } 
 | 
			
		||||
      else 
 | 
			
		||||
      {
 | 
			
		||||
	 glDisable(GL_FOG);
 | 
			
		||||
	 printf("FOG disable\n");
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (CHANGED(state, m, STIPPLE_MASK)) {
 | 
			
		||||
      if (m & STIPPLE) 
 | 
			
		||||
      {
 | 
			
		||||
	 glEnable(GL_POLYGON_STIPPLE);
 | 
			
		||||
	 printf("STIPPLE enable\n");
 | 
			
		||||
      } 
 | 
			
		||||
      else 
 | 
			
		||||
      {
 | 
			
		||||
	 glDisable(GL_POLYGON_STIPPLE);
 | 
			
		||||
	 printf("STIPPLE disable\n");
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
#ifdef GL_EXT_vertex_array
 | 
			
		||||
   if (CHANGED(state, m, (COMPILED_MASK|RENDER_STYLE_MASK|PRIMITIVE_MASK))) 
 | 
			
		||||
   {
 | 
			
		||||
      if ((m & (COMPILED_MASK|PRIMITIVE_MASK)) == (IMMEDIATE|STRIPS))
 | 
			
		||||
      {
 | 
			
		||||
	 glVertexPointerEXT( 3, GL_FLOAT, sizeof(data[0]), numverts, data );
 | 
			
		||||
	 glNormalPointerEXT( GL_FLOAT, sizeof(data[0]), numverts, &data[0][3]);
 | 
			
		||||
      }
 | 
			
		||||
      else 
 | 
			
		||||
      {
 | 
			
		||||
	 glVertexPointerEXT( 3, GL_FLOAT, sizeof(data[0]), numuniq, 
 | 
			
		||||
			     compressed_data );
 | 
			
		||||
	 glNormalPointerEXT( GL_FLOAT, sizeof(data[0]), numuniq, 
 | 
			
		||||
			     &compressed_data[0][3]);
 | 
			
		||||
      }
 | 
			
		||||
#ifdef GL_EXT_compiled_vertex_array
 | 
			
		||||
      if (allowed & COMPILED) {
 | 
			
		||||
	 if (m & COMPILED) {
 | 
			
		||||
	    glLockArraysEXT( 0, numuniq );
 | 
			
		||||
	 } else {
 | 
			
		||||
	    glUnlockArraysEXT();
 | 
			
		||||
	 }
 | 
			
		||||
      }
 | 
			
		||||
#endif
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   if (m & (RENDER_STYLE_MASK|PRIMITIVE_MASK)) {
 | 
			
		||||
      UPDATE(state, m, (RENDER_STYLE_MASK|PRIMITIVE_MASK));
 | 
			
		||||
   }
 | 
			
		||||
   
 | 
			
		||||
   if (m & MATERIAL_MASK) {
 | 
			
		||||
      UPDATE(state, m, MATERIAL_MASK);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
@@ -494,18 +673,12 @@ static void Init(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
   GLfloat fogColor[4] = {0.5,1.0,0.5,1.0};
 | 
			
		||||
 | 
			
		||||
   xrot = 0;
 | 
			
		||||
   yrot = 0;
 | 
			
		||||
   dist = -6;
 | 
			
		||||
   plane[0] = 1.0;
 | 
			
		||||
   plane[1] = 0.0;
 | 
			
		||||
   plane[2] = -1.0;
 | 
			
		||||
   plane[3] = 0.0;
 | 
			
		||||
 | 
			
		||||
   glClearColor(0.0, 0.0, 1.0, 0.0);
 | 
			
		||||
/*    glEnable( GL_DEPTH_TEST ); */
 | 
			
		||||
/*    glEnable( GL_VERTEX_ARRAY_EXT ); */
 | 
			
		||||
/*    glEnable( GL_NORMAL_ARRAY_EXT ); */
 | 
			
		||||
   glEnable( GL_DEPTH_TEST );
 | 
			
		||||
   glEnable( GL_VERTEX_ARRAY_EXT );
 | 
			
		||||
   glEnable( GL_NORMAL_ARRAY_EXT );
 | 
			
		||||
 | 
			
		||||
   InitMaterials();
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
@@ -513,44 +686,44 @@ static void Init(int argc, char *argv[])
 | 
			
		||||
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
/*    glClipPlane(GL_CLIP_PLANE0, plane); */
 | 
			
		||||
 | 
			
		||||
   InitMaterials();
 | 
			
		||||
   glClipPlane(GL_CLIP_PLANE0, plane); 
 | 
			
		||||
 | 
			
		||||
   set_matrix();
 | 
			
		||||
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
/*    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST); */
 | 
			
		||||
   glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
 | 
			
		||||
 | 
			
		||||
/*    glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); */
 | 
			
		||||
/*    glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); */
 | 
			
		||||
   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
 | 
			
		||||
   glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /* Green fog is easy to see */
 | 
			
		||||
/*    glFogi(GL_FOG_MODE,GL_EXP2); */
 | 
			
		||||
/*    glFogfv(GL_FOG_COLOR,fogColor); */
 | 
			
		||||
/*    glFogf(GL_FOG_DENSITY,0.15); */
 | 
			
		||||
/*    glHint(GL_FOG_HINT,GL_DONT_CARE); */
 | 
			
		||||
 | 
			
		||||
   {
 | 
			
		||||
      static int firsttime = 1;
 | 
			
		||||
      if (firsttime) {
 | 
			
		||||
	 firsttime = 0;
 | 
			
		||||
	 compactify_arrays();
 | 
			
		||||
	 expand_arrays();
 | 
			
		||||
	 make_tri_indices();
 | 
			
		||||
 | 
			
		||||
/* 	 if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) { */
 | 
			
		||||
/* 	    printf("Error: couldn't load texture image\n"); */
 | 
			
		||||
/* 	    exit(1); */
 | 
			
		||||
/* 	 } */
 | 
			
		||||
      }
 | 
			
		||||
   if (!LoadRGBMipmaps(TEXTURE_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: couldn't load texture image\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* Green fog is easy to see */
 | 
			
		||||
   glFogi(GL_FOG_MODE,GL_EXP2);
 | 
			
		||||
   glFogfv(GL_FOG_COLOR,fogColor);
 | 
			
		||||
   glFogf(GL_FOG_DENSITY,0.15);
 | 
			
		||||
   glHint(GL_FOG_HINT,GL_DONT_CARE);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   compactify_arrays();
 | 
			
		||||
   make_tri_indices();
 | 
			
		||||
 | 
			
		||||
   surf1 = BuildList( GL_COMPILE );
 | 
			
		||||
 | 
			
		||||
   ModeMenu(SHADE_SMOOTH|
 | 
			
		||||
	    LIT|
 | 
			
		||||
	    NO_TEXTURE|
 | 
			
		||||
	    NO_REFLECT|
 | 
			
		||||
	    POINT_FILTER|
 | 
			
		||||
	    TRIANGLES|
 | 
			
		||||
	    0);
 | 
			
		||||
	    IMMEDIATE|
 | 
			
		||||
	    NO_USER_CLIP|
 | 
			
		||||
	    NO_MATERIALS|
 | 
			
		||||
	    NO_FOG|
 | 
			
		||||
	    NO_STIPPLE|
 | 
			
		||||
	    GLVERTEX);
 | 
			
		||||
 | 
			
		||||
   if (PrintInfo) {
 | 
			
		||||
      printf("GL_RENDERER   = %s\n", (char *) glGetString(GL_RENDERER));
 | 
			
		||||
@@ -576,9 +749,31 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
   switch (key) {
 | 
			
		||||
   case 27:
 | 
			
		||||
      exit(0);
 | 
			
		||||
   case 'f':
 | 
			
		||||
      ModeMenu((state ^ FOG_MASK) & FOG_MASK);
 | 
			
		||||
      break;
 | 
			
		||||
   case 's':
 | 
			
		||||
      ModeMenu((state ^ SHADE_MASK) & SHADE_MASK);
 | 
			
		||||
      break;
 | 
			
		||||
   case 't':
 | 
			
		||||
      ModeMenu((state ^ STIPPLE_MASK) & STIPPLE_MASK);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'l':
 | 
			
		||||
      ModeMenu((state ^ LIGHT_MASK) & LIGHT_MASK);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'm':
 | 
			
		||||
      ModeMenu((state ^ MATERIAL_MASK) & MATERIAL_MASK);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'c':
 | 
			
		||||
      ModeMenu((state ^ CLIP_MASK) & CLIP_MASK);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'v':
 | 
			
		||||
      if (allowed&COMPILED)
 | 
			
		||||
	 ModeMenu(COMPILED|DRAW_ARRAYS|TRIANGLES);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'V':
 | 
			
		||||
      ModeMenu(IMMEDIATE|GLVERTEX|STRIPS);
 | 
			
		||||
      break;
 | 
			
		||||
   case 'b':
 | 
			
		||||
      Benchmark(5.0, 0);
 | 
			
		||||
      break;
 | 
			
		||||
@@ -595,9 +790,25 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
      set_matrix();
 | 
			
		||||
      glutPostRedisplay();
 | 
			
		||||
      break;
 | 
			
		||||
   case ' ':
 | 
			
		||||
      Init(0,0);
 | 
			
		||||
   case '-':
 | 
			
		||||
   case '_':
 | 
			
		||||
      plane[3] += 2.0;
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glClipPlane(GL_CLIP_PLANE0, plane);
 | 
			
		||||
      set_matrix();
 | 
			
		||||
      glutPostRedisplay();
 | 
			
		||||
      break;
 | 
			
		||||
   case '+':
 | 
			
		||||
   case '=':
 | 
			
		||||
      plane[3] -= 2.0;
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glClipPlane(GL_CLIP_PLANE0, plane);
 | 
			
		||||
      set_matrix();
 | 
			
		||||
      glutPostRedisplay();
 | 
			
		||||
      break;
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -643,15 +854,6 @@ static GLint Args(int argc, char **argv)
 | 
			
		||||
      else if (strcmp(argv[i], "-info") == 0) {
 | 
			
		||||
         PrintInfo = GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(argv[i], "-10") == 0) {
 | 
			
		||||
         maxverts = 10;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(argv[i], "-100") == 0) {
 | 
			
		||||
	 maxverts = 100;
 | 
			
		||||
      }
 | 
			
		||||
      else if (strcmp(argv[i], "-1000") == 0) {
 | 
			
		||||
	 maxverts = 1000;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         printf("%s (Bad option).\n", argv[i]);
 | 
			
		||||
	 return QUIT;
 | 
			
		||||
@@ -675,7 +877,7 @@ int main(int argc, char **argv)
 | 
			
		||||
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(400, 400);
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
   type = GLUT_DEPTH;
 | 
			
		||||
   type |= GLUT_RGB;
 | 
			
		||||
   type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
 | 
			
		||||
@@ -688,24 +890,70 @@ int main(int argc, char **argv)
 | 
			
		||||
   /* Make sure server supports the vertex array extension */
 | 
			
		||||
   extensions = (char *) glGetString( GL_EXTENSIONS );
 | 
			
		||||
 | 
			
		||||
   if (!strstr( extensions, "GL_EXT_vertex_array" )) 
 | 
			
		||||
   {
 | 
			
		||||
      printf("Vertex arrays not supported by this renderer\n");
 | 
			
		||||
      allowed &= ~(COMPILED|DRAW_ARRAYS|ARRAY_ELT);
 | 
			
		||||
   }
 | 
			
		||||
   else if (!strstr( extensions, "GL_EXT_compiled_vertex_array" )) 
 | 
			
		||||
   {
 | 
			
		||||
      printf("Compiled vertex arrays not supported by this renderer\n");
 | 
			
		||||
      allowed &= ~COMPILED;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   Init(argc, argv);
 | 
			
		||||
   ModeMenu(arg_mode);
 | 
			
		||||
 | 
			
		||||
   
 | 
			
		||||
   glutCreateMenu(ModeMenu);
 | 
			
		||||
   glutAddMenuEntry("GL info",               GLINFO);
 | 
			
		||||
   glutAddMenuEntry("", 0);
 | 
			
		||||
   glutAddMenuEntry("", 0);
 | 
			
		||||
   glutAddMenuEntry("GL info",               GLINFO);   
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   glutAddMenuEntry("Lit",                   LIT|NO_TEXTURE|NO_REFLECT);
 | 
			
		||||
   glutAddMenuEntry("Unlit",                 UNLIT|NO_TEXTURE|NO_REFLECT);
 | 
			
		||||
/*    glutAddMenuEntry("Textured", TEXTURE); */
 | 
			
		||||
   glutAddMenuEntry("Reflect",               TEXTURE|REFLECT);
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   glutAddMenuEntry("Smooth",                SHADE_SMOOTH);
 | 
			
		||||
   glutAddMenuEntry("Flat",                  SHADE_FLAT);
 | 
			
		||||
   glutAddMenuEntry("", 0);
 | 
			
		||||
   glutAddMenuEntry("", 0);
 | 
			
		||||
   glutAddMenuEntry("GL_TRIANGLES",          TRIANGLES);
 | 
			
		||||
   glutAddMenuEntry("GL_TRIANGLE_STRIPS",    STRIPS);
 | 
			
		||||
   glutAddMenuEntry("GL_POINTS",             POINTS);
 | 
			
		||||
   glutAddMenuEntry("", 0);
 | 
			
		||||
   glutAddMenuEntry("", 0);
 | 
			
		||||
   glutAddMenuEntry("Quit",                   QUIT);
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   glutAddMenuEntry("Fog",                   FOG);
 | 
			
		||||
   glutAddMenuEntry("No Fog",                NO_FOG);
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   glutAddMenuEntry("Stipple",               STIPPLE);
 | 
			
		||||
   glutAddMenuEntry("No Stipple",            NO_STIPPLE);
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   glutAddMenuEntry("Point Filtered",        POINT_FILTER);
 | 
			
		||||
   glutAddMenuEntry("Linear Filtered",       LINEAR_FILTER);
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   glutAddMenuEntry("glVertex (STRIPS)",    IMMEDIATE|GLVERTEX|STRIPS);
 | 
			
		||||
   glutAddMenuEntry("glVertex (TRIANGLES)", IMMEDIATE|GLVERTEX|TRIANGLES);
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   glutAddMenuEntry("glVertex display list (STRIPS)", 
 | 
			
		||||
		    DISPLAYLIST|GLVERTEX|STRIPS);
 | 
			
		||||
   glutAddMenuEntry("", 0);   
 | 
			
		||||
   if (allowed & DRAW_ARRAYS) {
 | 
			
		||||
      glutAddMenuEntry("DrawArrays (STRIPS)",
 | 
			
		||||
		       IMMEDIATE|DRAW_ARRAYS|STRIPS);
 | 
			
		||||
      glutAddMenuEntry("ArrayElement (STRIPS)",  
 | 
			
		||||
		       IMMEDIATE|ARRAY_ELT|STRIPS);
 | 
			
		||||
      glutAddMenuEntry("DrawElements (TRIANGLES)", 
 | 
			
		||||
		       IMMEDIATE|DRAW_ARRAYS|TRIANGLES);
 | 
			
		||||
      glutAddMenuEntry("ArrayElement (TRIANGLES)", 
 | 
			
		||||
		       IMMEDIATE|ARRAY_ELT|TRIANGLES);
 | 
			
		||||
      glutAddMenuEntry("", 0);   
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
   if (allowed & COMPILED) {
 | 
			
		||||
      glutAddMenuEntry("Compiled DrawElements (TRIANGLES)", 
 | 
			
		||||
		       COMPILED|DRAW_ARRAYS|TRIANGLES);
 | 
			
		||||
      glutAddMenuEntry("Compiled DrawElements (STRIPS)", 
 | 
			
		||||
		       COMPILED|DRAW_ARRAYS|STRIPS);
 | 
			
		||||
      glutAddMenuEntry("Compiled ArrayElement (TRIANGLES)", 
 | 
			
		||||
		       COMPILED|ARRAY_ELT|TRIANGLES);   
 | 
			
		||||
      glutAddMenuEntry("Compiled ArrayElement (STRIPS)", 
 | 
			
		||||
		       COMPILED|ARRAY_ELT|STRIPS);   
 | 
			
		||||
      glutAddMenuEntry("", 0);   
 | 
			
		||||
   }
 | 
			
		||||
   glutAddMenuEntry("Quit",                  QUIT);
 | 
			
		||||
   glutAttachMenu(GLUT_RIGHT_BUTTON);
 | 
			
		||||
 | 
			
		||||
   glutReshapeFunc(Reshape);
 | 
			
		||||
@@ -713,9 +961,6 @@ int main(int argc, char **argv)
 | 
			
		||||
   glutSpecialFunc(SpecialKey);
 | 
			
		||||
   glutDisplayFunc(Display);
 | 
			
		||||
 | 
			
		||||
   Benchmark(5,0); 
 | 
			
		||||
   Benchmark(5,0); 
 | 
			
		||||
   Benchmark(5,0); 
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -33,14 +33,14 @@
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include <GL/glext.h>
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
#include "../util/readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define TEXTURE_FILE "../images/girl.rgb"
 | 
			
		||||
 | 
			
		||||
static GLfloat Xrot = 0, Yrot = -30, Zrot = 0;
 | 
			
		||||
static GLboolean Anim = GL_TRUE;
 | 
			
		||||
static GLint Bias = 0, BiasStepSign = +1; /* ints avoid fp precision problem */
 | 
			
		||||
static GLint BiasMin = -400, BiasMax = 400;
 | 
			
		||||
static GLint BiasMin = -200, BiasMax = 500;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -192,8 +192,6 @@ static void SpecialKey( int key, int x, int y )
 | 
			
		||||
static void Init( void )
 | 
			
		||||
{
 | 
			
		||||
   const char *exten = (const char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
   GLfloat maxBias;
 | 
			
		||||
 | 
			
		||||
   if (!strstr(exten, "GL_EXT_texture_lod_bias")) {
 | 
			
		||||
      printf("Sorry, GL_EXT_texture_lod_bias not supported by this renderer.\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
@@ -209,11 +207,6 @@ static void Init( void )
 | 
			
		||||
   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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: multiarb.c,v 1.11 2002/02/13 02:23:33 brianp Exp $ */
 | 
			
		||||
/* $Id: multiarb.c,v 1.6 2000/05/23 23:21:00 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * GL_ARB_multitexture demo
 | 
			
		||||
@@ -8,7 +8,37 @@
 | 
			
		||||
 *
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul  November 1998  This program is in the public domain.
 | 
			
		||||
 * Modified on 12 Feb 2002 for > 2 texture units.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: multiarb.c,v $
 | 
			
		||||
 * Revision 1.6  2000/05/23 23:21:00  brianp
 | 
			
		||||
 * set default window pos
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.5  2000/02/02 17:31:45  brianp
 | 
			
		||||
 * changed > to >=
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.4  2000/02/02 01:07:21  brianp
 | 
			
		||||
 * limit Drift to [0, 1]
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/10/21 16:40:32  brianp
 | 
			
		||||
 * added -info command line option
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/10/13 12:02:13  brianp
 | 
			
		||||
 * use texture objects now
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/03/28 18:20:49  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1998/11/05 04:34:04  brianp
 | 
			
		||||
 * moved image files to ../images/ directory
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1  1998/11/03 01:36:33  brianp
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -18,19 +48,18 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
#include "../util/readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define TEXTURE_1_FILE "../images/girl.rgb"
 | 
			
		||||
#define TEXTURE_2_FILE "../images/reflect.rgb"
 | 
			
		||||
 | 
			
		||||
#define TEX0 1
 | 
			
		||||
#define TEX7 8
 | 
			
		||||
#define TEX1 2
 | 
			
		||||
#define TEXBOTH 3
 | 
			
		||||
#define ANIMATE 10
 | 
			
		||||
#define QUIT 100
 | 
			
		||||
 | 
			
		||||
static GLboolean Animate = GL_TRUE;
 | 
			
		||||
static GLint NumUnits = 1;
 | 
			
		||||
static GLboolean TexEnabled[8];
 | 
			
		||||
 | 
			
		||||
static GLfloat Drift = 0.0;
 | 
			
		||||
static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0;
 | 
			
		||||
@@ -40,30 +69,24 @@ static GLfloat Xrot = 20.0, Yrot = 30.0, Zrot = 0.0;
 | 
			
		||||
static void Idle( void )
 | 
			
		||||
{
 | 
			
		||||
   if (Animate) {
 | 
			
		||||
      GLint i;
 | 
			
		||||
 | 
			
		||||
      Drift += 0.05;
 | 
			
		||||
      if (Drift >= 1.0)
 | 
			
		||||
         Drift = 0.0;
 | 
			
		||||
 | 
			
		||||
      for (i = 0; i < NumUnits; i++) {
 | 
			
		||||
         glActiveTextureARB(GL_TEXTURE0_ARB + i);
 | 
			
		||||
         glMatrixMode(GL_TEXTURE);
 | 
			
		||||
         glLoadIdentity();
 | 
			
		||||
         if (i == 0) {
 | 
			
		||||
            glTranslatef(Drift, 0.0, 0.0);
 | 
			
		||||
            glScalef(2, 2, 2);
 | 
			
		||||
         }
 | 
			
		||||
         else if (i == 1) {
 | 
			
		||||
            glTranslatef(0.0, Drift, 0.0);
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            glTranslatef(0.5, 0.5, 0.0);
 | 
			
		||||
            glRotatef(180.0 * Drift, 0, 0, 1);
 | 
			
		||||
            glScalef(1.0/i, 1.0/i, 1.0/i);
 | 
			
		||||
            glTranslatef(-0.5, -0.5, 0.0);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
      glActiveTextureARB(GL_TEXTURE0_ARB);
 | 
			
		||||
#endif
 | 
			
		||||
      glMatrixMode(GL_TEXTURE);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glTranslatef(Drift, 0.0, 0.0);
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
      glActiveTextureARB(GL_TEXTURE1_ARB);
 | 
			
		||||
#endif
 | 
			
		||||
      glMatrixMode(GL_TEXTURE);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glTranslatef(0.0, Drift, 0.0);
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
 | 
			
		||||
      glutPostRedisplay();
 | 
			
		||||
@@ -73,30 +96,37 @@ static void Idle( void )
 | 
			
		||||
 | 
			
		||||
static void DrawObject(void)
 | 
			
		||||
{
 | 
			
		||||
   GLint i;
 | 
			
		||||
 | 
			
		||||
   if (!TexEnabled[0] && !TexEnabled[1])
 | 
			
		||||
      glColor3f(0.1, 0.1, 0.1);  /* add onto this */
 | 
			
		||||
   else
 | 
			
		||||
      glColor3f(1, 1, 1);  /* modulate this */
 | 
			
		||||
 | 
			
		||||
   glBegin(GL_QUADS);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NumUnits; i++)
 | 
			
		||||
      glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 0.0, 0.0);
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 0.0);
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 0.0);
 | 
			
		||||
   glVertex2f(-1.0, -1.0);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NumUnits; i++)
 | 
			
		||||
      glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 1.0, 0.0);
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 0.0);
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 0.0);
 | 
			
		||||
   glVertex2f(1.0, -1.0);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NumUnits; i++)
 | 
			
		||||
      glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 1.0, 1.0);
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 2.0, 2.0);
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0, 1.0);
 | 
			
		||||
   glVertex2f(1.0, 1.0);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NumUnits; i++)
 | 
			
		||||
      glMultiTexCoord2fARB(GL_TEXTURE0_ARB + i, 0.0, 1.0);
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0, 2.0);
 | 
			
		||||
   glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0, 1.0);
 | 
			
		||||
   glVertex2f(-1.0, 1.0);
 | 
			
		||||
#else
 | 
			
		||||
   glTexCoord2f(0.0, 0.0);
 | 
			
		||||
   glVertex2f(-1.0, -1.0);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0, 0.0);
 | 
			
		||||
   glVertex2f(1.0, -1.0);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(1.0, 1.0);
 | 
			
		||||
   glVertex2f(1.0, 1.0);
 | 
			
		||||
 | 
			
		||||
   glTexCoord2f(0.0, 1.0);
 | 
			
		||||
   glVertex2f(-1.0, 1.0);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glEnd();
 | 
			
		||||
}
 | 
			
		||||
@@ -134,19 +164,16 @@ static void Reshape( int width, int height )
 | 
			
		||||
 | 
			
		||||
static void ModeMenu(int entry)
 | 
			
		||||
{
 | 
			
		||||
   if (entry >= TEX0 && entry <= TEX7) {
 | 
			
		||||
      /* toggle */
 | 
			
		||||
      GLint i = entry - TEX0;
 | 
			
		||||
      TexEnabled[i] = !TexEnabled[i];
 | 
			
		||||
      glActiveTextureARB(GL_TEXTURE0_ARB + i);
 | 
			
		||||
      if (TexEnabled[i])
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
      else
 | 
			
		||||
         glDisable(GL_TEXTURE_2D);
 | 
			
		||||
      printf("Enabled: ");
 | 
			
		||||
      for (i = 0; i < NumUnits; i++)
 | 
			
		||||
         printf("%d ", (int) TexEnabled[i]);
 | 
			
		||||
      printf("\n");
 | 
			
		||||
   GLboolean enable0 = GL_FALSE, enable1 = GL_FALSE;
 | 
			
		||||
   if (entry==TEX0) {
 | 
			
		||||
      enable0 = GL_TRUE;
 | 
			
		||||
   }
 | 
			
		||||
   else if (entry==TEX1) {
 | 
			
		||||
      enable1 = GL_TRUE;
 | 
			
		||||
   }
 | 
			
		||||
   else if (entry==TEXBOTH) {
 | 
			
		||||
      enable0 = GL_TRUE;
 | 
			
		||||
      enable1 = GL_TRUE;
 | 
			
		||||
   }
 | 
			
		||||
   else if (entry==ANIMATE) {
 | 
			
		||||
      Animate = !Animate;
 | 
			
		||||
@@ -155,6 +182,26 @@ static void ModeMenu(int entry)
 | 
			
		||||
      exit(0);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (entry != ANIMATE) {
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
      glActiveTextureARB(GL_TEXTURE0_ARB);
 | 
			
		||||
#endif
 | 
			
		||||
      if (enable0) {
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
         glDisable(GL_TEXTURE_2D);
 | 
			
		||||
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
      glActiveTextureARB(GL_TEXTURE1_ARB);
 | 
			
		||||
#endif
 | 
			
		||||
      if (enable1) {
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
         glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -198,8 +245,7 @@ static void SpecialKey( int key, int x, int y )
 | 
			
		||||
 | 
			
		||||
static void Init( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   GLuint texObj[8];
 | 
			
		||||
   GLint size, i;
 | 
			
		||||
   GLuint texObj[2];
 | 
			
		||||
 | 
			
		||||
   const char *exten = (const char *) glGetString(GL_EXTENSIONS);
 | 
			
		||||
   if (!strstr(exten, "GL_ARB_multitexture")) {
 | 
			
		||||
@@ -207,82 +253,62 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &NumUnits);
 | 
			
		||||
   printf("%d texture units supported\n", NumUnits);
 | 
			
		||||
   if (NumUnits > 8)
 | 
			
		||||
      NumUnits = 8;
 | 
			
		||||
   /* allocate two texture objects */
 | 
			
		||||
   glGenTextures(2, texObj);
 | 
			
		||||
 | 
			
		||||
   glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size);
 | 
			
		||||
   printf("%d x %d max texture size\n", size, size);
 | 
			
		||||
   /* setup texture obj 0 */
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, texObj[0]);
 | 
			
		||||
#ifdef LINEAR_FILTER
 | 
			
		||||
   /* linear filtering looks much nicer but is much slower for Mesa */
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
#else
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
 | 
			
		||||
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NumUnits; i++) {
 | 
			
		||||
      if (i < 2)
 | 
			
		||||
         TexEnabled[i] = GL_TRUE;
 | 
			
		||||
      else
 | 
			
		||||
         TexEnabled[i] = GL_FALSE;
 | 
			
		||||
   if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: couldn't load texture image\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* allocate two texture objects */
 | 
			
		||||
   glGenTextures(NumUnits, texObj);
 | 
			
		||||
 | 
			
		||||
   /* setup the texture objects */
 | 
			
		||||
   for (i = 0; i < NumUnits; i++) {
 | 
			
		||||
   /* setup texture obj 1 */
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, texObj[1]);
 | 
			
		||||
#ifdef LINEAR_FILTER
 | 
			
		||||
   /* linear filtering looks much nicer but is much slower for Mesa */
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
#else
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      glActiveTextureARB(GL_TEXTURE0_ARB + i);
 | 
			
		||||
      glBindTexture(GL_TEXTURE_2D, texObj[i]);
 | 
			
		||||
   glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
 | 
			
		||||
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
 | 
			
		||||
      if (i == 0) {
 | 
			
		||||
         if (!LoadRGBMipmaps(TEXTURE_1_FILE, GL_RGB)) {
 | 
			
		||||
            printf("Error: couldn't load texture image\n");
 | 
			
		||||
            exit(1);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else if (i == 1) {
 | 
			
		||||
         if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) {
 | 
			
		||||
            printf("Error: couldn't load texture image\n");
 | 
			
		||||
            exit(1);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         /* checker */
 | 
			
		||||
         GLubyte image[8][8][3];
 | 
			
		||||
         GLint i, j;
 | 
			
		||||
         for (i = 0; i < 8; i++) {
 | 
			
		||||
            for (j = 0; j < 8; j++) {
 | 
			
		||||
               if ((i + j) & 1) {
 | 
			
		||||
                  image[i][j][0] = 50;
 | 
			
		||||
                  image[i][j][1] = 50;
 | 
			
		||||
                  image[i][j][2] = 50;
 | 
			
		||||
               }
 | 
			
		||||
               else {
 | 
			
		||||
                  image[i][j][0] = 25;
 | 
			
		||||
                  image[i][j][1] = 25;
 | 
			
		||||
                  image[i][j][2] = 25;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
         glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0,
 | 
			
		||||
                      GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *) image);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /* Bind texObj[i] to ith texture unit */
 | 
			
		||||
      if (i < 2)
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
      else
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
 | 
			
		||||
 | 
			
		||||
      if (TexEnabled[i])
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
   if (!LoadRGBMipmaps(TEXTURE_2_FILE, GL_RGB)) {
 | 
			
		||||
      printf("Error: couldn't load texture image\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /* now bind the texture objects to the respective texture units */
 | 
			
		||||
#ifdef GL_ARB_multitexture
 | 
			
		||||
   glActiveTextureARB(GL_TEXTURE0_ARB);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, texObj[0]);
 | 
			
		||||
   glActiveTextureARB(GL_TEXTURE1_ARB);
 | 
			
		||||
   glBindTexture(GL_TEXTURE_2D, texObj[1]);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
   glClearColor(0.3, 0.3, 0.4, 1.0);
 | 
			
		||||
 | 
			
		||||
   ModeMenu(TEXBOTH);
 | 
			
		||||
 | 
			
		||||
   if (argc > 1 && strcmp(argv[1], "-info")==0) {
 | 
			
		||||
      printf("GL_RENDERER   = %s\n", (char *) glGetString(GL_RENDERER));
 | 
			
		||||
      printf("GL_VERSION    = %s\n", (char *) glGetString(GL_VERSION));
 | 
			
		||||
@@ -294,8 +320,6 @@ static void Init( int argc, char *argv[] )
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   GLint i;
 | 
			
		||||
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowSize( 300, 300 );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
@@ -311,12 +335,9 @@ int main( int argc, char *argv[] )
 | 
			
		||||
   glutIdleFunc( Idle );
 | 
			
		||||
 | 
			
		||||
   glutCreateMenu(ModeMenu);
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < NumUnits; i++) {
 | 
			
		||||
      char s[100];
 | 
			
		||||
      sprintf(s, "Toggle Texture %d", i);
 | 
			
		||||
      glutAddMenuEntry(s, TEX0 + i);
 | 
			
		||||
   }
 | 
			
		||||
   glutAddMenuEntry("Texture 0", TEX0);
 | 
			
		||||
   glutAddMenuEntry("Texture 1", TEX1);
 | 
			
		||||
   glutAddMenuEntry("Multi-texture", TEXBOTH);
 | 
			
		||||
   glutAddMenuEntry("Toggle Animation", ANIMATE);
 | 
			
		||||
   glutAddMenuEntry("Quit", QUIT);
 | 
			
		||||
   glutAttachMenu(GLUT_RIGHT_BUTTON);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: osdemo.c,v 1.9 2002/07/12 15:54:19 brianp Exp $ */
 | 
			
		||||
/* $Id: osdemo.c,v 1.4 2000/03/28 16:59:39 rjfrank Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Demo of off-screen Mesa rendering
 | 
			
		||||
@@ -14,17 +14,11 @@
 | 
			
		||||
 *
 | 
			
		||||
 * PPM output provided by Joerg Schmalzl.
 | 
			
		||||
 * ASCII PPM output added by Brian Paul.
 | 
			
		||||
 *
 | 
			
		||||
 * Usage: osdemo [-perf] [filename]
 | 
			
		||||
 *
 | 
			
		||||
 * -perf: Redraws the image 1000 times, displaying the FPS every 5 secs.
 | 
			
		||||
 * filename: file to store the TGA or PPM output
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include "GL/osmesa.h"
 | 
			
		||||
#include "GL/glut.h"
 | 
			
		||||
 | 
			
		||||
@@ -35,9 +29,7 @@
 | 
			
		||||
#define WIDTH 400
 | 
			
		||||
#define HEIGHT 400
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
static int perf = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void render_image( void )
 | 
			
		||||
{
 | 
			
		||||
@@ -84,7 +76,7 @@ static void render_image( void )
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
#ifdef GL_HP_occlusion_test
 | 
			
		||||
   if (perf == 0) {
 | 
			
		||||
   {
 | 
			
		||||
      GLboolean bRet;
 | 
			
		||||
      glDepthMask(GL_FALSE);
 | 
			
		||||
      glColorMask(GL_FALSE,GL_FALSE,GL_FALSE,GL_FALSE);
 | 
			
		||||
@@ -113,7 +105,7 @@ static void render_image( void )
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
#ifdef GL_HP_occlusion_test
 | 
			
		||||
   if (perf == 0){
 | 
			
		||||
   {
 | 
			
		||||
      GLboolean bRet;
 | 
			
		||||
 | 
			
		||||
      glDepthMask(GL_FALSE);
 | 
			
		||||
@@ -138,22 +130,9 @@ static void render_image( void )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   if (perf) {
 | 
			
		||||
     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;
 | 
			
		||||
     }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef SAVE_TARGA
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
write_targa(const char *filename, const GLubyte *buffer, int width, int height)
 | 
			
		||||
@@ -194,7 +173,6 @@ write_targa(const char *filename, const GLubyte *buffer, int width, int height)
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
 | 
			
		||||
@@ -241,65 +219,26 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height)
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   void *buffer;
 | 
			
		||||
   int i;
 | 
			
		||||
   char *filename = NULL;
 | 
			
		||||
 | 
			
		||||
   /* Create an RGBA-mode context */
 | 
			
		||||
#if OSMESA_MAJOR_VERSION * 100 + OSMESA_MINOR_VERSION >= 305
 | 
			
		||||
   /* specify Z, stencil, accum sizes */
 | 
			
		||||
   OSMesaContext ctx = OSMesaCreateContextExt( OSMESA_RGBA, 16, 0, 0, NULL );
 | 
			
		||||
#else
 | 
			
		||||
   OSMesaContext ctx = OSMesaCreateContext( OSMESA_RGBA, NULL );
 | 
			
		||||
#endif
 | 
			
		||||
   if (!ctx) {
 | 
			
		||||
      printf("OSMesaCreateContext failed!\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   for ( i=1; i<argc; i++ ) {
 | 
			
		||||
      if (argv[i][0] != '-') filename = argv[i];
 | 
			
		||||
      if (strcmp(argv[i], "-perf")==0) perf = 1;
 | 
			
		||||
   }
 | 
			
		||||
   OSMesaContext ctx = OSMesaCreateContext( GL_RGBA, NULL );
 | 
			
		||||
 | 
			
		||||
   /* Allocate the image buffer */
 | 
			
		||||
   buffer = malloc( WIDTH * HEIGHT * 4 * sizeof(GLubyte) );
 | 
			
		||||
   if (!buffer) {
 | 
			
		||||
      printf("Alloc image buffer failed!\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
   void *buffer = malloc( WIDTH * HEIGHT * 4 );
 | 
			
		||||
 | 
			
		||||
   /* Bind the buffer to the context and make it current */
 | 
			
		||||
   if (!OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT )) {
 | 
			
		||||
      printf("OSMesaMakeCurrent failed!\n");
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
     
 | 
			
		||||
 | 
			
		||||
   {
 | 
			
		||||
      int z, s, a;
 | 
			
		||||
      glGetIntegerv(GL_DEPTH_BITS, &z);
 | 
			
		||||
      glGetIntegerv(GL_STENCIL_BITS, &s);
 | 
			
		||||
      glGetIntegerv(GL_ACCUM_RED_BITS, &a);
 | 
			
		||||
      printf("Depth=%d Stencil=%d Accum=%d\n", z, s, a);
 | 
			
		||||
   }
 | 
			
		||||
   OSMesaMakeCurrent( ctx, buffer, GL_UNSIGNED_BYTE, WIDTH, HEIGHT );
 | 
			
		||||
 | 
			
		||||
   render_image();
 | 
			
		||||
   if (perf)
 | 
			
		||||
      for(i=0; i< 1000; i++)
 | 
			
		||||
         render_image();
 | 
			
		||||
 | 
			
		||||
   if (filename != NULL) {
 | 
			
		||||
   if (argc>1) {
 | 
			
		||||
#ifdef SAVE_TARGA
 | 
			
		||||
      write_targa(filename, buffer, WIDTH, HEIGHT);
 | 
			
		||||
      write_targa(argv[1], buffer, WIDTH, HEIGHT);
 | 
			
		||||
#else
 | 
			
		||||
      write_ppm(filename, buffer, WIDTH, HEIGHT);
 | 
			
		||||
      write_ppm(argv[1], buffer, WIDTH, HEIGHT);
 | 
			
		||||
#endif
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: paltex.c,v 1.9 2002/07/22 13:45:31 brianp Exp $ */
 | 
			
		||||
/* $Id: paltex.c,v 1.4 2000/06/27 17:12:10 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Paletted texture demo.  Written by Brian Paul.
 | 
			
		||||
@@ -8,41 +8,27 @@
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
#define GL_GLEXT_LEGACY
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static float Rot = 0.0;
 | 
			
		||||
static GLboolean Anim = 1;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void Idle( void )
 | 
			
		||||
{
 | 
			
		||||
   float t = glutGet(GLUT_ELAPSED_TIME) * 0.001;  /* in seconds */
 | 
			
		||||
   Rot = t * 360 / 4;  /* 1 rotation per 4 seconds */
 | 
			
		||||
   Rot += 5.0;
 | 
			
		||||
   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();
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT );
 | 
			
		||||
 | 
			
		||||
   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);
 | 
			
		||||
@@ -61,9 +47,10 @@ 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 );
 | 
			
		||||
   glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 25.0 );
 | 
			
		||||
   glMatrixMode( GL_MODELVIEW );
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef( 0.0, 0.0, -7.0 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -75,16 +62,6 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
      case 's':
 | 
			
		||||
         Rot += 0.5;
 | 
			
		||||
         break;
 | 
			
		||||
      case ' ':
 | 
			
		||||
         Anim = !Anim;
 | 
			
		||||
         if (Anim)
 | 
			
		||||
            glutIdleFunc( Idle );
 | 
			
		||||
         else
 | 
			
		||||
            glutIdleFunc( NULL );
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
@@ -94,16 +71,15 @@ static void Init( void )
 | 
			
		||||
{
 | 
			
		||||
#define HEIGHT 8
 | 
			
		||||
#define WIDTH 32
 | 
			
		||||
   /* 257 = HEIGHT * WIDTH + 1 (for trailing '\0') */
 | 
			
		||||
   static char texture[257] = {"\
 | 
			
		||||
                                \
 | 
			
		||||
    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   \
 | 
			
		||||
                                "
 | 
			
		||||
   static char texture[HEIGHT][WIDTH] = {
 | 
			
		||||
         "                                ",
 | 
			
		||||
         "    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   ",
 | 
			
		||||
         "                                "
 | 
			
		||||
      };
 | 
			
		||||
   GLubyte table[256][4];
 | 
			
		||||
 | 
			
		||||
@@ -113,99 +89,26 @@ static void Init( void )
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* load the color table for each texel-index */
 | 
			
		||||
   memset(table, 0, 256*4);
 | 
			
		||||
   table[' '][0] = 255;
 | 
			
		||||
   table[' '][1] = 255;
 | 
			
		||||
   table[' '][2] = 255;
 | 
			
		||||
   table[' '][3] = 64;
 | 
			
		||||
   table[' '][0] = 50;
 | 
			
		||||
   table[' '][1] = 50;
 | 
			
		||||
   table[' '][2] = 50;
 | 
			
		||||
   table[' '][3] = 50;
 | 
			
		||||
   table['M'][0] = 255;
 | 
			
		||||
   table['M'][1] = 0;
 | 
			
		||||
   table['M'][2] = 0;
 | 
			
		||||
   table['M'][3] = 255;
 | 
			
		||||
   table['M'][3] = 0;
 | 
			
		||||
   table['E'][0] = 0;
 | 
			
		||||
   table['E'][1] = 255;
 | 
			
		||||
   table['E'][2] = 0;
 | 
			
		||||
   table['E'][3] = 255;
 | 
			
		||||
   table['S'][0] = 0;
 | 
			
		||||
   table['S'][1] = 0;
 | 
			
		||||
   table['E'][3] = 0;
 | 
			
		||||
   table['S'][0] = 40;
 | 
			
		||||
   table['S'][1] = 40;
 | 
			
		||||
   table['S'][2] = 255;
 | 
			
		||||
   table['S'][3] = 255;
 | 
			
		||||
   table['S'][3] = 0;
 | 
			
		||||
   table['A'][0] = 255;
 | 
			
		||||
   table['A'][1] = 255;
 | 
			
		||||
   table['A'][2] = 0;
 | 
			
		||||
   table['A'][3] = 255;
 | 
			
		||||
 | 
			
		||||
#ifdef GL_EXT_paletted_texture
 | 
			
		||||
 | 
			
		||||
#if defined(GL_EXT_shared_texture_palette) && defined(USE_SHARED_PALETTE)
 | 
			
		||||
   printf("Using shared palette\n");
 | 
			
		||||
   glColorTableEXT(GL_SHARED_TEXTURE_PALETTE_EXT,    /* target */
 | 
			
		||||
                   GL_RGBA,          /* internal format */
 | 
			
		||||
                   256,              /* table size */
 | 
			
		||||
                   GL_RGBA,          /* table format */
 | 
			
		||||
                   GL_UNSIGNED_BYTE, /* table type */
 | 
			
		||||
                   table);           /* the color table */
 | 
			
		||||
   glEnable(GL_SHARED_TEXTURE_PALETTE_EXT);
 | 
			
		||||
#else
 | 
			
		||||
   glColorTableEXT(GL_TEXTURE_2D,    /* target */
 | 
			
		||||
                   GL_RGBA,          /* internal format */
 | 
			
		||||
                   256,              /* table size */
 | 
			
		||||
                   GL_RGBA,          /* table format */
 | 
			
		||||
                   GL_UNSIGNED_BYTE, /* table type */
 | 
			
		||||
                   table);           /* the color table */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   glTexImage2D(GL_TEXTURE_2D,       /* target */
 | 
			
		||||
                0,                   /* level */
 | 
			
		||||
                GL_COLOR_INDEX8_EXT, /* internal format */
 | 
			
		||||
                WIDTH, HEIGHT,       /* width, height */
 | 
			
		||||
                0,                   /* border */
 | 
			
		||||
                GL_COLOR_INDEX,      /* texture format */
 | 
			
		||||
                GL_UNSIGNED_BYTE,    /* texture type */
 | 
			
		||||
                texture);            /* the texture */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   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);
 | 
			
		||||
#undef HEIGHT
 | 
			
		||||
#undef WIDTH
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Color ramp test
 | 
			
		||||
 */
 | 
			
		||||
static void Init2( void )
 | 
			
		||||
{
 | 
			
		||||
#define HEIGHT 32
 | 
			
		||||
#define WIDTH 256
 | 
			
		||||
   static char texture[HEIGHT][WIDTH];
 | 
			
		||||
   GLubyte table[256][4];
 | 
			
		||||
   int i, j;
 | 
			
		||||
 | 
			
		||||
   if (!glutExtensionSupported("GL_EXT_paletted_texture")) {
 | 
			
		||||
      printf("Sorry, GL_EXT_paletted_texture not supported\n");
 | 
			
		||||
      exit(0);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   for (j = 0; j < HEIGHT; j++) {
 | 
			
		||||
      for (i = 0; i < WIDTH; i++) {
 | 
			
		||||
         texture[j][i] = i;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < 255; i++) {
 | 
			
		||||
      table[i][0] = i;
 | 
			
		||||
      table[i][1] = 0;
 | 
			
		||||
      table[i][2] = 0;
 | 
			
		||||
      table[i][3] = 255;
 | 
			
		||||
   }
 | 
			
		||||
   table['A'][3] = 0;
 | 
			
		||||
 | 
			
		||||
#ifdef GL_EXT_paletted_texture
 | 
			
		||||
 | 
			
		||||
@@ -241,9 +144,6 @@ static void Init2( void )
 | 
			
		||||
   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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -251,7 +151,7 @@ int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInit( &argc, argv );
 | 
			
		||||
   glutInitWindowPosition( 0, 0 );
 | 
			
		||||
   glutInitWindowSize( 400, 300 );
 | 
			
		||||
   glutInitWindowSize( 400, 400 );
 | 
			
		||||
 | 
			
		||||
   glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
 | 
			
		||||
 | 
			
		||||
@@ -262,8 +162,7 @@ int main( int argc, char *argv[] )
 | 
			
		||||
   glutReshapeFunc( Reshape );
 | 
			
		||||
   glutKeyboardFunc( Key );
 | 
			
		||||
   glutDisplayFunc( Display );
 | 
			
		||||
   if (Anim)
 | 
			
		||||
      glutIdleFunc( Idle );
 | 
			
		||||
   glutIdleFunc( Idle );
 | 
			
		||||
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include <GL/glext.h>
 | 
			
		||||
#include "readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
#include "../util/readtex.c"   /* I know, this is a hack. */
 | 
			
		||||
 | 
			
		||||
#define TEXTURE_FILE "../images/girl.rgb"
 | 
			
		||||
 | 
			
		||||
@@ -127,12 +127,12 @@ static void Idle(void)
 | 
			
		||||
 | 
			
		||||
static GLubyte warp(GLfloat s, int frame)
 | 
			
		||||
{
 | 
			
		||||
   static const GLfloat pi = 3.14159265;
 | 
			
		||||
   static const GLfloat PI = 3.14159265;
 | 
			
		||||
   static int halfFrame = FRAMES / 2;
 | 
			
		||||
   GLfloat y, weight, v;
 | 
			
		||||
   if (frame >= halfFrame)
 | 
			
		||||
      frame = halfFrame - (frame - halfFrame);
 | 
			
		||||
   y = sin(s * pi);
 | 
			
		||||
   y = sin(s * PI);
 | 
			
		||||
   weight = (float) frame / (FRAMES-1);
 | 
			
		||||
   v = y * (0.8 * weight + 0.2);
 | 
			
		||||
   return (GLint) (v * 255.0F);
 | 
			
		||||
 
 | 
			
		||||
@@ -11,13 +11,33 @@
 | 
			
		||||
   is present , the particle size is attenuated based on eye distance. */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: pointblast.c,v $
 | 
			
		||||
 * Revision 1.2  2000/06/27 17:04:43  brianp
 | 
			
		||||
 * fixed compiler warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1998/07/26 01:24:27  brianp
 | 
			
		||||
 * removed include of gl.h
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/02/14 18:51:46  brianp
 | 
			
		||||
 * fixed a small compiler warning
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/02/14 18:45:25  brianp
 | 
			
		||||
 * optimized to use flat shading, don't blend ground polygon
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <math.h>       /* for cos(), sin(), and sqrt() */
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#endif
 | 
			
		||||
#define GL_GLEXT_LEGACY
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,20 +11,15 @@
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <time.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#ifndef M_PI
 | 
			
		||||
#define M_PI 3.14159265
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include "particles.h"
 | 
			
		||||
extern "C" {
 | 
			
		||||
#include "readtex.h"
 | 
			
		||||
#include "image.h"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef _WIN32
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <mmsystem.h>
 | 
			
		||||
#include "particles.cxx"
 | 
			
		||||
#include "readtex.c"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef XMESA
 | 
			
		||||
@@ -302,21 +297,20 @@ static void key(unsigned char key, int x, int y)
 | 
			
		||||
 | 
			
		||||
static void inittextures(void)
 | 
			
		||||
{
 | 
			
		||||
  GLubyte *img;
 | 
			
		||||
  GLint width,height;
 | 
			
		||||
  GLenum format;
 | 
			
		||||
  IMAGE *img;
 | 
			
		||||
  GLenum gluerr;
 | 
			
		||||
 | 
			
		||||
  glGenTextures(1,&groundid);
 | 
			
		||||
  glBindTexture(GL_TEXTURE_2D,groundid);
 | 
			
		||||
 | 
			
		||||
  if(!(img=LoadRGBImage("../images/s128.rgb",&width,&height,&format))){
 | 
			
		||||
  	fprintf(stderr,"Error reading a texture.\n");
 | 
			
		||||
  	exit(-1);
 | 
			
		||||
  if(!(img=ImageLoad("s128.rgb"))) {
 | 
			
		||||
    fprintf(stderr,"Error reading a texture.\n");
 | 
			
		||||
    exit(-1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  glPixelStorei(GL_UNPACK_ALIGNMENT,4);
 | 
			
		||||
  if((gluerr=(GLenum)gluBuild2DMipmaps(GL_TEXTURE_2D, 3, width, height,GL_RGB,
 | 
			
		||||
			       GL_UNSIGNED_BYTE, (GLvoid *)(img)))) {
 | 
			
		||||
  if((gluerr=(GLenum)gluBuild2DMipmaps(GL_TEXTURE_2D, 3, img->sizeX, img->sizeY, GL_RGB,
 | 
			
		||||
			       GL_UNSIGNED_BYTE, (GLvoid *)(img->data)))) {
 | 
			
		||||
    fprintf(stderr,"GLULib%s\n",gluErrorString(gluerr));
 | 
			
		||||
    exit(-1);
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,6 @@
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
 | 
			
		||||
#ifdef WIN32
 | 
			
		||||
@@ -25,8 +24,7 @@ static int fullscreen = 1;
 | 
			
		||||
static int WIDTH = 640;
 | 
			
		||||
static int HEIGHT = 480;
 | 
			
		||||
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
#define FRAME 50
 | 
			
		||||
 | 
			
		||||
#define BASESIZE 7.5f
 | 
			
		||||
#define SPHERE_RADIUS 0.75f
 | 
			
		||||
@@ -96,6 +94,21 @@ static int showreflectmap = 1;
 | 
			
		||||
static int joyavailable = 0;
 | 
			
		||||
static int joyactive = 0;
 | 
			
		||||
 | 
			
		||||
static float
 | 
			
		||||
gettime(void)
 | 
			
		||||
{
 | 
			
		||||
   static float told = 0.0f;
 | 
			
		||||
   float tnew, ris;
 | 
			
		||||
 | 
			
		||||
   tnew = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
 | 
			
		||||
   ris = tnew - told;
 | 
			
		||||
 | 
			
		||||
   told = tnew;
 | 
			
		||||
 | 
			
		||||
   return ris / 1000.0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
calcposobs(void)
 | 
			
		||||
{
 | 
			
		||||
@@ -103,13 +116,6 @@ calcposobs(void)
 | 
			
		||||
   dir[1] = cos(alpha * M_PI / 180.0) * sin(beta * M_PI / 180.0);
 | 
			
		||||
   dir[2] = cos(beta * M_PI / 180.0);
 | 
			
		||||
 | 
			
		||||
   if (dir[0] < 1.0e-5 && dir[0] > -1.0e-5)
 | 
			
		||||
      dir[0] = 0;
 | 
			
		||||
   if (dir[1] < 1.0e-5 && dir[1] > -1.0e-5)
 | 
			
		||||
      dir[1] = 0;
 | 
			
		||||
   if (dir[2] < 1.0e-5 && dir[2] > -1.0e-5)
 | 
			
		||||
      dir[2] = 0;
 | 
			
		||||
 | 
			
		||||
   obs[0] += v * dir[0];
 | 
			
		||||
   obs[1] += v * dir[1];
 | 
			
		||||
   obs[2] += v * dir[2];
 | 
			
		||||
@@ -387,7 +393,8 @@ colorcheckmap(float ppos[3], float c[3])
 | 
			
		||||
   h[1] = 0.5f * (vdir[1] + ldir[1]);
 | 
			
		||||
   h[2] = 0.5f * (vdir[2] + ldir[2]);
 | 
			
		||||
   kfact = dprod(h, norm);
 | 
			
		||||
   kfact = pow(kfact, 6.0) * 7.0 * 255.0;
 | 
			
		||||
   kfact =
 | 
			
		||||
      kfact * kfact * kfact * kfact * kfact * kfact * kfact * 7.0f * 255.0f;
 | 
			
		||||
 | 
			
		||||
   r = r * dfact + kfact;
 | 
			
		||||
   g = g * dfact + kfact;
 | 
			
		||||
@@ -487,10 +494,12 @@ updatereflectmap(int slot)
 | 
			
		||||
	    h[1] = 0.5f * (vdir[1] + ldir[1]);
 | 
			
		||||
	    h[2] = 0.5f * (vdir[2] + ldir[2]);
 | 
			
		||||
	    kfact = dprod(h, norm);
 | 
			
		||||
            kfact = pow(kfact, 4.0);
 | 
			
		||||
            if (kfact < 1.0e-10)
 | 
			
		||||
               kfact = 0.0;
 | 
			
		||||
         }
 | 
			
		||||
	    kfact *= kfact;
 | 
			
		||||
	    kfact *= kfact;
 | 
			
		||||
	    kfact *= kfact;
 | 
			
		||||
	    kfact *= kfact;
 | 
			
		||||
	    kfact *= 10.0f;
 | 
			
		||||
	 }
 | 
			
		||||
 | 
			
		||||
	 r = dfact + kfact;
 | 
			
		||||
	 g = dfact + kfact;
 | 
			
		||||
@@ -613,7 +622,9 @@ updatemaps(void)
 | 
			
		||||
static void
 | 
			
		||||
draw(void)
 | 
			
		||||
{
 | 
			
		||||
   static char frbuf[80] = "";
 | 
			
		||||
   static int count = 0;
 | 
			
		||||
   static char frbuf[80];
 | 
			
		||||
   float fr;
 | 
			
		||||
 | 
			
		||||
   dojoy();
 | 
			
		||||
 | 
			
		||||
@@ -646,6 +657,11 @@ draw(void)
 | 
			
		||||
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   if ((count % FRAME) == 0) {
 | 
			
		||||
      fr = gettime();
 | 
			
		||||
      sprintf(frbuf, "Frame rate: %f", FRAME / fr);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_DEPTH_TEST);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
 | 
			
		||||
@@ -730,17 +746,7 @@ draw(void)
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   Frames++;
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      if (t - T0 >= 2000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         GLfloat fps = Frames / seconds;
 | 
			
		||||
         sprintf(frbuf, "Frame rate: %f", fps);
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   count++;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: readpix.c,v 1.8 2002/07/12 15:54:02 brianp Exp $ */
 | 
			
		||||
/* $Id: readpix.c,v 1.3 2000/03/31 01:01:31 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * glReadPixels and glCopyPixels test
 | 
			
		||||
@@ -6,6 +6,20 @@
 | 
			
		||||
 * Brian Paul   March 1, 2000  This file is in the public domain.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: readpix.c,v $
 | 
			
		||||
 * Revision 1.3  2000/03/31 01:01:31  brianp
 | 
			
		||||
 * tweaks to allow different read formats/types
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  2000/03/23 19:47:25  brianp
 | 
			
		||||
 * added benchmarking
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1  2000/03/01 16:23:14  brianp
 | 
			
		||||
 * test glDraw/Read/CopyPixels()
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
@@ -29,11 +43,11 @@ static GLboolean ScaleAndBias = GL_FALSE;
 | 
			
		||||
static GLboolean Benchmark = GL_FALSE;
 | 
			
		||||
static GLubyte *TempImage = NULL;
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
#if 1
 | 
			
		||||
#define ReadFormat ImgFormat
 | 
			
		||||
#define ReadType GL_UNSIGNED_BYTE
 | 
			
		||||
#endif
 | 
			
		||||
#if 1
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_RGBA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_BYTE;
 | 
			
		||||
#endif
 | 
			
		||||
@@ -41,18 +55,6 @@ static GLenum ReadType = GL_UNSIGNED_BYTE;
 | 
			
		||||
static GLenum ReadFormat = GL_RGB;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_5_6_5;
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_RGBA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_1_5_5_5_REV;
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_BGRA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_5_5_5_1;
 | 
			
		||||
#endif
 | 
			
		||||
#if 0
 | 
			
		||||
static GLenum ReadFormat = GL_BGRA;
 | 
			
		||||
static GLenum ReadType = GL_UNSIGNED_SHORT_4_4_4_4_REV;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@@ -99,7 +101,6 @@ SetupPixelTransfer(GLboolean invert)
 | 
			
		||||
static void
 | 
			
		||||
Display( void )
 | 
			
		||||
{
 | 
			
		||||
   glClearColor(.3, .3, .3, 1);
 | 
			
		||||
   glClear( GL_COLOR_BUFFER_BIT );
 | 
			
		||||
 | 
			
		||||
   glRasterPos2i(5, ImgHeight+25);
 | 
			
		||||
@@ -136,8 +137,6 @@ Display( void )
 | 
			
		||||
      Benchmark = GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* clear the temporary image to white (helpful for debugging */
 | 
			
		||||
      memset(TempImage, 255, ImgWidth * ImgHeight * 4);
 | 
			
		||||
      glReadPixels(APosX, APosY, ImgWidth, ImgHeight,
 | 
			
		||||
                   ReadFormat, ReadType, TempImage);
 | 
			
		||||
   }
 | 
			
		||||
@@ -156,8 +155,6 @@ Display( void )
 | 
			
		||||
 | 
			
		||||
   if (!DrawFront)
 | 
			
		||||
      glutSwapBuffers();
 | 
			
		||||
   else
 | 
			
		||||
      glFinish();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -219,7 +216,7 @@ Init( GLboolean ciMode )
 | 
			
		||||
 | 
			
		||||
   if (ciMode) {
 | 
			
		||||
      /* Convert RGB image to grayscale */
 | 
			
		||||
      GLubyte *indexImage = (GLubyte *) malloc( ImgWidth * ImgHeight );
 | 
			
		||||
      GLubyte *indexImage = malloc( ImgWidth * ImgHeight );
 | 
			
		||||
      GLint i;
 | 
			
		||||
      for (i=0; i<ImgWidth*ImgHeight; i++) {
 | 
			
		||||
         int gray = Image[i*3] + Image[i*3+1] + Image[i*3+2];
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: reflect.c,v 1.7 2001/04/25 15:51:32 brianp Exp $ */
 | 
			
		||||
/* $Id: reflect.c,v 1.3 2000/06/15 14:25:48 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Demo of a reflective, texture-mapped surface with OpenGL.
 | 
			
		||||
@@ -53,11 +53,7 @@ static GLfloat spin;
 | 
			
		||||
 | 
			
		||||
static GLint Width = 400, Height = 300;
 | 
			
		||||
static GLenum ShowBuffer = GL_NONE;
 | 
			
		||||
static GLboolean Anim = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
/* performance info */
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void make_table( void )
 | 
			
		||||
@@ -148,7 +144,7 @@ static void init( void )
 | 
			
		||||
   glEnable( GL_LIGHT0 );
 | 
			
		||||
   glEnable( GL_LIGHTING );
 | 
			
		||||
 | 
			
		||||
   glClearColor( 0.5, 0.5, 0.9, 0.0 );
 | 
			
		||||
   glClearColor( 0.5, 0.5, 0.9, 1.0 );
 | 
			
		||||
 | 
			
		||||
   glEnable( GL_NORMALIZE );
 | 
			
		||||
}
 | 
			
		||||
@@ -297,31 +293,8 @@ static void draw_scene( void )
 | 
			
		||||
   else if (ShowBuffer == GL_STENCIL) {
 | 
			
		||||
      ShowStencilBuffer(Width, Height, 255.0, 0.0);
 | 
			
		||||
   }
 | 
			
		||||
   else if (ShowBuffer == GL_ALPHA) {
 | 
			
		||||
      ShowAlphaBuffer(Width, Height);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   {
 | 
			
		||||
      GLint t = glutGet(GLUT_ELAPSED_TIME);
 | 
			
		||||
      Frames++;
 | 
			
		||||
      if (t - T0 >= 5000) {
 | 
			
		||||
         GLfloat seconds = (t - T0) / 1000.0;
 | 
			
		||||
         GLfloat fps = Frames / seconds;
 | 
			
		||||
         printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps);
 | 
			
		||||
         T0 = t;
 | 
			
		||||
         Frames = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void idle( void )
 | 
			
		||||
{
 | 
			
		||||
   spin += 2.0;
 | 
			
		||||
   yrot += 3.0;
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -335,16 +308,6 @@ static void Key( unsigned char key, int x, int y )
 | 
			
		||||
   else if (key == 's') {
 | 
			
		||||
      ShowBuffer = GL_STENCIL;
 | 
			
		||||
   }
 | 
			
		||||
   else if (key == 'a') {
 | 
			
		||||
      ShowBuffer = GL_ALPHA;
 | 
			
		||||
   }
 | 
			
		||||
   else if (key == ' ') {
 | 
			
		||||
      Anim = !Anim;
 | 
			
		||||
      if (Anim)
 | 
			
		||||
         glutIdleFunc(idle);
 | 
			
		||||
      else
 | 
			
		||||
         glutIdleFunc(NULL);
 | 
			
		||||
   }
 | 
			
		||||
   else if (key==27) {
 | 
			
		||||
      exit(0);
 | 
			
		||||
   }
 | 
			
		||||
@@ -381,6 +344,16 @@ static void SpecialKey( int key, int x, int y )
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void idle( void )
 | 
			
		||||
{
 | 
			
		||||
   spin += 2.0;
 | 
			
		||||
   yrot += 3.0;
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int main( int argc, char *argv[] )
 | 
			
		||||
{
 | 
			
		||||
   glutInit(&argc, argv);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										119
									
								
								progs/demos/shadow.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										119
									
								
								progs/demos/shadow.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,119 @@
 | 
			
		||||
/**
 | 
			
		||||
(c) Copyright 1993, Silicon Graphics, Inc.
 | 
			
		||||
 | 
			
		||||
ALL RIGHTS RESERVED
 | 
			
		||||
 | 
			
		||||
Permission to use, copy, modify, and distribute this software
 | 
			
		||||
for any purpose and without fee is hereby granted, provided
 | 
			
		||||
that the above copyright notice appear in all copies and that
 | 
			
		||||
both the copyright notice and this permission notice appear in
 | 
			
		||||
supporting documentation, and that the name of Silicon
 | 
			
		||||
Graphics, Inc. not be used in advertising or publicity
 | 
			
		||||
pertaining to distribution of the software without specific,
 | 
			
		||||
written prior permission.
 | 
			
		||||
 | 
			
		||||
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU
 | 
			
		||||
"AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR
 | 
			
		||||
OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
 | 
			
		||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  IN NO
 | 
			
		||||
EVENT SHALL SILICON GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE
 | 
			
		||||
ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR
 | 
			
		||||
CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER,
 | 
			
		||||
INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE,
 | 
			
		||||
SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR
 | 
			
		||||
NOT SILICON GRAPHICS, INC.  HAS BEEN ADVISED OF THE POSSIBILITY
 | 
			
		||||
OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 | 
			
		||||
ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR
 | 
			
		||||
PERFORMANCE OF THIS SOFTWARE.
 | 
			
		||||
 | 
			
		||||
US Government Users Restricted Rights
 | 
			
		||||
 | 
			
		||||
Use, duplication, or disclosure by the Government is subject to
 | 
			
		||||
restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
 | 
			
		||||
(c)(1)(ii) of the Rights in Technical Data and Computer
 | 
			
		||||
Software clause at DFARS 252.227-7013 and/or in similar or
 | 
			
		||||
successor clauses in the FAR or the DOD or NASA FAR
 | 
			
		||||
Supplement.  Unpublished-- rights reserved under the copyright
 | 
			
		||||
laws of the United States.  Contractor/manufacturer is Silicon
 | 
			
		||||
Graphics, Inc., 2011 N.  Shoreline Blvd., Mountain View, CA
 | 
			
		||||
94039-7311.
 | 
			
		||||
 | 
			
		||||
OpenGL(TM) is a trademark of Silicon Graphics, Inc.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
/* Taken from the projshadow.c - by Tom McReynolds, SGI */
 | 
			
		||||
 | 
			
		||||
/* Modified by David Bucciarelli */
 | 
			
		||||
 | 
			
		||||
/* Rendering shadows using projective shadows. */
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include "shadow.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
enum {
 | 
			
		||||
  X, Y, Z, W
 | 
			
		||||
};
 | 
			
		||||
enum {
 | 
			
		||||
  A, B, C, D
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* create a matrix that will project the desired shadow */
 | 
			
		||||
void
 | 
			
		||||
shadowmatrix(GLfloat shadowMat[4][4],
 | 
			
		||||
  GLfloat groundplane[4],
 | 
			
		||||
  GLfloat lightpos[4])
 | 
			
		||||
{
 | 
			
		||||
  GLfloat dot;
 | 
			
		||||
 | 
			
		||||
  /* find dot product between light position vector and ground plane normal */
 | 
			
		||||
  dot = groundplane[X] * lightpos[X] +
 | 
			
		||||
    groundplane[Y] * lightpos[Y] +
 | 
			
		||||
    groundplane[Z] * lightpos[Z] +
 | 
			
		||||
    groundplane[W] * lightpos[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[0][0] = dot - lightpos[X] * groundplane[X];
 | 
			
		||||
  shadowMat[1][0] = 0.f - lightpos[X] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][0] = 0.f - lightpos[X] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][0] = 0.f - lightpos[X] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[X][1] = 0.f - lightpos[Y] * groundplane[X];
 | 
			
		||||
  shadowMat[1][1] = dot - lightpos[Y] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][1] = 0.f - lightpos[Y] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][1] = 0.f - lightpos[Y] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[X][2] = 0.f - lightpos[Z] * groundplane[X];
 | 
			
		||||
  shadowMat[1][2] = 0.f - lightpos[Z] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][2] = dot - lightpos[Z] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][2] = 0.f - lightpos[Z] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
  shadowMat[X][3] = 0.f - lightpos[W] * groundplane[X];
 | 
			
		||||
  shadowMat[1][3] = 0.f - lightpos[W] * groundplane[Y];
 | 
			
		||||
  shadowMat[2][3] = 0.f - lightpos[W] * groundplane[Z];
 | 
			
		||||
  shadowMat[3][3] = dot - lightpos[W] * groundplane[W];
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* find the plane equation given 3 points */
 | 
			
		||||
void
 | 
			
		||||
findplane(GLfloat plane[4],
 | 
			
		||||
  GLfloat v0[3], GLfloat v1[3], GLfloat v2[3])
 | 
			
		||||
{
 | 
			
		||||
  GLfloat vec0[3], vec1[3];
 | 
			
		||||
 | 
			
		||||
  /* need 2 vectors to find cross product */
 | 
			
		||||
  vec0[X] = v1[X] - v0[X];
 | 
			
		||||
  vec0[Y] = v1[Y] - v0[Y];
 | 
			
		||||
  vec0[Z] = v1[Z] - v0[Z];
 | 
			
		||||
 | 
			
		||||
  vec1[X] = v2[X] - v0[X];
 | 
			
		||||
  vec1[Y] = v2[Y] - v0[Y];
 | 
			
		||||
  vec1[Z] = v2[Z] - v0[Z];
 | 
			
		||||
 | 
			
		||||
  /* find cross product to get A, B, and C of plane equation */
 | 
			
		||||
  plane[A] = vec0[Y] * vec1[Z] - vec0[Z] * vec1[Y];
 | 
			
		||||
  plane[B] = -(vec0[X] * vec1[Z] - vec0[Z] * vec1[X]);
 | 
			
		||||
  plane[C] = vec0[X] * vec1[Y] - vec0[Y] * vec1[X];
 | 
			
		||||
 | 
			
		||||
  plane[D] = -(plane[A] * v0[X] + plane[B] * v0[Y] + plane[C] * v0[Z]);
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										18
									
								
								progs/demos/shadow.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								progs/demos/shadow.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,18 @@
 | 
			
		||||
#ifndef SHADOW_H
 | 
			
		||||
#define SHADOW_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern void
 | 
			
		||||
shadowmatrix(GLfloat shadowMat[4][4],
 | 
			
		||||
             GLfloat groundplane[4],
 | 
			
		||||
             GLfloat lightpos[4]);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern void
 | 
			
		||||
findplane(GLfloat plane[4],
 | 
			
		||||
          GLfloat v0[3], GLfloat v1[3], GLfloat v2[3]);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1,596 +0,0 @@
 | 
			
		||||
/* $Id: shadowtex.c,v 1.7 2002/07/12 15:54:02 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Shadow demo using the GL_ARB_depth_texture, GL_ARB_shadow and
 | 
			
		||||
 * GL_ARB_shadow_ambient extensions (or the old SGIX extensions).
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 * 19 Feb 2001
 | 
			
		||||
 *
 | 
			
		||||
 * Added GL_EXT_shadow_funcs support on 23 March 2002
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2001  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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include "../util/showbuffer.c"
 | 
			
		||||
 | 
			
		||||
#if 0 /* change to 1 if you want to use the old SGIX extensions */
 | 
			
		||||
#undef GL_ARB_depth_texture
 | 
			
		||||
#undef GL_ARB_shadow
 | 
			
		||||
#undef GL_ARB_shadow_ambient
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define DEG_TO_RAD (3.14159 / 180.0)
 | 
			
		||||
 | 
			
		||||
static GLint WindowWidth = 450, WindowHeight = 300;
 | 
			
		||||
static GLfloat Xrot = 15, Yrot = 0, Zrot = 0;
 | 
			
		||||
 | 
			
		||||
static GLfloat Red[4] = {1, 0, 0, 1};
 | 
			
		||||
static GLfloat Green[4] = {0, 1, 0, 1};
 | 
			
		||||
static GLfloat Blue[4] = {0, 0, 1, 1};
 | 
			
		||||
static GLfloat Yellow[4] = {1, 1, 0, 1};
 | 
			
		||||
 | 
			
		||||
static GLfloat LightDist = 10;
 | 
			
		||||
static GLfloat LightLatitude = 45.0;
 | 
			
		||||
static GLfloat LightLongitude = 45.0;
 | 
			
		||||
static GLfloat LightPos[4];
 | 
			
		||||
static GLfloat SpotDir[3];
 | 
			
		||||
static GLfloat SpotAngle = 40.0 * DEG_TO_RAD;
 | 
			
		||||
static GLfloat ShadowNear = 4.0, ShadowFar = 24.0;
 | 
			
		||||
static GLint ShadowTexWidth = 256, ShadowTexHeight = 256;
 | 
			
		||||
 | 
			
		||||
static GLboolean LinearFilter = GL_FALSE;
 | 
			
		||||
 | 
			
		||||
static GLfloat Bias = -0.06;
 | 
			
		||||
 | 
			
		||||
static GLboolean Anim = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
static GLboolean HaveEXTshadowFuncs = GL_FALSE;
 | 
			
		||||
static GLint Operator = 0;
 | 
			
		||||
static const GLenum OperatorFunc[8] = {
 | 
			
		||||
   GL_LEQUAL, GL_LESS, GL_GEQUAL, GL_GREATER,
 | 
			
		||||
   GL_EQUAL, GL_NOTEQUAL, GL_ALWAYS, GL_NEVER };
 | 
			
		||||
static const char *OperatorName[8] = {
 | 
			
		||||
   "GL_LEQUAL", "GL_LESS", "GL_GEQUAL", "GL_GREATER",
 | 
			
		||||
   "GL_EQUAL", "GL_NOTEQUAL", "GL_ALWAYS", "GL_NEVER" };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLuint DisplayMode;
 | 
			
		||||
#define SHOW_NORMAL         0
 | 
			
		||||
#define SHOW_DEPTH_IMAGE    1
 | 
			
		||||
#define SHOW_DEPTH_MAPPING  2
 | 
			
		||||
#define SHOW_DISTANCE       3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
DrawScene(void)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat k = 6;
 | 
			
		||||
   /* sphere */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(1.6, 2.2, 2.7);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Green);
 | 
			
		||||
   glColor4fv(Green);
 | 
			
		||||
   glutSolidSphere(1.5, 15, 15);
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   /* dodecahedron */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(-2.0, 1.2, 2.1);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Red);
 | 
			
		||||
   glColor4fv(Red);
 | 
			
		||||
   glutSolidDodecahedron();
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   /* icosahedron */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(-0.6, 1.3, -0.5);
 | 
			
		||||
   glScalef(1.5, 1.5, 1.5);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Yellow);
 | 
			
		||||
   glColor4fv(Red);
 | 
			
		||||
   glutSolidIcosahedron();
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   /* a plane */
 | 
			
		||||
   glPushMatrix();
 | 
			
		||||
   glTranslatef(0, -1.1, 0);
 | 
			
		||||
   glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, Blue);
 | 
			
		||||
   glColor4fv(Blue);
 | 
			
		||||
   glNormal3f(0, 1, 0);
 | 
			
		||||
   glBegin(GL_POLYGON);
 | 
			
		||||
   glVertex3f(-k, 0, -k);
 | 
			
		||||
   glVertex3f( k, 0, -k);
 | 
			
		||||
   glVertex3f( k, 0,  k);
 | 
			
		||||
   glVertex3f(-k, 0,  k);
 | 
			
		||||
   glEnd();
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Load the GL_TEXTURE matrix with the projection from the light
 | 
			
		||||
 * source's point of view.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
MakeShadowMatrix(const GLfloat lightPos[4], const GLfloat spotDir[3],
 | 
			
		||||
                 GLfloat spotAngle, GLfloat shadowNear, GLfloat shadowFar)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat d;
 | 
			
		||||
   
 | 
			
		||||
   glMatrixMode(GL_TEXTURE);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glTranslatef(0.5, 0.5, 0.5 + Bias);
 | 
			
		||||
   glScalef(0.5, 0.5, 0.5);
 | 
			
		||||
   d = shadowNear * tan(spotAngle);
 | 
			
		||||
   glFrustum(-d, d, -d, d, shadowNear, shadowFar);
 | 
			
		||||
   gluLookAt(lightPos[0], lightPos[1], lightPos[2],
 | 
			
		||||
             lightPos[0] + spotDir[0],
 | 
			
		||||
             lightPos[1] + spotDir[1],
 | 
			
		||||
             lightPos[2] + spotDir[2],
 | 
			
		||||
             0, 1, 0);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
EnableIdentityTexgen(void)
 | 
			
		||||
{
 | 
			
		||||
   /* texgen so that texcoord = vertex coord */
 | 
			
		||||
   static GLfloat sPlane[4] = { 1, 0, 0, 0 };
 | 
			
		||||
   static GLfloat tPlane[4] = { 0, 1, 0, 0 };
 | 
			
		||||
   static GLfloat rPlane[4] = { 0, 0, 1, 0 };
 | 
			
		||||
   static GLfloat qPlane[4] = { 0, 0, 0, 1 };
 | 
			
		||||
 | 
			
		||||
   glTexGenfv(GL_S, GL_EYE_PLANE, sPlane);
 | 
			
		||||
   glTexGenfv(GL_T, GL_EYE_PLANE, tPlane);
 | 
			
		||||
   glTexGenfv(GL_R, GL_EYE_PLANE, rPlane);
 | 
			
		||||
   glTexGenfv(GL_Q, GL_EYE_PLANE, qPlane);
 | 
			
		||||
   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glTexGeni(GL_Q, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_T);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_R);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_Q);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Setup 1-D texgen so that the distance from the light source, between
 | 
			
		||||
 * the near and far planes maps to s=0 and s=1.  When we draw the scene,
 | 
			
		||||
 * the grayness will indicate the fragment's distance from the light
 | 
			
		||||
 * source.
 | 
			
		||||
 */
 | 
			
		||||
static void
 | 
			
		||||
EnableDistanceTexgen(const GLfloat lightPos[4], const GLfloat lightDir[3],
 | 
			
		||||
                     GLfloat lightNear, GLfloat lightFar)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat m, d;
 | 
			
		||||
   GLfloat sPlane[4];
 | 
			
		||||
   GLfloat nearPoint[3];
 | 
			
		||||
 | 
			
		||||
   m = sqrt(lightDir[0] * lightDir[0] +
 | 
			
		||||
            lightDir[1] * lightDir[1] +
 | 
			
		||||
            lightDir[2] * lightDir[2]);
 | 
			
		||||
 | 
			
		||||
   d = lightFar - lightNear;
 | 
			
		||||
 | 
			
		||||
   /* nearPoint = point on light direction vector which intersects the
 | 
			
		||||
    * near plane of the light frustum.
 | 
			
		||||
    */
 | 
			
		||||
   nearPoint[0] = LightPos[0] + lightDir[0] / m * lightNear;
 | 
			
		||||
   nearPoint[1] = LightPos[1] + lightDir[1] / m * lightNear;
 | 
			
		||||
   nearPoint[2] = LightPos[2] + lightDir[2] / m * lightNear;
 | 
			
		||||
 | 
			
		||||
   sPlane[0] = lightDir[0] / d / m;
 | 
			
		||||
   sPlane[1] = lightDir[1] / d / m;
 | 
			
		||||
   sPlane[2] = lightDir[2] / d / m;
 | 
			
		||||
   sPlane[3] = -(sPlane[0] * nearPoint[0]
 | 
			
		||||
               + sPlane[1] * nearPoint[1]
 | 
			
		||||
               + sPlane[2] * nearPoint[2]);
 | 
			
		||||
 | 
			
		||||
   glTexGenfv(GL_S, GL_EYE_PLANE, sPlane);
 | 
			
		||||
   glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
 | 
			
		||||
   glEnable(GL_TEXTURE_GEN_S);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
DisableTexgen(void)
 | 
			
		||||
{
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_S);
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_T);
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_R);
 | 
			
		||||
   glDisable(GL_TEXTURE_GEN_Q);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
ComputeLightPos(GLfloat dist, GLfloat latitude, GLfloat longitude,
 | 
			
		||||
                GLfloat pos[4], GLfloat dir[3])
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
   pos[0] = dist * sin(longitude * DEG_TO_RAD);
 | 
			
		||||
   pos[1] = dist * sin(latitude * DEG_TO_RAD);
 | 
			
		||||
   pos[2] = dist * cos(latitude * DEG_TO_RAD) * cos(longitude * DEG_TO_RAD);
 | 
			
		||||
   pos[3] = 1;
 | 
			
		||||
   dir[0] = -pos[0];
 | 
			
		||||
   dir[1] = -pos[1];
 | 
			
		||||
   dir[2] = -pos[2];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Display(void)
 | 
			
		||||
{
 | 
			
		||||
   GLfloat ar = (GLfloat) WindowWidth / (GLfloat) WindowHeight;
 | 
			
		||||
   GLfloat d;
 | 
			
		||||
   GLenum error;
 | 
			
		||||
 | 
			
		||||
   ComputeLightPos(LightDist, LightLatitude, LightLongitude,
 | 
			
		||||
                   LightPos, SpotDir);
 | 
			
		||||
   /*
 | 
			
		||||
    * Step 1: render scene from point of view of the light source
 | 
			
		||||
    */
 | 
			
		||||
   /* compute frustum to enclose spot light cone */
 | 
			
		||||
   d = ShadowNear * tan(SpotAngle);
 | 
			
		||||
   glMatrixMode(GL_PROJECTION);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   glFrustum(-d, d, -d, d, ShadowNear, ShadowFar);
 | 
			
		||||
   glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
   glLoadIdentity();
 | 
			
		||||
   gluLookAt(LightPos[0], LightPos[1], LightPos[2], /* from */
 | 
			
		||||
             0, 0, 0, /* target */
 | 
			
		||||
             0, 1, 0); /* up */
 | 
			
		||||
 | 
			
		||||
   glViewport(0, 0, ShadowTexWidth, ShadowTexHeight);
 | 
			
		||||
   glClear(GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
   DrawScene();
 | 
			
		||||
 | 
			
		||||
   /*
 | 
			
		||||
    * Step 2: copy depth buffer into texture map
 | 
			
		||||
    */
 | 
			
		||||
   if (DisplayMode == SHOW_DEPTH_MAPPING) {
 | 
			
		||||
      /* load depth image as gray-scale luminance texture */
 | 
			
		||||
      GLfloat *depth = (GLfloat *) malloc(ShadowTexWidth * ShadowTexHeight
 | 
			
		||||
                                          * sizeof(GLfloat));
 | 
			
		||||
      if (depth) {
 | 
			
		||||
         glReadPixels(0, 0, ShadowTexWidth, ShadowTexHeight,
 | 
			
		||||
                      GL_DEPTH_COMPONENT, GL_FLOAT, depth);
 | 
			
		||||
         glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE,
 | 
			
		||||
                      ShadowTexWidth, ShadowTexHeight, 0,
 | 
			
		||||
                      GL_LUMINANCE, GL_FLOAT, depth);
 | 
			
		||||
         free(depth);
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* The normal shadow case */
 | 
			
		||||
      glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT,
 | 
			
		||||
                       0, 0, ShadowTexWidth, ShadowTexHeight, 0);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /*
 | 
			
		||||
    * Step 3: render scene from point of view of the camera
 | 
			
		||||
    */
 | 
			
		||||
   glViewport(0, 0, WindowWidth, WindowHeight);
 | 
			
		||||
   if (DisplayMode == SHOW_DEPTH_IMAGE) {
 | 
			
		||||
      ShowDepthBuffer(WindowWidth, WindowHeight, 0, 1);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      glMatrixMode(GL_PROJECTION);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glFrustum(-ar, ar, -1.0, 1.0, 4.0, 50.0);
 | 
			
		||||
      glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
      glLoadIdentity();
 | 
			
		||||
      glTranslatef(0.0, 0.0, -22.0);
 | 
			
		||||
      glRotatef(Xrot, 1, 0, 0);
 | 
			
		||||
      glRotatef(Yrot, 0, 1, 0);
 | 
			
		||||
      glRotatef(Zrot, 0, 0, 1);
 | 
			
		||||
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
      glLightfv(GL_LIGHT0, GL_POSITION, LightPos);
 | 
			
		||||
      if (LinearFilter) {
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 | 
			
		||||
      }
 | 
			
		||||
      if (DisplayMode == SHOW_DEPTH_MAPPING) {
 | 
			
		||||
#if defined(GL_ARB_shadow)
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
 | 
			
		||||
#elif defined(GL_SGIX_shadow)
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_FALSE);
 | 
			
		||||
#endif
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
         MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar);
 | 
			
		||||
         EnableIdentityTexgen();
 | 
			
		||||
      }
 | 
			
		||||
      else if (DisplayMode == SHOW_DISTANCE) {
 | 
			
		||||
         glMatrixMode(GL_TEXTURE);
 | 
			
		||||
         glLoadIdentity();
 | 
			
		||||
         glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
         EnableDistanceTexgen(LightPos, SpotDir, ShadowNear+Bias, ShadowFar);
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
 | 
			
		||||
         glEnable(GL_TEXTURE_1D);
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         assert(DisplayMode == SHOW_NORMAL);
 | 
			
		||||
#if defined(GL_ARB_shadow)
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB,
 | 
			
		||||
                         GL_COMPARE_R_TO_TEXTURE_ARB);
 | 
			
		||||
#elif defined(GL_SGIX_shadow)
 | 
			
		||||
         glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_SGIX, GL_TRUE);
 | 
			
		||||
#endif
 | 
			
		||||
         glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 | 
			
		||||
         glEnable(GL_TEXTURE_2D);
 | 
			
		||||
         MakeShadowMatrix(LightPos, SpotDir, SpotAngle, ShadowNear, ShadowFar);
 | 
			
		||||
         EnableIdentityTexgen();
 | 
			
		||||
      }
 | 
			
		||||
      DrawScene();
 | 
			
		||||
      DisableTexgen();
 | 
			
		||||
      glDisable(GL_TEXTURE_1D);
 | 
			
		||||
      glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   error = glGetError();
 | 
			
		||||
   if (error) {
 | 
			
		||||
      printf("GL Error: %s\n", gluErrorString(error));
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Reshape(int width, int height)
 | 
			
		||||
{
 | 
			
		||||
   WindowWidth = width;
 | 
			
		||||
   WindowHeight = height;
 | 
			
		||||
   if (width >= 512 && height >= 512) {
 | 
			
		||||
      ShadowTexWidth = ShadowTexHeight = 512;
 | 
			
		||||
   }
 | 
			
		||||
   else if (width >= 256 && height >= 256) {
 | 
			
		||||
      ShadowTexWidth = ShadowTexHeight = 256;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      ShadowTexWidth = ShadowTexHeight = 128;
 | 
			
		||||
   }
 | 
			
		||||
   printf("Using %d x %d depth texture\n", ShadowTexWidth, ShadowTexHeight);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Idle(void)
 | 
			
		||||
{
 | 
			
		||||
   Yrot += 5.0;
 | 
			
		||||
   /*LightLongitude -= 5.0;*/
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Key(unsigned char key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat step = 3.0;
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case 'a':
 | 
			
		||||
         Anim = !Anim;
 | 
			
		||||
         if (Anim)
 | 
			
		||||
            glutIdleFunc(Idle);
 | 
			
		||||
         else
 | 
			
		||||
            glutIdleFunc(NULL);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'b':
 | 
			
		||||
         Bias -= 0.01;
 | 
			
		||||
         printf("Bias %g\n", Bias);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'B':
 | 
			
		||||
         Bias += 0.01;
 | 
			
		||||
         printf("Bias %g\n", Bias);
 | 
			
		||||
         break;
 | 
			
		||||
      case 'd':
 | 
			
		||||
         DisplayMode = SHOW_DISTANCE;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'f':
 | 
			
		||||
         LinearFilter = !LinearFilter;
 | 
			
		||||
         printf("%s filtering\n", LinearFilter ? "Bilinear" : "Nearest");
 | 
			
		||||
         break;
 | 
			
		||||
      case 'i':
 | 
			
		||||
         DisplayMode = SHOW_DEPTH_IMAGE;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'm':
 | 
			
		||||
         DisplayMode = SHOW_DEPTH_MAPPING;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'n':
 | 
			
		||||
      case ' ':
 | 
			
		||||
         DisplayMode = SHOW_NORMAL;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'o':
 | 
			
		||||
         if (HaveEXTshadowFuncs) {
 | 
			
		||||
            Operator++;
 | 
			
		||||
            if (Operator >= 8)
 | 
			
		||||
               Operator = 0;
 | 
			
		||||
            printf("Operator: %s\n", OperatorName[Operator]);
 | 
			
		||||
            glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB,
 | 
			
		||||
                            OperatorFunc[Operator]);
 | 
			
		||||
         }
 | 
			
		||||
         break;
 | 
			
		||||
      case 'z':
 | 
			
		||||
         Zrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case 'Z':
 | 
			
		||||
         Zrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case 27:
 | 
			
		||||
         exit(0);
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
SpecialKey(int key, int x, int y)
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat step = 3.0;
 | 
			
		||||
   const int mod = glutGetModifiers();
 | 
			
		||||
   (void) x;
 | 
			
		||||
   (void) y;
 | 
			
		||||
   switch (key) {
 | 
			
		||||
      case GLUT_KEY_UP:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLatitude += step;
 | 
			
		||||
         else
 | 
			
		||||
            Xrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_DOWN:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLatitude -= step;
 | 
			
		||||
         else
 | 
			
		||||
            Xrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_LEFT:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLongitude += step;
 | 
			
		||||
         else
 | 
			
		||||
            Yrot += step;
 | 
			
		||||
         break;
 | 
			
		||||
      case GLUT_KEY_RIGHT:
 | 
			
		||||
         if (mod)
 | 
			
		||||
            LightLongitude -= step;
 | 
			
		||||
         else
 | 
			
		||||
            Yrot -= step;
 | 
			
		||||
         break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
Init(void)
 | 
			
		||||
{
 | 
			
		||||
#if defined(GL_ARB_depth_texture) && defined(GL_ARB_shadow)
 | 
			
		||||
   if (!glutExtensionSupported("GL_ARB_depth_texture") ||
 | 
			
		||||
       !glutExtensionSupported("GL_ARB_shadow")) {
 | 
			
		||||
      printf("Sorry, this demo requires the GL_ARB_depth_texture and GL_ARB_shadow extensions\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
   printf("Using GL_ARB_depth_texture and GL_ARB_shadow\n");
 | 
			
		||||
#elif defined(GL_SGIX_depth_texture) && defined(GL_SGIX_shadow)
 | 
			
		||||
   if (!glutExtensionSupported("GL_SGIX_depth_texture") ||
 | 
			
		||||
       !glutExtensionSupported("GL_SGIX_shadow")) {
 | 
			
		||||
      printf("Sorry, this demo requires the GL_SGIX_depth_texture and GL_SGIX_shadow extensions\n");
 | 
			
		||||
      exit(1);
 | 
			
		||||
   }
 | 
			
		||||
   printf("Using GL_SGIX_depth_texture and GL_SGIX_shadow\n");
 | 
			
		||||
#endif
 | 
			
		||||
   HaveEXTshadowFuncs = glutExtensionSupported("GL_EXT_shadow_funcs");
 | 
			
		||||
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
 | 
			
		||||
#if defined(GL_ARB_shadow)
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB,
 | 
			
		||||
                   GL_COMPARE_R_TO_TEXTURE_ARB);
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
 | 
			
		||||
#elif defined(GL_SGIX_shadow)
 | 
			
		||||
   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_OPERATOR_SGIX,
 | 
			
		||||
                   GL_TEXTURE_LEQUAL_R_SGIX);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(GL_ARB_shadow_ambient)
 | 
			
		||||
   if (glutExtensionSupported("GL_ARB_shadow_ambient")) {
 | 
			
		||||
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, 0.3);
 | 
			
		||||
      printf("and GL_ARB_shadow_ambient\n");
 | 
			
		||||
   }
 | 
			
		||||
#elif defined(GL_SGIX_shadow_ambient)
 | 
			
		||||
   if (glutExtensionSupported("GL_SGIX_shadow_ambient")) {
 | 
			
		||||
      glTexParameterf(GL_TEXTURE_2D, GL_SHADOW_AMBIENT_SGIX, 0.3);
 | 
			
		||||
      printf("and GL_SGIX_shadow_ambient\n");
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* setup 1-D grayscale texture image for SHOW_DISTANCE mode */
 | 
			
		||||
   {
 | 
			
		||||
      GLuint i;
 | 
			
		||||
      GLubyte image[256];
 | 
			
		||||
      for (i = 0; i < 256; i++)
 | 
			
		||||
         image[i] = i;
 | 
			
		||||
      glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE,
 | 
			
		||||
                   256, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, image);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_DEPTH_TEST);
 | 
			
		||||
   glEnable(GL_LIGHTING);
 | 
			
		||||
   glEnable(GL_LIGHT0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
PrintHelp(void)
 | 
			
		||||
{
 | 
			
		||||
   printf("Keys:\n");
 | 
			
		||||
   printf("  a = toggle animation\n");
 | 
			
		||||
   printf("  i = show depth texture image\n");
 | 
			
		||||
   printf("  m = show depth texture mapping\n");
 | 
			
		||||
   printf("  d = show fragment distance from light source\n");
 | 
			
		||||
   printf("  n = show normal, shadowed image\n");
 | 
			
		||||
   printf("  f = toggle nearest/bilinear texture filtering\n");
 | 
			
		||||
   printf("  b/B = decrease/increase shadow map Z bias\n");
 | 
			
		||||
   printf("  cursor keys = rotate scene\n");
 | 
			
		||||
   printf("  <shift> + cursor keys = rotate light source\n");
 | 
			
		||||
   if (HaveEXTshadowFuncs)
 | 
			
		||||
      printf("  o = cycle through comparison modes\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
   glutInit(&argc, argv);
 | 
			
		||||
   glutInitWindowPosition(0, 0);
 | 
			
		||||
   glutInitWindowSize(WindowWidth, WindowHeight);
 | 
			
		||||
   glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
 | 
			
		||||
   glutCreateWindow(argv[0]);
 | 
			
		||||
   glutReshapeFunc(Reshape);
 | 
			
		||||
   glutKeyboardFunc(Key);
 | 
			
		||||
   glutSpecialFunc(SpecialKey);
 | 
			
		||||
   glutDisplayFunc(Display);
 | 
			
		||||
   if (Anim)
 | 
			
		||||
      glutIdleFunc(Idle);
 | 
			
		||||
   Init();
 | 
			
		||||
   PrintHelp();
 | 
			
		||||
   glutMainLoop();
 | 
			
		||||
   return 0;
 | 
			
		||||
}
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user