Compare commits
	
		
			199 Commits
		
	
	
		
			7.8-branch
			...
			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 | 
							
								
								
									
										446
									
								
								Make-config
									
									
									
									
									
								
							
							
						
						
									
										446
									
								
								Make-config
									
									
									
									
									
								
							@@ -1,13 +1,13 @@
 | 
			
		||||
# $Id: Make-config,v 1.25 2000/06/08 15:19:12 brianp Exp $
 | 
			
		||||
# $Id: Make-config,v 1.25.4.7 2001/05/14 19:11:32 brianp Exp $
 | 
			
		||||
 | 
			
		||||
MESA_MAJOR=3
 | 
			
		||||
MESA_MINOR=3
 | 
			
		||||
MESA_TINY=0
 | 
			
		||||
MESA_MINOR=4
 | 
			
		||||
MESA_TINY=2
 | 
			
		||||
VERSION=$(MESA_MAJOR).$(MESA_MINOR)
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# 
 | 
			
		||||
# Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
# 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"),
 | 
			
		||||
@@ -200,7 +200,11 @@ freebsd-386:
 | 
			
		||||
	"CFLAGS = -O3 -ffast-math -fPIC -pedantic -I/usr/X11R6/include -DUSE_XSHM -DHZ=100 -DUSE_X86_ASM -DFREEBSD" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.freebsd" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S"
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S"
 | 
			
		||||
 | 
			
		||||
gcc:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
@@ -467,136 +471,7 @@ linux-static:
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ar-ruv" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm -lpthread"
 | 
			
		||||
 | 
			
		||||
linux-386:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM  -DPTHREADS -I/usr/X11R6/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-386-static:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.a" \
 | 
			
		||||
	"GLU_LIB = libGLU.a" \
 | 
			
		||||
	"GLUT_LIB = libglut.a" \
 | 
			
		||||
	"GLW_LIB = libGLw.a" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -funroll-loops -ansi -pedantic -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DPTHREADS -I/usr/X11R6/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ar-ruv" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lm -lpthread" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L/usr/local/glide/lib -lglide2x" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lglut -lGLU -lGL"
 | 
			
		||||
 | 
			
		||||
linux-386-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-386-opt-V2-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -m486 -fomit-frame-pointer -pipe -ansi -pedantic -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DFX -DFX_V2 -DUSE_X86_ASM -DPTHREAD -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include"\
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-386-opt-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -m486 -fomit-frame-pointer -pipe -ansi -pedantic -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DFX -DUSE_X86_ASM -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-3dnow:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \
 | 
			
		||||
	"CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DPTHREADS -I/usr/X11R6/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S \
 | 
			
		||||
	X86/mmx_blend.S \
 | 
			
		||||
	X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
	X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
	X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
	X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
	X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S" 
 | 
			
		||||
 | 
			
		||||
linux-3dnow-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include -I/usr/src/mesa-glx/src/FX/X86" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S \
 | 
			
		||||
	X86/mmx_blend.S \
 | 
			
		||||
	X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
	X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
	X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
	X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
	X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \
 | 
			
		||||
	FX/X86/fx_3dnow_fastpath.S"
 | 
			
		||||
 | 
			
		||||
linux-katmai:
 | 
			
		||||
linux-x86:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
@@ -609,47 +484,52 @@ linux-katmai:
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S \
 | 
			
		||||
	X86/mmx_blend.S \
 | 
			
		||||
	X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
	X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
	X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
	X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
	X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \
 | 
			
		||||
	X86/katmai_norm_raw.S \
 | 
			
		||||
	X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
	X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
	X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
	X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
	X86/vertex_katmai.S"
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S \
 | 
			
		||||
		X86/mmx_blend.S \
 | 
			
		||||
		X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
		X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
		X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
		X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
		X86/3dnow_norm_raw.S X86/3dnow_vertex.S \
 | 
			
		||||
		X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
		X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
		X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
		X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
		X86/katmai_norm_raw.S X86/katmai_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-katmai-glide:
 | 
			
		||||
linux-x86-static:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"GL_LIB = libGL.a" \
 | 
			
		||||
	"GLU_LIB = libGLU.a" \
 | 
			
		||||
	"GLUT_LIB = libglut.a" \
 | 
			
		||||
	"GLW_LIB = libGLw.a" \
 | 
			
		||||
	"CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include -I/usr/src/mesa-glx/src/FX/X86" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"CFLAGS = -Wall -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -DPTHREADS -I/usr/X11R6/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ar-ruv" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S \
 | 
			
		||||
	X86/mmx_blend.S \
 | 
			
		||||
	X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
	X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
	X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
	X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
	X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \
 | 
			
		||||
	FX/X86/fx_3dnow_fastpath.S \
 | 
			
		||||
	X86/katmai_norm_raw.S \
 | 
			
		||||
	X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
	X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
	X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
	X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
	X86/vertex_katmai.S" 
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S \
 | 
			
		||||
		X86/mmx_blend.S \
 | 
			
		||||
		X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
		X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
		X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
		X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
		X86/3dnow_norm_raw.S X86/3dnow_vertex.S \
 | 
			
		||||
		X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
		X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
		X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
		X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
		X86/katmai_norm_raw.S X86/katmai_vertex.S"
 | 
			
		||||
 | 
			
		||||
# Contributed by Uwe_Maurer@t-online.de
 | 
			
		||||
linux-ggi:
 | 
			
		||||
@@ -674,7 +554,113 @@ linux-386-ggi:
 | 
			
		||||
	"CFLAGS = -O3 -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DUSE_X86_ASM -DGGI -DCDECL=" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ggi" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lggi -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -L/usr/local/glide/lib -lglide2x" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -lglut -lGLU -lGL"
 | 
			
		||||
 | 
			
		||||
linux-386-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-386-opt-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -m486 -fomit-frame-pointer -pipe -ansi -pedantic -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DFX -DUSE_X86_ASM -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-386-opt-V2-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O3 -m486 -fomit-frame-pointer -pipe -ansi -pedantic -ffast-math -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2 -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DFX -DFX_V2 -DUSE_X86_ASM -DPTHREAD -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include"\
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-x86-glide:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \
 | 
			
		||||
	"CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -funroll-loops -fomit-frame-pointer -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -DUSE_XSHM -DFX -DPTHREADS -I/usr/X11R6/include -I/usr/include/glide -I/usr/local/glide/include -I/usr/src/mesa-glx/src/FX/X86" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -L/usr/local/glide/lib -lglide2x -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S \
 | 
			
		||||
		X86/mmx_blend.S \
 | 
			
		||||
		X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
		X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
		X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
		X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
		X86/3dnow_norm_raw.S X86/3dnow_vertex.S \
 | 
			
		||||
		FX/X86/fx_3dnow_fastpath.S \
 | 
			
		||||
		X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
		X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
		X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
		X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
		X86/katmai_norm_raw.S X86/katmai_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-alpha:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
@@ -874,7 +860,11 @@ os2-x11:
 | 
			
		||||
	"CFLAGS = -Zmt -O3 -m486 -funroll-loops -Wall -Wno-unused -ansi -pedantic -ffast-math -DUSE_X86_ASM -D_SVID_SOURCE -D_BSD_SOURCE -I$(X11ROOT)/XFree86/include" \
 | 
			
		||||
	"MAKELIB = ..\\bin\\mklib-emx.cmd " \
 | 
			
		||||
	"APP_LIB_DEPS = -Zmt -Zcrtdll -Zexe -L$(X11ROOT)/XFree86/lib -lXt -lX11 -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S"
 | 
			
		||||
 | 
			
		||||
osf1:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
@@ -1273,19 +1263,7 @@ DEBUG:
 | 
			
		||||
	"APP_LIB_DEPS = -lX11 -lXext -lXmu -lXi -lfpe -lm"
 | 
			
		||||
 | 
			
		||||
# for debugging on Linux systems
 | 
			
		||||
linux-static-debug:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.a" \
 | 
			
		||||
	"GLU_LIB = libGLU.a" \
 | 
			
		||||
	"GLUT_LIB = libglut.a" \
 | 
			
		||||
	"GLW_LIB = libGLw.a" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -DUSE_XSHM -DDEBUG -DSVGA -DFX -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM_not -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ar-ruv" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -ltexus -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lvga -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S X86/vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-elf-debug:
 | 
			
		||||
linux-debug:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
@@ -1297,7 +1275,48 @@ linux-elf-debug:
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lvga -L/usr/local/glide/lib -lglide2x" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lglut -lGLU -lGL"
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -lglut -lGLU -lGL"
 | 
			
		||||
 | 
			
		||||
linux-static-debug:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.a" \
 | 
			
		||||
	"GLU_LIB = libGLU.a" \
 | 
			
		||||
	"GLUT_LIB = libglut.a" \
 | 
			
		||||
	"GLW_LIB = libGLw.a" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -g -ansi -pedantic -Wall -Wmissing-prototypes -DUSE_XSHM -DDEBUG -DMESA_DEBUG -DSVGA -DFX -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ar-ruv" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -ltexus -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lvga -lm" \
 | 
			
		||||
 | 
			
		||||
linux-x86-debug:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.so" \
 | 
			
		||||
	"GLU_LIB = libGLU.so" \
 | 
			
		||||
	"GLUT_LIB = libglut.so" \
 | 
			
		||||
	"GLW_LIB = libGLw.so" \
 | 
			
		||||
	"CC = gcc -malign-loops=2 -malign-jumps=2 -malign-functions=2" \
 | 
			
		||||
	"CFLAGS = -O2 -g -ansi -pedantic -Wall -Wmissing-prototypes -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -DPTHREADS -I/usr/X11R6/include -DDEBUG -DMESA_DEBUG" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.linux" \
 | 
			
		||||
	"GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lm -lpthread" \
 | 
			
		||||
	"GLU_LIB_DEPS = -L../lib -lGL -lm" \
 | 
			
		||||
	"GLUT_LIB_DEPS = -L../lib -lGLU -lGL -L/usr/X11R6/lib -lX11 -lXmu -lXt -lXi -lm" \
 | 
			
		||||
	"APP_LIB_DEPS = -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S \
 | 
			
		||||
		X86/mmx_blend.S \
 | 
			
		||||
		X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
		X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
		X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
		X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
		X86/3dnow_norm_raw.S X86/3dnow_vertex.S \
 | 
			
		||||
		X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
		X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
		X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
		X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
		X86/katmai_norm_raw.S X86/katmai_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-glide-debug:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
@@ -1318,14 +1337,51 @@ linux-prof:
 | 
			
		||||
	"GLUT_LIB = libglut.a" \
 | 
			
		||||
	"GLW_LIB = libGLw.a" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O2 -pg -ansi -pedantic -Wall -DUSE_XSHM -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"CFLAGS = -Wall -O2 -pg -ansi -pedantic -ffast-math -DUSE_XSHM -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ar-ruv" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/X11/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S \
 | 
			
		||||
		X86/mmx_blend.S \
 | 
			
		||||
		X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
		X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
		X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
		X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
		X86/3dnow_norm_raw.S X86/3dnow_vertex.S \
 | 
			
		||||
		FX/X86/fx_3dnow_fastpath.S \
 | 
			
		||||
		X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
		X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
		X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
		X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
		X86/katmai_norm_raw.S X86/katmai_vertex.S"
 | 
			
		||||
 | 
			
		||||
linux-glide-prof:
 | 
			
		||||
	$(MAKE) $(MFLAGS) -f Makefile.X11 targets \
 | 
			
		||||
	"GL_LIB = libGL.a" \
 | 
			
		||||
	"GLU_LIB = libGLU.a" \
 | 
			
		||||
	"GLUT_LIB = libglut.a" \
 | 
			
		||||
	"GLW_LIB = libGLw.a" \
 | 
			
		||||
	"CC = gcc" \
 | 
			
		||||
	"CFLAGS = -O2 -pg -ansi -pedantic -Wall -DUSE_XSHM -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -I/usr/include/glide -I/usr/local/glide/include" \
 | 
			
		||||
	"MAKELIB = ../bin/mklib.ar-ruv" \
 | 
			
		||||
	"APP_LIB_DEPS = -L/usr/local/glide/lib -lglide2x -L/usr/X11/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE -lm" \
 | 
			
		||||
	"ASM_SOURCES = X86/x86a.S X86/common_x86asm.S X86/glapi_x86.S \
 | 
			
		||||
	X86/mmx_blend.S \
 | 
			
		||||
	X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
	X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
	X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
	X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
	X86/3dnow_norm_raw.S X86/vertex.S X86/vertex_3dnow.S \
 | 
			
		||||
	FX/X86/fx_3dnow_fastpath.S"
 | 
			
		||||
	"ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
 | 
			
		||||
		X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
 | 
			
		||||
		X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
 | 
			
		||||
		X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
 | 
			
		||||
		X86/x86_cliptest.S X86/x86_vertex.S \
 | 
			
		||||
		X86/mmx_blend.S \
 | 
			
		||||
		X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
 | 
			
		||||
		X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
 | 
			
		||||
		X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
 | 
			
		||||
		X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
 | 
			
		||||
		X86/3dnow_norm_raw.S X86/3dnow_vertex.S \
 | 
			
		||||
		FX/X86/fx_3dnow_fastpath.S \
 | 
			
		||||
		X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
 | 
			
		||||
		X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
 | 
			
		||||
		X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
 | 
			
		||||
		X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
 | 
			
		||||
		X86/katmai_norm_raw.S X86/katmai_vertex.S"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								Makefile.X11
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								Makefile.X11
									
									
									
									
									
								
							@@ -1,20 +1,20 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.32 2000/07/21 16:36:35 brianp Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.32.2.8 2001/05/16 20:37:47 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
# 
 | 
			
		||||
# Copyright (C) 1999-2000  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
 | 
			
		||||
@@ -68,18 +68,15 @@ 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-386            for Linux on Intel, make shared .so libs"
 | 
			
		||||
	@echo "  make linux-386-static     for Linux on Intel, make static .a libs"
 | 
			
		||||
	@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"
 | 
			
		||||
	@echo "  make linux-386-ggi        for Linux systems with libggi w/ Intel assembly"
 | 
			
		||||
	@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-3dnow          for Linux on AMD w/ 3DNow!"
 | 
			
		||||
	@echo "  make linux-3dnow-glide    for Linux on AMD w/ 3DNow! for Glide"
 | 
			
		||||
	@echo "  make linux-katmai         for Linux on PentiumIII w/ SSE"
 | 
			
		||||
	@echo "  make linux-katmai-glide   for Linux on PentiumIII w/ SSE for Glide"
 | 
			
		||||
	@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"
 | 
			
		||||
	@echo "  make linux-ppc            for Linux on PowerPC systems"
 | 
			
		||||
@@ -139,13 +136,10 @@ 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 irix6-o32 irix6-o32-dso \
 | 
			
		||||
linux-static-debug linux-elf-debug linux-prof linux-glide-debug \
 | 
			
		||||
linux linux-static \
 | 
			
		||||
linux-386 linux-386-static \
 | 
			
		||||
linux linux-static linux-debug linux-static-debug linux-prof \
 | 
			
		||||
linux-x86 linux-x86-static linux-x86-debug \
 | 
			
		||||
linux-glide linux-386-glide linux-386-opt-glide \
 | 
			
		||||
linux-386-opt-V2-glide \
 | 
			
		||||
linux-3dnow linux-3dnow-glide \
 | 
			
		||||
linux-katmai linux-katmai-glide \
 | 
			
		||||
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 \
 | 
			
		||||
@@ -326,10 +320,10 @@ realclean: clean
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DIRECTORY = Mesa-3.3
 | 
			
		||||
LIB_NAME = MesaLib-3.3
 | 
			
		||||
DEMO_NAME = MesaDemos-3.3
 | 
			
		||||
GLU_NAME = MesaGLU-3.3
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -388,6 +382,7 @@ LIB_FILES =	\
 | 
			
		||||
	$(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	\
 | 
			
		||||
@@ -463,7 +458,6 @@ LIB_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.[ch]				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.am			\
 | 
			
		||||
	$(DIRECTORY)/src/X86/Makefile.in			\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.m4				\
 | 
			
		||||
	$(DIRECTORY)/src/X86/*.S				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/README[12]				\
 | 
			
		||||
	$(DIRECTORY)/src-glu/Makefile*				\
 | 
			
		||||
@@ -478,6 +472,7 @@ LIB_FILES =	\
 | 
			
		||||
	$(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			\
 | 
			
		||||
@@ -494,6 +489,8 @@ LIB_FILES =	\
 | 
			
		||||
	$(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				\
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,11 @@
 | 
			
		||||
 | 
			
		||||
                     3Dfx Glide device driver for Mesa 3.3
 | 
			
		||||
                     3Dfx Glide device driver for Mesa 3.4.2
 | 
			
		||||
				(see below for FAQ)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
NOTE: This information is probably somewhat out of date.  A rewrite is
 | 
			
		||||
overdue.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
What do you need ?
 | 
			
		||||
------------------
 | 
			
		||||
@@ -13,7 +16,7 @@ What do you need ?
 | 
			
		||||
	  under Linux (more information in the "Useful Glide Environment
 | 
			
		||||
	  Variables");
 | 
			
		||||
 | 
			
		||||
	- Mesa 3.1;
 | 
			
		||||
	- 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
 | 
			
		||||
@@ -23,8 +26,6 @@ What do you need ?
 | 
			
		||||
	- A compiler supported by the Glide library (Micro$oft VC++ (tested),
 | 
			
		||||
	  Watcom (tested), GCC for Linux (tested), etc.);
 | 
			
		||||
 | 
			
		||||
	- A lot of patience, this is an alpha release.
 | 
			
		||||
 | 
			
		||||
	- It's nice to have two monitors - one for your normal graphics
 | 
			
		||||
	  card and one for your 3Dfx card. If something goes wrong with
 | 
			
		||||
	  an application using the 3Dfx hardware you can still see your
 | 
			
		||||
@@ -77,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:
 | 
			
		||||
------
 | 
			
		||||
@@ -117,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
 | 
			
		||||
@@ -135,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).
 | 
			
		||||
@@ -236,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.
 | 
			
		||||
 | 
			
		||||
@@ -395,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
 | 
			
		||||
@@ -413,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
 | 
			
		||||
@@ -490,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'.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.3 Unix/X11 Information
 | 
			
		||||
                         Mesa 3.4.2 Unix/X11 Information
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -323,4 +323,4 @@ Summary of X-related environment variables:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: README.X11,v 3.5 2000/04/04 15:14:48 brianp Exp $
 | 
			
		||||
$Id: README.X11,v 3.5.4.3 2001/05/14 19:11:32 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/RELNOTES-3.4
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/RELNOTES-3.4
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.4 release notes
 | 
			
		||||
 | 
			
		||||
                             November 3, 2000
 | 
			
		||||
 | 
			
		||||
                             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 3.4 simply fixes bugs found in the Mesa 3.3 release.  For details,
 | 
			
		||||
see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4,v 1.1.2.2 2000/11/02 18:05:34 brianp Exp $
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/RELNOTES-3.4.1
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/RELNOTES-3.4.1
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.4.1 release notes
 | 
			
		||||
 | 
			
		||||
                             February 9, 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 3.4.1 is a maintenance release that simply fixes bugs found since
 | 
			
		||||
the Mesa 3.4 release.  For details, see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4.1,v 1.1.2.2 2001/02/07 22:54:04 brianp Exp $
 | 
			
		||||
							
								
								
									
										22
									
								
								docs/RELNOTES-3.4.2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								docs/RELNOTES-3.4.2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.4.2 release notes
 | 
			
		||||
 | 
			
		||||
                               May 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 3.4.2 is a maintenance release that simply fixes bugs found since
 | 
			
		||||
the Mesa 3.4.1 release.  For details, see the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.4.2,v 1.1.2.2 2001/05/16 22:29:07 brianp Exp $
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
$Id: VERSIONS,v 1.38 2000/07/21 15:41:59 brianp Exp $
 | 
			
		||||
$Id: VERSIONS,v 1.38.2.46 2001/05/17 19:31:55 brianp Exp $
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mesa Version History
 | 
			
		||||
@@ -746,3 +746,80 @@ Mesa Version History
 | 
			
		||||
	- gl.h now uses #defines instead of C enums for all tokens
 | 
			
		||||
	- glu.h now uses #defines instead of C enums for all tokens
 | 
			
		||||
	- moved programs from 3Dfx/demos/ into demos/ directory
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.4  November 3, 2000
 | 
			
		||||
    New:
 | 
			
		||||
	- optimized glDrawPixels for glPixelZoom(1,-1)
 | 
			
		||||
    Bug Fixes:
 | 
			
		||||
	- widgets-mesa/src/*.c files were missing from 3.3 distro
 | 
			
		||||
	- include/GL/mesa_wgl.h file was missing from 3.3 distro
 | 
			
		||||
	- fixed some Win32 compile problems
 | 
			
		||||
	- texture object priorities weren't getting initialized to 1.0
 | 
			
		||||
	- glAreTexturesResident return value was wrong when using hardware
 | 
			
		||||
	- glXUseXFont segfaulted when using 3dfx driver (via MESA_GLX_FX)
 | 
			
		||||
	- glReadPixels with GLushort packed types was broken
 | 
			
		||||
	- fixed a few bugs in the GL_EXT_texture_env_combine texture code
 | 
			
		||||
	- glPush/PopAttrib(GL_ENABLE_BIT) mishandled multi-texture enables
 | 
			
		||||
	- fixed some typos/bugs in the VB code
 | 
			
		||||
	- glDrawPixels(GL_COLOR_INDEX) to RGB window didn't work
 | 
			
		||||
	- optimized glDrawPixels paths weren't being used
 | 
			
		||||
	- per-fragment fog calculation didn't work without a Z buffer
 | 
			
		||||
	- improved blending accuracy, fixes Glean blendFunc test failures
 | 
			
		||||
	- glPixelStore(GL_PACK/UNPACK_SKIP_IMAGES) wasn't handled correctly
 | 
			
		||||
	- glXGetProcAddressARB() didn't always return the right address
 | 
			
		||||
	- gluBuild[12]DMipmaps() didn't grok the GL_BGR pixel format
 | 
			
		||||
	- texture matrix changes weren't always detected (GLUT projtex demo)
 | 
			
		||||
	- fixed random color problem in vertex fog code
 | 
			
		||||
	- fixed Glide-related bug that let Quake get a 24-bit Z buffer
 | 
			
		||||
    Changes:
 | 
			
		||||
	- finished internal support for compressed textures for DRI
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.4.1  February 14, 2001
 | 
			
		||||
    New:
 | 
			
		||||
	- fixed some Linux build problems
 | 
			
		||||
	- fixed some Windows build problems
 | 
			
		||||
	- GL_EXT_texture_env_dot3 extension (Gareth Hughes)
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- added RENDER_START/RENDER_FINISH macros for glCopyTexImage in DRI
 | 
			
		||||
	- various state-update code changes needed for DRI bugs
 | 
			
		||||
	- disabled pixel transfer ops in glColorTable commands, not needed
 | 
			
		||||
	- fixed bugs in glCopyConvolutionFilter1D/2D, glGetConvolutionFilter
 | 
			
		||||
	- updated sources and fixed compile problems in widgets-mesa/
 | 
			
		||||
	- GLX_PBUFFER enum value was wrong in glx.h
 | 
			
		||||
	- fixed a glColorMaterial lighting bug
 | 
			
		||||
	- fixed bad args to Read/WriteStencilSpan in h/w stencil clear function
 | 
			
		||||
	- glXCopySubBufferMESA() Y position was off by one
 | 
			
		||||
	- Error checking of glTexSubImage3D() was broken (bug 128775)
 | 
			
		||||
	- glPopAttrib() didn't restore all derived Mesa state correctly
 | 
			
		||||
	- Better glReadPixels accuracy for 16bpp color - fixes lots of OpenGL
 | 
			
		||||
	  conformance problems at 16bpp.
 | 
			
		||||
	- clearing depth buffer with scissoring was broken, would segfault
 | 
			
		||||
	- OSMesaGetDepthBuffer() returned bad bytesPerValue value
 | 
			
		||||
	- fixed a line clipping bug (reported by Craig McDaniel)
 | 
			
		||||
	- fixed RGB color over/underflow bug for very tiny triangles
 | 
			
		||||
    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
 | 
			
		||||
	- using fog could result in random vertex alpha values
 | 
			
		||||
	- AA triangle rendering could touch pixels outside right window bound
 | 
			
		||||
	- fixed byteswapping problem in clear_32bit_ximage() function
 | 
			
		||||
	- fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
 | 
			
		||||
	- fixed memory leak in glXUseXFont()
 | 
			
		||||
	- fragment sampling in AA triangle function was off by 1/2 pixel
 | 
			
		||||
	- Windows: reading pixels from framebuffer didn't always work
 | 
			
		||||
	- glConvolutionFilter2D could segfault or cause FP exception
 | 
			
		||||
	- fixed segfaults in FX and X drivers when using tex unit 1 but not 0
 | 
			
		||||
	- GL_NAND logicop didn't work right in RGBA mode
 | 
			
		||||
	- fixed a memory corruption bug in vertex buffer reset code
 | 
			
		||||
	- clearing the softwara alpha buffer with scissoring was broken
 | 
			
		||||
	- fixed a few color index mode fog bugs
 | 
			
		||||
	- fixed some bad assertions in color index mode
 | 
			
		||||
	- fixed FX line 'stipple' bug #420091
 | 
			
		||||
    Changes:
 | 
			
		||||
	- optimized writing mono-colored pixel spans to X pixmaps
 | 
			
		||||
	- increased max viewport size to 2048 x 2048
 | 
			
		||||
 
 | 
			
		||||
@@ -29,6 +29,6 @@ endif
 | 
			
		||||
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 gl_mangle.h glu.h glu_mangle.h \
 | 
			
		||||
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
 | 
			
		||||
	$(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: gl.h,v 1.44 2000/07/13 17:45:13 brianp Exp $ */
 | 
			
		||||
/* $Id: gl.h,v 1.44.4.3 2001/03/21 15:59:49 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
@@ -44,11 +44,11 @@
 | 
			
		||||
#define OPENSTEP
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(__WIN32__)
 | 
			
		||||
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
 | 
			
		||||
#define __WIN32__
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
 | 
			
		||||
#  if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
 | 
			
		||||
#    define GLAPI __declspec(dllexport)
 | 
			
		||||
#  elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
 | 
			
		||||
@@ -63,7 +63,7 @@
 | 
			
		||||
#  define GLAPIENTRY
 | 
			
		||||
#endif /* WIN32 / CYGWIN bracket */
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
 | 
			
		||||
#include <gl/mesa_wgl.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -2228,6 +2228,19 @@ GLAPI void GLAPIENTRY glResizeBuffersMESA( void );
 | 
			
		||||
#endif /* GL_MESA_resize_bufffers */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * 220. GL_EXT_texture_env_dot3
 | 
			
		||||
 */
 | 
			
		||||
#ifndef GL_EXT_texture_env_dot3
 | 
			
		||||
#define GL_EXT_texture_env_dot3 1
 | 
			
		||||
 | 
			
		||||
#define GL_DOT3_RGB_EXT				0x8740
 | 
			
		||||
#define GL_DOT3_RGBA_EXT			0x8741
 | 
			
		||||
 | 
			
		||||
#endif /* GL_EXT_texture_env_dot3 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#else  /* GL_GLEXT_LEGACY */
 | 
			
		||||
 | 
			
		||||
#include <GL/glext.h>
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: gl_mangle.h,v 1.4 2000/01/04 08:07:09 brianp Exp $ */
 | 
			
		||||
/* $Id: gl_mangle.h,v 1.4.4.1 2001/02/19 18:29:20 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4.x
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -535,5 +535,128 @@
 | 
			
		||||
#define glCopyColorTable mglCopyColorTable
 | 
			
		||||
#define glLockArraysEXT mglLockArraysEXT
 | 
			
		||||
#define glUnlockArraysEXT mglUnlockArraysEXT
 | 
			
		||||
#define glGetFinalCombinerInputParameterivNV mglGetFinalCombinerInputParameterivNV
 | 
			
		||||
#define glGetFinalCombinerInputParameterfvNV mglGetFinalCombinerInputParameterfvNV 
 | 
			
		||||
#define glGetCombinerOutputParameterivNV mglGetCombinerOutputParameterivNV 
 | 
			
		||||
#define glGetCombinerOutputParameterfvNV mglGetCombinerOutputParameterfvNV 
 | 
			
		||||
#define glGetCombinerInputParameterivNV mglGetCombinerInputParameterivNV 
 | 
			
		||||
#define glGetCombinerInputParameterfvNV mglGetCombinerInputParameterfvNV 
 | 
			
		||||
#define glFinalCombinerInputNV mglFinalCombinerInputNV 
 | 
			
		||||
#define glCombinerOutputNV mglCombinerOutputNV 
 | 
			
		||||
#define glCombinerInputNV mglCombinerInputNV 
 | 
			
		||||
#define glCombinerParameteriNV mglCombinerParameteriNV 
 | 
			
		||||
#define glCombinerParameterivNV mglCombinerParameterivNV 
 | 
			
		||||
#define glCombinerParameterfNV mglCombinerParameterfNV 
 | 
			
		||||
#define glCombinerParameterfvNV mglCombinerParameterfvNV 
 | 
			
		||||
#define glVertexArrayRangeNV mglVertexArrayRangeNV 
 | 
			
		||||
#define glFlushVertexArrayRangeNV mglFlushVertexArrayRangeNV 
 | 
			
		||||
#define glVertexWeightPointerEXT mglVertexWeightPointerEXT 
 | 
			
		||||
#define glVertexWeightfvEXT mglVertexWeightfvEXT 
 | 
			
		||||
#define glVertexWeightfEXT mglVertexWeightfEXT 
 | 
			
		||||
#define glBlendFuncSeparateEXT mglBlendFuncSeparateEXT 
 | 
			
		||||
#define glFogCoordPointerEXT mglFogCoordPointerEXT 
 | 
			
		||||
#define glFogCoorddEXT mglFogCoorddEXT 
 | 
			
		||||
#define glFogCoordfvEXT mglFogCoordfvEXT 
 | 
			
		||||
#define glFogCoordfEXT mglFogCoordfEXT 
 | 
			
		||||
#define glLightEnviSGIX mglLightEnviSGIX 
 | 
			
		||||
#define glGetFragmentMaterialivSGIX mglGetFragmentMaterialivSGIX 
 | 
			
		||||
#define glGetFragmentMaterialfvSGIX mglGetFragmentMaterialfvSGIX 
 | 
			
		||||
#define glGetFragmentLightivSGIX mglGetFragmentLightivSGIX 
 | 
			
		||||
#define glGetFragmentLightfvSGIX mglGetFragmentLightfvSGIX 
 | 
			
		||||
#define glFragmentMaterialivSGIX mglFragmentMaterialivSGIX 
 | 
			
		||||
#define glFragmentMaterialiSGIX mglFragmentMaterialiSGIX 
 | 
			
		||||
#define glFragmentMaterialfvSGIX mglFragmentMaterialfvSGIX 
 | 
			
		||||
#define glFragmentMaterialfSGIX mglFragmentMaterialfSGIX 
 | 
			
		||||
#define glFragmentLightModelivSGIX mglFragmentLightModelivSGIX 
 | 
			
		||||
#define glFragmentLightModeliSGIX mglFragmentLightModeliSGIX 
 | 
			
		||||
#define glFragmentLightModelfvSGIX mglFragmentLightModelfvSGIX 
 | 
			
		||||
#define glFragmentLightModelfSGIX mglFragmentLightModelfSGIX 
 | 
			
		||||
#define glFragmentLightivSGIX mglFragmentLightivSGIX 
 | 
			
		||||
#define glFragmentLightiSGIX mglFragmentLightiSGIX 
 | 
			
		||||
#define glFragmentLightfvSGIX mglFragmentLightfvSGIX 
 | 
			
		||||
#define glFragmentLightfSGIX mglFragmentLightfSGIX 
 | 
			
		||||
#define glFragmentColorMaterialSGIX mglFragmentColorMaterialSGIX 
 | 
			
		||||
#define glCullParameterdvEXT mglCullParameterdvEXT 
 | 
			
		||||
#define glCullParameterfvEXT mglCullParameterfvEXT 
 | 
			
		||||
#define glIndexFuncEXT mglIndexFuncEXT 
 | 
			
		||||
#define glIndexMaterialEXT mglIndexMaterialEXT 
 | 
			
		||||
#define glListParameterivSGIX mglListParameterivSGIX 
 | 
			
		||||
#define glListParameteriSGIX mglListParameteriSGIX 
 | 
			
		||||
#define glListParameterfvSGIX mglListParameterfvSGIX 
 | 
			
		||||
#define glListParameterfSGIX mglListParameterfSGIX 
 | 
			
		||||
#define glGetListParameterivSGIX mglGetListParameterivSGIX 
 | 
			
		||||
#define glGetListParameterfvSGIX mglGetListParameterfvSGIX 
 | 
			
		||||
#define glHintPGI mglHintPGI 
 | 
			
		||||
#define glCopyColorSubTableEXT mglCopyColorSubTableEXT 
 | 
			
		||||
#define glFlushRasterSGIX mglFlushRasterSGIX 
 | 
			
		||||
#define glReferencePlaneSGIX mglReferencePlaneSGIX 
 | 
			
		||||
#define glTagSampleBufferSGIX mglTagSampleBufferSGIX 
 | 
			
		||||
#define glFrameZoomSGIX mglFrameZoomSGIX 
 | 
			
		||||
#define glGetInstrumentsSGIX mglGetInstrumentsSGIX 
 | 
			
		||||
#define glPollInstrumentsSGIX mglPollInstrumentsSGIX 
 | 
			
		||||
#define glReadInstrumentsSGIX mglReadInstrumentsSGIX 
 | 
			
		||||
#define glStopInstrumentsSGIX mglStopInstrumentsSGIX 
 | 
			
		||||
#define glStartInstrumentsSGIX mglStartInstrumentsSGIX 
 | 
			
		||||
#define glInstrumentsBufferSGIX mglInstrumentsBufferSGIX 
 | 
			
		||||
#define glPointParameterfvSGIS mglPointParameterfvSGIS 
 | 
			
		||||
#define glPointParameterfSGIS mglPointParameterfSGIS 
 | 
			
		||||
#define glSpriteParameterivSGIX mglSpriteParameterivSGIX 
 | 
			
		||||
#define glSpriteParameteriSGIX mglSpriteParameteriSGIX 
 | 
			
		||||
#define glSpriteParameterfvSGIX mglSpriteParameterfvSGIX 
 | 
			
		||||
#define glSpriteParameterfSGIX mglSpriteParameterfSGIX 
 | 
			
		||||
#define glSamplePatternSGIS mglSamplePatternSGIS 
 | 
			
		||||
#define glSampleMaskSGIS mglSampleMaskSGIS 
 | 
			
		||||
#define glSharpenTexFuncSGIS mglSharpenTexFuncSGIS 
 | 
			
		||||
#define glGetSharpenTexFuncSGIS mglGetSharpenTexFuncSGIS 
 | 
			
		||||
#define glGetDetailTexFuncSGIS mglGetDetailTexFuncSGIS 
 | 
			
		||||
#define glDetailTexFuncSGIS mglDetailTexFuncSGIS 
 | 
			
		||||
#define glTexSubImage4DSGIS mglTexSubImage4DSGIS 
 | 
			
		||||
#define glTexImage4DSGIS mglTexImage4DSGIS 
 | 
			
		||||
#define glGetPixelTexGenParameterivSGIS mglGetPixelTexGenParameterivSGIS 
 | 
			
		||||
#define glGetPixelTexGenParameterfvSGIS mglGetPixelTexGenParameterfvSGIS 
 | 
			
		||||
#define glPixelTexGenParameteriSGIS mglPixelTexGenParameteriSGIS 
 | 
			
		||||
#define glPixelTexGenParameterfSGIS mglPixelTexGenParameterfSGIS 
 | 
			
		||||
#define glGetColorTableParameterivSGI mglGetColorTableParameterivSGI 
 | 
			
		||||
#define glGetColorTableParameterfvSGI mglGetColorTableParameterfvSGI 
 | 
			
		||||
#define glGetColorTableSGI mglGetColorTableSGI 
 | 
			
		||||
#define glCopyColorTableSGI mglCopyColorTableSGI 
 | 
			
		||||
#define glColorTableParameterivSGI mglColorTableParameterivSGI 
 | 
			
		||||
#define glColorTableParameterfvSGI mglColorTableParameterfvSGI 
 | 
			
		||||
#define glColorTableSGI mglColorTableSGI 
 | 
			
		||||
#define glSeparableFilter2DEXT mglSeparableFilter2DEXT 
 | 
			
		||||
#define glGetSeparableFilterEXT mglGetSeparableFilterEXT 
 | 
			
		||||
#define glGetConvolutionParameterfvEXT mglGetConvolutionParameterfvEXT 
 | 
			
		||||
#define glGetConvolutionParameterivEXT mglGetConvolutionParameterivEXT 
 | 
			
		||||
#define glGetConvolutionFilterEXT mglGetConvolutionFilterEXT 
 | 
			
		||||
#define glCopyConvolutionFilter2DEXT mglCopyConvolutionFilter2DEXT 
 | 
			
		||||
#define glCopyConvolutionFilter1DEXT mglCopyConvolutionFilter1DEXT 
 | 
			
		||||
#define glConvolutionParameterivEXT mglConvolutionParameterivEXT 
 | 
			
		||||
#define glConvolutionParameteriEXT mglConvolutionParameteriEXT 
 | 
			
		||||
#define glConvolutionParameterfvEXT mglConvolutionParameterfvEXT 
 | 
			
		||||
#define glConvolutionParameterfEXT mglConvolutionParameterfEXT 
 | 
			
		||||
#define glConvolutionFilter2DEXT mglConvolutionFilter2DEXT 
 | 
			
		||||
#define glConvolutionFilter1DEXT mglConvolutionFilter1DEXT 
 | 
			
		||||
#define glResetMinmaxEXT mglResetMinmaxEXT 
 | 
			
		||||
#define glResetHistogramEXT mglResetHistogramEXT 
 | 
			
		||||
#define glMinmaxEXT mglMinmaxEXT 
 | 
			
		||||
#define glHistogramEXT mglHistogramEXT 
 | 
			
		||||
#define glGetMinmaxParameterivEXT mglGetMinmaxParameterivEXT 
 | 
			
		||||
#define glGetMinmaxParameterfvEXT mglGetMinmaxParameterfvEXT 
 | 
			
		||||
#define glGetMinmaxEXT mglGetMinmaxEXT 
 | 
			
		||||
#define glGetHistogramParameterivEXT mglGetHistogramParameterivEXT 
 | 
			
		||||
#define glGetHistogramParameterfvEXT mglGetHistogramParameterfvEXT 
 | 
			
		||||
#define glGetHistogramEXT mglGetHistogramEXT 
 | 
			
		||||
#define glCopyTexSubImage2DEXT mglCopyTexSubImage2DEXT 
 | 
			
		||||
#define glCopyTexSubImage1DEXT mglCopyTexSubImage1DEXT 
 | 
			
		||||
#define glCopyTexImage2DEXT mglCopyTexImage2DEXT 
 | 
			
		||||
#define glCopyTexImage1DEXT mglCopyTexImage1DEXT 
 | 
			
		||||
#define glTexSubImage2DEXT mglTexSubImage2DEXT 
 | 
			
		||||
#define glTexSubImage1DEXT mglTexSubImage1DEXT 
 | 
			
		||||
#define glSampleCoverageARB mglSampleCoverageARB 
 | 
			
		||||
#define glSamplePassARB mglSamplePassARB 
 | 
			
		||||
#define glMultTransposeMatrixfARB mglMultTransposeMatrixfARB 
 | 
			
		||||
#define glMultTransposeMatrixdARB mglMultTransposeMatrixdARB 
 | 
			
		||||
#define glLoadTransposeMatrixfARB mglLoadTransposeMatrixfARB 
 | 
			
		||||
#define glLoadTransposeMatrixdARB mglLoadTransposeMatrixdARB 
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -13,21 +13,21 @@ extern "C" {
 | 
			
		||||
** 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)
 | 
			
		||||
@@ -46,7 +46,7 @@ extern "C" {
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
/* Header file version number, required by OpenGL ABI for Linux */
 | 
			
		||||
#define GL_GLEXT_VERSION 6
 | 
			
		||||
#define GL_GLEXT_VERSION 7
 | 
			
		||||
 | 
			
		||||
#ifndef GL_VERSION_1_2
 | 
			
		||||
#define GL_CONSTANT_COLOR                 0x8001
 | 
			
		||||
@@ -220,12 +220,57 @@ extern "C" {
 | 
			
		||||
#define GL_COMPRESSED_RGB_ARB             0x84ED
 | 
			
		||||
#define GL_COMPRESSED_RGBA_ARB            0x84EE
 | 
			
		||||
#define GL_TEXTURE_COMPRESSION_HINT_ARB   0x84EF
 | 
			
		||||
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB         0x86A0
 | 
			
		||||
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
 | 
			
		||||
#define GL_TEXTURE_COMPRESSED_ARB         0x86A1
 | 
			
		||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
 | 
			
		||||
#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_ARB_vertex_blend
 | 
			
		||||
#define GL_MAX_VERTEX_UNITS_ARB           0x86A4
 | 
			
		||||
#define GL_ACTIVE_VERTEX_UNITS_ARB        0x86A5
 | 
			
		||||
#define GL_WEIGHT_SUM_UNITY_ARB           0x86A6
 | 
			
		||||
#define GL_VERTEX_BLEND_ARB               0x86A7
 | 
			
		||||
#define GL_CURRENT_WEIGHT_ARB             0x86A8
 | 
			
		||||
#define GL_WEIGHT_ARRAY_TYPE_ARB          0x86A9
 | 
			
		||||
#define GL_WEIGHT_ARRAY_STRIDE_ARB        0x86AA
 | 
			
		||||
#define GL_WEIGHT_ARRAY_SIZE_ARB          0x86AB
 | 
			
		||||
#define GL_WEIGHT_ARRAY_POINTER_ARB       0x86AC
 | 
			
		||||
#define GL_WEIGHT_ARRAY_ARB               0x86AD
 | 
			
		||||
#define GL_MODELVIEW0_ARB                 0x1700
 | 
			
		||||
#define GL_MODELVIEW1_ARB                 0x850A
 | 
			
		||||
#define GL_MODELVIEW2_ARB                 0x8722
 | 
			
		||||
#define GL_MODELVIEW3_ARB                 0x8723
 | 
			
		||||
#define GL_MODELVIEW4_ARB                 0x8724
 | 
			
		||||
#define GL_MODELVIEW5_ARB                 0x8725
 | 
			
		||||
#define GL_MODELVIEW6_ARB                 0x8726
 | 
			
		||||
#define GL_MODELVIEW7_ARB                 0x8727
 | 
			
		||||
#define GL_MODELVIEW8_ARB                 0x8728
 | 
			
		||||
#define GL_MODELVIEW9_ARB                 0x8729
 | 
			
		||||
#define GL_MODELVIEW10_ARB                0x872A
 | 
			
		||||
#define GL_MODELVIEW11_ARB                0x872B
 | 
			
		||||
#define GL_MODELVIEW12_ARB                0x872C
 | 
			
		||||
#define GL_MODELVIEW13_ARB                0x872D
 | 
			
		||||
#define GL_MODELVIEW14_ARB                0x872E
 | 
			
		||||
#define GL_MODELVIEW15_ARB                0x872F
 | 
			
		||||
#define GL_MODELVIEW16_ARB                0x8730
 | 
			
		||||
#define GL_MODELVIEW17_ARB                0x8731
 | 
			
		||||
#define GL_MODELVIEW18_ARB                0x8732
 | 
			
		||||
#define GL_MODELVIEW19_ARB                0x8733
 | 
			
		||||
#define GL_MODELVIEW20_ARB                0x8734
 | 
			
		||||
#define GL_MODELVIEW21_ARB                0x8735
 | 
			
		||||
#define GL_MODELVIEW22_ARB                0x8736
 | 
			
		||||
#define GL_MODELVIEW23_ARB                0x8737
 | 
			
		||||
#define GL_MODELVIEW24_ARB                0x8738
 | 
			
		||||
#define GL_MODELVIEW25_ARB                0x8739
 | 
			
		||||
#define GL_MODELVIEW26_ARB                0x873A
 | 
			
		||||
#define GL_MODELVIEW27_ARB                0x873B
 | 
			
		||||
#define GL_MODELVIEW28_ARB                0x873C
 | 
			
		||||
#define GL_MODELVIEW29_ARB                0x873D
 | 
			
		||||
#define GL_MODELVIEW30_ARB                0x873E
 | 
			
		||||
#define GL_MODELVIEW31_ARB                0x873F
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_EXT_abgr
 | 
			
		||||
#define GL_ABGR_EXT                       0x8000
 | 
			
		||||
#endif
 | 
			
		||||
@@ -670,6 +715,18 @@ extern "C" {
 | 
			
		||||
#ifndef GL_SGIX_tag_sample_buffer
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_FfdMaskSGIX
 | 
			
		||||
#define GL_TEXTURE_DEFORMATION_BIT_SGIX   0x00000001
 | 
			
		||||
#define GL_GEOMETRY_DEFORMATION_BIT_SGIX  0x00000002
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_polynomial_ffd
 | 
			
		||||
#define GL_GEOMETRY_DEFORMATION_SGIX      0x8194
 | 
			
		||||
#define GL_TEXTURE_DEFORMATION_SGIX       0x8195
 | 
			
		||||
#define GL_DEFORMATIONS_MASK_SGIX         0x8196
 | 
			
		||||
#define GL_MAX_DEFORMATION_ORDER_SGIX     0x8197
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_reference_plane
 | 
			
		||||
#define GL_REFERENCE_PLANE_SGIX           0x817D
 | 
			
		||||
#define GL_REFERENCE_PLANE_EQUATION_SGIX  0x817E
 | 
			
		||||
@@ -785,6 +842,14 @@ extern "C" {
 | 
			
		||||
#define GL_COLOR_INDEX8_EXT               0x80E5
 | 
			
		||||
#define GL_COLOR_INDEX12_EXT              0x80E6
 | 
			
		||||
#define GL_COLOR_INDEX16_EXT              0x80E7
 | 
			
		||||
#define GL_COLOR_TABLE_FORMAT_EXT         0x80D8
 | 
			
		||||
#define GL_COLOR_TABLE_WIDTH_EXT          0x80D9
 | 
			
		||||
#define GL_COLOR_TABLE_RED_SIZE_EXT       0x80DA
 | 
			
		||||
#define GL_COLOR_TABLE_GREEN_SIZE_EXT     0x80DB
 | 
			
		||||
#define GL_COLOR_TABLE_BLUE_SIZE_EXT      0x80DC
 | 
			
		||||
#define GL_COLOR_TABLE_ALPHA_SIZE_EXT     0x80DD
 | 
			
		||||
#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
 | 
			
		||||
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
 | 
			
		||||
#define GL_TEXTURE_INDEX_SIZE_EXT         0x80ED
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -926,6 +991,24 @@ extern "C" {
 | 
			
		||||
#define GL_BGRA_EXT                       0x80E1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_async
 | 
			
		||||
#define GL_ASYNC_MARKER_SGIX              0x8329
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_async_pixel
 | 
			
		||||
#define GL_ASYNC_TEX_IMAGE_SGIX           0x835C
 | 
			
		||||
#define GL_ASYNC_DRAW_PIXELS_SGIX         0x835D
 | 
			
		||||
#define GL_ASYNC_READ_PIXELS_SGIX         0x835E
 | 
			
		||||
#define GL_MAX_ASYNC_TEX_IMAGE_SGIX       0x835F
 | 
			
		||||
#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX     0x8360
 | 
			
		||||
#define GL_MAX_ASYNC_READ_PIXELS_SGIX     0x8361
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_async_histogram
 | 
			
		||||
#define GL_ASYNC_HISTOGRAM_SGIX           0x832C
 | 
			
		||||
#define GL_MAX_ASYNC_HISTOGRAM_SGIX       0x832D
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_INTEL_texture_scissor
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -1419,6 +1502,11 @@ extern "C" {
 | 
			
		||||
#define GL_TEXTURE_COLOR_WRITEMASK_SGIS   0x81EF
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_EXT_texture_env_dot3
 | 
			
		||||
#define GL_DOT3_RGB_EXT                   0x8740
 | 
			
		||||
#define GL_DOT3_RGBA_EXT                  0x8741
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*************************************************************/
 | 
			
		||||
 | 
			
		||||
@@ -1658,15 +1746,9 @@ typedef void (APIENTRY * PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bia
 | 
			
		||||
#define GL_EXT_texture3D 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
extern void APIENTRY glTexImage3DEXT (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_EXT_subtexture
 | 
			
		||||
/*#define GL_EXT_subtexture 1*/
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
extern void APIENTRY glTexSubImage3DEXT (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRY * PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
 | 
			
		||||
typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -2038,6 +2120,20 @@ extern void APIENTRY glTagSampleBufferSGIX (void);
 | 
			
		||||
typedef void (APIENTRY * PFNGLTAGSAMPLEBUFFERSGIXPROC) (void);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_polynomial_ffd
 | 
			
		||||
#define GL_SGIX_polynomial_ffd 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
extern void APIENTRY glDeformationMap3dSGIX (GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
 | 
			
		||||
extern void APIENTRY glDeformationMap3fSGIX (GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
 | 
			
		||||
extern void APIENTRY glDeformSGIX (GLbitfield);
 | 
			
		||||
extern void APIENTRY glLoadIdentityDeformationMapSGIX (GLbitfield);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRY * PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points);
 | 
			
		||||
typedef void (APIENTRY * PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points);
 | 
			
		||||
typedef void (APIENTRY * PFNGLDEFORMSGIXPROC) (GLbitfield mask);
 | 
			
		||||
typedef void (APIENTRY * PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_reference_plane
 | 
			
		||||
#define GL_SGIX_reference_plane 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
@@ -2306,6 +2402,32 @@ typedef void (APIENTRY * PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode)
 | 
			
		||||
#define GL_EXT_bgra 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_async
 | 
			
		||||
#define GL_SGIX_async 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
extern void APIENTRY glAsyncMarkerSGIX (GLuint);
 | 
			
		||||
extern GLint APIENTRY glFinishAsyncSGIX (GLuint *);
 | 
			
		||||
extern GLint APIENTRY glPollAsyncSGIX (GLuint *);
 | 
			
		||||
extern GLuint APIENTRY glGenAsyncMarkersSGIX (GLsizei);
 | 
			
		||||
extern void APIENTRY glDeleteAsyncMarkersSGIX (GLuint, GLsizei);
 | 
			
		||||
extern GLboolean APIENTRY glIsAsyncMarkerSGIX (GLuint);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRY * PFNGLASYNCMARKERSGIXPROC) (GLuint marker);
 | 
			
		||||
typedef GLint (APIENTRY * PFNGLFINISHASYNCSGIXPROC) (GLuint *markerp);
 | 
			
		||||
typedef GLint (APIENTRY * PFNGLPOLLASYNCSGIXPROC) (GLuint *markerp);
 | 
			
		||||
typedef GLuint (APIENTRY * PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range);
 | 
			
		||||
typedef void (APIENTRY * PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range);
 | 
			
		||||
typedef GLboolean (APIENTRY * PFNGLISASYNCMARKERSGIXPROC) (GLuint marker);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_async_pixel
 | 
			
		||||
#define GL_SGIX_async_pixel 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_async_histogram
 | 
			
		||||
#define GL_SGIX_async_histogram 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_INTEL_parallel_arrays
 | 
			
		||||
#define GL_INTEL_parallel_arrays 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
@@ -2712,12 +2834,6 @@ extern void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum,
 | 
			
		||||
extern void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
 | 
			
		||||
extern void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
 | 
			
		||||
extern void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
 | 
			
		||||
#ifdef VMS
 | 
			
		||||
   #define glGetCombinerOutputParameterfvNV glGetCombinerOutputParameterfvN
 | 
			
		||||
   #define glGetCombinerOutputParameterivNV glGetCombinerOutputParameterivN
 | 
			
		||||
   #define glGetFinalCombinerInputParameterfvNV glGetFinalCombinerInputParafvNV
 | 
			
		||||
   #define glGetFinalCombinerInputParameterivNV glGetFinalCombinerInputParaivNV
 | 
			
		||||
#endif
 | 
			
		||||
extern void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum, GLenum, GLfloat *);
 | 
			
		||||
extern void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum, GLenum, GLint *);
 | 
			
		||||
extern void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum, GLfloat *);
 | 
			
		||||
@@ -2918,6 +3034,18 @@ extern void APIENTRY glTextureColorMaskSGIS (GLboolean, GLboolean, GLboolean, GL
 | 
			
		||||
typedef void (APIENTRY * PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_SGIX_igloo_interface
 | 
			
		||||
#define GL_SGIX_igloo_interface 1
 | 
			
		||||
#ifdef GL_GLEXT_PROTOTYPES
 | 
			
		||||
extern void APIENTRY glIglooInterfaceSGIX (GLenum, const GLvoid *);
 | 
			
		||||
#endif /* GL_GLEXT_PROTOTYPES */
 | 
			
		||||
typedef void (APIENTRY * PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid *params);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef GL_EXT_texture_env_dot3
 | 
			
		||||
#define GL_EXT_texture_env_dot3 1
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glu.h,v 1.22 2000/07/11 14:11:44 brianp Exp $ */
 | 
			
		||||
/* $Id: glu.h,v 1.22.4.1 2000/10/26 15:32:46 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -200,7 +200,7 @@ extern "C" {
 | 
			
		||||
#define GLU_NURBS_ERROR37	100287   /* duplicate point on pwlcurve */
 | 
			
		||||
 | 
			
		||||
/* GLU 1.3 and later */
 | 
			
		||||
#define GLU_NURBS_MODE ?
 | 
			
		||||
#define GLU_NURBS_MODE		100160
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Errors */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: glx.h,v 1.22 2000/06/23 17:39:18 brianp Exp $ */
 | 
			
		||||
/* $Id: glx.h,v 1.22.4.1 2000/11/25 18:52:02 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -158,7 +158,7 @@ extern "C" {
 | 
			
		||||
#define GLX_DAMAGED			0x8020
 | 
			
		||||
#define GLX_SAVED			0x8021
 | 
			
		||||
#define GLX_WINDOW			0x8022
 | 
			
		||||
#define GLX_PBUFFER			0x8033
 | 
			
		||||
#define GLX_PBUFFER			0x8023
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: mesa_wgl.h,v 1.5 2000/05/22 16:21:27 brianp Exp $ */
 | 
			
		||||
/* $Id: mesa_wgl.h,v 1.5.4.1 2000/11/20 17:31:51 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -32,6 +32,7 @@
 | 
			
		||||
#define _mesa_wgl_h_
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include <gl/gl.h>
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										880
									
								
								include/GL/vms_x_fix.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										880
									
								
								include/GL/vms_x_fix.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,880 @@
 | 
			
		||||
/***************************************************************************
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 * Repair definitions of Xlib when compileing with /name=(as_is) on VMS    *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 * Author : Jouk Jansen (joukj@hrem.stm.tudelft.nl)                        *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 * Last revision : 22 August 2000                                          *
 | 
			
		||||
 *                                                                         *
 | 
			
		||||
 ***************************************************************************/
 | 
			
		||||
 | 
			
		||||
#ifndef VMS_X_FIX
 | 
			
		||||
#define VMS_X_FIX
 | 
			
		||||
 | 
			
		||||
#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE 
 | 
			
		||||
#define XAllocClassHint XALLOCCLASSHINT
 | 
			
		||||
#define XAllocColor XALLOCCOLOR
 | 
			
		||||
#define XAllocColorCells XALLOCCOLORCELLS
 | 
			
		||||
#define XAllocSizeHints XALLOCSIZEHINTS
 | 
			
		||||
#define XAllocWMHints XALLOCWMHINTS
 | 
			
		||||
#define XAutoRepeatOff XAUTOREPEATOFF
 | 
			
		||||
#define XAutoRepeatOn XAUTOREPEATON
 | 
			
		||||
#define XBaseFontNameListOfFontSet XBASEFONTNAMELISTOFFONTSET
 | 
			
		||||
#define XBell XBELL
 | 
			
		||||
#define XBitmapPad XBITMAPPAD
 | 
			
		||||
#define XChangeActivePointerGrab XCHANGEACTIVEPOINTERGRAB
 | 
			
		||||
#define XChangeGC XCHANGEGC
 | 
			
		||||
#define XChangeProperty XCHANGEPROPERTY
 | 
			
		||||
#define XChangeWindowAttributes XCHANGEWINDOWATTRIBUTES
 | 
			
		||||
#define XCheckIfEvent XCHECKIFEVENT
 | 
			
		||||
#define XCheckMaskEvent XCHECKMASKEVENT
 | 
			
		||||
#define XCheckTypedWindowEvent XCHECKTYPEDWINDOWEVENT
 | 
			
		||||
#define XCheckWindowEvent XCHECKWINDOWEVENT
 | 
			
		||||
#define XClearArea XCLEARAREA
 | 
			
		||||
#define XClearWindow XCLEARWINDOW
 | 
			
		||||
#define XClipBox XCLIPBOX
 | 
			
		||||
#define XCloseDisplay XCLOSEDISPLAY
 | 
			
		||||
#define XCloseIM XCLOSEIM
 | 
			
		||||
#define XConfigureWindow XCONFIGUREWINDOW
 | 
			
		||||
#define XConvertSelection XCONVERTSELECTION
 | 
			
		||||
#define XCopyArea XCOPYAREA
 | 
			
		||||
#define XCopyGC XCOPYGC
 | 
			
		||||
#define XCopyPlane XCOPYPLANE
 | 
			
		||||
#define XCreateBitmapFromData XCREATEBITMAPFROMDATA
 | 
			
		||||
#define XCreateColormap XCREATECOLORMAP
 | 
			
		||||
#define XCreateFontCursor XCREATEFONTCURSOR
 | 
			
		||||
#define XCreateFontSet XCREATEFONTSET
 | 
			
		||||
#define XCreateGC XCREATEGC
 | 
			
		||||
#define XCreateIC XCREATEIC
 | 
			
		||||
#define XCreateImage XCREATEIMAGE
 | 
			
		||||
#define XCreatePixmap XCREATEPIXMAP
 | 
			
		||||
#define XCreatePixmapCursor XCREATEPIXMAPCURSOR
 | 
			
		||||
#define XCreatePixmapFromBitmapData XCREATEPIXMAPFROMBITMAPDATA
 | 
			
		||||
#define XCreateRegion XCREATEREGION
 | 
			
		||||
#define XCreateSimpleWindow XCREATESIMPLEWINDOW
 | 
			
		||||
#define XCreateWindow XCREATEWINDOW
 | 
			
		||||
#define XDefaultScreenOfDisplay XDEFAULTSCREENOFDISPLAY
 | 
			
		||||
#define XDefineCursor XDEFINECURSOR
 | 
			
		||||
#define XDeleteProperty XDELETEPROPERTY
 | 
			
		||||
#define XDestroyIC XDESTROYIC
 | 
			
		||||
#define XDestroyRegion XDESTROYREGION
 | 
			
		||||
#define XDestroyWindow XDESTROYWINDOW
 | 
			
		||||
#define XDisplayName XDISPLAYNAME
 | 
			
		||||
#define XDisplayOfScreen XDISPLAYOFSCREEN
 | 
			
		||||
#define XDrawArc XDRAWARC
 | 
			
		||||
#define XDrawImageString XDRAWIMAGESTRING
 | 
			
		||||
#define XDrawImageString16 XDRAWIMAGESTRING16
 | 
			
		||||
#define XDrawLine XDRAWLINE
 | 
			
		||||
#define XDrawLines XDRAWLINES
 | 
			
		||||
#define XDrawPoint XDRAWPOINT
 | 
			
		||||
#define XDrawPoints XDRAWPOINTS
 | 
			
		||||
#define XDrawRectangle XDRAWRECTANGLE
 | 
			
		||||
#define XDrawSegments XDRAWSEGMENTS
 | 
			
		||||
#define XDrawString XDRAWSTRING
 | 
			
		||||
#define XDrawString16 XDRAWSTRING16
 | 
			
		||||
#define XEmptyRegion XEMPTYREGION
 | 
			
		||||
#define XEqualRegion XEQUALREGION
 | 
			
		||||
#define XEventsQueued XEVENTSQUEUED
 | 
			
		||||
#define XExtentsOfFontSet XEXTENTSOFFONTSET
 | 
			
		||||
#define XFillArc XFILLARC
 | 
			
		||||
#define XFillPolygon XFILLPOLYGON
 | 
			
		||||
#define XFillRectangle XFILLRECTANGLE
 | 
			
		||||
#define XFillRectangles XFILLRECTANGLES
 | 
			
		||||
#define XFilterEvent XFILTEREVENT
 | 
			
		||||
#define XFlush XFLUSH
 | 
			
		||||
#define XFontsOfFontSet XFONTSOFFONTSET
 | 
			
		||||
#define XFree XFREE
 | 
			
		||||
#define XFreeColormap XFREECOLORMAP
 | 
			
		||||
#define XFreeColors XFREECOLORS
 | 
			
		||||
#define XFreeCursor XFREECURSOR
 | 
			
		||||
#define XFreeFont XFREEFONT
 | 
			
		||||
#define XFreeFontInfo XFREEFONTINFO
 | 
			
		||||
#define XFreeFontNames XFREEFONTNAMES
 | 
			
		||||
#define XFreeFontSet XFREEFONTSET
 | 
			
		||||
#define XFreeGC XFREEGC
 | 
			
		||||
#define XFreeModifiermap XFREEMODIFIERMAP
 | 
			
		||||
#define XFreePixmap XFREEPIXMAP
 | 
			
		||||
#define XFreeStringList XFREESTRINGLIST
 | 
			
		||||
#define XGetAtomName XGETATOMNAME
 | 
			
		||||
#define XGetDefault XGETDEFAULT
 | 
			
		||||
#define XGetErrorDatabaseText XGETERRORDATABASETEXT
 | 
			
		||||
#define XGetErrorText XGETERRORTEXT
 | 
			
		||||
#define XGetFontProperty XGETFONTPROPERTY
 | 
			
		||||
#define XGetGCValues XGETGCVALUES
 | 
			
		||||
#define XGetGeometry XGETGEOMETRY
 | 
			
		||||
#define XGetICValues XGETICVALUES
 | 
			
		||||
#define XGetIMValues XGETIMVALUES
 | 
			
		||||
#define XGetImage XGETIMAGE
 | 
			
		||||
#define XGetKeyboardControl XGETKEYBOARDCONTROL
 | 
			
		||||
#define XGetModifierMapping XGETMODIFIERMAPPING
 | 
			
		||||
#define XGetMotionEvents XGETMOTIONEVENTS
 | 
			
		||||
#define XGetNormalHints XGETNORMALHINTS
 | 
			
		||||
#define XGetSelectionOwner XGETSELECTIONOWNER
 | 
			
		||||
#define XGetSubImage XGETSUBIMAGE
 | 
			
		||||
#define XGetVisualInfo XGETVISUALINFO
 | 
			
		||||
#define XGetWMColormapWindows XGETWMCOLORMAPWINDOWS
 | 
			
		||||
#define XGetWMHints XGETWMHINTS
 | 
			
		||||
#define XGetWMName XGETWMNAME
 | 
			
		||||
#define XGetWMNormalHints XGETWMNORMALHINTS
 | 
			
		||||
#define XGetWindowAttributes XGETWINDOWATTRIBUTES
 | 
			
		||||
#define XGetWindowProperty XGETWINDOWPROPERTY
 | 
			
		||||
#define XGrabKeyboard XGRABKEYBOARD
 | 
			
		||||
#define XGrabPointer XGRABPOINTER
 | 
			
		||||
#define XGrabServer XGRABSERVER
 | 
			
		||||
#define XHeightOfScreen XHEIGHTOFSCREEN
 | 
			
		||||
#define XIfEvent XIFEVENT
 | 
			
		||||
#define XInternAtom XINTERNATOM
 | 
			
		||||
#define XIntersectRegion XINTERSECTREGION
 | 
			
		||||
#define XKeycodeToKeysym XKEYCODETOKEYSYM
 | 
			
		||||
#define XKeysymToKeycode XKEYSYMTOKEYCODE
 | 
			
		||||
#define XKeysymToString XKEYSYMTOSTRING
 | 
			
		||||
#define XListFonts XLISTFONTS
 | 
			
		||||
#define XListFontsWithInfo XLISTFONTSWITHINFO
 | 
			
		||||
#define XListPixmapFormats XLISTPIXMAPFORMATS
 | 
			
		||||
#define XListProperties XLISTPROPERTIES
 | 
			
		||||
#define XLoadQueryFont XLOADQUERYFONT
 | 
			
		||||
#define XLookupString XLOOKUPSTRING
 | 
			
		||||
#define XLowerWindow XLOWERWINDOW
 | 
			
		||||
#define XMapRaised XMAPRAISED
 | 
			
		||||
#define XMapWindow XMAPWINDOW
 | 
			
		||||
#define XMatchVisualInfo XMATCHVISUALINFO
 | 
			
		||||
#define XMoveResizeWindow XMOVERESIZEWINDOW
 | 
			
		||||
#define XMoveWindow XMOVEWINDOW
 | 
			
		||||
#define XNextEvent XNEXTEVENT
 | 
			
		||||
#define XOffsetRegion XOFFSETREGION
 | 
			
		||||
#define XOpenDisplay XOPENDISPLAY
 | 
			
		||||
#define XOpenIM XOPENIM
 | 
			
		||||
#define XParseColor XPARSECOLOR
 | 
			
		||||
#define XParseGeometry XPARSEGEOMETRY
 | 
			
		||||
#define XPeekEvent XPEEKEVENT
 | 
			
		||||
#define XPending XPENDING
 | 
			
		||||
#define XPointInRegion XPOINTINREGION
 | 
			
		||||
#define XPolygonRegion XPOLYGONREGION
 | 
			
		||||
#define XPutBackEvent XPUTBACKEVENT
 | 
			
		||||
#define XPutImage XPUTIMAGE
 | 
			
		||||
#define XQueryColor XQUERYCOLOR
 | 
			
		||||
#define XQueryColors XQUERYCOLORS
 | 
			
		||||
#define XQueryExtension XQUERYEXTENSION
 | 
			
		||||
#define XQueryPointer XQUERYPOINTER
 | 
			
		||||
#define XQueryTree XQUERYTREE
 | 
			
		||||
#define XRaiseWindow XRAISEWINDOW
 | 
			
		||||
#define XReconfigureWMWindow XRECONFIGUREWMWINDOW
 | 
			
		||||
#define XRectInRegion XRECTINREGION
 | 
			
		||||
#define XRefreshKeyboardMapping XREFRESHKEYBOARDMAPPING
 | 
			
		||||
#define XReparentWindow XREPARENTWINDOW
 | 
			
		||||
#define XResizeWindow XRESIZEWINDOW
 | 
			
		||||
#define XRestackWindows XRESTACKWINDOWS
 | 
			
		||||
#define XRootWindowOfScreen XROOTWINDOWOFSCREEN
 | 
			
		||||
#define XScreenNumberOfScreen XSCREENNUMBEROFSCREEN
 | 
			
		||||
#define XSelectAsyncEvent XSELECTASYNCEVENT
 | 
			
		||||
#define XSelectAsyncInput XSELECTASYNCINPUT
 | 
			
		||||
#define XSelectInput XSELECTINPUT
 | 
			
		||||
#define XSendEvent XSENDEVENT
 | 
			
		||||
#define XServerVendor XSERVERVENDOR
 | 
			
		||||
#define XSetBackground XSETBACKGROUND
 | 
			
		||||
#define XSetClassHint XSETCLASSHINT
 | 
			
		||||
#define XSetClipMask XSETCLIPMASK
 | 
			
		||||
#define XSetClipOrigin XSETCLIPORIGIN
 | 
			
		||||
#define XSetClipRectangles XSETCLIPRECTANGLES
 | 
			
		||||
#define XSetCloseDownMode XSETCLOSEDOWNMODE
 | 
			
		||||
#define XSetCommand XSETCOMMAND
 | 
			
		||||
#define XSetDashes XSETDASHES
 | 
			
		||||
#define XSetErrorHandler XSETERRORHANDLER
 | 
			
		||||
#define XSetFillStyle XSETFILLSTYLE
 | 
			
		||||
#define XSetFont XSETFONT
 | 
			
		||||
#define XSetForeground XSETFOREGROUND
 | 
			
		||||
#define XSetFunction XSETFUNCTION
 | 
			
		||||
#define XSetGraphicsExposures XSETGRAPHICSEXPOSURES
 | 
			
		||||
#define XSetICFocus XSETICFOCUS
 | 
			
		||||
#define XSetICValues XSETICVALUES
 | 
			
		||||
#define XSetIOErrorHandler XSETIOERRORHANDLER
 | 
			
		||||
#define XSetInputFocus XSETINPUTFOCUS
 | 
			
		||||
#define XSetLineAttributes XSETLINEATTRIBUTES
 | 
			
		||||
#define XSetLocaleModifiers XSETLOCALEMODIFIERS
 | 
			
		||||
#define XSetNormalHints XSETNORMALHINTS
 | 
			
		||||
#define XSetRegion XSETREGION
 | 
			
		||||
#define XSetSelectionOwner XSETSELECTIONOWNER
 | 
			
		||||
#define XSetStipple XSETSTIPPLE
 | 
			
		||||
#define XSetSubwindowMode XSETSUBWINDOWMODE
 | 
			
		||||
#define XSetTSOrigin XSETTSORIGIN
 | 
			
		||||
#define XSetTile XSETTILE
 | 
			
		||||
#define XSetTransientForHint XSETTRANSIENTFORHINT
 | 
			
		||||
#define XSetWMColormapWindows XSETWMCOLORMAPWINDOWS
 | 
			
		||||
#define XSetWMHints XSETWMHINTS
 | 
			
		||||
#define XSetWMIconName XSETWMICONNAME
 | 
			
		||||
#define XSetWMName XSETWMNAME
 | 
			
		||||
#define XSetWMNormalHints XSETWMNORMALHINTS
 | 
			
		||||
#define XSetWMProperties XSETWMPROPERTIES
 | 
			
		||||
#define XSetWMProtocols XSETWMPROTOCOLS
 | 
			
		||||
#define XSetWindowBackground XSETWINDOWBACKGROUND
 | 
			
		||||
#define XSetWindowBackgroundPixmap XSETWINDOWBACKGROUNDPIXMAP
 | 
			
		||||
#define XSetWindowColormap XSETWINDOWCOLORMAP
 | 
			
		||||
#define XShapeCombineMask XSHAPECOMBINEMASK
 | 
			
		||||
#define XShapeCombineRectangles XSHAPECOMBINERECTANGLES
 | 
			
		||||
#define XShapeGetRectangles XSHAPEGETRECTANGLES
 | 
			
		||||
#define XShrinkRegion XSHRINKREGION
 | 
			
		||||
#define XStoreColor XSTORECOLOR
 | 
			
		||||
#define XStoreColors XSTORECOLORS
 | 
			
		||||
#define XStoreName XSTORENAME
 | 
			
		||||
#define XStringToKeysym XSTRINGTOKEYSYM
 | 
			
		||||
#define XSubtractRegion XSUBTRACTREGION
 | 
			
		||||
#define XSupportsLocale XSUPPORTSLOCALE
 | 
			
		||||
#define XSync XSYNC
 | 
			
		||||
#define XSynchronize XSYNCHRONIZE
 | 
			
		||||
#define XTextExtents XTEXTEXTENTS
 | 
			
		||||
#define XTextExtents16 XTEXTEXTENTS16
 | 
			
		||||
#define XTextWidth XTEXTWIDTH
 | 
			
		||||
#define XTextWidth16 XTEXTWIDTH16
 | 
			
		||||
#define XTranslateCoordinates XTRANSLATECOORDINATES
 | 
			
		||||
#define XUndefineCursor XUNDEFINECURSOR
 | 
			
		||||
#define XUngrabKeyboard XUNGRABKEYBOARD
 | 
			
		||||
#define XUngrabPointer XUNGRABPOINTER
 | 
			
		||||
#define XUngrabServer XUNGRABSERVER
 | 
			
		||||
#define XUnionRectWithRegion XUNIONRECTWITHREGION
 | 
			
		||||
#define XUnionRegion XUNIONREGION
 | 
			
		||||
#define XUnmapWindow XUNMAPWINDOW
 | 
			
		||||
#define _XUnregisterFilter _XUNREGISTERFILTER
 | 
			
		||||
#define XUnsetICFocus XUNSETICFOCUS
 | 
			
		||||
#define XVaCreateNestedList XVACREATENESTEDLIST
 | 
			
		||||
#define XVisualIDFromVisual XVISUALIDFROMVISUAL
 | 
			
		||||
#define XWidthOfScreen XWIDTHOFSCREEN
 | 
			
		||||
#define XWindowEvent XWINDOWEVENT
 | 
			
		||||
#define XWithdrawWindow XWITHDRAWWINDOW
 | 
			
		||||
#define XXorRegion XXORREGION
 | 
			
		||||
#define XmAddProtocolCallback XMADDPROTOCOLCALLBACK
 | 
			
		||||
#define XmAddProtocols XMADDPROTOCOLS
 | 
			
		||||
#define XmChangeColor XMCHANGECOLOR
 | 
			
		||||
#define XmClipboardCopy XMCLIPBOARDCOPY
 | 
			
		||||
#define XmClipboardEndCopy XMCLIPBOARDENDCOPY
 | 
			
		||||
#define XmClipboardInquireLength XMCLIPBOARDINQUIRELENGTH
 | 
			
		||||
#define XmClipboardLock XMCLIPBOARDLOCK
 | 
			
		||||
#define XmClipboardRetrieve XMCLIPBOARDRETRIEVE
 | 
			
		||||
#define XmClipboardStartCopy XMCLIPBOARDSTARTCOPY
 | 
			
		||||
#define XmClipboardUnlock XMCLIPBOARDUNLOCK
 | 
			
		||||
#define XmCreateArrowButton XMCREATEARROWBUTTON
 | 
			
		||||
#define XmCreateArrowButtonGadget XMCREATEARROWBUTTONGADGET
 | 
			
		||||
#define XmCreateCascadeButton XMCREATECASCADEBUTTON
 | 
			
		||||
#define XmCreateDialogShell XMCREATEDIALOGSHELL
 | 
			
		||||
#define XmCreateDragIcon XMCREATEDRAGICON
 | 
			
		||||
#define XmCreateDrawingArea XMCREATEDRAWINGAREA
 | 
			
		||||
#define XmCreateDrawnButton XMCREATEDRAWNBUTTON
 | 
			
		||||
#define XmCreateFileSelectionBox XMCREATEFILESELECTIONBOX
 | 
			
		||||
#define XmCreateFileSelectionDialog XMCREATEFILESELECTIONDIALOG
 | 
			
		||||
#define XmCreateForm XMCREATEFORM
 | 
			
		||||
#define XmCreateFormDialog XMCREATEFORMDIALOG
 | 
			
		||||
#define XmCreateFrame XMCREATEFRAME
 | 
			
		||||
#define XmCreateInformationDialog XMCREATEINFORMATIONDIALOG
 | 
			
		||||
#define XmCreateLabelGadget XMCREATELABELGADGET
 | 
			
		||||
#define XmCreateMainWindow XMCREATEMAINWINDOW
 | 
			
		||||
#define XmCreateMenuBar XMCREATEMENUBAR
 | 
			
		||||
#define XmCreateMessageBox XMCREATEMESSAGEBOX
 | 
			
		||||
#define XmCreateMessageDialog XMCREATEMESSAGEDIALOG
 | 
			
		||||
#define XmCreateOptionMenu XMCREATEOPTIONMENU
 | 
			
		||||
#define XmCreatePanedWindow XMCREATEPANEDWINDOW
 | 
			
		||||
#define XmCreatePopupMenu XMCREATEPOPUPMENU
 | 
			
		||||
#define XmCreatePromptDialog XMCREATEPROMPTDIALOG
 | 
			
		||||
#define XmCreatePulldownMenu XMCREATEPULLDOWNMENU
 | 
			
		||||
#define XmCreatePushButton XMCREATEPUSHBUTTON
 | 
			
		||||
#define XmCreatePushButtonGadget XMCREATEPUSHBUTTONGADGET
 | 
			
		||||
#define XmCreateQuestionDialog XMCREATEQUESTIONDIALOG
 | 
			
		||||
#define XmCreateRadioBox XMCREATERADIOBOX
 | 
			
		||||
#define XmCreateRowColumn XMCREATEROWCOLUMN
 | 
			
		||||
#define XmCreateScale XMCREATESCALE
 | 
			
		||||
#define XmCreateScrollBar XMCREATESCROLLBAR
 | 
			
		||||
#define XmCreateScrolledList XMCREATESCROLLEDLIST
 | 
			
		||||
#define XmCreateScrolledText XMCREATESCROLLEDTEXT
 | 
			
		||||
#define XmCreateScrolledWindow XMCREATESCROLLEDWINDOW
 | 
			
		||||
#define XmCreateSelectionDialog XMCREATESELECTIONDIALOG
 | 
			
		||||
#define XmCreateSeparator XMCREATESEPARATOR
 | 
			
		||||
#define XmCreateSeparatorGadget XMCREATESEPARATORGADGET
 | 
			
		||||
#define XmCreateTemplateDialog XMCREATETEMPLATEDIALOG
 | 
			
		||||
#define XmCreateText XMCREATETEXT
 | 
			
		||||
#define XmCreateTextField XMCREATETEXTFIELD
 | 
			
		||||
#define XmCreateToggleButton XMCREATETOGGLEBUTTON
 | 
			
		||||
#define XmCreateToggleButtonGadget XMCREATETOGGLEBUTTONGADGET
 | 
			
		||||
#define XmDragStart XMDRAGSTART
 | 
			
		||||
#define XmDropSiteRegister XMDROPSITEREGISTER
 | 
			
		||||
#define XmDropSiteUnregister XMDROPSITEUNREGISTER
 | 
			
		||||
#define XmDropSiteUpdate XMDROPSITEUPDATE
 | 
			
		||||
#define XmDropTransferStart XMDROPTRANSFERSTART
 | 
			
		||||
#define XmFileSelectionBoxGetChild XMFILESELECTIONBOXGETCHILD
 | 
			
		||||
#define XmFileSelectionDoSearch XMFILESELECTIONDOSEARCH
 | 
			
		||||
#define XmFontListAppendEntry XMFONTLISTAPPENDENTRY
 | 
			
		||||
#define XmFontListCopy XMFONTLISTCOPY
 | 
			
		||||
#define XmFontListCreate XMFONTLISTCREATE
 | 
			
		||||
#define XmFontListEntryCreate XMFONTLISTENTRYCREATE
 | 
			
		||||
#define XmFontListEntryFree XMFONTLISTENTRYFREE
 | 
			
		||||
#define XmFontListEntryGetFont XMFONTLISTENTRYGETFONT
 | 
			
		||||
#define XmFontListEntryGetTag XMFONTLISTENTRYGETTAG
 | 
			
		||||
#define XmFontListEntryLoad XMFONTLISTENTRYLOAD
 | 
			
		||||
#define XmFontListFree XMFONTLISTFREE
 | 
			
		||||
#define XmFontListFreeFontContext XMFONTLISTFREEFONTCONTEXT
 | 
			
		||||
#define XmFontListGetNextFont XMFONTLISTGETNEXTFONT
 | 
			
		||||
#define XmFontListInitFontContext XMFONTLISTINITFONTCONTEXT
 | 
			
		||||
#define XmFontListNextEntry XMFONTLISTNEXTENTRY
 | 
			
		||||
#define XmGetColors XMGETCOLORS
 | 
			
		||||
#define XmGetFocusWidget XMGETFOCUSWIDGET
 | 
			
		||||
#define XmGetMenuCursor XMGETMENUCURSOR
 | 
			
		||||
#define XmGetPixmapByDepth XMGETPIXMAPBYDEPTH
 | 
			
		||||
#define XmGetTearOffControl XMGETTEAROFFCONTROL
 | 
			
		||||
#define XmGetXmDisplay XMGETXMDISPLAY
 | 
			
		||||
#define XmImMbLookupString XMIMMBLOOKUPSTRING
 | 
			
		||||
#define XmImRegister XMIMREGISTER
 | 
			
		||||
#define XmImSetFocusValues XMIMSETFOCUSVALUES
 | 
			
		||||
#define XmImSetValues XMIMSETVALUES
 | 
			
		||||
#define XmImUnregister XMIMUNREGISTER
 | 
			
		||||
#define XmImUnsetFocus XMIMUNSETFOCUS
 | 
			
		||||
#define XmInternAtom XMINTERNATOM
 | 
			
		||||
#define XmIsMotifWMRunning XMISMOTIFWMRUNNING
 | 
			
		||||
#define XmListAddItem XMLISTADDITEM
 | 
			
		||||
#define XmListAddItemUnselected XMLISTADDITEMUNSELECTED
 | 
			
		||||
#define XmListAddItemsUnselected XMLISTADDITEMSUNSELECTED
 | 
			
		||||
#define XmListDeleteAllItems XMLISTDELETEALLITEMS
 | 
			
		||||
#define XmListDeleteItemsPos XMLISTDELETEITEMSPOS
 | 
			
		||||
#define XmListDeletePos XMLISTDELETEPOS
 | 
			
		||||
#define XmListDeselectAllItems XMLISTDESELECTALLITEMS
 | 
			
		||||
#define XmListDeselectPos XMLISTDESELECTPOS
 | 
			
		||||
#define XmListGetKbdItemPos XMLISTGETKBDITEMPOS
 | 
			
		||||
#define XmListGetMatchPos XMLISTGETMATCHPOS
 | 
			
		||||
#define XmListGetSelectedPos XMLISTGETSELECTEDPOS
 | 
			
		||||
#define XmListPosSelected XMLISTPOSSELECTED
 | 
			
		||||
#define XmListSelectItem XMLISTSELECTITEM
 | 
			
		||||
#define XmListSelectPos XMLISTSELECTPOS
 | 
			
		||||
#define XmListSetBottomPos XMLISTSETBOTTOMPOS
 | 
			
		||||
#define XmListSetItem XMLISTSETITEM
 | 
			
		||||
#define XmListSetKbdItemPos XMLISTSETKBDITEMPOS
 | 
			
		||||
#define XmListSetPos XMLISTSETPOS
 | 
			
		||||
#define XmMainWindowSetAreas XMMAINWINDOWSETAREAS
 | 
			
		||||
#define XmMenuPosition XMMENUPOSITION
 | 
			
		||||
#define XmMessageBoxGetChild XMMESSAGEBOXGETCHILD
 | 
			
		||||
#define XmOptionButtonGadget XMOPTIONBUTTONGADGET
 | 
			
		||||
#define XmOptionLabelGadget XMOPTIONLABELGADGET
 | 
			
		||||
#define XmProcessTraversal XMPROCESSTRAVERSAL
 | 
			
		||||
#define XmQmotif XMQMOTIF
 | 
			
		||||
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
 | 
			
		||||
#define XmRepTypeGetId XMREPTYPEGETID
 | 
			
		||||
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
 | 
			
		||||
#define XmRepTypeRegister XMREPTYPEREGISTER
 | 
			
		||||
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
 | 
			
		||||
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
 | 
			
		||||
#define XmScrolledWindowSetAreas XMSCROLLEDWINDOWSETAREAS
 | 
			
		||||
#define XmSelectionBoxGetChild XMSELECTIONBOXGETCHILD
 | 
			
		||||
#define XmStringByteCompare XMSTRINGBYTECOMPARE
 | 
			
		||||
#define XmStringCompare XMSTRINGCOMPARE
 | 
			
		||||
#define XmStringConcat XMSTRINGCONCAT
 | 
			
		||||
#define XmStringCopy XMSTRINGCOPY
 | 
			
		||||
#define XmStringCreate XMSTRINGCREATE
 | 
			
		||||
#define XmStringCreateLocalized XMSTRINGCREATELOCALIZED
 | 
			
		||||
#define XmStringCreateLtoR XMSTRINGCREATELTOR
 | 
			
		||||
#define XmStringCreateSimple XMSTRINGCREATESIMPLE
 | 
			
		||||
#define XmStringDraw XMSTRINGDRAW
 | 
			
		||||
#define XmStringDrawUnderline XMSTRINGDRAWUNDERLINE
 | 
			
		||||
#define XmStringExtent XMSTRINGEXTENT
 | 
			
		||||
#define XmStringFree XMSTRINGFREE
 | 
			
		||||
#define XmStringFreeContext XMSTRINGFREECONTEXT
 | 
			
		||||
#define XmStringGetLtoR XMSTRINGGETLTOR
 | 
			
		||||
#define XmStringGetNextComponent XMSTRINGGETNEXTCOMPONENT
 | 
			
		||||
#define XmStringGetNextSegment XMSTRINGGETNEXTSEGMENT
 | 
			
		||||
#define XmStringInitContext XMSTRINGINITCONTEXT
 | 
			
		||||
#define XmStringLength XMSTRINGLENGTH
 | 
			
		||||
#define XmStringLtoRCreate XMSTRINGLTORCREATE
 | 
			
		||||
#define XmStringNConcat XMSTRINGNCONCAT
 | 
			
		||||
#define XmStringSegmentCreate XMSTRINGSEGMENTCREATE
 | 
			
		||||
#define XmStringWidth XMSTRINGWIDTH
 | 
			
		||||
#define XmTextClearSelection XMTEXTCLEARSELECTION
 | 
			
		||||
#define XmTextFieldGetEditable XMTEXTFIELDGETEDITABLE
 | 
			
		||||
#define XmTextFieldGetInsertionPosition XMTEXTFIELDGETINSERTIONPOSITION
 | 
			
		||||
#define XmTextFieldGetLastPosition XMTEXTFIELDGETLASTPOSITION
 | 
			
		||||
#define XmTextFieldGetSelection XMTEXTFIELDGETSELECTION
 | 
			
		||||
#define XmTextFieldGetString XMTEXTFIELDGETSTRING
 | 
			
		||||
#define XmTextFieldInsert XMTEXTFIELDINSERT
 | 
			
		||||
#define XmTextFieldRemove XMTEXTFIELDREMOVE
 | 
			
		||||
#define XmTextFieldSetSelection XMTEXTFIELDSETSELECTION
 | 
			
		||||
#define XmTextFieldSetString XMTEXTFIELDSETSTRING
 | 
			
		||||
#define XmTextGetCursorPosition XMTEXTGETCURSORPOSITION
 | 
			
		||||
#define XmTextGetInsertionPosition XMTEXTGETINSERTIONPOSITION
 | 
			
		||||
#define XmTextGetLastPosition XMTEXTGETLASTPOSITION
 | 
			
		||||
#define XmTextGetMaxLength XMTEXTGETMAXLENGTH
 | 
			
		||||
#define XmTextGetSelection XMTEXTGETSELECTION
 | 
			
		||||
#define XmTextGetSelectionPosition XMTEXTGETSELECTIONPOSITION
 | 
			
		||||
#define XmTextGetString XMTEXTGETSTRING
 | 
			
		||||
#define XmTextInsert XMTEXTINSERT
 | 
			
		||||
#define XmTextRemove XMTEXTREMOVE
 | 
			
		||||
#define XmTextReplace XMTEXTREPLACE
 | 
			
		||||
#define XmTextSetCursorPosition XMTEXTSETCURSORPOSITION
 | 
			
		||||
#define XmTextSetHighlight XMTEXTSETHIGHLIGHT
 | 
			
		||||
#define XmTextSetInsertionPosition XMTEXTSETINSERTIONPOSITION
 | 
			
		||||
#define XmTextSetSelection XMTEXTSETSELECTION
 | 
			
		||||
#define XmTextSetString XMTEXTSETSTRING
 | 
			
		||||
#define XmToggleButtonGadgetGetState XMTOGGLEBUTTONGADGETGETSTATE
 | 
			
		||||
#define XmToggleButtonGadgetSetState XMTOGGLEBUTTONGADGETSETSTATE
 | 
			
		||||
#define XmToggleButtonGetState XMTOGGLEBUTTONGETSTATE
 | 
			
		||||
#define XmToggleButtonSetState XMTOGGLEBUTTONSETSTATE
 | 
			
		||||
#define XmUpdateDisplay XMUPDATEDISPLAY
 | 
			
		||||
#define XmVaCreateSimpleRadioBox XMVACREATESIMPLERADIOBOX
 | 
			
		||||
#define XmbDrawString XMBDRAWSTRING
 | 
			
		||||
#define XmbLookupString XMBLOOKUPSTRING
 | 
			
		||||
#define XmbResetIC XMBRESETIC
 | 
			
		||||
#define XmbSetWMProperties XMBSETWMPROPERTIES
 | 
			
		||||
#define XmbTextEscapement XMBTEXTESCAPEMENT
 | 
			
		||||
#define XmbTextExtents XMBTEXTEXTENTS
 | 
			
		||||
#define XmbTextListToTextProperty XMBTEXTLISTTOTEXTPROPERTY
 | 
			
		||||
#define XmbTextPropertyToTextList XMBTEXTPROPERTYTOTEXTLIST
 | 
			
		||||
#define XmuClientWindow XMUCLIENTWINDOW
 | 
			
		||||
#define XmuPrintDefaultErrorMessage XMUPRINTDEFAULTERRORMESSAGE
 | 
			
		||||
#define XrmGetDatabase XRMGETDATABASE
 | 
			
		||||
#define XrmGetResource XRMGETRESOURCE
 | 
			
		||||
#define XrmPutStringResource XRMPUTSTRINGRESOURCE
 | 
			
		||||
#define XrmQuarkToString XRMQUARKTOSTRING
 | 
			
		||||
#define XrmStringToQuark XRMSTRINGTOQUARK
 | 
			
		||||
#define XtAddCallback XTADDCALLBACK
 | 
			
		||||
#define XtAddCallbacks XTADDCALLBACKS
 | 
			
		||||
#define XtAddEventHandler XTADDEVENTHANDLER
 | 
			
		||||
#define XtAddGrab XTADDGRAB
 | 
			
		||||
#define XtAllocateGC XTALLOCATEGC
 | 
			
		||||
#define XtAppAddActions XTAPPADDACTIONS
 | 
			
		||||
#define XtAppAddInput XTAPPADDINPUT
 | 
			
		||||
#define XtAppAddTimeOut XTAPPADDTIMEOUT
 | 
			
		||||
#define XtAppCreateShell XTAPPCREATESHELL
 | 
			
		||||
#define XtAppInitialize XTAPPINITIALIZE
 | 
			
		||||
#define XtAppNextEvent XTAPPNEXTEVENT
 | 
			
		||||
#define XtAppPeekEvent XTAPPPEEKEVENT
 | 
			
		||||
#define XtAppPending XTAPPPENDING
 | 
			
		||||
#define XtAppProcessEvent XTAPPPROCESSEVENT
 | 
			
		||||
#define XtAppSetErrorHandler XTAPPSETERRORHANDLER
 | 
			
		||||
#define XtAppSetFallbackResources XTAPPSETFALLBACKRESOURCES
 | 
			
		||||
#define XtAppSetWarningHandler XTAPPSETWARNINGHANDLER
 | 
			
		||||
#define XtAppSetWarningMsgHandler XTAPPSETWARNINGMSGHANDLER
 | 
			
		||||
#define XtAppWarning XTAPPWARNING
 | 
			
		||||
#define XtCallActionProc XTCALLACTIONPROC
 | 
			
		||||
#define XtCallCallbackList XTCALLCALLBACKLIST
 | 
			
		||||
#define XtCallCallbacks XTCALLCALLBACKS
 | 
			
		||||
#define XtConfigureWidget XTCONFIGUREWIDGET
 | 
			
		||||
#define XtConvertAndStore XTCONVERTANDSTORE
 | 
			
		||||
#define XtCreateApplicationContext XTCREATEAPPLICATIONCONTEXT
 | 
			
		||||
#define XtCreateManagedWidget XTCREATEMANAGEDWIDGET
 | 
			
		||||
#define XtCreatePopupShell XTCREATEPOPUPSHELL
 | 
			
		||||
#define XtCreateWidget XTCREATEWIDGET
 | 
			
		||||
#define XtDatabase XTDATABASE
 | 
			
		||||
#define XtDestroyWidget XTDESTROYWIDGET
 | 
			
		||||
#define XtDisownSelection XTDISOWNSELECTION
 | 
			
		||||
#define XtDispatchEvent XTDISPATCHEVENT
 | 
			
		||||
#define XtDisplayOfObject XTDISPLAYOFOBJECT
 | 
			
		||||
#define XtDisplayStringConvWarning XTDISPLAYSTRINGCONVWARNING
 | 
			
		||||
#define XtDisplayToApplicationContext XTDISPLAYTOAPPLICATIONCONTEXT
 | 
			
		||||
#define XtAppAddWorkProc XTAPPADDWORKPROC
 | 
			
		||||
#define XtRemoveWorkProc XTREMOVEWORKPROC
 | 
			
		||||
#define XtFree XTFREE
 | 
			
		||||
#define XtGetActionKeysym XTGETACTIONKEYSYM
 | 
			
		||||
#define XtGetActionList XTGETACTIONLIST
 | 
			
		||||
#define XtGetApplicationNameAndClass XTGETAPPLICATIONNAMEANDCLASS
 | 
			
		||||
#define XtGetApplicationResources XTGETAPPLICATIONRESOURCES
 | 
			
		||||
#define XtGetGC XTGETGC
 | 
			
		||||
#define XtGetMultiClickTime XTGETMULTICLICKTIME
 | 
			
		||||
#define XtGetSelectionValue XTGETSELECTIONVALUE
 | 
			
		||||
#define XtGetSelectionValues XTGETSELECTIONVALUES
 | 
			
		||||
#define XtGetSubresources XTGETSUBRESOURCES
 | 
			
		||||
#define XtGetValues XTGETVALUES
 | 
			
		||||
#define XtGrabKeyboard XTGRABKEYBOARD
 | 
			
		||||
#define XtGrabPointer XTGRABPOINTER
 | 
			
		||||
#define XtHasCallbacks XTHASCALLBACKS
 | 
			
		||||
#define XtInitializeWidgetClass XTINITIALIZEWIDGETCLASS
 | 
			
		||||
#define XtInsertEventHandler XTINSERTEVENTHANDLER
 | 
			
		||||
#define XtIsManaged XTISMANAGED
 | 
			
		||||
#define XtIsObject XTISOBJECT
 | 
			
		||||
#define XtIsSensitive XTISSENSITIVE
 | 
			
		||||
#define XtIsSubclass XTISSUBCLASS
 | 
			
		||||
#define XtLastTimestampProcessed XTLASTTIMESTAMPPROCESSED
 | 
			
		||||
#define XtMakeGeometryRequest XTMAKEGEOMETRYREQUEST
 | 
			
		||||
#define XtMakeResizeRequest XTMAKERESIZEREQUEST
 | 
			
		||||
#define XtMalloc XTMALLOC
 | 
			
		||||
#define XtManageChild XTMANAGECHILD
 | 
			
		||||
#define XtManageChildren XTMANAGECHILDREN
 | 
			
		||||
#define XtMergeArgLists XTMERGEARGLISTS
 | 
			
		||||
#define XtMoveWidget XTMOVEWIDGET
 | 
			
		||||
#define XtName XTNAME
 | 
			
		||||
#define XtNameToWidget XTNAMETOWIDGET
 | 
			
		||||
#define XtOpenDisplay XTOPENDISPLAY
 | 
			
		||||
#define XtOverrideTranslations XTOVERRIDETRANSLATIONS
 | 
			
		||||
#define XtOwnSelection XTOWNSELECTION
 | 
			
		||||
#define XtParseTranslationTable XTPARSETRANSLATIONTABLE
 | 
			
		||||
#define XtPopdown XTPOPDOWN
 | 
			
		||||
#define XtPopup XTPOPUP
 | 
			
		||||
#define XtQueryGeometry XTQUERYGEOMETRY
 | 
			
		||||
#define XtRealizeWidget XTREALIZEWIDGET
 | 
			
		||||
#define XtRealloc XTREALLOC
 | 
			
		||||
#define XtReleaseGC XTRELEASEGC
 | 
			
		||||
#define XtRemoveAllCallbacks XTREMOVEALLCALLBACKS
 | 
			
		||||
#define XtRemoveCallback XTREMOVECALLBACK
 | 
			
		||||
#define XtRemoveEventHandler XTREMOVEEVENTHANDLER
 | 
			
		||||
#define XtRemoveGrab XTREMOVEGRAB
 | 
			
		||||
#define XtRemoveInput XTREMOVEINPUT
 | 
			
		||||
#define XtRemoveTimeOut XTREMOVETIMEOUT
 | 
			
		||||
#define XtResizeWidget XTRESIZEWIDGET
 | 
			
		||||
#define XtResolvePathname XTRESOLVEPATHNAME
 | 
			
		||||
#define XtSetKeyboardFocus XTSETKEYBOARDFOCUS
 | 
			
		||||
#define XtSetMappedWhenManaged XTSETMAPPEDWHENMANAGED
 | 
			
		||||
#define XtSetSensitive XTSETSENSITIVE
 | 
			
		||||
#define XtSetTypeConverter XTSETTYPECONVERTER
 | 
			
		||||
#define XtSetValues XTSETVALUES
 | 
			
		||||
#define XtShellStrings XTSHELLSTRINGS
 | 
			
		||||
#define XtStrings XTSTRINGS
 | 
			
		||||
#define XtToolkitInitialize XTTOOLKITINITIALIZE
 | 
			
		||||
#define XtTranslateCoords XTTRANSLATECOORDS
 | 
			
		||||
#define XtTranslateKeycode XTTRANSLATEKEYCODE
 | 
			
		||||
#define XtUngrabKeyboard XTUNGRABKEYBOARD
 | 
			
		||||
#define XtUngrabPointer XTUNGRABPOINTER
 | 
			
		||||
#define XtUnmanageChild XTUNMANAGECHILD
 | 
			
		||||
#define XtUnmanageChildren XTUNMANAGECHILDREN
 | 
			
		||||
#define XtUnrealizeWidget XTUNREALIZEWIDGET
 | 
			
		||||
#define XtVaCreateManagedWidget XTVACREATEMANAGEDWIDGET
 | 
			
		||||
#define XtVaCreateWidget XTVACREATEWIDGET
 | 
			
		||||
#define XtVaGetValues XTVAGETVALUES
 | 
			
		||||
#define XtVaSetValues XTVASETVALUES
 | 
			
		||||
#define XtWarning XTWARNING
 | 
			
		||||
#define XtWidgetToApplicationContext XTWIDGETTOAPPLICATIONCONTEXT
 | 
			
		||||
#define XtWindowOfObject XTWINDOWOFOBJECT
 | 
			
		||||
#define XtWindowToWidget XTWINDOWTOWIDGET
 | 
			
		||||
#define XwcDrawString XWCDRAWSTRING
 | 
			
		||||
#define XwcFreeStringList XWCFREESTRINGLIST
 | 
			
		||||
#define XwcTextEscapement XWCTEXTESCAPEMENT
 | 
			
		||||
#define XwcTextExtents XWCTEXTEXTENTS
 | 
			
		||||
#define XwcTextListToTextProperty XWCTEXTLISTTOTEXTPROPERTY
 | 
			
		||||
#define XwcTextPropertyToTextList XWCTEXTPROPERTYTOTEXTLIST
 | 
			
		||||
#define _XmBottomShadowColorDefault _XMBOTTOMSHADOWCOLORDEFAULT
 | 
			
		||||
#define _XmClearBorder _XMCLEARBORDER
 | 
			
		||||
#define _XmConfigureObject _XMCONFIGUREOBJECT
 | 
			
		||||
#define _XmDestroyParentCallback _XMDESTROYPARENTCALLBACK
 | 
			
		||||
#define _XmDrawArrow _XMDRAWARROW
 | 
			
		||||
#define _XmDrawShadows _XMDRAWSHADOWS
 | 
			
		||||
#define _XmFontListGetDefaultFont _XMFONTLISTGETDEFAULTFONT
 | 
			
		||||
#define _XmFromHorizontalPixels _XMFROMHORIZONTALPIXELS
 | 
			
		||||
#define _XmFromVerticalPixels _XMFROMVERTICALPIXELS
 | 
			
		||||
#define _XmGetClassExtensionPtr _XMGETCLASSEXTENSIONPTR
 | 
			
		||||
#define _XmGetDefaultFontList _XMGETDEFAULTFONTLIST
 | 
			
		||||
#define _XmGetTextualDragIcon _XMGETTEXTUALDRAGICON
 | 
			
		||||
#define _XmGetWidgetExtData _XMGETWIDGETEXTDATA
 | 
			
		||||
#define _XmGrabKeyboard _XMGRABKEYBOARD
 | 
			
		||||
#define _XmGrabPointer _XMGRABPOINTER
 | 
			
		||||
#define _XmInheritClass _XMINHERITCLASS
 | 
			
		||||
#define _XmInputInGadget _XMINPUTINGADGET
 | 
			
		||||
#define _XmMakeGeometryRequest _XMMAKEGEOMETRYREQUEST
 | 
			
		||||
#define _XmMenuPopDown _XMMENUPOPDOWN
 | 
			
		||||
#define _XmMoveObject _XMMOVEOBJECT
 | 
			
		||||
#define _XmNavigChangeManaged _XMNAVIGCHANGEMANAGED
 | 
			
		||||
#define _XmOSBuildFileList _XMOSBUILDFILELIST
 | 
			
		||||
#define _XmOSFileCompare _XMOSFILECOMPARE
 | 
			
		||||
#define _XmOSFindPatternPart _XMOSFINDPATTERNPART
 | 
			
		||||
#define _XmOSQualifyFileSpec _XMOSQUALIFYFILESPEC
 | 
			
		||||
#define _XmPostPopupMenu _XMPOSTPOPUPMENU
 | 
			
		||||
#define _XmPrimitiveEnter _XMPRIMITIVEENTER
 | 
			
		||||
#define _XmPrimitiveLeave _XMPRIMITIVELEAVE
 | 
			
		||||
#define _XmRedisplayGadgets _XMREDISPLAYGADGETS
 | 
			
		||||
#define _XmShellIsExclusive _XMSHELLISEXCLUSIVE
 | 
			
		||||
#define _XmStringDraw _XMSTRINGDRAW
 | 
			
		||||
#define _XmStringGetTextConcat _XMSTRINGGETTEXTCONCAT
 | 
			
		||||
#define _XmStrings _XMSTRINGS
 | 
			
		||||
#define _XmToHorizontalPixels _XMTOHORIZONTALPIXELS
 | 
			
		||||
#define _XmToVerticalPixels _XMTOVERTICALPIXELS
 | 
			
		||||
#define _XmTopShadowColorDefault _XMTOPSHADOWCOLORDEFAULT
 | 
			
		||||
#define _Xm_fastPtr _XM_FASTPTR
 | 
			
		||||
#define _XtCheckSubclassFlag _XTCHECKSUBCLASSFLAG
 | 
			
		||||
#define _XtInherit _XTINHERIT
 | 
			
		||||
#define _XtInheritTranslations _XTINHERITTRANSLATIONS
 | 
			
		||||
#define applicationShellWidgetClass APPLICATIONSHELLWIDGETCLASS
 | 
			
		||||
#define compositeWidgetClass COMPOSITEWIDGETCLASS
 | 
			
		||||
#define overrideShellWidgetClass OVERRIDESHELLWIDGETCLASS
 | 
			
		||||
#define shellWidgetClass SHELLWIDGETCLASS
 | 
			
		||||
#define topLevelShellClassRec TOPLEVELSHELLCLASSREC
 | 
			
		||||
#define topLevelShellWidgetClass TOPLEVELSHELLWIDGETCLASS
 | 
			
		||||
#define transientShellWidgetClass TRANSIENTSHELLWIDGETCLASS
 | 
			
		||||
#define vendorShellClassRec VENDORSHELLCLASSREC
 | 
			
		||||
#define vendorShellWidgetClass VENDORSHELLWIDGETCLASS
 | 
			
		||||
#define wmShellWidgetClass WMSHELLWIDGETCLASS
 | 
			
		||||
#define xmArrowButtonWidgetClass XMARROWBUTTONWIDGETCLASS
 | 
			
		||||
#define xmCascadeButtonClassRec XMCASCADEBUTTONCLASSREC
 | 
			
		||||
#define xmCascadeButtonGadgetClass XMCASCADEBUTTONGADGETCLASS
 | 
			
		||||
#define xmCascadeButtonWidgetClass XMCASCADEBUTTONWIDGETCLASS
 | 
			
		||||
#define xmDialogShellWidgetClass XMDIALOGSHELLWIDGETCLASS
 | 
			
		||||
#define xmDrawingAreaWidgetClass XMDRAWINGAREAWIDGETCLASS
 | 
			
		||||
#define xmDrawnButtonWidgetClass XMDRAWNBUTTONWIDGETCLASS
 | 
			
		||||
#define xmFileSelectionBoxWidgetClass XMFILESELECTIONBOXWIDGETCLASS
 | 
			
		||||
#define xmFormWidgetClass XMFORMWIDGETCLASS
 | 
			
		||||
#define xmFrameWidgetClass XMFRAMEWIDGETCLASS
 | 
			
		||||
#define xmGadgetClass XMGADGETCLASS
 | 
			
		||||
#define xmLabelGadgetClass XMLABELGADGETCLASS
 | 
			
		||||
#define xmLabelWidgetClass XMLABELWIDGETCLASS
 | 
			
		||||
#define xmListWidgetClass XMLISTWIDGETCLASS
 | 
			
		||||
#define xmMainWindowWidgetClass XMMAINWINDOWWIDGETCLASS
 | 
			
		||||
#define xmManagerClassRec XMMANAGERCLASSREC
 | 
			
		||||
#define xmManagerWidgetClass XMMANAGERWIDGETCLASS
 | 
			
		||||
#define xmMenuShellWidgetClass XMMENUSHELLWIDGETCLASS
 | 
			
		||||
#define xmMessageBoxWidgetClass XMMESSAGEBOXWIDGETCLASS
 | 
			
		||||
#define xmPrimitiveClassRec XMPRIMITIVECLASSREC
 | 
			
		||||
#define xmPrimitiveWidgetClass XMPRIMITIVEWIDGETCLASS
 | 
			
		||||
#define xmPushButtonClassRec XMPUSHBUTTONCLASSREC
 | 
			
		||||
#define xmPushButtonGadgetClass XMPUSHBUTTONGADGETCLASS
 | 
			
		||||
#define xmPushButtonWidgetClass XMPUSHBUTTONWIDGETCLASS
 | 
			
		||||
#define xmRowColumnWidgetClass XMROWCOLUMNWIDGETCLASS
 | 
			
		||||
#define xmSashWidgetClass XMSASHWIDGETCLASS
 | 
			
		||||
#define xmScrollBarWidgetClass XMSCROLLBARWIDGETCLASS
 | 
			
		||||
#define xmScrolledWindowClassRec XMSCROLLEDWINDOWCLASSREC
 | 
			
		||||
#define xmScrolledWindowWidgetClass XMSCROLLEDWINDOWWIDGETCLASS
 | 
			
		||||
#define xmSeparatorGadgetClass XMSEPARATORGADGETCLASS
 | 
			
		||||
#define xmSeparatorWidgetClass XMSEPARATORWIDGETCLASS
 | 
			
		||||
#define xmTextFieldWidgetClass XMTEXTFIELDWIDGETCLASS
 | 
			
		||||
#define xmTextWidgetClass XMTEXTWIDGETCLASS
 | 
			
		||||
#define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS
 | 
			
		||||
#define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS
 | 
			
		||||
#define XtRegisterDrawable _XTREGISTERWINDOW
 | 
			
		||||
#define XtUnregisterDrawable _XTUNREGISTERWINDOW
 | 
			
		||||
#define XQueryFont XQUERYFONT
 | 
			
		||||
#define XSetPlaneMask XSETPLANEMASK
 | 
			
		||||
#define XChangeKeyboardControl XCHANGEKEYBOARDCONTROL
 | 
			
		||||
#define XDestroySubwindows XDESTROYSUBWINDOWS
 | 
			
		||||
#define XFreeDeviceList XFREEDEVICELIST
 | 
			
		||||
#define XFreeDeviceState XFREEDEVICESTATE
 | 
			
		||||
#define XGetExtensionVersion XGETEXTENSIONVERSION
 | 
			
		||||
#define XGetRGBColormaps XGETRGBCOLORMAPS
 | 
			
		||||
#define XIconifyWindow XICONIFYWINDOW
 | 
			
		||||
#define XInstallColormap XINSTALLCOLORMAP
 | 
			
		||||
#define XListInputDevices XLISTINPUTDEVICES
 | 
			
		||||
#define XLookupKeysym XLOOKUPKEYSYM
 | 
			
		||||
#define XOpenDevice XOPENDEVICE
 | 
			
		||||
#define XQueryDeviceState XQUERYDEVICESTATE
 | 
			
		||||
#define XSelectExtensionEvent XSELECTEXTENSIONEVENT
 | 
			
		||||
#define XWarpPointer XWARPPOINTER
 | 
			
		||||
#define XmuLookupStandardColormap XMULOOKUPSTANDARDCOLORMAP
 | 
			
		||||
#define XAllocNamedColor XALLOCNAMEDCOLOR
 | 
			
		||||
#define XBlackPixelOfScreen XBLACKPIXELOFSCREEN
 | 
			
		||||
#define XDefaultColormap XDEFAULTCOLORMAP
 | 
			
		||||
#define XDefaultColormapOfScreen XDEFAULTCOLORMAPOFSCREEN
 | 
			
		||||
#define XDefaultDepth XDEFAULTDEPTH
 | 
			
		||||
#define XDefaultScreen XDEFAULTSCREEN
 | 
			
		||||
#define XDefaultVisual XDEFAULTVISUAL
 | 
			
		||||
#define XSetIconName XSETICONNAME
 | 
			
		||||
#define XtInitialize XTINITIALIZE
 | 
			
		||||
#define XtMainLoop XTMAINLOOP
 | 
			
		||||
#define DtSaverGetWindows DTSAVERGETWINDOWS
 | 
			
		||||
#define XAddHosts XADDHOSTS
 | 
			
		||||
#define XDisableAccessControl XDISABLEACCESSCONTROL
 | 
			
		||||
#define XEnableAccessControl XENABLEACCESSCONTROL
 | 
			
		||||
#define XFillArcs XFILLARCS
 | 
			
		||||
#define XForceScreenSaver XFORCESCREENSAVER
 | 
			
		||||
#define XGetScreenSaver XGETSCREENSAVER
 | 
			
		||||
#define XListHosts XLISTHOSTS
 | 
			
		||||
#define XReadBitmapFile XREADBITMAPFILE
 | 
			
		||||
#define XRemoveHosts XREMOVEHOSTS
 | 
			
		||||
#define XResetScreenSaver XRESETSCREENSAVER
 | 
			
		||||
#define XResourceManagerString XRESOURCEMANAGERSTRING
 | 
			
		||||
#define XSetScreenSaver XSETSCREENSAVER
 | 
			
		||||
#define XStringListToTextProperty XSTRINGLISTTOTEXTPROPERTY
 | 
			
		||||
#define XrmDestroyDatabase XRMDESTROYDATABASE
 | 
			
		||||
#define XrmGetFileDatabase XRMGETFILEDATABASE
 | 
			
		||||
#define XrmGetStringDatabase XRMGETSTRINGDATABASE
 | 
			
		||||
#define XrmInitialize XRMINITIALIZE
 | 
			
		||||
#define XrmMergeDatabases XRMMERGEDATABASES
 | 
			
		||||
#define XrmParseCommand XRMPARSECOMMAND
 | 
			
		||||
#define XrmPutLineResource XRMPUTLINERESOURCE
 | 
			
		||||
#define XrmQPutStringResource XRMQPUTSTRINGRESOURCE
 | 
			
		||||
#define XrmStringToBindingQuarkList XRMSTRINGTOBINDINGQUARKLIST
 | 
			
		||||
#define XrmStringToQuark XRMSTRINGTOQUARK
 | 
			
		||||
#define XmCreateLabel XMCREATELABEL
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
extern void XtFree(char*);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define pthread_attr_create PTHREAD_ATTR_CREATE
 | 
			
		||||
#define pthread_attr_delete PTHREAD_ATTR_DELETE
 | 
			
		||||
#define pthread_attr_destroy PTHREAD_ATTR_DESTROY
 | 
			
		||||
#define pthread_attr_getdetach_np PTHREAD_ATTR_GETDETACH_NP
 | 
			
		||||
#define pthread_attr_getguardsize_np PTHREAD_ATTR_GETGUARDSIZE_NP
 | 
			
		||||
#define pthread_attr_getinheritsched PTHREAD_ATTR_GETINHERITSCHED
 | 
			
		||||
#define pthread_attr_getprio PTHREAD_ATTR_GETPRIO
 | 
			
		||||
#define pthread_attr_getsched PTHREAD_ATTR_GETSCHED
 | 
			
		||||
#define pthread_attr_getschedparam PTHREAD_ATTR_GETSCHEDPARAM
 | 
			
		||||
#define pthread_attr_getstacksize PTHREAD_ATTR_GETSTACKSIZE
 | 
			
		||||
#define pthread_attr_init PTHREAD_ATTR_INIT
 | 
			
		||||
#define pthread_attr_setdetach_np PTHREAD_ATTR_SETDETACH_NP
 | 
			
		||||
#define pthread_attr_setdetachstate PTHREAD_ATTR_SETDETACHSTATE
 | 
			
		||||
#define pthread_attr_setguardsize_np PTHREAD_ATTR_SETGUARDSIZE_NP
 | 
			
		||||
#define pthread_attr_setinheritsched PTHREAD_ATTR_SETINHERITSCHED
 | 
			
		||||
#define pthread_attr_setprio PTHREAD_ATTR_SETPRIO
 | 
			
		||||
#define pthread_attr_setsched PTHREAD_ATTR_SETSCHED
 | 
			
		||||
#define pthread_attr_setschedparam PTHREAD_ATTR_SETSCHEDPARAM
 | 
			
		||||
#define pthread_attr_setschedpolicy PTHREAD_ATTR_SETSCHEDPOLICY
 | 
			
		||||
#define pthread_attr_setstacksize PTHREAD_ATTR_SETSTACKSIZE
 | 
			
		||||
#define pthread_cancel PTHREAD_CANCEL
 | 
			
		||||
#define pthread_cancel_e PTHREAD_CANCEL_E
 | 
			
		||||
#define pthread_cond_broadcast PTHREAD_COND_BROADCAST
 | 
			
		||||
#define pthread_cond_destroy PTHREAD_COND_DESTROY
 | 
			
		||||
#define pthread_cond_init PTHREAD_COND_INIT
 | 
			
		||||
#define pthread_cond_sig_preempt_int_np PTHREAD_COND_SIG_PREEMPT_INT_NP
 | 
			
		||||
#define pthread_cond_signal PTHREAD_COND_SIGNAL
 | 
			
		||||
#define pthread_cond_signal_int_np PTHREAD_COND_SIGNAL_INT_NP
 | 
			
		||||
#define pthread_cond_timedwait PTHREAD_COND_TIMEDWAIT
 | 
			
		||||
#define pthread_cond_wait PTHREAD_COND_WAIT
 | 
			
		||||
#define pthread_condattr_create PTHREAD_CONDATTR_CREATE
 | 
			
		||||
#define pthread_condattr_delete PTHREAD_CONDATTR_DELETE
 | 
			
		||||
#define pthread_condattr_init PTHREAD_CONDATTR_INIT
 | 
			
		||||
#define pthread_create PTHREAD_CREATE
 | 
			
		||||
#define pthread_delay_np PTHREAD_DELAY_NP
 | 
			
		||||
#define pthread_detach PTHREAD_DETACH
 | 
			
		||||
#define pthread_equal PTHREAD_EQUAL
 | 
			
		||||
#define pthread_exc_fetch_fp_np PTHREAD_EXC_FETCH_FP_NP
 | 
			
		||||
#define pthread_exc_handler_np PTHREAD_EXC_HANDLER_NP
 | 
			
		||||
#define pthread_exc_pop_ctx_np PTHREAD_EXC_POP_CTX_NP
 | 
			
		||||
#define pthread_exc_push_ctx_np PTHREAD_EXC_PUSH_CTX_NP
 | 
			
		||||
#define pthread_exc_savecontext_np PTHREAD_EXC_SAVECONTEXT_NP
 | 
			
		||||
#define pthread_exit PTHREAD_EXIT
 | 
			
		||||
#define pthread_get_expiration_np PTHREAD_GET_EXPIRATION_NP
 | 
			
		||||
#define pthread_getprio PTHREAD_GETPRIO
 | 
			
		||||
#define pthread_getschedparam PTHREAD_GETSCHEDPARAM
 | 
			
		||||
#define pthread_getscheduler PTHREAD_GETSCHEDULER
 | 
			
		||||
#define pthread_getspecific PTHREAD_GETSPECIFIC
 | 
			
		||||
#define pthread_getunique_np PTHREAD_GETUNIQUE_NP
 | 
			
		||||
#define pthread_join PTHREAD_JOIN
 | 
			
		||||
#define pthread_join32 PTHREAD_JOIN32
 | 
			
		||||
#define pthread_keycreate PTHREAD_KEYCREATE
 | 
			
		||||
#define pthread_key_create PTHREAD_KEY_CREATE
 | 
			
		||||
#define pthread_kill PTHREAD_KILL
 | 
			
		||||
#define pthread_lock_global_np PTHREAD_LOCK_GLOBAL_NP
 | 
			
		||||
#define pthread_mutex_destroy PTHREAD_MUTEX_DESTROY
 | 
			
		||||
#define pthread_mutex_init PTHREAD_MUTEX_INIT
 | 
			
		||||
#define pthread_mutex_lock PTHREAD_MUTEX_LOCK
 | 
			
		||||
#define pthread_mutex_trylock PTHREAD_MUTEX_TRYLOCK
 | 
			
		||||
#define pthread_mutex_unlock PTHREAD_MUTEX_UNLOCK
 | 
			
		||||
#define pthread_mutexattr_create PTHREAD_MUTEXATTR_CREATE
 | 
			
		||||
#define pthread_mutexattr_delete PTHREAD_MUTEXATTR_DELETE
 | 
			
		||||
#define pthread_mutexattr_destroy PTHREAD_MUTEXATTR_DESTROY
 | 
			
		||||
#define pthread_mutexattr_getkind_np PTHREAD_MUTEXATTR_GETKIND_NP
 | 
			
		||||
#define pthread_mutexattr_init PTHREAD_MUTEXATTR_INIT
 | 
			
		||||
#define pthread_mutexattr_setkind_np PTHREAD_MUTEXATTR_SETKIND_NP
 | 
			
		||||
#define pthread_mutexattr_settype_np PTHREAD_MUTEXATTR_SETTYPE_NP
 | 
			
		||||
#define pthread_once PTHREAD_ONCE
 | 
			
		||||
#define pthread_resume_np PTHREAD_RESUME_NP
 | 
			
		||||
#define pthread_self PTHREAD_SELF
 | 
			
		||||
#define pthread_setasynccancel PTHREAD_SETASYNCCANCEL
 | 
			
		||||
#define pthread_setcancel PTHREAD_SETCANCEL
 | 
			
		||||
#define pthread_setcancelstate PTHREAD_SETCANCELSTATE
 | 
			
		||||
#define pthread_setprio PTHREAD_SETPRIO
 | 
			
		||||
#define pthread_setschedparam PTHREAD_SETSCHEDPARAM
 | 
			
		||||
#define pthread_setscheduler PTHREAD_SETSCHEDULER
 | 
			
		||||
#define pthread_setspecific PTHREAD_SETSPECIFIC
 | 
			
		||||
#define pthread_suspend_np PTHREAD_SUSPEND_NP
 | 
			
		||||
#define pthread_testcancel PTHREAD_TESTCANCEL
 | 
			
		||||
#define pthread_unlock_global_np PTHREAD_UNLOCK_GLOBAL_NP
 | 
			
		||||
#define pthread_yield PTHREAD_YIELD
 | 
			
		||||
#define pthread_yield_np PTHREAD_YIELD_NP
 | 
			
		||||
#define XDefaultRootWindow XDEFAULTROOTWINDOW
 | 
			
		||||
#define XDisplayCells XDISPLAYCELLS
 | 
			
		||||
#define XMaxRequestSize XMAXREQUESTSIZE
 | 
			
		||||
#define XScreenOfDisplay XSCREENOFDISPLAY
 | 
			
		||||
#define XSetFillRule XSETFILLRULE
 | 
			
		||||
#define XmActivateProtocol XMACTIVATEPROTOCOL
 | 
			
		||||
#define XmCreateBulletinBoardDialog XMCREATEBULLETINBOARDDIALOG
 | 
			
		||||
#define XmCreateErrorDialog XMCREATEERRORDIALOG
 | 
			
		||||
#define XmCreateWarningDialog XMCREATEWARNINGDIALOG
 | 
			
		||||
#define XmCvtCTToXmString XMCVTCTTOXMSTRING
 | 
			
		||||
#define XmDestroyPixmap XMDESTROYPIXMAP
 | 
			
		||||
#define XmGetPixmap XMGETPIXMAP
 | 
			
		||||
#define XmInstallImage XMINSTALLIMAGE
 | 
			
		||||
#define XmListAddItems XMLISTADDITEMS
 | 
			
		||||
#define XmListDeleteItem XMLISTDELETEITEM
 | 
			
		||||
#define XmListItemExists XMLISTITEMEXISTS
 | 
			
		||||
#define XmListItemPos XMLISTITEMPOS
 | 
			
		||||
#define XmListReplaceItems XMLISTREPLACEITEMS
 | 
			
		||||
#define XmListReplaceItemsPos XMLISTREPLACEITEMSPOS
 | 
			
		||||
#define XmRemoveProtocols XMREMOVEPROTOCOLS
 | 
			
		||||
#define XmRemoveTabGroup XMREMOVETABGROUP
 | 
			
		||||
#define XmSetColorCalculation XMSETCOLORCALCULATION
 | 
			
		||||
#define XmTextCopy XMTEXTCOPY
 | 
			
		||||
#define XmTextCut XMTEXTCUT
 | 
			
		||||
#define XmTextFieldClearSelection XMTEXTFIELDCLEARSELECTION
 | 
			
		||||
#define XmTextFieldCopy XMTEXTFIELDCOPY
 | 
			
		||||
#define XmTextFieldCut XMTEXTFIELDCUT
 | 
			
		||||
#define XmTextFieldGetMaxLength XMTEXTFIELDGETMAXLENGTH
 | 
			
		||||
#define XmTextFieldGetSelectionPosition XMTEXTFIELDGETSELECTIONPOSITION
 | 
			
		||||
#define XmTextFieldPaste XMTEXTFIELDPASTE
 | 
			
		||||
#define XmTextFieldReplace XMTEXTFIELDREPLACE
 | 
			
		||||
#define XmTextFieldSetAddMode XMTEXTFIELDSETADDMODE
 | 
			
		||||
#define XmTextFieldSetHighlight XMTEXTFIELDSETHIGHLIGHT
 | 
			
		||||
#define XmTextFieldSetInsertionPosition XMTEXTFIELDSETINSERTIONPOSITION
 | 
			
		||||
#define XmTextFieldSetMaxLength XMTEXTFIELDSETMAXLENGTH
 | 
			
		||||
#define XmTextFieldShowPosition XMTEXTFIELDSHOWPOSITION
 | 
			
		||||
#define XmTextGetEditable XMTEXTGETEDITABLE
 | 
			
		||||
#define XmTextPaste XMTEXTPASTE
 | 
			
		||||
#define XmTextPosToXY XMTEXTPOSTOXY
 | 
			
		||||
#define XmTextSetEditable XMTEXTSETEDITABLE
 | 
			
		||||
#define XmTextShowPosition XMTEXTSHOWPOSITION
 | 
			
		||||
#define XmUninstallImage XMUNINSTALLIMAGE
 | 
			
		||||
#define XmuCvtStringToBitmap XMUCVTSTRINGTOBITMAP
 | 
			
		||||
#define XrmPutFileDatabase XRMPUTFILEDATABASE
 | 
			
		||||
#define XtAddConverter XTADDCONVERTER
 | 
			
		||||
#define XtError XTERROR
 | 
			
		||||
#define XtVaCreatePopupShell XTVACREATEPOPUPSHELL
 | 
			
		||||
#define pthread_attr_getschedpolicy PTHREAD_ATTR_GETSCHEDPOLICY
 | 
			
		||||
#define pthread_key_delete PTHREAD_KEY_DELETE
 | 
			
		||||
#define xmBulletinBoardWidgetClass XMBULLETINBOARDWIDGETCLASS
 | 
			
		||||
#define xmScaleWidgetClass XMSCALEWIDGETCLASS
 | 
			
		||||
#define XtDisplay XTDISPLAY
 | 
			
		||||
#define XtScreen XTSCREEN
 | 
			
		||||
#define XAllocIconSize XALLOCICONSIZE
 | 
			
		||||
#define XAllocStandardColormap XALLOCSTANDARDCOLORMAP
 | 
			
		||||
#define XAllowEvents XALLOWEVENTS
 | 
			
		||||
#define XBlackPixel XBLACKPIXEL
 | 
			
		||||
#define XCopyColormapAndFree XCOPYCOLORMAPANDFREE
 | 
			
		||||
#define XDefaultGC XDEFAULTGC
 | 
			
		||||
#define XDisplayHeight XDISPLAYHEIGHT
 | 
			
		||||
#define XDisplayWidth XDISPLAYWIDTH
 | 
			
		||||
#define XGetCommand XGETCOMMAND
 | 
			
		||||
#define XGetIconSizes XGETICONSIZES
 | 
			
		||||
#define XKillClient XKILLCLIENT
 | 
			
		||||
#define XListInstalledColormaps XLISTINSTALLEDCOLORMAPS
 | 
			
		||||
#define XRootWindow XROOTWINDOW
 | 
			
		||||
#define XWMGeometry XWMGEOMETRY
 | 
			
		||||
#define XWhitePixel XWHITEPIXEL
 | 
			
		||||
#define XrmCombineDatabase XRMCOMBINEDATABASE
 | 
			
		||||
#define XrmCombineFileDatabase XRMCOMBINEFILEDATABASE
 | 
			
		||||
#define XSetStandardProperties XSETSTANDARDPROPERTIES
 | 
			
		||||
#define XSetState XSETSTATE
 | 
			
		||||
#define XDrawRectangles XDRAWRECTANGLES
 | 
			
		||||
#define XGrabButton XGRABBUTTON
 | 
			
		||||
#define XLookupColor XLOOKUPCOLOR
 | 
			
		||||
#define XMapSubwindows XMAPSUBWINDOWS
 | 
			
		||||
#define XRecolorCursor XRECOLORCURSOR
 | 
			
		||||
#define XStoreBytes XSTOREBYTES
 | 
			
		||||
#define XUngrabButton XUNGRABBUTTON
 | 
			
		||||
#define XUninstallColormap XUNINSTALLCOLORMAP
 | 
			
		||||
#define lib$wait LIB$WAIT
 | 
			
		||||
#define lib$find_file LIB$FIND_FILE
 | 
			
		||||
#define lib$find_file_end LIB$FIND_FILE_END
 | 
			
		||||
#define lib$set_symbol LIB$SET_SYMBOL
 | 
			
		||||
#define lib$sfree1_dd LIB$SFREE1_DD
 | 
			
		||||
#define lib$spawn LIB$SPAWN
 | 
			
		||||
#define sys$assign SYS$ASSIGN
 | 
			
		||||
#define sys$crembx SYS$CREMBX
 | 
			
		||||
#define sys$dassgn SYS$DASSGN
 | 
			
		||||
#define sys$dclexh SYS$DCLEXH
 | 
			
		||||
#define sys$getdviw SYS$GETDVIW
 | 
			
		||||
#define sys$getsyiw SYS$GETSYIW
 | 
			
		||||
#define sys$qio SYS$QIO
 | 
			
		||||
#define sys$qiow SYS$QIOW
 | 
			
		||||
#define sys$setef SYS$SETEF
 | 
			
		||||
#define sys$synch SYS$SYNCH
 | 
			
		||||
#define XDrawText XDRAWTEXT
 | 
			
		||||
#define XtCloseDisplay XTCLOSEDISPLAY
 | 
			
		||||
#define XtDestroyApplicationContext XTDESTROYAPPLICATIONCONTEXT
 | 
			
		||||
#define lib$ediv LIB$EDIV
 | 
			
		||||
#define lib$subx LIB$SUBX
 | 
			
		||||
#define sys$bintim SYS$BINTIM
 | 
			
		||||
#define sys$gettim SYS$GETTIM
 | 
			
		||||
#define XFetchName XFETCHNAME
 | 
			
		||||
#define XPeekIfEvent XPEEKIFEVENT
 | 
			
		||||
#define XQueryKeymap XQUERYKEYMAP
 | 
			
		||||
#endif
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: xmesa.h,v 1.8 2000/05/02 02:30:01 brianp Exp $ */
 | 
			
		||||
/* $Id: xmesa.h,v 1.8.4.1 2000/11/02 18:08:28 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -89,7 +89,7 @@ extern struct Library *XLibBase;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define XMESA_MAJOR_VERSION 3
 | 
			
		||||
#define XMESA_MINOR_VERSION 3
 | 
			
		||||
#define XMESA_MINOR_VERSION 4
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,36 +1,13 @@
 | 
			
		||||
/* $Id: bounce.c,v 1.2 2000/06/27 17:04:43 brianp Exp $ */
 | 
			
		||||
/* $Id: bounce.c,v 1.2.4.1 2000/08/16 20:36:32 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Bouncing ball demo.  Color index mode only!
 | 
			
		||||
 * Bouncing ball demo.
 | 
			
		||||
 *
 | 
			
		||||
 * This program is in the public domain
 | 
			
		||||
 *
 | 
			
		||||
 * Brian Paul
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* Conversion to GLUT by Mark J. Kilgard */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: bounce.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  1999/03/18 08:16:14  joukj
 | 
			
		||||
 *
 | 
			
		||||
 *     cmpstr needs string.h to included to avoid warnings
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/11/28 01:13:02  brianp
 | 
			
		||||
 * now sets an initial window position and size
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/11/28 01:06:57  brianp
 | 
			
		||||
 * now works in RGB mode by default
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 * Conversion to GLUT by Mark J. Kilgard
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -84,9 +61,9 @@ make_ball(void)
 | 
			
		||||
        glColor3f(1, 1, 1);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      x = COS(b) * COS(a);
 | 
			
		||||
      y = SIN(b) * COS(a);
 | 
			
		||||
      z = SIN(a);
 | 
			
		||||
      x = radius * COS(b) * COS(a);
 | 
			
		||||
      y = radius * SIN(b) * COS(a);
 | 
			
		||||
      z = radius * SIN(a);
 | 
			
		||||
      glVertex3f(x, y, z);
 | 
			
		||||
 | 
			
		||||
      x = radius * COS(b) * COS(a + da);
 | 
			
		||||
 
 | 
			
		||||
@@ -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 #####
 | 
			
		||||
 | 
			
		||||
VPATH = RCS
 | 
			
		||||
 | 
			
		||||
INCDIR = [-.include]
 | 
			
		||||
CFLAGS = /include=$(INCDIR)/prefix=all
 | 
			
		||||
LIBDIR = [-.lib]
 | 
			
		||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
 | 
			
		||||
 | 
			
		||||
.ifdef SHARE
 | 
			
		||||
GL_LIBS = $(XLIBS)
 | 
			
		||||
.else
 | 
			
		||||
GL_LIBS = [-.lib]libGLUT/l,libMesaGLU/l,libMesaGL/l,$(XLIBS)
 | 
			
		||||
.endif
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
LIB_DEP = [-.lib]$(GL_LIB) [-.lib]$(GLU_LIB) [-.lib]$(GLUT_LIB)
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
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;
 | 
			
		||||
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 :
 | 
			
		||||
	link $(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: gloss.c,v 1.4 2000/06/27 17:04:43 brianp 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
 | 
			
		||||
@@ -46,7 +46,7 @@ static GLfloat DXrot = 1.0, DYrot = 2.5;
 | 
			
		||||
static GLfloat Black[4] = { 0, 0, 0, 0 };
 | 
			
		||||
static GLfloat White[4] = { 1, 1, 1, 1 };
 | 
			
		||||
static GLfloat Diffuse[4] = { .3, .3, 1.0, 1.0 };  /* blue */
 | 
			
		||||
static GLfloat Shininess = 15;
 | 
			
		||||
static GLfloat Shininess = 6;
 | 
			
		||||
 | 
			
		||||
static GLuint BaseTexture, SpecularTexture;
 | 
			
		||||
static GLboolean DoSpecTexture = GL_TRUE;
 | 
			
		||||
 
 | 
			
		||||
@@ -561,24 +561,28 @@ static void drawSample( int x, int y, int w, int h,
 | 
			
		||||
   if ( drawSmooth ) {
 | 
			
		||||
      glShadeModel( GL_SMOOTH );
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      glShadeModel( GL_FLAT );
 | 
			
		||||
      glColor4f(1, 1, 1, 1);
 | 
			
		||||
   }
 | 
			
		||||
   if ( drawTextured ) {
 | 
			
		||||
      glEnable( GL_TEXTURE_2D );
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glBegin( GL_QUADS );
 | 
			
		||||
      glColor4f( 1.0, 0.0, 0.0, 1.0 );
 | 
			
		||||
      if ( drawSmooth )  glColor4f( 1.0, 0.0, 1.0, 1.0 );
 | 
			
		||||
      glTexCoord2f( 0.0, 0.0 );
 | 
			
		||||
      glVertex2f( -0.8, -0.8 );
 | 
			
		||||
 | 
			
		||||
      glColor4f( 0.0, 1.0, 0.0, 1.0 );
 | 
			
		||||
      if ( drawSmooth )  glColor4f( 1.0, 0.0, 1.0, 1.0 );
 | 
			
		||||
      glTexCoord2f( 1.0, 0.0 );
 | 
			
		||||
      glVertex2f( 0.8, -0.8 );
 | 
			
		||||
 | 
			
		||||
      glColor4f( 0.0, 0.0, 1.0, 1.0 );
 | 
			
		||||
      if ( drawSmooth )  glColor4f( 0.0, 1.0, 0.0, 1.0 );
 | 
			
		||||
      glTexCoord2f( 1.0, 1.0 );
 | 
			
		||||
      glVertex2f( 0.8, 0.8 );
 | 
			
		||||
 | 
			
		||||
      glColor4f( 1.0, 1.0, 1.0, 1.0 );
 | 
			
		||||
      if ( drawSmooth )  glColor4f( 0.0, 1.0, 0.0, 1.0 );
 | 
			
		||||
      glTexCoord2f( 0.0, 1.0 );
 | 
			
		||||
      glVertex2f( -0.8, 0.8 );
 | 
			
		||||
   glEnd();
 | 
			
		||||
@@ -587,7 +591,18 @@ static void drawSample( int x, int y, int w, int h,
 | 
			
		||||
   glShadeModel( GL_FLAT );
 | 
			
		||||
   glDisable( GL_TEXTURE_2D );
 | 
			
		||||
 | 
			
		||||
   if ( displayLevelInfo ) {
 | 
			
		||||
   if ( envMode->mode == GL_DECAL &&
 | 
			
		||||
        (format->baseFormat == GL_ALPHA ||
 | 
			
		||||
         format->baseFormat == GL_LUMINANCE ||
 | 
			
		||||
         format->baseFormat == GL_LUMINANCE_ALPHA ||
 | 
			
		||||
         format->baseFormat == GL_INTENSITY)) {
 | 
			
		||||
      /* undefined format/mode combination */
 | 
			
		||||
      begin2D( w, h );
 | 
			
		||||
      drawStringOutline( "UNDEFINED MODE", 15, h / 2,
 | 
			
		||||
                         labelLevelColor0, labelLevelColor1 );
 | 
			
		||||
      end2D();
 | 
			
		||||
   }
 | 
			
		||||
   else if ( displayLevelInfo ) {
 | 
			
		||||
      GLint width, height, border, components;
 | 
			
		||||
      GLint redSize, greenSize, blueSize, alphaSize;
 | 
			
		||||
      GLint luminanceSize, intensitySize;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: trispd.c,v 1.1 1999/08/19 00:55:40 jtg Exp $ */
 | 
			
		||||
/* $Id: trispd.c,v 1.1.1.1.6.1 2000/10/26 15:26:27 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Simple GLUT program to measure triangle strip rendering speed.
 | 
			
		||||
@@ -7,8 +7,11 @@
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: trispd.c,v $
 | 
			
		||||
 * Revision 1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Initial revision
 | 
			
		||||
 * Revision 1.1.1.1.6.1  2000/10/26 15:26:27  brianp
 | 
			
		||||
 * added a glFinish() call
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.4  1999/03/28 18:24:37  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
@@ -107,6 +110,7 @@ static void Display( void )
 | 
			
		||||
	 }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   glFinish();
 | 
			
		||||
   t1 = glutGet(GLUT_ELAPSED_TIME) * 0.001;
 | 
			
		||||
   
 | 
			
		||||
   if (t1-t0 < MinPeriod) {
 | 
			
		||||
 
 | 
			
		||||
@@ -27,7 +27,8 @@ static int fullscreen = 1;
 | 
			
		||||
static int WIDTH = 640;
 | 
			
		||||
static int HEIGHT = 480;
 | 
			
		||||
 | 
			
		||||
#define FRAME 50
 | 
			
		||||
static GLint T0 = 0;
 | 
			
		||||
static GLint Frames = 0;
 | 
			
		||||
 | 
			
		||||
#define NUMBLOC 5
 | 
			
		||||
 | 
			
		||||
@@ -56,7 +57,7 @@ static float v = 0.5;
 | 
			
		||||
static float alpha = 90.0;
 | 
			
		||||
static float beta = 90.0;
 | 
			
		||||
 | 
			
		||||
static int fog = 0;
 | 
			
		||||
static int fog = 1;
 | 
			
		||||
static int bfcull = 1;
 | 
			
		||||
static int usetex = 1;
 | 
			
		||||
static int cstrip = 0;
 | 
			
		||||
@@ -154,21 +155,6 @@ drawobjs(int *l, float *f)
 | 
			
		||||
      }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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)
 | 
			
		||||
{
 | 
			
		||||
@@ -221,7 +207,6 @@ key(unsigned char k, int x, int y)
 | 
			
		||||
      XMesaSetFXmode(fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW);
 | 
			
		||||
      break;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   case 'j':
 | 
			
		||||
      joyactive = (!joyactive);
 | 
			
		||||
      break;
 | 
			
		||||
@@ -257,6 +242,7 @@ key(unsigned char k, int x, int y)
 | 
			
		||||
      fprintf(stderr, "Done.\n");
 | 
			
		||||
      break;
 | 
			
		||||
   }
 | 
			
		||||
   glutPostRedisplay();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
@@ -366,10 +352,9 @@ dojoy(void)
 | 
			
		||||
static void
 | 
			
		||||
draw(void)
 | 
			
		||||
{
 | 
			
		||||
   static int count = 0;
 | 
			
		||||
   static char frbuf[80];
 | 
			
		||||
   static char frbuf[80] = "";
 | 
			
		||||
   int i;
 | 
			
		||||
   float fr, base, offset;
 | 
			
		||||
   float base, offset;
 | 
			
		||||
 | 
			
		||||
   dojoy();
 | 
			
		||||
 | 
			
		||||
@@ -416,11 +401,6 @@ draw(void)
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
   glPopMatrix();
 | 
			
		||||
 | 
			
		||||
   if ((count % FRAME) == 0) {
 | 
			
		||||
      fr = gettime();
 | 
			
		||||
      sprintf(frbuf, "Frame rate: %f", FRAME / fr);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   glDisable(GL_TEXTURE_2D);
 | 
			
		||||
   glDisable(GL_FOG);
 | 
			
		||||
   glShadeModel(GL_FLAT);
 | 
			
		||||
@@ -449,9 +429,27 @@ draw(void)
 | 
			
		||||
 | 
			
		||||
   glutSwapBuffers();
 | 
			
		||||
 | 
			
		||||
   count++;
 | 
			
		||||
   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();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
main(int ac, char **av)
 | 
			
		||||
{
 | 
			
		||||
@@ -500,7 +498,7 @@ main(int ac, char **av)
 | 
			
		||||
   glutDisplayFunc(draw);
 | 
			
		||||
   glutKeyboardFunc(key);
 | 
			
		||||
   glutSpecialFunc(special);
 | 
			
		||||
   glutIdleFunc(draw);
 | 
			
		||||
   glutIdleFunc(idle);
 | 
			
		||||
 | 
			
		||||
   glEnable(GL_BLEND);
 | 
			
		||||
   /*glBlendFunc(GL_SRC_ALPHA_SATURATE,GL_ONE); */
 | 
			
		||||
 
 | 
			
		||||
@@ -88,7 +88,7 @@ void drawSquares(GLenum mode)
 | 
			
		||||
void processHits (GLint hits, GLuint buffer[])
 | 
			
		||||
{
 | 
			
		||||
   unsigned int i, j;
 | 
			
		||||
   GLuint ii, jj, names, *ptr;
 | 
			
		||||
   GLuint ii = 0, jj = 0, names, *ptr;
 | 
			
		||||
 | 
			
		||||
   printf ("hits = %d\n", hits);
 | 
			
		||||
   ptr = (GLuint *) buffer;
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ void makeCheckImage(void)
 | 
			
		||||
    
 | 
			
		||||
   for (i = 0; i < checkImageHeight; i++) {
 | 
			
		||||
      for (j = 0; j < checkImageWidth; j++) {
 | 
			
		||||
         c = ((((i&0x8)==0)^((j&0x8))==0))*255;
 | 
			
		||||
         c = (((i&0x8)==0)^((j&0x8)==0))*255;
 | 
			
		||||
         checkImage[i][j][0] = (GLubyte) c;
 | 
			
		||||
         checkImage[i][j][1] = (GLubyte) c;
 | 
			
		||||
         checkImage[i][j][2] = (GLubyte) c;
 | 
			
		||||
 
 | 
			
		||||
@@ -41,55 +41,55 @@ GLint cubeList = 1;
 | 
			
		||||
float scp[18][3] = {
 | 
			
		||||
    {
 | 
			
		||||
	1.000000, 0.000000, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	1.000000, 0.000000, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.707107, 0.707107, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.707107, 0.707107, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.000000, 1.000000, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.000000, 1.000000, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	-0.707107, 0.707107, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	-0.707107, 0.707107, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	-1.000000, 0.000000, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	-1.000000, 0.000000, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	-0.707107, -0.707107, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	-0.707107, -0.707107, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.000000, -1.000000, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.000000, -1.000000, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.707107, -0.707107, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	0.707107, -0.707107, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	1.000000, 0.000000, 0.000000
 | 
			
		||||
    },	
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	1.000000, 0.000000, 5.000000
 | 
			
		||||
    },
 | 
			
		||||
@@ -136,7 +136,7 @@ static void Init(void)
 | 
			
		||||
    static float back_mat_diffuse[] = {1.0, 0.0, 0.0, 1.0};
 | 
			
		||||
    static float lmodel_ambient[] = {0.0, 0.0, 0.0, 1.0};
 | 
			
		||||
    static float fog_color[] = {0.8, 0.8, 0.8, 1.0};
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    glFrontFace(GL_CW);
 | 
			
		||||
 | 
			
		||||
    glEnable(GL_DEPTH_TEST);
 | 
			
		||||
@@ -148,7 +148,7 @@ static void Init(void)
 | 
			
		||||
    glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
 | 
			
		||||
    glEnable(GL_LIGHTING);
 | 
			
		||||
    glEnable(GL_LIGHT0);
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    glMaterialfv(GL_FRONT, GL_SHININESS, front_mat_shininess);
 | 
			
		||||
    glMaterialfv(GL_FRONT, GL_SPECULAR, front_mat_specular);
 | 
			
		||||
    glMaterialfv(GL_FRONT, GL_DIFFUSE, front_mat_diffuse);
 | 
			
		||||
@@ -258,7 +258,7 @@ static GLenum Args(int argc, char **argv)
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    rgb = GL_TRUE;
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
    for (i = 1; i < argc; i++) {
 | 
			
		||||
	if (strcmp(argv[i], "-ci") == 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -123,7 +123,7 @@ static void Draw(void)
 | 
			
		||||
    } else {
 | 
			
		||||
	glDisable(GL_LINE_STIPPLE);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    if (mode2) {
 | 
			
		||||
	ci = CI_OFFSET;
 | 
			
		||||
	glEnable(GL_LINE_SMOOTH);
 | 
			
		||||
@@ -170,7 +170,7 @@ static GLenum Args(int argc, char **argv)
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    rgb = GL_TRUE;
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
    for (i = 1; i < argc; i++) {
 | 
			
		||||
	if (strcmp(argv[i], "-ci") == 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@
 | 
			
		||||
 * Nov 20, 1995 use stdlib's rand()/srand() instead of random()/srand48(), etc.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/* 
 | 
			
		||||
/*
 | 
			
		||||
 * Modified by Li Wei(liwei@aiar.xjtu.edu.cn) to be able to run in Windows
 | 
			
		||||
 * 6/13
 | 
			
		||||
 *
 | 
			
		||||
@@ -83,7 +83,7 @@ void FillTorus(float rc, int numc, float rt, int numt)
 | 
			
		||||
 | 
			
		||||
    pi = 3.14159265358979323846;
 | 
			
		||||
    twopi = 2 * pi;
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i < numc; i++) {
 | 
			
		||||
	glBegin(GL_QUAD_STRIP);
 | 
			
		||||
        for (j = 0; j <= numt; j++) {
 | 
			
		||||
@@ -136,7 +136,7 @@ void DrawScene(void)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    glPushMatrix();
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 | 
			
		||||
    gluLookAt(0,0,10, 0,0,0, 0,1,0);
 | 
			
		||||
 | 
			
		||||
@@ -252,7 +252,7 @@ void Init(void)
 | 
			
		||||
    dests[GREENRING][1] = bottom_y;
 | 
			
		||||
    dests[GREENRING][2] = bottom_z;
 | 
			
		||||
 | 
			
		||||
    base = 2.0; 
 | 
			
		||||
    base = 2.0;
 | 
			
		||||
    height = 2.0;
 | 
			
		||||
    theTorus = glGenLists(1);
 | 
			
		||||
    glNewList(theTorus, GL_COMPILE);
 | 
			
		||||
@@ -321,7 +321,7 @@ GLenum Args(int argc, char **argv)
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    rgb = GL_TRUE;
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
    for (i = 1; i < argc; i++) {
 | 
			
		||||
	if (strcmp(argv[i], "-ci") == 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -326,7 +326,7 @@ static GLenum Args(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
    for (i = 1; i < argc; i++) {
 | 
			
		||||
	if (strcmp(argv[i], "-sb") == 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,7 @@ float c[6][4][4][3] = {
 | 
			
		||||
	{
 | 
			
		||||
	    {
 | 
			
		||||
		1.0, 1.0, -1.0
 | 
			
		||||
	    }, 
 | 
			
		||||
	    },
 | 
			
		||||
	    {
 | 
			
		||||
		0.0, 1.0, -1.0
 | 
			
		||||
	    },
 | 
			
		||||
@@ -102,10 +102,10 @@ float c[6][4][4][3] = {
 | 
			
		||||
	    },
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 1.0, -1.0
 | 
			
		||||
	    }, 
 | 
			
		||||
	    },
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 0.0, -1.0
 | 
			
		||||
	    }, 
 | 
			
		||||
	    },
 | 
			
		||||
	    {
 | 
			
		||||
		0.0, 0.0, -1.0
 | 
			
		||||
	    },
 | 
			
		||||
@@ -269,7 +269,7 @@ float c[6][4][4][3] = {
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 0.0, -1.0
 | 
			
		||||
	    },
 | 
			
		||||
	}, 
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 1.0, 0.0
 | 
			
		||||
@@ -283,7 +283,7 @@ float c[6][4][4][3] = {
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 0.0, 0.0
 | 
			
		||||
	    },
 | 
			
		||||
	}, 
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 0.0, 1.0
 | 
			
		||||
@@ -297,7 +297,7 @@ float c[6][4][4][3] = {
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 0.0, 0.0
 | 
			
		||||
	    },
 | 
			
		||||
	}, 
 | 
			
		||||
	},
 | 
			
		||||
	{
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, -1.0, 0.0
 | 
			
		||||
@@ -311,7 +311,7 @@ float c[6][4][4][3] = {
 | 
			
		||||
	    {
 | 
			
		||||
		-1.0, 0.0, 0.0
 | 
			
		||||
	    },
 | 
			
		||||
	}, 
 | 
			
		||||
	},
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
	{
 | 
			
		||||
@@ -463,8 +463,8 @@ GLfloat identity[16] = {
 | 
			
		||||
void BuildCylinder(int numEdges)
 | 
			
		||||
{
 | 
			
		||||
    int i, top = 1.0, bottom = -1.0;
 | 
			
		||||
    float x[100], y[100], angle; 
 | 
			
		||||
    
 | 
			
		||||
    float x[100], y[100], angle;
 | 
			
		||||
 | 
			
		||||
    for (i = 0; i <= numEdges; i++) {
 | 
			
		||||
	angle = i * 2.0 * PI / numEdges;
 | 
			
		||||
	x[i] = cos(angle);   /* was cosf() */
 | 
			
		||||
@@ -505,7 +505,7 @@ void BuildTorus(float rc, int numc, float rt, int numt)
 | 
			
		||||
 | 
			
		||||
    pi = 3.14159265358979323846;
 | 
			
		||||
    twopi = 2.0 * pi;
 | 
			
		||||
 
 | 
			
		||||
 | 
			
		||||
    glNewList(torus, GL_COMPILE);
 | 
			
		||||
    for (i = 0; i < numc; i++) {
 | 
			
		||||
	glBegin(GL_QUAD_STRIP);
 | 
			
		||||
@@ -542,7 +542,7 @@ void BuildCage(void)
 | 
			
		||||
    left   = -4.0;
 | 
			
		||||
    bottom = -4.0;
 | 
			
		||||
    right  = 4.0;
 | 
			
		||||
    top    = 4.0; 
 | 
			
		||||
    top    = 4.0;
 | 
			
		||||
 | 
			
		||||
    inc = 2.0 * 4.0 * 0.1;
 | 
			
		||||
 | 
			
		||||
@@ -631,7 +631,7 @@ void BuildCube(void)
 | 
			
		||||
    glNewList(cube, GL_COMPILE);
 | 
			
		||||
    for (i = 0; i < 6; i++) {
 | 
			
		||||
	for (j = 0; j < 4; j++) {
 | 
			
		||||
	    glNormal3fv(n[i]); 
 | 
			
		||||
	    glNormal3fv(n[i]);
 | 
			
		||||
	    glBegin(GL_POLYGON);
 | 
			
		||||
		glVertex3fv(c[i][j][0]);
 | 
			
		||||
		glVertex3fv(c[i][j][1]);
 | 
			
		||||
@@ -670,7 +670,7 @@ void SetDeepestColor(void)
 | 
			
		||||
    glGetIntegerv(GL_BLUE_BITS, &blueBits);
 | 
			
		||||
 | 
			
		||||
    deepestColor = (redBits >= greenBits) ? COLOR_RED : COLOR_GREEN;
 | 
			
		||||
    deepestColor = (deepestColor >= blueBits) ? deepestColor : COLOR_BLUE; 
 | 
			
		||||
    deepestColor = (deepestColor >= blueBits) ? deepestColor : COLOR_BLUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void SetDefaultSettings(void)
 | 
			
		||||
@@ -726,17 +726,17 @@ void Init(void)
 | 
			
		||||
	image->data = AlphaPadImage(image->sizeX*image->sizeY,
 | 
			
		||||
                                    image->data, 128);
 | 
			
		||||
	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
	gluBuild2DMipmaps(GL_TEXTURE_2D, numComponents, 
 | 
			
		||||
			  image->sizeX, image->sizeY, 
 | 
			
		||||
	gluBuild2DMipmaps(GL_TEXTURE_2D, numComponents,
 | 
			
		||||
			  image->sizeX, image->sizeY,
 | 
			
		||||
			  GL_RGBA, GL_UNSIGNED_BYTE, image->data);
 | 
			
		||||
    } else {
 | 
			
		||||
	image = LoadPPM(imageFileName);
 | 
			
		||||
	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 | 
			
		||||
	gluBuild2DMipmaps(GL_TEXTURE_2D, numComponents, 
 | 
			
		||||
			  image->sizeX, image->sizeY, 
 | 
			
		||||
	gluBuild2DMipmaps(GL_TEXTURE_2D, numComponents,
 | 
			
		||||
			  image->sizeX, image->sizeY,
 | 
			
		||||
			  GL_RGB, GL_UNSIGNED_BYTE, image->data);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    glFogf(GL_FOG_DENSITY, 0.125);
 | 
			
		||||
    glFogi(GL_FOG_MODE, GL_LINEAR);
 | 
			
		||||
    glFogf(GL_FOG_START, 4.0);
 | 
			
		||||
@@ -747,7 +747,7 @@ void Init(void)
 | 
			
		||||
    glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
 | 
			
		||||
    glLightfv(GL_LIGHT0, GL_SPECULAR, specular);
 | 
			
		||||
    glLightfv(GL_LIGHT0, GL_POSITION, position);
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
 | 
			
		||||
    glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
 | 
			
		||||
    glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat_diffuse);
 | 
			
		||||
@@ -845,7 +845,7 @@ void Draw(void)
 | 
			
		||||
    if (autoRotate) {
 | 
			
		||||
	xRotation += .75;
 | 
			
		||||
	yRotation += .375;
 | 
			
		||||
    } 
 | 
			
		||||
    }
 | 
			
		||||
    glutSwapBuffers();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -964,7 +964,7 @@ GLenum Args(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
    numComponents = 4;
 | 
			
		||||
 | 
			
		||||
    for (i = 1; i < argc; i++) {
 | 
			
		||||
 
 | 
			
		||||
@@ -281,7 +281,7 @@ static GLenum Args(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
    for (i = 1; i < argc; i++) {
 | 
			
		||||
	if (strcmp(argv[i], "-sb") == 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -285,7 +285,7 @@ static GLenum Args(int argc, char **argv)
 | 
			
		||||
{
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
 | 
			
		||||
    for (i = 1; i < argc; i++) {
 | 
			
		||||
	if (strcmp(argv[i], "-sb") == 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -128,7 +128,7 @@ static void Animate(void)
 | 
			
		||||
		    glColor3fv(facet->color);
 | 
			
		||||
		} else {
 | 
			
		||||
		    thisColor = facet->color;
 | 
			
		||||
		    glMaterialfv(GL_FRONT_AND_BACK, GL_COLOR_INDEXES, 
 | 
			
		||||
		    glMaterialfv(GL_FRONT_AND_BACK, GL_COLOR_INDEXES,
 | 
			
		||||
				 facet->color);
 | 
			
		||||
		}
 | 
			
		||||
	    } else {
 | 
			
		||||
@@ -182,12 +182,12 @@ static void Animate(void)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void SetColorMap(void) 
 | 
			
		||||
static void SetColorMap(void)
 | 
			
		||||
{
 | 
			
		||||
    static float green[3] = {0.2, 1.0, 0.2};
 | 
			
		||||
    static float red[3] = {1.0, 0.2, 0.2};
 | 
			
		||||
    float *color, percent;
 | 
			
		||||
    GLint *indexes, entries, i, j;
 | 
			
		||||
    float *color = 0, percent;
 | 
			
		||||
    GLint *indexes = 0, entries, i, j;
 | 
			
		||||
 | 
			
		||||
    entries = glutGet(GLUT_WINDOW_COLORMAP_SIZE);
 | 
			
		||||
 | 
			
		||||
@@ -360,7 +360,7 @@ static void InitMaterials(void)
 | 
			
		||||
    glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
 | 
			
		||||
    glEnable(GL_LIGHTING);
 | 
			
		||||
    glEnable(GL_LIGHT0);
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    glMaterialfv(GL_FRONT, GL_SHININESS, front_mat_shininess);
 | 
			
		||||
    glMaterialfv(GL_FRONT, GL_SPECULAR, front_mat_specular);
 | 
			
		||||
    glMaterialfv(GL_FRONT, GL_DIFFUSE, front_mat_diffuse);
 | 
			
		||||
@@ -394,7 +394,7 @@ static void Init(void)
 | 
			
		||||
    glClearColor(0.0, 0.0, 0.0, 0.0);
 | 
			
		||||
 | 
			
		||||
    glShadeModel(GL_FLAT);
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    glFrontFace(GL_CW);
 | 
			
		||||
 | 
			
		||||
    glEnable(GL_DEPTH_TEST);
 | 
			
		||||
@@ -515,7 +515,7 @@ static GLenum Args(int argc, char **argv)
 | 
			
		||||
    GLint i;
 | 
			
		||||
 | 
			
		||||
    rgb = GL_TRUE;
 | 
			
		||||
    doubleBuffer = GL_FALSE;
 | 
			
		||||
    doubleBuffer = GL_TRUE;
 | 
			
		||||
    frames = 10;
 | 
			
		||||
    widthX = 10;
 | 
			
		||||
    widthY = 10;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glxheads.c,v 1.1 2000/06/13 19:41:30 brianp Exp $ */
 | 
			
		||||
/* $Id: glxheads.c,v 1.1.4.1 2000/11/10 17:17:23 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Exercise multiple GLX connections on multiple X displays.
 | 
			
		||||
@@ -139,7 +139,7 @@ AddHead(const char *displayName)
 | 
			
		||||
   if (!glXMakeCurrent(dpy, win, ctx)) {
 | 
			
		||||
      Error(displayName, "glXMakeCurrent failed");
 | 
			
		||||
      printf("glXMakeCurrent failed in Redraw()\n");
 | 
			
		||||
      return;
 | 
			
		||||
      return NULL;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* save the info for this head */
 | 
			
		||||
 
 | 
			
		||||
@@ -53,7 +53,7 @@ PERFORMANCE OF THIS SOFTWARE.
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
/*#undef GL_EXT_polygon_offset   uncomment to use new version*/
 | 
			
		||||
#undef GL_EXT_polygon_offset  /* use GL 1.1 version instead of extension */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifndef EXIT_FAILURE
 | 
			
		||||
 
 | 
			
		||||
@@ -1,61 +1,62 @@
 | 
			
		||||
LIBRARY GLU32
 | 
			
		||||
DESCRIPTION 'GLU for Windows Mesa'
 | 
			
		||||
EXETYPE WINDOWS
 | 
			
		||||
CODE MOVEABLE DISCARDABLE
 | 
			
		||||
DATA MOVEABLE SINGLE
 | 
			
		||||
HEAPSIZE 256000
 | 
			
		||||
 | 
			
		||||
STACKSIZE 4096
 | 
			
		||||
 | 
			
		||||
EXPORTS
 | 
			
		||||
    gluLookAt
 | 
			
		||||
    gluOrtho2D
 | 
			
		||||
    gluPerspective
 | 
			
		||||
    gluPickMatrix
 | 
			
		||||
    gluProject
 | 
			
		||||
    gluUnProject
 | 
			
		||||
    gluErrorString
 | 
			
		||||
    gluScaleImage
 | 
			
		||||
    gluBuild1DMipmaps
 | 
			
		||||
    gluBuild2DMipmaps
 | 
			
		||||
    gluNewQuadric
 | 
			
		||||
    gluDeleteQuadric
 | 
			
		||||
    gluQuadricDrawStyle
 | 
			
		||||
    gluQuadricOrientation
 | 
			
		||||
    gluQuadricNormals
 | 
			
		||||
    gluQuadricTexture
 | 
			
		||||
    gluQuadricCallback
 | 
			
		||||
    gluCylinder
 | 
			
		||||
    gluSphere
 | 
			
		||||
    gluDisk
 | 
			
		||||
    gluPartialDisk
 | 
			
		||||
    gluNewNurbsRenderer
 | 
			
		||||
    gluDeleteNurbsRenderer
 | 
			
		||||
    gluLoadSamplingMatrices
 | 
			
		||||
    gluNurbsProperty
 | 
			
		||||
    gluGetNurbsProperty
 | 
			
		||||
    gluBeginCurve
 | 
			
		||||
    gluEndCurve
 | 
			
		||||
    gluNurbsCurve
 | 
			
		||||
    gluBeginSurface
 | 
			
		||||
    gluEndSurface
 | 
			
		||||
    gluNurbsSurface
 | 
			
		||||
    gluBeginTrim
 | 
			
		||||
    gluEndTrim
 | 
			
		||||
    gluPwlCurve
 | 
			
		||||
    gluNurbsCallback
 | 
			
		||||
    gluNewTess
 | 
			
		||||
    gluDeleteTess
 | 
			
		||||
    gluTessBeginPolygon
 | 
			
		||||
    gluTessBeginContour
 | 
			
		||||
    gluTessVertex
 | 
			
		||||
    gluTessEndContour
 | 
			
		||||
    gluTessEndPolygon
 | 
			
		||||
    gluTessProperty
 | 
			
		||||
    gluTessNormal
 | 
			
		||||
    gluTessCallback
 | 
			
		||||
    gluGetTessProperty
 | 
			
		||||
    gluBeginPolygon
 | 
			
		||||
    gluNextContour
 | 
			
		||||
    gluEndPolygon
 | 
			
		||||
    gluGetString
 | 
			
		||||
LIBRARY GLU32
 | 
			
		||||
DESCRIPTION 'GLU for Windows Mesa'
 | 
			
		||||
EXETYPE WINDOWS
 | 
			
		||||
CODE MOVEABLE DISCARDABLE
 | 
			
		||||
DATA MOVEABLE SINGLE
 | 
			
		||||
HEAPSIZE 256000
 | 
			
		||||
 | 
			
		||||
STACKSIZE 4096
 | 
			
		||||
 | 
			
		||||
EXPORTS
 | 
			
		||||
    gluLookAt
 | 
			
		||||
    gluOrtho2D
 | 
			
		||||
    gluPerspective
 | 
			
		||||
    gluPickMatrix
 | 
			
		||||
    gluProject
 | 
			
		||||
    gluUnProject
 | 
			
		||||
    gluErrorString
 | 
			
		||||
    gluScaleImage
 | 
			
		||||
    gluBuild1DMipmaps
 | 
			
		||||
    gluBuild2DMipmaps
 | 
			
		||||
    gluNewQuadric
 | 
			
		||||
    gluDeleteQuadric
 | 
			
		||||
    gluQuadricDrawStyle
 | 
			
		||||
    gluQuadricOrientation
 | 
			
		||||
    gluQuadricNormals
 | 
			
		||||
    gluQuadricTexture
 | 
			
		||||
    gluQuadricCallback
 | 
			
		||||
    gluCylinder
 | 
			
		||||
    gluSphere
 | 
			
		||||
    gluDisk
 | 
			
		||||
    gluPartialDisk
 | 
			
		||||
    gluNewNurbsRenderer
 | 
			
		||||
    gluDeleteNurbsRenderer
 | 
			
		||||
    gluLoadSamplingMatrices
 | 
			
		||||
    gluNurbsProperty
 | 
			
		||||
    gluGetNurbsProperty
 | 
			
		||||
    gluBeginCurve
 | 
			
		||||
    gluEndCurve
 | 
			
		||||
    gluNurbsCurve
 | 
			
		||||
    gluBeginSurface
 | 
			
		||||
    gluEndSurface
 | 
			
		||||
    gluNurbsSurface
 | 
			
		||||
    gluBeginTrim
 | 
			
		||||
    gluEndTrim
 | 
			
		||||
    gluPwlCurve
 | 
			
		||||
    gluNurbsCallback
 | 
			
		||||
    gluNewTess
 | 
			
		||||
    gluDeleteTess
 | 
			
		||||
;    gluTessBeginPolygon
 | 
			
		||||
;    gluTessBeginContour
 | 
			
		||||
    gluTessVertex
 | 
			
		||||
;    gluTessEndContour
 | 
			
		||||
;    gluTessEndPolygon
 | 
			
		||||
;    gluTessProperty
 | 
			
		||||
;    gluTessNormal
 | 
			
		||||
    gluTessCallback
 | 
			
		||||
;    gluGetTessProperty
 | 
			
		||||
    gluBeginPolygon
 | 
			
		||||
    gluNextContour
 | 
			
		||||
    gluEndPolygon
 | 
			
		||||
    gluGetString
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
# Makefile for GLU 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]
 | 
			
		||||
@@ -10,28 +11,74 @@
 | 
			
		||||
 | 
			
		||||
VPATH = RCS
 | 
			
		||||
 | 
			
		||||
INCDIR = $disk2:[-.include]
 | 
			
		||||
INCDIR = [-.include]
 | 
			
		||||
LIBDIR = [-.lib]
 | 
			
		||||
CFLAGS = /include=$(INCDIR)/define=(FBIND=1)
 | 
			
		||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
 | 
			
		||||
 | 
			
		||||
SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
 | 
			
		||||
	project.c quadric.c tess.c tess_fist.c tess_hash.c tess_heap.c \
 | 
			
		||||
	tess_winding.c tess_clip.c
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
OBJECTS =glu.obj,mipmap.obj,nurbs.obj,nurbscrv.obj,nurbssrf.obj,nurbsutl.obj,\
 | 
			
		||||
	project.obj,quadric.obj,tess.obj,tess_fist.obj,tess_hash.obj,\
 | 
			
		||||
	tess_heap.obj,tess_winding.obj,tess_clip.obj
 | 
			
		||||
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 #####
 | 
			
		||||
 | 
			
		||||
VERSION=MesaGlu V3.1
 | 
			
		||||
VERSION=Mesa V3.1
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
# Make the library:
 | 
			
		||||
$(LIBDIR)$(GLU_LIB) : $(OBJECTS)
 | 
			
		||||
# 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
 | 
			
		||||
@@ -41,7 +88,13 @@ $(LIBDIR)$(GLU_LIB) : $(OBJECTS)
 | 
			
		||||
  @ WRITE_ FILE "IDENTIFICATION=""$(VERSION)"""
 | 
			
		||||
  @ WRITE_ FILE "GSMATCH=LEQUAL,3,1
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS)"
 | 
			
		||||
  @ WRITE_ FILE "[-.lib]libmesagl.exe/SHARE"
 | 
			
		||||
  @ 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
 | 
			
		||||
@@ -49,16 +102,79 @@ $(LIBDIR)$(GLU_LIB) : $(OBJECTS)
 | 
			
		||||
  @ 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 $(GLU_LIB) ..."
 | 
			
		||||
  @ LINK_/noinform/NODEB/SHARE=$(GLU_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
 | 
			
		||||
  @ WRITE_ SYS$OUTPUT "  linking $(GL_LIB) ..."
 | 
			
		||||
  @ LINK_/NODEB/SHARE=$(GL_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
 | 
			
		||||
.else
 | 
			
		||||
  @ $(MAKELIB) $(GLU_LIB) $(OBJECTS)
 | 
			
		||||
  @ $(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 $(GLU_LIB)* $(LIBDIR)
 | 
			
		||||
  @ rename $(GL_LIB)* $(LIBDIR)
 | 
			
		||||
 | 
			
		||||
clean :
 | 
			
		||||
	delete *.obj;*
 | 
			
		||||
	purge
 | 
			
		||||
	delete *.obj;*
 | 
			
		||||
 | 
			
		||||
include mms_depend.
 | 
			
		||||
aatriangle.obj : aatriangle.c
 | 
			
		||||
 | 
			
		||||
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,8 +1,8 @@
 | 
			
		||||
/* $Id: glu.c,v 1.21 2000/07/18 01:13:28 brianp Exp $ */
 | 
			
		||||
/* $Id: glu.c,v 1.21.2.3 2001/05/14 19:11:33 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
@@ -302,7 +302,7 @@ const GLubyte *GLAPIENTRY
 | 
			
		||||
gluGetString(GLenum name)
 | 
			
		||||
{
 | 
			
		||||
   static char *extensions = "GL_EXT_abgr";
 | 
			
		||||
   static char *version = "1.1 Mesa 3.3";
 | 
			
		||||
   static char *version = "1.1 Mesa 3.4.2";
 | 
			
		||||
 | 
			
		||||
   switch (name) {
 | 
			
		||||
   case GLU_EXTENSIONS:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: mipmap.c,v 1.7 2000/07/11 14:11:04 brianp Exp $ */
 | 
			
		||||
/* $Id: mipmap.c,v 1.7.4.1 2000/10/26 21:48:37 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
@@ -576,6 +576,7 @@ bytes_per_pixel(GLenum format, GLenum type)
 | 
			
		||||
      n = 2;
 | 
			
		||||
      break;
 | 
			
		||||
   case GL_RGB:
 | 
			
		||||
   case GL_BGR:
 | 
			
		||||
      n = 3;
 | 
			
		||||
      break;
 | 
			
		||||
   case GL_RGBA:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: nurbscrv.c,v 1.2 2000/07/11 14:11:04 brianp Exp $ */
 | 
			
		||||
/* $Id: nurbscrv.c,v 1.2.4.1 2000/11/10 17:17:22 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -359,7 +359,7 @@ do_nurbs_curve(GLUnurbsObj * nobj)
 | 
			
		||||
   GLint n_ctrl;
 | 
			
		||||
   GLfloat *new_geom_ctrl, *new_color_ctrl, *new_normal_ctrl,
 | 
			
		||||
      *new_texture_ctrl;
 | 
			
		||||
   GLfloat *geom_ctrl, *color_ctrl, *normal_ctrl, *texture_ctrl;
 | 
			
		||||
   GLfloat *geom_ctrl = 0, *color_ctrl = 0, *normal_ctrl = 0, *texture_ctrl = 0;
 | 
			
		||||
   GLint *factors;
 | 
			
		||||
   GLint i, j;
 | 
			
		||||
   GLint geom_dim, color_dim = 0, normal_dim = 0, texture_dim = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: nurbsutl.c,v 1.3 2000/07/11 20:39:00 brianp Exp $ */
 | 
			
		||||
/* $Id: nurbsutl.c,v 1.3.4.1 2000/11/10 17:17:22 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -130,7 +130,7 @@ set_new_t_min_t_max(knot_str_type * geom_knot, knot_str_type * color_knot,
 | 
			
		||||
		    knot_str_type * normal_knot, knot_str_type * texture_knot,
 | 
			
		||||
		    GLfloat maximal_min_knot, GLfloat minimal_max_knot)
 | 
			
		||||
{
 | 
			
		||||
   GLuint t_min, t_max, cnt;
 | 
			
		||||
   GLuint t_min = 0, t_max = 0, cnt = 0;
 | 
			
		||||
 | 
			
		||||
   if (minimal_max_knot - maximal_min_knot < EPSILON) {
 | 
			
		||||
      /* knot common range empty */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: polytest.c,v 1.3 2000/07/11 14:11:04 brianp Exp $ */
 | 
			
		||||
/* $Id: polytest.c,v 1.3.4.1 2000/11/10 17:17:22 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -786,7 +786,7 @@ cut_out_hole(GLUtriangulatorObj * tobj,
 | 
			
		||||
   tess_vertex *v1, *v2, *tmp_vertex;
 | 
			
		||||
   GLuint vertex1_cnt, vertex2_cnt, tmp_vertex_cnt;
 | 
			
		||||
   GLuint i, j, k;
 | 
			
		||||
   GLenum test;
 | 
			
		||||
   GLenum test = 0;
 | 
			
		||||
 | 
			
		||||
   /* find an edge connecting contour and hole not intersecting any other */
 | 
			
		||||
   /* edge belonging to either the contour or any of the other holes */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
# Makefile for GLUT 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]
 | 
			
		||||
@@ -7,122 +8,77 @@
 | 
			
		||||
.include [-]mms-config.
 | 
			
		||||
 | 
			
		||||
##### MACROS #####
 | 
			
		||||
GLUT_MAJOR = 3
 | 
			
		||||
GLUT_MINOR = 7
 | 
			
		||||
 | 
			
		||||
VPATH = RCS
 | 
			
		||||
 | 
			
		||||
INCDIR = [-.include]
 | 
			
		||||
LIBDIR = [-.lib]
 | 
			
		||||
CFLAGS = /nowarn/include=$(INCDIR)/prefix=all
 | 
			
		||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
 | 
			
		||||
 | 
			
		||||
SOURCES = \
 | 
			
		||||
glut_8x13.c \
 | 
			
		||||
glut_9x15.c \
 | 
			
		||||
glut_bitmap.c \
 | 
			
		||||
glut_bwidth.c \
 | 
			
		||||
glut_cindex.c \
 | 
			
		||||
glut_cmap.c \
 | 
			
		||||
glut_cursor.c \
 | 
			
		||||
glut_dials.c \
 | 
			
		||||
glut_dstr.c \
 | 
			
		||||
glut_event.c \
 | 
			
		||||
glut_ext.c \
 | 
			
		||||
glut_fullscrn.c \
 | 
			
		||||
glut_gamemode.c \
 | 
			
		||||
glut_get.c \
 | 
			
		||||
glut_glxext.c \
 | 
			
		||||
glut_hel10.c \
 | 
			
		||||
glut_hel12.c \
 | 
			
		||||
glut_hel18.c \
 | 
			
		||||
glut_init.c \
 | 
			
		||||
glut_input.c \
 | 
			
		||||
glut_joy.c \
 | 
			
		||||
glut_key.c \
 | 
			
		||||
glut_keyctrl.c \
 | 
			
		||||
glut_keyup.c \
 | 
			
		||||
glut_menu.c \
 | 
			
		||||
glut_menu2.c \
 | 
			
		||||
glut_mesa.c \
 | 
			
		||||
glut_modifier.c \
 | 
			
		||||
glut_mroman.c \
 | 
			
		||||
glut_overlay.c \
 | 
			
		||||
glut_roman.c \
 | 
			
		||||
glut_shapes.c \
 | 
			
		||||
glut_space.c \
 | 
			
		||||
glut_stroke.c \
 | 
			
		||||
glut_swap.c \
 | 
			
		||||
glut_swidth.c \
 | 
			
		||||
glut_tablet.c \
 | 
			
		||||
glut_teapot.c \
 | 
			
		||||
glut_tr10.c \
 | 
			
		||||
glut_tr24.c \
 | 
			
		||||
glut_util.c \
 | 
			
		||||
glut_vidresize.c \
 | 
			
		||||
glut_warp.c \
 | 
			
		||||
glut_win.c \
 | 
			
		||||
glut_winmisc.c \
 | 
			
		||||
layerutil.c
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
OBJECTS = \
 | 
			
		||||
glut_8x13.obj,\
 | 
			
		||||
glut_9x15.obj,\
 | 
			
		||||
glut_bitmap.obj,\
 | 
			
		||||
glut_bwidth.obj,\
 | 
			
		||||
glut_cindex.obj,\
 | 
			
		||||
glut_cmap.obj,\
 | 
			
		||||
glut_cursor.obj,\
 | 
			
		||||
glut_dials.obj,\
 | 
			
		||||
glut_dstr.obj,\
 | 
			
		||||
glut_event.obj,\
 | 
			
		||||
glut_ext.obj,\
 | 
			
		||||
glut_fullscrn.obj,\
 | 
			
		||||
glut_gamemode.obj
 | 
			
		||||
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
 | 
			
		||||
 | 
			
		||||
OBJECTS1=glut_get.obj,\
 | 
			
		||||
glut_glxext.obj,\
 | 
			
		||||
glut_hel10.obj,\
 | 
			
		||||
glut_hel12.obj,\
 | 
			
		||||
glut_hel18.obj,\
 | 
			
		||||
glut_init.obj,\
 | 
			
		||||
glut_input.obj,\
 | 
			
		||||
glut_joy.obj,\
 | 
			
		||||
glut_key.obj,\
 | 
			
		||||
glut_keyctrl.obj,\
 | 
			
		||||
glut_keyup.obj,\
 | 
			
		||||
glut_menu.obj,\
 | 
			
		||||
glut_menu2.obj,\
 | 
			
		||||
glut_mesa.obj,\
 | 
			
		||||
glut_modifier.obj
 | 
			
		||||
ASM_SOURCES =
 | 
			
		||||
 | 
			
		||||
OBJECTS2=glut_mroman.obj,\
 | 
			
		||||
glut_overlay.obj,\
 | 
			
		||||
glut_roman.obj,\
 | 
			
		||||
glut_shapes.obj,\
 | 
			
		||||
glut_space.obj,\
 | 
			
		||||
glut_stroke.obj,\
 | 
			
		||||
glut_swap.obj,\
 | 
			
		||||
glut_swidth.obj,\
 | 
			
		||||
glut_tablet.obj,\
 | 
			
		||||
glut_teapot.obj,\
 | 
			
		||||
glut_tr10.obj,\
 | 
			
		||||
glut_tr24.obj,\
 | 
			
		||||
glut_util.obj,\
 | 
			
		||||
glut_vidresize.obj
 | 
			
		||||
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=glut_warp.obj,\
 | 
			
		||||
glut_win.obj,\
 | 
			
		||||
glut_winmisc.obj,\
 | 
			
		||||
layerutil.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 #####
 | 
			
		||||
 | 
			
		||||
VERSION=Glut V3.7
 | 
			
		||||
VERSION=Mesa V3.1
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
# Make the library:
 | 
			
		||||
$(LIBDIR)$(GLUT_LIB) : $(OBJECTS) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)
 | 
			
		||||
# 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
 | 
			
		||||
@@ -130,14 +86,15 @@ $(LIBDIR)$(GLUT_LIB) : $(OBJECTS) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)
 | 
			
		||||
  @ WRITE_ FILE "! mesagl1.opt generated by DESCRIP.$(MMS_EXT)" 
 | 
			
		||||
  @ WRITE_ FILE "!"
 | 
			
		||||
  @ WRITE_ FILE "IDENTIFICATION=""$(VERSION)"""
 | 
			
		||||
  @ WRITE_ FILE "GSMATCH=LEQUAL,3,7
 | 
			
		||||
  @ WRITE_ FILE "GSMATCH=LEQUAL,3,1
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS1)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS2)"
 | 
			
		||||
  @ WRITE_ FILE "$(OBJECTS3)"
 | 
			
		||||
  @ WRITE_ FILE "[-.lib]libmesaglu.exe/SHARE"
 | 
			
		||||
  @ WRITE_ FILE "[-.lib]libmesagl.exe/SHARE"
 | 
			
		||||
  @ write file "sys$library:decw$xmulibshr.exe/share"
 | 
			
		||||
  @ 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
 | 
			
		||||
@@ -145,18 +102,79 @@ $(LIBDIR)$(GLUT_LIB) : $(OBJECTS) $(OBJECTS1) $(OBJECTS2) $(OBJECTS3)
 | 
			
		||||
  @ 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 $(GLUT_LIB) ..."
 | 
			
		||||
  @ LINK_/NODEB/SHARE=$(GLUT_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
 | 
			
		||||
  @ WRITE_ SYS$OUTPUT "  linking $(GL_LIB) ..."
 | 
			
		||||
  @ LINK_/NODEB/SHARE=$(GL_LIB)/MAP=mesagl.map/FULL mesagl1.opt/opt,mesagl.opt/opt
 | 
			
		||||
.else
 | 
			
		||||
  @ $(MAKELIB) $(GLUT_LIB) $(OBJECTS)
 | 
			
		||||
  @ library $(GLUT_LIB) $(OBJECTS1)
 | 
			
		||||
  @ library $(GLUT_LIB) $(OBJECTS2)
 | 
			
		||||
  @ library $(GLUT_LIB) $(OBJECTS3)
 | 
			
		||||
  @ $(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 $(GLUT_LIB)* $(LIBDIR)
 | 
			
		||||
  @ rename $(GL_LIB)* $(LIBDIR)
 | 
			
		||||
 | 
			
		||||
clean :
 | 
			
		||||
	delete *.obj;*
 | 
			
		||||
	purge
 | 
			
		||||
	delete *.obj;*
 | 
			
		||||
 | 
			
		||||
include mms_depend.
 | 
			
		||||
aatriangle.obj : aatriangle.c
 | 
			
		||||
 | 
			
		||||
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.
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@ void
 | 
			
		||||
__glutSetCursor(GLUTwindow *window)
 | 
			
		||||
{
 | 
			
		||||
  int cursor = window->cursor;
 | 
			
		||||
  Cursor xcursor;
 | 
			
		||||
  Cursor xcursor = 0;
 | 
			
		||||
 | 
			
		||||
  if (cursor >= 0 &&
 | 
			
		||||
    cursor < sizeof(cursorTable) / sizeof(cursorTable[0])) {
 | 
			
		||||
 
 | 
			
		||||
@@ -630,7 +630,7 @@ findMatch(FrameBufferMode * fbmodes, int nfbmodes,
 | 
			
		||||
{
 | 
			
		||||
  FrameBufferMode *found;
 | 
			
		||||
  int *bestScore, *thisScore;
 | 
			
		||||
  int i, j, numok, result, worse, better;
 | 
			
		||||
  int i, j, numok, result = 0, worse, better;
 | 
			
		||||
 | 
			
		||||
  found = NULL;
 | 
			
		||||
  numok = 1;            /* "num" capability is indexed from 1,
 | 
			
		||||
@@ -760,7 +760,7 @@ parseCriteria(char *word, Criterion * criterion, int *mask,
 | 
			
		||||
  Bool * allowDoubleAsSingle)
 | 
			
		||||
{
 | 
			
		||||
  char *cstr, *vstr, *response;
 | 
			
		||||
  int comparator, value;
 | 
			
		||||
  int comparator, value = 0;
 | 
			
		||||
  int rgb, rgba, acc, acca, count, i;
 | 
			
		||||
 | 
			
		||||
  cstr = strpbrk(word, "=><!~");
 | 
			
		||||
 
 | 
			
		||||
@@ -158,7 +158,7 @@ findMatch(DisplayMode * dmodes, int ndmodes,
 | 
			
		||||
{
 | 
			
		||||
  DisplayMode *found;
 | 
			
		||||
  int *bestScore, *thisScore;
 | 
			
		||||
  int i, j, numok, result, worse, better;
 | 
			
		||||
  int i, j, numok, result = 0, worse, better;
 | 
			
		||||
 | 
			
		||||
  found = NULL;
 | 
			
		||||
  numok = 1;            /* "num" capability is indexed from 1,
 | 
			
		||||
@@ -382,7 +382,7 @@ static int
 | 
			
		||||
parseCriteria(char *word, Criterion * criterion)
 | 
			
		||||
{
 | 
			
		||||
  char *cstr, *vstr, *response;
 | 
			
		||||
  int comparator, value;
 | 
			
		||||
  int comparator, value = 0;
 | 
			
		||||
 | 
			
		||||
  cstr = strpbrk(word, "=><!~");
 | 
			
		||||
  if (cstr) {
 | 
			
		||||
 
 | 
			
		||||
@@ -311,7 +311,7 @@ probeDevices(void)
 | 
			
		||||
  XButtonInfoPtr b;
 | 
			
		||||
  XValuatorInfoPtr v;
 | 
			
		||||
  XAxisInfoPtr a;
 | 
			
		||||
  int num_dev, btns, dials;
 | 
			
		||||
  int num_dev = 0, btns = 0, dials = 0;
 | 
			
		||||
  int i, j, k;
 | 
			
		||||
#endif /* !_WIN32 */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -99,8 +99,8 @@ ifSunCreator(void)
 | 
			
		||||
{
 | 
			
		||||
  char *xvendor, *glvendor, *renderer;
 | 
			
		||||
  int isSunCreator = 0; /* Until proven that it is. */
 | 
			
		||||
  int savedDisplayMode;
 | 
			
		||||
  char *savedDisplayString;
 | 
			
		||||
  int savedDisplayMode = 0;
 | 
			
		||||
  char *savedDisplayString = 0;
 | 
			
		||||
  GLUTwindow *window;
 | 
			
		||||
 | 
			
		||||
#define VENDOR_SUN "Sun Microsystems"
 | 
			
		||||
@@ -154,7 +154,7 @@ menuVisualSetup(void)
 | 
			
		||||
  Bool presumablyMesa;
 | 
			
		||||
  int layer, nVisuals, i, dummy;
 | 
			
		||||
  unsigned long *placeHolders = NULL;
 | 
			
		||||
  int numPlaceHolders;
 | 
			
		||||
  int numPlaceHolders = 0;
 | 
			
		||||
  Bool allocateHigh;
 | 
			
		||||
 | 
			
		||||
  allocateHigh = ifSunCreator();
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.20 2000/07/14 14:55:04 brianp Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.20.2.2 2001/03/23 17:08:08 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
@@ -77,6 +77,7 @@ CORE_SOURCES = \
 | 
			
		||||
	stages.c \
 | 
			
		||||
	state.c \
 | 
			
		||||
	stencil.c \
 | 
			
		||||
	texformat.c \
 | 
			
		||||
	teximage.c \
 | 
			
		||||
	texobj.c \
 | 
			
		||||
	texstate.c \
 | 
			
		||||
@@ -132,9 +133,9 @@ DRIVER_SOURCES = \
 | 
			
		||||
	FX/fxvsetup.c \
 | 
			
		||||
	FX/fxglidew.c
 | 
			
		||||
 | 
			
		||||
ASM_SOURCES = 
 | 
			
		||||
ASM_SOURCES =
 | 
			
		||||
 | 
			
		||||
ADDITIONAL_OBJ = 
 | 
			
		||||
ADDITIONAL_OBJ =
 | 
			
		||||
 | 
			
		||||
OBJECTS = $(ASM_SOURCES:.S=.o) \
 | 
			
		||||
	$(CORE_SOURCES:.c=.o) \
 | 
			
		||||
@@ -222,6 +223,7 @@ X86/3dnow.o: X86/3dnow.c
 | 
			
		||||
X86/katmai.o: X86/katmai.c
 | 
			
		||||
	$(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
#default:
 | 
			
		||||
@@ -234,7 +236,7 @@ clean:
 | 
			
		||||
targets: $(LIBDIR)/$(GL_LIB)
 | 
			
		||||
 | 
			
		||||
# Make the library
 | 
			
		||||
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
 | 
			
		||||
$(LIBDIR)/$(GL_LIB): $(GENERATED_SOURCES) $(OBJECTS)
 | 
			
		||||
	$(MAKELIB) $(GL_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
 | 
			
		||||
	rm -f $(LIBDIR)/$(GL_LIB)*
 | 
			
		||||
	mv $(GL_LIB)* $(LIBDIR)
 | 
			
		||||
@@ -249,9 +251,9 @@ include depend
 | 
			
		||||
#
 | 
			
		||||
# Run 'make dep' to update the dependencies if you change what's included
 | 
			
		||||
# by any source file.
 | 
			
		||||
# 
 | 
			
		||||
dep: $(CORE_SOURCES) $(DRIVER_SOURCES)
 | 
			
		||||
	makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES)
 | 
			
		||||
#
 | 
			
		||||
dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(ASM_SOURCES)
 | 
			
		||||
	makedepend -fdepend -Y -I../include $(CFLAGS) -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(ASM_SOURCES)
 | 
			
		||||
 | 
			
		||||
tags:
 | 
			
		||||
	etags `find . -name \*.[ch]` `find ../include`
 | 
			
		||||
 
 | 
			
		||||
@@ -1511,7 +1511,7 @@ static void SetRenderStates( GLcontext *ctx )
 | 
			
		||||
   /*================================================*/
 | 
			
		||||
   /* Check too see if there are new TEXTURE states. */
 | 
			
		||||
   /*================================================*/
 | 
			
		||||
   if ( ctx->Texture.Enabled )
 | 
			
		||||
   if ( ctx->Texture.ReallyEnabled )
 | 
			
		||||
   {
 | 
			
		||||
      switch( ctx->Texture.Set[ctx->Texture.CurrentSet].EnvMode )
 | 
			
		||||
      {
 | 
			
		||||
@@ -1871,9 +1871,9 @@ static void DebugRenderStates( GLcontext *ctx, BOOL bForce )
 | 
			
		||||
   /*================================================*/
 | 
			
		||||
   /* Check too see if there are new TEXTURE states. */
 | 
			
		||||
   /*================================================*/
 | 
			
		||||
   if ( texture != ctx->Texture.Enabled )
 | 
			
		||||
   if ( texture != ctx->Texture.ReallyEnabled )
 | 
			
		||||
   {
 | 
			
		||||
	texture = ctx->Texture.Enabled;
 | 
			
		||||
	texture = ctx->Texture.ReallyEnabled;
 | 
			
		||||
	DPF(( 0, "\tTexture\t\t%s", (texture) ? "ENABLED" : "--------" ));
 | 
			
		||||
   }	
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -389,7 +389,7 @@ triangle_func ggiGetTriangleFunc(GLcontext *ctx)
 | 
			
		||||
	if (ctx->Stencil.Enabled) return NULL;
 | 
			
		||||
	if (ctx->Polygon.SmoothFlag) return NULL;
 | 
			
		||||
	if (ctx->Polygon.StippleFlag) return NULL;
 | 
			
		||||
	if (ctx->Texture.Enabled) return NULL;  
 | 
			
		||||
	if (ctx->Texture.ReallyEnabled) return NULL;  
 | 
			
		||||
	if (ctx->Light.ShadeModel==GL_SMOOTH) return NULL;
 | 
			
		||||
	if (ctx->Depth.Test && ctx->Depth.Func != GL_LESS) return NULL;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: fbdev_mode.c,v 1.4 2000/01/07 08:34:44 jtaylor Exp $
 | 
			
		||||
/* $Id: fbdev_mode.c,v 1.4.4.1 2000/11/15 10:27:44 jtaylor Exp $
 | 
			
		||||
******************************************************************************
 | 
			
		||||
 | 
			
		||||
   display-fbdev-mesa
 | 
			
		||||
@@ -80,7 +80,7 @@ static int do_setmode(ggi_visual *vis)
 | 
			
		||||
	priv->have_accel = 0;
 | 
			
		||||
	for (id = 1; GGIMesa_fbdev_getapi(vis, id, libname, libargs) == 0; id++) 
 | 
			
		||||
	{
 | 
			
		||||
		if (_ggiOpenDL(vis, libname, libargs, NULL) == NULL) 
 | 
			
		||||
		if (_ggiOpenDL(vis, libname, libargs, NULL) == 0) 
 | 
			
		||||
		{
 | 
			
		||||
			fprintf(stderr, "display-fbdev-mesa: Error opening the "
 | 
			
		||||
				"%s (%s) library.\n", libname, libargs);
 | 
			
		||||
@@ -91,7 +91,7 @@ static int do_setmode(ggi_visual *vis)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (priv->oldpriv->accel &&
 | 
			
		||||
	    _ggiOpenDL(vis, priv->accel, NULL, NULL) != NULL) {
 | 
			
		||||
	    _ggiOpenDL(vis, priv->accel, NULL, NULL) != 0) {
 | 
			
		||||
		priv->have_accel = 1;
 | 
			
		||||
	} 
 | 
			
		||||
	else 
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ struct fbdev_priv_mesa
 | 
			
		||||
	char *accel;
 | 
			
		||||
	int have_accel;
 | 
			
		||||
	void *accelpriv;
 | 
			
		||||
	fbdev_hook *oldpriv;	/* Hooks back to the LibGGI fbdev target's private data */
 | 
			
		||||
	ggi_fbdev_priv *oldpriv;	/* Hooks back to the LibGGI fbdev target's private data */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif /* _GGIMESA_DISPLAY_FBDEV_H */
 | 
			
		||||
 
 | 
			
		||||
@@ -725,6 +725,8 @@ void GLAPIENTRY gl3DfxSetPaletteEXT(GLuint *pal)
 | 
			
		||||
static GrScreenResolution_t fxBestResolution(int width, int height, int aux)
 | 
			
		||||
{
 | 
			
		||||
  static int resolutions[][5]={ 
 | 
			
		||||
    { 320, 200, GR_RESOLUTION_320x200, 2, 2 },
 | 
			
		||||
    { 320, 240, GR_RESOLUTION_320x240, 2, 2 },
 | 
			
		||||
    { 512, 384, GR_RESOLUTION_512x384, 2, 2 },
 | 
			
		||||
    { 640, 400, GR_RESOLUTION_640x400, 2, 2 },
 | 
			
		||||
    { 640, 480, GR_RESOLUTION_640x480, 2, 2 },
 | 
			
		||||
@@ -734,15 +736,15 @@ static GrScreenResolution_t fxBestResolution(int width, int height, int aux)
 | 
			
		||||
    ,{ 1024, 768, GR_RESOLUTION_1024x768, 8, 4 }
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef GR_RESOLUTION_1280x1024
 | 
			
		||||
    ,{ 1024, 768, GR_RESOLUTION_1280x1024, 8, 8 }
 | 
			
		||||
    ,{ 1280, 1024, GR_RESOLUTION_1280x1024, 8, 8 }
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef GR_RESOLUTION_1600x1200
 | 
			
		||||
    ,{ 1024, 768, GR_RESOLUTION_1600x1200, 16, 8 }
 | 
			
		||||
    ,{ 1600, 1200, GR_RESOLUTION_1600x1200, 16, 8 }
 | 
			
		||||
#endif
 | 
			
		||||
  };
 | 
			
		||||
  int NUM_RESOLUTIONS = sizeof(resolutions) / (sizeof(int)*5);
 | 
			
		||||
  int i,fbmem;
 | 
			
		||||
  GrScreenResolution_t lastvalidres=resolutions[1][2];
 | 
			
		||||
  GrScreenResolution_t lastvalidres=resolutions[4][2];
 | 
			
		||||
 | 
			
		||||
  fxQueryHardware();
 | 
			
		||||
 | 
			
		||||
@@ -943,7 +945,7 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
 | 
			
		||||
   fxMesa->haveDoubleBuffer=doubleBuffer;
 | 
			
		||||
   fxMesa->haveAlphaBuffer=alphaBuffer;
 | 
			
		||||
   fxMesa->haveGlobalPaletteTexture=GL_FALSE;
 | 
			
		||||
   fxMesa->haveZBuffer=depthSize ? 1 : 0;
 | 
			
		||||
   fxMesa->haveZBuffer=depthSize ? 16 : 0;
 | 
			
		||||
   fxMesa->verbose=verbose;
 | 
			
		||||
   fxMesa->board=glbCurrentBoard;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -274,6 +274,8 @@ static GLbitfield fxDDClear(GLcontext *ctx, GLbitfield mask, GLboolean all,
 | 
			
		||||
      FX_grColorMask(FXTRUE, ctx->Color.ColorMask[ACOMP] && fxMesa->haveAlphaBuffer);
 | 
			
		||||
      if (ctx->Color.DrawDestMask & FRONT_LEFT_BIT)
 | 
			
		||||
        FX_grRenderBuffer(GR_BUFFER_FRONTBUFFER);
 | 
			
		||||
      if (!ctx->Depth.Test || !ctx->Depth.Mask)
 | 
			
		||||
        FX_grDepthMask(FXFALSE);
 | 
			
		||||
      break;
 | 
			
		||||
    default:
 | 
			
		||||
      /* error */
 | 
			
		||||
@@ -984,7 +986,7 @@ static GLboolean fxIsInHardware(GLcontext *ctx)
 | 
			
		||||
    if (ctx->Texture.ReallyEnabled & TEXTURE1_2D) {
 | 
			
		||||
      if (ctx->Texture.Unit[1].EnvMode == GL_BLEND)
 | 
			
		||||
        return GL_FALSE;
 | 
			
		||||
      if (ctx->Texture.Unit[0].Current->Image[0]->Border > 0)
 | 
			
		||||
      if (ctx->Texture.Unit[1].Current->Image[0]->Border > 0)
 | 
			
		||||
        return GL_FALSE;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -52,6 +52,169 @@
 | 
			
		||||
#include "fxdrv.h"
 | 
			
		||||
#include "image.h"
 | 
			
		||||
#include "texutil.h"
 | 
			
		||||
#include "texformat.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLint
 | 
			
		||||
bytesPerTexel(GLint mesaFormat)
 | 
			
		||||
{
 | 
			
		||||
   switch (mesaFormat) {
 | 
			
		||||
   case MESA_FORMAT_RGBA8888:
 | 
			
		||||
      return 4;
 | 
			
		||||
   case MESA_FORMAT_ABGR8888:
 | 
			
		||||
      return 4;
 | 
			
		||||
   case MESA_FORMAT_ARGB8888:
 | 
			
		||||
      return 4;
 | 
			
		||||
   case MESA_FORMAT_RGB888:
 | 
			
		||||
      return 4;
 | 
			
		||||
   case MESA_FORMAT_BGR888:
 | 
			
		||||
      return 4;
 | 
			
		||||
   case MESA_FORMAT_RGB565:
 | 
			
		||||
      return 2;
 | 
			
		||||
   case MESA_FORMAT_ARGB4444:
 | 
			
		||||
      return 2;
 | 
			
		||||
   case MESA_FORMAT_ARGB1555:
 | 
			
		||||
      return 2;
 | 
			
		||||
   case MESA_FORMAT_AL88:
 | 
			
		||||
      return 2;
 | 
			
		||||
   case MESA_FORMAT_RGB332:
 | 
			
		||||
      return 1;
 | 
			
		||||
   case MESA_FORMAT_A8:
 | 
			
		||||
      return 1;
 | 
			
		||||
   case MESA_FORMAT_L8:
 | 
			
		||||
      return 1;
 | 
			
		||||
   case MESA_FORMAT_I8:
 | 
			
		||||
      return 1;
 | 
			
		||||
   case MESA_FORMAT_CI8:
 | 
			
		||||
      return 1;
 | 
			
		||||
   default:
 | 
			
		||||
      return 0;
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This is a bit of a hack.  We just need it for Mesa 3.4.2 in order
 | 
			
		||||
 * to keep the FX driver working.  This is all different in 3.5
 | 
			
		||||
 */
 | 
			
		||||
static GLboolean
 | 
			
		||||
_mesa_convert_teximage(GLint mesaFormat, GLint dstWidth, GLint dstHeight,
 | 
			
		||||
                       void *destPtr, GLint dstStride,
 | 
			
		||||
                       GLint srcWidth, GLint srcHeight,
 | 
			
		||||
                       GLenum format, GLenum type, const GLvoid *srcPtr,
 | 
			
		||||
                       const struct gl_pixelstore_attrib *packing)
 | 
			
		||||
{
 | 
			
		||||
   if (srcWidth != dstWidth || srcHeight != dstHeight) {
 | 
			
		||||
      /* rescale (needed because of Glide's 1:8 texture aspect limitation) */
 | 
			
		||||
      GLvoid *tmpImage;
 | 
			
		||||
      GLint texelBytes;
 | 
			
		||||
      GLboolean b;
 | 
			
		||||
 | 
			
		||||
      assert(dstWidth >= srcWidth);
 | 
			
		||||
      assert(dstHeight >= dstHeight);
 | 
			
		||||
 | 
			
		||||
      texelBytes = _mesa_bytes_per_pixel(format, type);
 | 
			
		||||
      tmpImage = MALLOC(dstWidth * dstHeight * texelBytes);
 | 
			
		||||
      if (!tmpImage) {
 | 
			
		||||
         return GL_FALSE;  /* out of mem */
 | 
			
		||||
      }
 | 
			
		||||
      b = _mesa_convert_texsubimage2d(mesaFormat,
 | 
			
		||||
                                      0, 0,  /* xoffset, yoffset */
 | 
			
		||||
                                      srcWidth, srcHeight,
 | 
			
		||||
                                      dstWidth,
 | 
			
		||||
                                      format, type,
 | 
			
		||||
                                      packing,
 | 
			
		||||
                                      srcPtr, tmpImage);
 | 
			
		||||
      if (!b) {
 | 
			
		||||
         /* can't handle this pixel format/type/packing combination */
 | 
			
		||||
         FREE(tmpImage);
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }      
 | 
			
		||||
 | 
			
		||||
      texelBytes = bytesPerTexel(mesaFormat);
 | 
			
		||||
      if (!texelBytes) {
 | 
			
		||||
         FREE(tmpImage);
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /* rescale now */
 | 
			
		||||
      _mesa_rescale_teximage2d(texelBytes, srcWidth, srcHeight,
 | 
			
		||||
                               dstWidth, dstHeight, tmpImage, destPtr);
 | 
			
		||||
      FREE(tmpImage);
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* rescale not needed */
 | 
			
		||||
      return _mesa_convert_texsubimage2d(mesaFormat,
 | 
			
		||||
                                         0, 0,  /* xoffset, yoffset */
 | 
			
		||||
                                         dstWidth, dstHeight,
 | 
			
		||||
                                         dstWidth,
 | 
			
		||||
                                         format, type,
 | 
			
		||||
                                         packing,
 | 
			
		||||
                                         srcPtr, destPtr);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLboolean
 | 
			
		||||
_mesa_convert_texsubimage(GLint mesaFormat, GLint xoffset, GLint yoffset,
 | 
			
		||||
                          GLint dstWidth, GLint dstHeight,
 | 
			
		||||
                          void *destPtr, GLint dstStride,
 | 
			
		||||
                          GLint subWidth, GLint subHeight,
 | 
			
		||||
                          GLint srcWidth, GLint srcHeight,
 | 
			
		||||
                          GLenum format, GLenum type, const GLvoid *srcPtr,
 | 
			
		||||
                          const struct gl_pixelstore_attrib *packing)
 | 
			
		||||
{
 | 
			
		||||
   if (dstWidth != srcWidth || dstHeight != srcHeight) {
 | 
			
		||||
      /* bail out on texsubimage changes that need rescale.  TexImage2D
 | 
			
		||||
       * will get called instead.
 | 
			
		||||
       */
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      return _mesa_convert_texsubimage2d(mesaFormat,
 | 
			
		||||
                                         xoffset, yoffset,
 | 
			
		||||
                                         subWidth, subHeight,
 | 
			
		||||
                                         dstWidth,
 | 
			
		||||
                                         format, type,
 | 
			
		||||
                                         packing,
 | 
			
		||||
                                         srcPtr, destPtr);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
_mesa_unconvert_teximage(GLint mesaFormat, GLint srcWidth, GLint srcHeight,
 | 
			
		||||
                         const GLvoid *srcPtr,
 | 
			
		||||
                         GLint srcStride, GLint dstWidth, GLint dstHeight,
 | 
			
		||||
                         GLenum dstFormat, GLvoid *dstPtr)
 | 
			
		||||
{
 | 
			
		||||
   if (srcWidth != dstWidth || srcHeight != dstHeight) {
 | 
			
		||||
      /* need to rescale image */
 | 
			
		||||
      GLint texelBytes = bytesPerTexel(mesaFormat);
 | 
			
		||||
      GLvoid *tmpImage;
 | 
			
		||||
 | 
			
		||||
      if (!texelBytes)
 | 
			
		||||
         return;  /* bad format? */
 | 
			
		||||
 | 
			
		||||
      tmpImage = MALLOC(srcWidth * srcHeight * texelBytes);
 | 
			
		||||
      if (!tmpImage) {
 | 
			
		||||
         return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /* convert */
 | 
			
		||||
      _mesa_unconvert_teximage2d(mesaFormat, dstFormat, srcWidth, srcHeight,
 | 
			
		||||
                                 srcPtr, tmpImage);
 | 
			
		||||
      /* rescale */
 | 
			
		||||
      _mesa_rescale_teximage2d(texelBytes, srcWidth, srcHeight,
 | 
			
		||||
                               dstWidth, dstHeight, tmpImage, dstPtr);
 | 
			
		||||
      FREE(tmpImage);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      _mesa_unconvert_teximage2d(mesaFormat, dstFormat, srcWidth, srcHeight,
 | 
			
		||||
                                 srcPtr, dstPtr);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void fxPrintTextureData(tfxTexInfo *ti)
 | 
			
		||||
@@ -848,7 +1011,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
    tfxTexInfo *ti = fxTMGetTexInfo(texObj);
 | 
			
		||||
    tfxMipMapLevel *mml = &ti->mipmapLevel[level];
 | 
			
		||||
    GLint dstWidth, dstHeight, wScale, hScale, texelSize, dstStride;
 | 
			
		||||
    MesaIntTexFormat intFormat;
 | 
			
		||||
    GLint mesaFormat;
 | 
			
		||||
 | 
			
		||||
    fxTexGetFormat(texImage->IntFormat, &gldformat, NULL);
 | 
			
		||||
 | 
			
		||||
@@ -865,7 +1028,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      case GL_INTENSITY12:
 | 
			
		||||
      case GL_INTENSITY16:
 | 
			
		||||
        texelSize = 1;
 | 
			
		||||
        intFormat = MESA_I8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_I8;
 | 
			
		||||
        break;
 | 
			
		||||
      case 1:
 | 
			
		||||
      case GL_LUMINANCE:
 | 
			
		||||
@@ -874,7 +1037,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      case GL_LUMINANCE12:
 | 
			
		||||
      case GL_LUMINANCE16:
 | 
			
		||||
        texelSize = 1;
 | 
			
		||||
        intFormat = MESA_L8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_L8;
 | 
			
		||||
        break;
 | 
			
		||||
      case GL_ALPHA:
 | 
			
		||||
      case GL_ALPHA4:
 | 
			
		||||
@@ -882,7 +1045,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      case GL_ALPHA12:
 | 
			
		||||
      case GL_ALPHA16:
 | 
			
		||||
        texelSize = 1;
 | 
			
		||||
        intFormat = MESA_A8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_A8;
 | 
			
		||||
        break;
 | 
			
		||||
      case GL_COLOR_INDEX:
 | 
			
		||||
      case GL_COLOR_INDEX1_EXT:
 | 
			
		||||
@@ -892,7 +1055,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      case GL_COLOR_INDEX12_EXT:
 | 
			
		||||
      case GL_COLOR_INDEX16_EXT:
 | 
			
		||||
        texelSize = 1;
 | 
			
		||||
        intFormat = MESA_C8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_CI8;
 | 
			
		||||
        break;
 | 
			
		||||
      case 2:
 | 
			
		||||
      case GL_LUMINANCE_ALPHA:
 | 
			
		||||
@@ -903,7 +1066,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      case GL_LUMINANCE12_ALPHA12:
 | 
			
		||||
      case GL_LUMINANCE16_ALPHA16:
 | 
			
		||||
        texelSize = 2;
 | 
			
		||||
        intFormat = MESA_A8_L8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_AL88;
 | 
			
		||||
        break;
 | 
			
		||||
      case 3:
 | 
			
		||||
      case GL_RGB:
 | 
			
		||||
@@ -915,7 +1078,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      case GL_RGB12:
 | 
			
		||||
      case GL_RGB16:
 | 
			
		||||
        texelSize = 2;
 | 
			
		||||
        intFormat = MESA_R5_G6_B5;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_RGB565;
 | 
			
		||||
        break;
 | 
			
		||||
      case 4:
 | 
			
		||||
      case GL_RGBA:
 | 
			
		||||
@@ -926,18 +1089,20 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      case GL_RGBA12:
 | 
			
		||||
      case GL_RGBA16:
 | 
			
		||||
        texelSize = 2;
 | 
			
		||||
        intFormat = MESA_A4_R4_G4_B4;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_ARGB4444;
 | 
			
		||||
        break;
 | 
			
		||||
      case GL_RGB5_A1:
 | 
			
		||||
        texelSize = 2;
 | 
			
		||||
        intFormat = MESA_A1_R5_G5_B5;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_ARGB1555;
 | 
			
		||||
        break;
 | 
			
		||||
      default:
 | 
			
		||||
        gl_problem(NULL, "tdfx driver: texbuildimagemap() bad format");
 | 
			
		||||
        return GL_FALSE;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    _mesa_set_teximage_component_sizes(intFormat, texImage);
 | 
			
		||||
    /*
 | 
			
		||||
    _mesa_set_teximage_component_sizes(mesaFormat, texImage);
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
    /*printf("teximage:\n");*/
 | 
			
		||||
    /* allocate new storage for texture image, if needed */
 | 
			
		||||
@@ -957,7 +1122,7 @@ GLboolean fxDDTexImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
    dstStride = dstWidth * texelSize;
 | 
			
		||||
 | 
			
		||||
    /* store the texture image */
 | 
			
		||||
    if (!_mesa_convert_teximage(intFormat, dstWidth, dstHeight, mml->data,
 | 
			
		||||
    if (!_mesa_convert_teximage(mesaFormat, dstWidth, dstHeight, mml->data,
 | 
			
		||||
                                dstStride,
 | 
			
		||||
                                texImage->Width, texImage->Height,
 | 
			
		||||
                                format, type, pixels, packing)) {
 | 
			
		||||
@@ -1014,7 +1179,7 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
  switch (mml->glideFormat) {
 | 
			
		||||
    case GR_TEXFMT_INTENSITY_8:
 | 
			
		||||
      dstStride = mml->width;
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_I8, xoffset, yoffset,
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_FORMAT_CI8, xoffset, yoffset,
 | 
			
		||||
                                         mml->width, mml->height, mml->data,
 | 
			
		||||
                                         dstStride, width, height,
 | 
			
		||||
                                         texImage->Width, texImage->Height,
 | 
			
		||||
@@ -1022,7 +1187,7 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      break;
 | 
			
		||||
    case GR_TEXFMT_ALPHA_8:
 | 
			
		||||
      dstStride = mml->width;
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_A8, xoffset, yoffset,
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_FORMAT_A8, xoffset, yoffset,
 | 
			
		||||
                                         mml->width, mml->height, mml->data,
 | 
			
		||||
                                         dstStride, width, height,
 | 
			
		||||
                                         texImage->Width, texImage->Height,
 | 
			
		||||
@@ -1030,7 +1195,7 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      break;
 | 
			
		||||
    case GR_TEXFMT_P_8:
 | 
			
		||||
      dstStride = mml->width;
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_C8, xoffset, yoffset,
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_FORMAT_CI8, xoffset, yoffset,
 | 
			
		||||
                                         mml->width, mml->height, mml->data,
 | 
			
		||||
                                         dstStride, width, height,
 | 
			
		||||
                                         texImage->Width, texImage->Height,
 | 
			
		||||
@@ -1038,7 +1203,7 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      break;
 | 
			
		||||
    case GR_TEXFMT_ALPHA_INTENSITY_88:
 | 
			
		||||
      dstStride = mml->width * 2;
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_A8_L8, xoffset, yoffset,
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_FORMAT_AL88, xoffset, yoffset,
 | 
			
		||||
                                         mml->width, mml->height, mml->data,
 | 
			
		||||
                                         dstStride, width, height,
 | 
			
		||||
                                         texImage->Width, texImage->Height,
 | 
			
		||||
@@ -1046,7 +1211,7 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      break;
 | 
			
		||||
    case GR_TEXFMT_RGB_565:
 | 
			
		||||
      dstStride = mml->width * 2;
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_R5_G6_B5, xoffset, yoffset,
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_FORMAT_RGB565, xoffset, yoffset,
 | 
			
		||||
                                         mml->width, mml->height, mml->data,
 | 
			
		||||
                                         dstStride, width, height,
 | 
			
		||||
                                         texImage->Width, texImage->Height,
 | 
			
		||||
@@ -1054,7 +1219,7 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      break;
 | 
			
		||||
    case GR_TEXFMT_ARGB_4444:
 | 
			
		||||
      dstStride = mml->width * 2;
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_A4_R4_G4_B4, xoffset, yoffset,
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_FORMAT_ARGB4444, xoffset, yoffset,
 | 
			
		||||
                                         mml->width, mml->height, mml->data,
 | 
			
		||||
                                         dstStride, width, height,
 | 
			
		||||
                                         texImage->Width, texImage->Height,
 | 
			
		||||
@@ -1062,7 +1227,7 @@ GLboolean fxDDTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
      break;
 | 
			
		||||
    case GR_TEXFMT_ARGB_1555:
 | 
			
		||||
      dstStride = mml->width * 2;
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_A1_R5_G5_B5, xoffset, yoffset,
 | 
			
		||||
      result = _mesa_convert_texsubimage(MESA_FORMAT_ARGB1555, xoffset, yoffset,
 | 
			
		||||
                                         mml->width, mml->height, mml->data,
 | 
			
		||||
                                         dstStride, width, height,
 | 
			
		||||
                                         texImage->Width, texImage->Height,
 | 
			
		||||
@@ -1119,7 +1284,7 @@ GLvoid *fxDDGetTexImage(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
  ti = fxTMGetTexInfo(texObj);
 | 
			
		||||
  mml = &ti->mipmapLevel[level];
 | 
			
		||||
  if (mml->data) {
 | 
			
		||||
    MesaIntTexFormat mesaFormat;
 | 
			
		||||
    GLint mesaFormat;
 | 
			
		||||
    GLenum glFormat;
 | 
			
		||||
    struct gl_texture_image *texImage = texObj->Image[level];
 | 
			
		||||
    GLint srcStride;
 | 
			
		||||
@@ -1130,37 +1295,37 @@ GLvoid *fxDDGetTexImage(GLcontext *ctx, GLenum target, GLint level,
 | 
			
		||||
 | 
			
		||||
    switch (mml->glideFormat) {
 | 
			
		||||
      case GR_TEXFMT_INTENSITY_8:
 | 
			
		||||
        mesaFormat = MESA_I8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_CI8;
 | 
			
		||||
        glFormat = GL_INTENSITY;
 | 
			
		||||
        srcStride = mml->width;
 | 
			
		||||
        break;
 | 
			
		||||
      case GR_TEXFMT_ALPHA_INTENSITY_88:
 | 
			
		||||
        mesaFormat = MESA_A8_L8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_AL88;
 | 
			
		||||
        glFormat = GL_LUMINANCE_ALPHA;
 | 
			
		||||
        srcStride = mml->width;
 | 
			
		||||
        break;
 | 
			
		||||
      case GR_TEXFMT_ALPHA_8:
 | 
			
		||||
        mesaFormat = MESA_A8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_A8;
 | 
			
		||||
        glFormat = GL_ALPHA;
 | 
			
		||||
        srcStride = mml->width;
 | 
			
		||||
        break;
 | 
			
		||||
      case GR_TEXFMT_RGB_565:
 | 
			
		||||
        mesaFormat = MESA_R5_G6_B5;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_RGB565;
 | 
			
		||||
        glFormat = GL_RGB;
 | 
			
		||||
        srcStride = mml->width * 2;
 | 
			
		||||
        break;
 | 
			
		||||
      case GR_TEXFMT_ARGB_4444:
 | 
			
		||||
        mesaFormat = MESA_A4_R4_G4_B4;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_ARGB4444;
 | 
			
		||||
        glFormat = GL_RGBA;
 | 
			
		||||
        srcStride = mml->width * 2;
 | 
			
		||||
        break;
 | 
			
		||||
      case GR_TEXFMT_ARGB_1555:
 | 
			
		||||
        mesaFormat = MESA_A1_R5_G5_B5;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_ARGB1555;
 | 
			
		||||
        glFormat = GL_RGBA;
 | 
			
		||||
        srcStride = mml->width * 2;
 | 
			
		||||
        break;
 | 
			
		||||
      case GR_TEXFMT_P_8:
 | 
			
		||||
        mesaFormat = MESA_C8;
 | 
			
		||||
        mesaFormat = MESA_FORMAT_CI8;
 | 
			
		||||
        glFormat = GL_COLOR_INDEX;
 | 
			
		||||
        srcStride = mml->width;
 | 
			
		||||
        break;
 | 
			
		||||
 
 | 
			
		||||
@@ -274,7 +274,7 @@ typedef struct {
 | 
			
		||||
} tfxMipMapLevel;
 | 
			
		||||
 | 
			
		||||
typedef struct tfxTexInfo_t {
 | 
			
		||||
  struct tfxTexInfo *next;
 | 
			
		||||
  struct tfxTexInfo_t *next;
 | 
			
		||||
  struct gl_texture_object *tObj;
 | 
			
		||||
 | 
			
		||||
  GLuint lastTimeUsed;
 | 
			
		||||
 
 | 
			
		||||
@@ -55,6 +55,8 @@
 | 
			
		||||
extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define GL_GLEXT_PROTOTYPES 1
 | 
			
		||||
#include "fxdrv.h"
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
 | 
			
		||||
@@ -64,7 +66,6 @@ extern "C" {
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include "GL/fxmesa.h"
 | 
			
		||||
#include "fxdrv.h"
 | 
			
		||||
 | 
			
		||||
#define MAX_MESA_ATTRS  20
 | 
			
		||||
 | 
			
		||||
@@ -867,4 +868,4 @@ BOOL GLAPIENTRY SwapBuffers(HDC hdc)
 | 
			
		||||
  return wglSwapBuffers(hdc);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif /* FX */
 | 
			
		||||
#endif /* __WIN32__ */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +1,21 @@
 | 
			
		||||
/* $Id: osmesa.c,v 1.19 2000/06/27 21:42:14 brianp Exp $ */
 | 
			
		||||
/* $Id: osmesa.c,v 1.19.4.4 2001/02/08 23:51:27 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 *
 | 
			
		||||
 * 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"),
 | 
			
		||||
 * 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
 | 
			
		||||
@@ -103,7 +103,7 @@ OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
 | 
			
		||||
   OSMesaContext osmesa;
 | 
			
		||||
   GLint rshift, gshift, bshift, ashift;
 | 
			
		||||
   GLint rind, gind, bind;
 | 
			
		||||
   GLint indexBits, alphaBits;
 | 
			
		||||
   GLint indexBits, alphaBits = 0;
 | 
			
		||||
   GLboolean rgbmode;
 | 
			
		||||
   GLboolean swalpha;
 | 
			
		||||
   GLuint i4 = 1;
 | 
			
		||||
@@ -227,6 +227,7 @@ OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
 | 
			
		||||
      gl_extensions_enable(&(osmesa->gl_ctx),"GL_HP_occlusion_test");
 | 
			
		||||
      gl_extensions_enable(&(osmesa->gl_ctx), "GL_ARB_texture_cube_map");
 | 
			
		||||
      gl_extensions_enable(&(osmesa->gl_ctx), "GL_EXT_texture_env_combine");
 | 
			
		||||
      gl_extensions_enable(&(osmesa->gl_ctx), "GL_EXT_texture_env_dot3");
 | 
			
		||||
 | 
			
		||||
      osmesa->gl_buffer = gl_create_framebuffer( osmesa->gl_visual,
 | 
			
		||||
                                           osmesa->gl_visual->DepthBits > 0,
 | 
			
		||||
@@ -489,7 +490,10 @@ OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
 | 
			
		||||
   else {
 | 
			
		||||
      *width = c->gl_buffer->Width;
 | 
			
		||||
      *height = c->gl_buffer->Height;
 | 
			
		||||
      *bytesPerValue = sizeof(GLdepth);
 | 
			
		||||
      if (c->gl_visual->DepthBits <= 16)
 | 
			
		||||
         *bytesPerValue = sizeof(GLushort);
 | 
			
		||||
      else
 | 
			
		||||
         *bytesPerValue = sizeof(GLuint);
 | 
			
		||||
      *buffer = c->gl_buffer->DepthBuffer;
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
   }
 | 
			
		||||
@@ -1357,7 +1361,7 @@ static line_func choose_line_function( GLcontext *ctx )
 | 
			
		||||
   OSMesaContext osmesa = (OSMesaContext) ctx;
 | 
			
		||||
 | 
			
		||||
   if (ctx->Line.SmoothFlag)              return NULL;
 | 
			
		||||
   if (ctx->Texture.Enabled)              return NULL;
 | 
			
		||||
   if (ctx->Texture.ReallyEnabled)        return NULL;
 | 
			
		||||
   if (ctx->Light.ShadeModel!=GL_FLAT)    return NULL;
 | 
			
		||||
 | 
			
		||||
   if (ctx->Line.Width==1.0F
 | 
			
		||||
@@ -1543,7 +1547,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx )
 | 
			
		||||
 | 
			
		||||
   if (ctx->Polygon.SmoothFlag)     return NULL;
 | 
			
		||||
   if (ctx->Polygon.StippleFlag)    return NULL;
 | 
			
		||||
   if (ctx->Texture.Enabled)        return NULL;
 | 
			
		||||
   if (ctx->Texture.ReallyEnabled)  return NULL;
 | 
			
		||||
 | 
			
		||||
   if (ctx->RasterMask==DEPTH_BIT
 | 
			
		||||
       && ctx->Depth.Func==GL_LESS
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: wgl.c,v 1.2 1999/09/19 09:59:20 tjump Exp $ */
 | 
			
		||||
/* $Id: wgl.c,v 1.2.6.3 2001/05/09 20:44:52 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
* This library is free software; you can redistribute it and/or
 | 
			
		||||
@@ -30,8 +30,9 @@ extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#include <windows.h>
 | 
			
		||||
 | 
			
		||||
#define GL_GLEXT_PROTOTYPES
 | 
			
		||||
#include <GL/gl.h>
 | 
			
		||||
#include <GL/glext.h>
 | 
			
		||||
//#include <GL/glu.h>
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
@@ -90,7 +91,7 @@ struct __extensions__	ext[] = {
 | 
			
		||||
   { (PROC)glGetColorTableParameterivEXT,	"glGetColorTableParameterivEXT"	},
 | 
			
		||||
   { (PROC)glPointParameterfEXT,		"glPointParameterfEXT"		},
 | 
			
		||||
   { (PROC)glPointParameterfvEXT,		"glPointParameterfvEXT"		},
 | 
			
		||||
   { (PROC)glBlendFuncSeparateINGR,		"glBlendFuncSeparateINGR"	},
 | 
			
		||||
   { (PROC)glBlendFuncSeparateEXT,		"glBlendFuncSeparateEXT"	},
 | 
			
		||||
   { (PROC)glLockArraysEXT,			"glLockArraysEXT"		},
 | 
			
		||||
   { (PROC)glUnlockArraysEXT,			"glUnlockArraysEXT"		}
 | 
			
		||||
};
 | 
			
		||||
@@ -246,7 +247,6 @@ static FIXED FixedFromDouble(double d)
 | 
			
		||||
   return *(FIXED *)&l;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLAPI BOOL GLWINAPI wglUseFontBitmapsA(HDC hdc, DWORD first,
 | 
			
		||||
                                       DWORD count, DWORD listBase)
 | 
			
		||||
{
 | 
			
		||||
@@ -265,46 +265,45 @@ GLAPI BOOL GLWINAPI wglUseFontBitmapsA(HDC hdc, DWORD first,
 | 
			
		||||
   if (listBase<0)
 | 
			
		||||
      return FALSE;
 | 
			
		||||
 | 
			
		||||
   font_list = glGenLists( count );
 | 
			
		||||
   if(font_list == 0)
 | 
			
		||||
      return FALSE;
 | 
			
		||||
   font_list = listBase;
 | 
			
		||||
 | 
			
		||||
   mat.eM11 = FixedFromDouble(1);
 | 
			
		||||
   mat.eM12 = FixedFromDouble(0);
 | 
			
		||||
   mat.eM21 = FixedFromDouble(0);
 | 
			
		||||
   mat.eM22 = FixedFromDouble(1);
 | 
			
		||||
   mat.eM22 = FixedFromDouble(-1);
 | 
			
		||||
 | 
			
		||||
   memset(&gm,0,sizeof(gm));
 | 
			
		||||
 | 
			
		||||
   for (i = 0; i < count; i++)
 | 
			
		||||
   {
 | 
			
		||||
       DWORD err;
 | 
			
		||||
       
 | 
			
		||||
      glNewList( font_list+i, GL_COMPILE );
 | 
			
		||||
 | 
			
		||||
      /* allocate space for the bitmap/outline */
 | 
			
		||||
      size = GetGlyphOutline(hdc, first + i, GGO_BITMAP, &gm, 0, NULL, &mat);
 | 
			
		||||
      if (size == GDI_ERROR)
 | 
			
		||||
      {
 | 
			
		||||
         DWORD err;
 | 
			
		||||
         err = GetLastError();
 | 
			
		||||
         return(FALSE);
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      hBits  = GlobalAlloc(GHND, size);
 | 
			
		||||
      hBits  = GlobalAlloc(GHND, size+1);
 | 
			
		||||
      lpBits = GlobalLock(hBits);
 | 
			
		||||
 | 
			
		||||
      err = 
 | 
			
		||||
      GetGlyphOutline(hdc,    /* handle to device context */
 | 
			
		||||
                      first + i,          /* character to query */
 | 
			
		||||
                      GGO_BITMAP,         /* format of data to return */
 | 
			
		||||
                      &gm,                /* pointer to structure for metrics */
 | 
			
		||||
                      &gm,                /* pointer to structure for metrics*/
 | 
			
		||||
                      size,               /* size of buffer for data */
 | 
			
		||||
                      lpBits,             /* pointer to buffer for data */
 | 
			
		||||
                      &mat                /* pointer to transformation */
 | 
			
		||||
                                          /* matrix structure */
 | 
			
		||||
                  );
 | 
			
		||||
 | 
			
		||||
      if (*lpBits == GDI_ERROR)
 | 
			
		||||
      if (err == GDI_ERROR)
 | 
			
		||||
      {
 | 
			
		||||
         DWORD err;
 | 
			
		||||
         err = GetLastError();
 | 
			
		||||
 | 
			
		||||
         GlobalUnlock(hBits);
 | 
			
		||||
@@ -314,7 +313,7 @@ GLAPI BOOL GLWINAPI wglUseFontBitmapsA(HDC hdc, DWORD first,
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      glBitmap(gm.gmBlackBoxX,gm.gmBlackBoxY,
 | 
			
		||||
               gm.gmptGlyphOrigin.x,
 | 
			
		||||
               -gm.gmptGlyphOrigin.x,
 | 
			
		||||
               gm.gmptGlyphOrigin.y,
 | 
			
		||||
               gm.gmCellIncX,gm.gmCellIncY,
 | 
			
		||||
               (const GLubyte * )lpBits);
 | 
			
		||||
@@ -325,7 +324,7 @@ GLAPI BOOL GLWINAPI wglUseFontBitmapsA(HDC hdc, DWORD first,
 | 
			
		||||
      glEndList( );
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
    return TRUE;
 | 
			
		||||
   return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
GLAPI BOOL GLWINAPI wglUseFontBitmapsW(HDC hdc,DWORD first,DWORD count,DWORD listBase)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,69 +1,20 @@
 | 
			
		||||
/* $Id: wmesa.c,v 1.3 2000/03/03 23:21:57 brianp Exp $ */
 | 
			
		||||
/* $Id: wmesa.c,v 1.3.4.5 2001/05/09 20:42:45 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
*   File name   :   wmesa.c
 | 
			
		||||
*  Version      :   2.3
 | 
			
		||||
*
 | 
			
		||||
*  Display driver for Mesa 2.3  under
 | 
			
		||||
*   Windows95 and WindowsNT
 | 
			
		||||
*
 | 
			
		||||
*   Copyright (C) 1996-  Li Wei
 | 
			
		||||
*  Address      :       Institute of Artificial Intelligence
 | 
			
		||||
*               :           & Robotics
 | 
			
		||||
*               :       Xi'an Jiaotong University
 | 
			
		||||
*  Email        :       liwei@aiar.xjtu.edu.cn
 | 
			
		||||
*  Web page :       http://sun.aiar.xjtu.edu.cn
 | 
			
		||||
*
 | 
			
		||||
*  This file and its associations are partially borrowed from the
 | 
			
		||||
*  Windows NT driver for Mesa 1.8 , written by Mark Leaming
 | 
			
		||||
*  (mark@rsinc.com).
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: wmesa.c,v $
 | 
			
		||||
 * Revision 1.3  2000/03/03 23:21:57  brianp
 | 
			
		||||
 * removed obsolete logicop function
 | 
			
		||||
 * Windows (Win32) device driver for Mesa 3.4
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  2000/02/17 20:52:02  brianp
 | 
			
		||||
 * replaced renderer_string() with get_string() func
 | 
			
		||||
 * Original author:
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:42  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.10  1999/06/15 01:35:06  brianp
 | 
			
		||||
 * small change to wmSetPixel() from TWILMOT@cpr.fr
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.9  1999/05/11 19:06:01  brianp
 | 
			
		||||
 * fixed a few VB->Index bugs (mikec@ensoniq.com)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.8  1999/05/08 15:15:23  brianp
 | 
			
		||||
 * various updates from mikec@ensoniq.com
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.7  1999/04/01 01:27:34  brianp
 | 
			
		||||
 * always flip Y coord in read_rgba_span()
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.6  1999/03/28 21:17:27  brianp
 | 
			
		||||
 * updated SetBuffer driver function
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.5  1999/03/16 01:36:42  brianp
 | 
			
		||||
 * patched dither() to check if Current is NULL, per xzhou@nyx.net
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.4  1999/02/25 14:12:33  keithw
 | 
			
		||||
 * Merged in kw3 patch
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1999/01/03 03:08:57  brianp
 | 
			
		||||
 * Ted Jump's changes
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/08/29 00:26:01
 | 
			
		||||
 * updated for Mesa 3.0 to accomodate EGCS-Mingw32 build
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/06/11 01:42:08  brianp
 | 
			
		||||
 * updated for Mesa 3.0 device driver interface (but not tested)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/06/11 01:18:25  brianp
 | 
			
		||||
 * initial revision
 | 
			
		||||
 *  Copyright (C) 1996-  Li Wei
 | 
			
		||||
 *  Address      :       Institute of Artificial Intelligence
 | 
			
		||||
 *               :           & Robotics
 | 
			
		||||
 *               :       Xi'an Jiaotong University
 | 
			
		||||
 *  Email        :       liwei@aiar.xjtu.edu.cn
 | 
			
		||||
 *  Web page :       http://sun.aiar.xjtu.edu.cn
 | 
			
		||||
 *
 | 
			
		||||
 *  This file and its associations are partially borrowed from the
 | 
			
		||||
 *  Windows NT driver for Mesa 1.8 , written by Mark Leaming
 | 
			
		||||
 *  (mark@rsinc.com).
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -84,7 +35,7 @@
 | 
			
		||||
#include "depth.h"
 | 
			
		||||
#include "wmesadef.h"
 | 
			
		||||
 | 
			
		||||
#pragma warning ( disable : 4133 4761 )
 | 
			
		||||
#pragma warning ( disable : 4100 4133 4761 )
 | 
			
		||||
 | 
			
		||||
#ifdef PROFILE
 | 
			
		||||
//  #include "profile.h"
 | 
			
		||||
@@ -430,9 +381,9 @@ static void clear_color( GLcontext* ctx, GLubyte r, GLubyte g, GLubyte b, GLubyt
 | 
			
		||||
*/
 | 
			
		||||
//static void clear(GLcontext* ctx,
 | 
			
		||||
//                  GLboolean all,GLint x, GLint y, GLint width, GLint height )
 | 
			
		||||
// TODO: I modified this function to match the prototype in dd.h. (swansma@geocities.com)
 | 
			
		||||
//       dd.h does not explain what the return type is so I could not set this to the proper
 | 
			
		||||
//       value.
 | 
			
		||||
// TODO: I modified this function to match the prototype in
 | 
			
		||||
//       dd.h. (swansma@geocities.com)
 | 
			
		||||
 | 
			
		||||
static GLbitfield clear(GLcontext* ctx, GLbitfield mask,
 | 
			
		||||
                  GLboolean all, GLint x, GLint y, GLint width, GLint height)
 | 
			
		||||
{
 | 
			
		||||
@@ -599,7 +550,7 @@ static void dither( GLcontext* ctx, GLboolean enable )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static GLboolean set_buffer( GLcontext* ctx, GLenum mode )
 | 
			
		||||
static GLboolean set_draw_buffer( GLcontext* ctx, GLenum mode )
 | 
			
		||||
{
 | 
			
		||||
   STARTPROFILE
 | 
			
		||||
   /* TODO: this could be better */
 | 
			
		||||
@@ -609,7 +560,15 @@ static GLboolean set_buffer( GLcontext* ctx, GLenum mode )
 | 
			
		||||
   else {
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
   ENDPROFILE(set_buffer)
 | 
			
		||||
   ENDPROFILE(set_draw_buffer)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void set_read_buffer(GLcontext *ctx, GLframebuffer *colorBuffer,
 | 
			
		||||
                            GLenum buffer )
 | 
			
		||||
{
 | 
			
		||||
   /* XXX todo */
 | 
			
		||||
   return;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -711,7 +670,7 @@ extern points_func choose_points_function( GLcontext* ctx )
 | 
			
		||||
{
 | 
			
		||||
    STARTPROFILE
 | 
			
		||||
        if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->RasterMask==0
 | 
			
		||||
            && !ctx->Texture.Enabled  && ctx->Visual->RGBAflag) {
 | 
			
		||||
            && !ctx->Texture.ReallyEnabled  && ctx->Visual->RGBAflag) {
 | 
			
		||||
            ENDPROFILE(choose_points_function)
 | 
			
		||||
                return fast_rgb_points;
 | 
			
		||||
        }
 | 
			
		||||
@@ -769,7 +728,7 @@ static line_func choose_line_function( GLcontext* ctx )
 | 
			
		||||
    STARTPROFILE
 | 
			
		||||
    if (ctx->Line.Width==1.0 && !ctx->Line.SmoothFlag && !ctx->Line.StippleFlag
 | 
			
		||||
        && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0
 | 
			
		||||
        && !ctx->Texture.Enabled && Current->rgb_flag) {
 | 
			
		||||
        && !ctx->Texture.ReallyEnabled && Current->rgb_flag) {
 | 
			
		||||
       ENDPROFILE(choose_line_function)
 | 
			
		||||
       return fast_flat_rgb_line;
 | 
			
		||||
    }
 | 
			
		||||
@@ -1126,7 +1085,8 @@ static void read_rgba_pixels( const GLcontext* ctx,
 | 
			
		||||
   assert(Current->rgb_flag==GL_TRUE);
 | 
			
		||||
   for (i=0; i<n; i++) {
 | 
			
		||||
      if (mask[i]) {
 | 
			
		||||
         Color=GetPixel(DC,x[i],FLIP(y[i]));
 | 
			
		||||
         GLint y2 = Current->Height - y[i] - 1;
 | 
			
		||||
         Color=GetPixel(DC,x[i],y2);
 | 
			
		||||
         rgba[i][RCOMP] = GetRValue(Color);
 | 
			
		||||
         rgba[i][GCOMP] = GetGValue(Color);
 | 
			
		||||
         rgba[i][BCOMP] = GetBValue(Color);
 | 
			
		||||
@@ -1176,7 +1136,8 @@ void setup_DD_pointers( GLcontext* ctx )
 | 
			
		||||
 | 
			
		||||
    ctx->Driver.Dither = dither;
 | 
			
		||||
 | 
			
		||||
    ctx->Driver.SetBuffer = set_buffer;
 | 
			
		||||
    ctx->Driver.SetDrawBuffer = set_draw_buffer;
 | 
			
		||||
    ctx->Driver.SetReadBuffer = set_read_buffer;
 | 
			
		||||
    ctx->Driver.GetBufferSize = buffer_size;
 | 
			
		||||
 | 
			
		||||
    ctx->Driver.PointsFunc = choose_points_function(ctx);
 | 
			
		||||
@@ -1364,7 +1325,11 @@ WMesaContext WMesaCreateContext( HWND hWnd, HPALETTE* Pal,
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    c->gl_buffer = gl_create_framebuffer( c->gl_visual );
 | 
			
		||||
    c->gl_buffer = gl_create_framebuffer( c->gl_visual,
 | 
			
		||||
                                          c->gl_visual->DepthBits > 0,
 | 
			
		||||
                                          c->gl_visual->StencilBits > 0,
 | 
			
		||||
                                          c->gl_visual->AccumRedBits > 0,
 | 
			
		||||
                                          c->gl_visual->AlphaBits > 0 );
 | 
			
		||||
    if (!c->gl_buffer) {
 | 
			
		||||
        gl_destroy_visual( c->gl_visual );
 | 
			
		||||
        gl_destroy_context( c->gl_ctx );
 | 
			
		||||
@@ -1442,6 +1407,14 @@ void /*APIENTRY*/ WMesaMakeCurrent( WMesaContext c )
 | 
			
		||||
void /*APIENTRY*/ WMesaSwapBuffers( void )
 | 
			
		||||
{
 | 
			
		||||
    HDC DC = Current->hDC;
 | 
			
		||||
    GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
 | 
			
		||||
    /* If we're swapping the buffer associated with the current context
 | 
			
		||||
     * we have to flush any pending rendering commands first.
 | 
			
		||||
    */
 | 
			
		||||
    if (Current && Current->gl_ctx == ctx)
 | 
			
		||||
       _mesa_swapbuffers(ctx);
 | 
			
		||||
 | 
			
		||||
    if (Current->db_flag)
 | 
			
		||||
        wmFlush(Current);
 | 
			
		||||
}
 | 
			
		||||
@@ -2153,6 +2126,7 @@ static void smooth_8A8B8G8R_z_triangle( GLcontext *ctx,
 | 
			
		||||
{
 | 
			
		||||
    WMesaContext wmesa = (WMesaContext) ctx->DriverCtx;
 | 
			
		||||
#define INTERP_Z 1
 | 
			
		||||
#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
 | 
			
		||||
#define INTERP_RGB 1
 | 
			
		||||
#define PIXEL_ADDRESS(X,Y) PIXELADDR4(X,Y)
 | 
			
		||||
#define PIXEL_TYPE GLuint
 | 
			
		||||
@@ -2907,7 +2881,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx )
 | 
			
		||||
    int depth = wmesa->cColorBits;
 | 
			
		||||
 | 
			
		||||
    if (ctx->Polygon.SmoothFlag)     return NULL;
 | 
			
		||||
    if (ctx->Texture.Enabled)        return NULL;
 | 
			
		||||
    if (ctx->Texture.ReallyEnabled)  return NULL;
 | 
			
		||||
    if (!wmesa->db_flag) return NULL;
 | 
			
		||||
    /*if (wmesa->xm_buffer->buffer==XIMAGE)*/ {
 | 
			
		||||
    if (   ctx->Light.ShadeModel==GL_SMOOTH
 | 
			
		||||
 
 | 
			
		||||
@@ -458,7 +458,7 @@ extern points_func choose_points_function( GLcontext* ctx )
 | 
			
		||||
{
 | 
			
		||||
   STARTPROFILE
 | 
			
		||||
   if (ctx->Point.Size==1.0 && !ctx->Point.SmoothFlag && ctx->RasterMask==0
 | 
			
		||||
       && !ctx->Texture.Enabled  && ctx->Visual->RGBAflag) {
 | 
			
		||||
       && !ctx->Texture.ReallyEnabled  && ctx->Visual->RGBAflag) {
 | 
			
		||||
   ENDPROFILE(choose_points_function)
 | 
			
		||||
      return fast_rgb_points;
 | 
			
		||||
   }
 | 
			
		||||
@@ -516,7 +516,7 @@ static line_func choose_line_function( GLcontext* ctx )
 | 
			
		||||
	STARTPROFILE
 | 
			
		||||
   if (ctx->Line.Width==1.0 && !ctx->Line.SmoothFlag && !ctx->Line.StippleFlag
 | 
			
		||||
       && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0
 | 
			
		||||
       && !ctx->Texture.Enabled && Current->rgb_flag) {
 | 
			
		||||
       && !ctx->Texture.ReallyEnabled && Current->rgb_flag) {
 | 
			
		||||
   ENDPROFILE(choose_line_function)
 | 
			
		||||
      return fast_flat_rgb_line;
 | 
			
		||||
   }
 | 
			
		||||
@@ -627,7 +627,7 @@ static triangle_func choose_triangle_function( GLcontext *ctx )
 | 
			
		||||
{
 | 
			
		||||
   if (ctx->Polygon.SmoothFlag)     return NULL;
 | 
			
		||||
   if (ctx->Polygon.StippleFlag)    return NULL;
 | 
			
		||||
   if (ctx->Texture.Enabled)        return NULL;
 | 
			
		||||
   if (ctx->Texture.ReallyEnabled)  return NULL;
 | 
			
		||||
 | 
			
		||||
   if (ctx->RasterMask==DEPTH_BIT
 | 
			
		||||
       && ctx->Depth.Func==GL_LESS
 | 
			
		||||
@@ -698,7 +698,7 @@ static polygon_func choose_polygon_function( GLcontext* ctx )
 | 
			
		||||
	STARTPROFILE
 | 
			
		||||
   if (!ctx->Polygon.SmoothFlag && !ctx->Polygon.StippleFlag
 | 
			
		||||
       && ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0
 | 
			
		||||
       && !ctx->Texture.Enabled && Current->rgb_flag==GL_TRUE) {
 | 
			
		||||
       && !ctx->Texture.ReallyEnabled && Current->rgb_flag==GL_TRUE) {
 | 
			
		||||
   ENDPROFILE(choose_polygon_function)
 | 
			
		||||
      return fast_flat_rgb_polygon;
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: fakeglx.c,v 1.34 2000/06/08 22:50:28 brianp Exp $ */
 | 
			
		||||
/* $Id: fakeglx.c,v 1.34.4.9 2001/05/15 20:22:19 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4.2
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -31,7 +31,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 * Thanks to the contributors:
 | 
			
		||||
 *
 | 
			
		||||
 * Initial version:  Philip Brown (philb@CSUA.Berkeley.EDU)
 | 
			
		||||
 * Initial version:  Philip Brown (phil@bolthole.com)
 | 
			
		||||
 * Better glXGetConfig() support: Armin Liebchen (liebchen@asylum.cs.utah.edu)
 | 
			
		||||
 * Further visual-handling refinements: Wolfram Gloger
 | 
			
		||||
 *    (wmglo@Dent.MED.Uni-Muenchen.DE).
 | 
			
		||||
@@ -65,7 +65,7 @@
 | 
			
		||||
#define SERVER_MINOR_VERSION 3
 | 
			
		||||
 | 
			
		||||
/* This is appended onto the glXGetClient/ServerString version strings. */
 | 
			
		||||
#define MESA_GLX_VERSION "Mesa 3.3"
 | 
			
		||||
#define MESA_GLX_VERSION "Mesa 3.4.2"
 | 
			
		||||
 | 
			
		||||
/* Who implemented this GLX? */
 | 
			
		||||
#define VENDOR "Brian Paul"
 | 
			
		||||
@@ -337,22 +337,40 @@ create_glx_visual( Display *dpy, XVisualInfo *visinfo )
 | 
			
		||||
                            );
 | 
			
		||||
   }
 | 
			
		||||
   else if (is_usable_visual( visinfo )) {
 | 
			
		||||
      /* Configure this visual as RGB, double-buffered, depth-buffered. */
 | 
			
		||||
      /* This is surely wrong for some people's needs but what else */
 | 
			
		||||
      /* can be done?  They should use glXChooseVisual(). */
 | 
			
		||||
      return save_glx_visual( dpy, visinfo,
 | 
			
		||||
                              GL_TRUE,   /* rgb */
 | 
			
		||||
                              GL_FALSE,  /* alpha */
 | 
			
		||||
                              GL_TRUE,   /* double */
 | 
			
		||||
                              GL_FALSE,  /* stereo */
 | 
			
		||||
                              DEFAULT_SOFTWARE_DEPTH_BITS,
 | 
			
		||||
                              8 * sizeof(GLstencil),
 | 
			
		||||
                              8 * sizeof(GLaccum), /* r */
 | 
			
		||||
                              8 * sizeof(GLaccum), /* g */
 | 
			
		||||
                              8 * sizeof(GLaccum), /* b */
 | 
			
		||||
                              8 * sizeof(GLaccum), /* a */
 | 
			
		||||
                              0          /* level */
 | 
			
		||||
                            );
 | 
			
		||||
      if (getenv("MESA_GLX_FORCE_CI")) {
 | 
			
		||||
         /* Configure this visual as a COLOR INDEX visual. */
 | 
			
		||||
         return save_glx_visual( dpy, visinfo,
 | 
			
		||||
                                 GL_FALSE,   /* rgb */
 | 
			
		||||
                                 GL_FALSE,  /* alpha */
 | 
			
		||||
                                 GL_TRUE,   /* double */
 | 
			
		||||
                                 GL_FALSE,  /* stereo */
 | 
			
		||||
                                 DEFAULT_SOFTWARE_DEPTH_BITS,
 | 
			
		||||
                                 8 * sizeof(GLstencil),
 | 
			
		||||
                                 0 * sizeof(GLaccum), /* r */
 | 
			
		||||
                                 0 * sizeof(GLaccum), /* g */
 | 
			
		||||
                                 0 * sizeof(GLaccum), /* b */
 | 
			
		||||
                                 0 * sizeof(GLaccum), /* a */
 | 
			
		||||
                                 0          /* level */
 | 
			
		||||
                               );
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         /* Configure this visual as RGB, double-buffered, depth-buffered. */
 | 
			
		||||
         /* This is surely wrong for some people's needs but what else */
 | 
			
		||||
         /* can be done?  They should use glXChooseVisual(). */
 | 
			
		||||
         return save_glx_visual( dpy, visinfo,
 | 
			
		||||
                                 GL_TRUE,   /* rgb */
 | 
			
		||||
                                 GL_FALSE,  /* alpha */
 | 
			
		||||
                                 GL_TRUE,   /* double */
 | 
			
		||||
                                 GL_FALSE,  /* stereo */
 | 
			
		||||
                                 DEFAULT_SOFTWARE_DEPTH_BITS,
 | 
			
		||||
                                 8 * sizeof(GLstencil),
 | 
			
		||||
                                 8 * sizeof(GLaccum), /* r */
 | 
			
		||||
                                 8 * sizeof(GLaccum), /* g */
 | 
			
		||||
                                 8 * sizeof(GLaccum), /* b */
 | 
			
		||||
                                 8 * sizeof(GLaccum), /* a */
 | 
			
		||||
                                 0          /* level */
 | 
			
		||||
                               );
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      fprintf(stderr,"Mesa: error in glXCreateContext: bad visual\n");
 | 
			
		||||
@@ -561,7 +579,7 @@ static XVisualInfo *choose_x_visual( Display *dpy, int screen,
 | 
			
		||||
                                     int preferred_class )
 | 
			
		||||
{
 | 
			
		||||
   XVisualInfo *vis;
 | 
			
		||||
   int xclass, visclass;
 | 
			
		||||
   int xclass, visclass = 0;
 | 
			
		||||
   int depth;
 | 
			
		||||
 | 
			
		||||
   if (rgba) {
 | 
			
		||||
@@ -858,7 +876,7 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list )
 | 
			
		||||
   int *parselist;
 | 
			
		||||
   XVisualInfo *vis;
 | 
			
		||||
   int min_ci = 0;
 | 
			
		||||
   int min_red=0, min_green=0, min_blue=0;
 | 
			
		||||
   int min_red=0, min_green=0, min_blue=0, min_alpha=0;
 | 
			
		||||
   GLboolean rgb_flag = GL_FALSE;
 | 
			
		||||
   GLboolean alpha_flag = GL_FALSE;
 | 
			
		||||
   GLboolean double_flag = GL_FALSE;
 | 
			
		||||
@@ -922,10 +940,8 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list )
 | 
			
		||||
	    break;
 | 
			
		||||
	 case GLX_ALPHA_SIZE:
 | 
			
		||||
	    parselist++;
 | 
			
		||||
            {
 | 
			
		||||
               GLint size = *parselist++;
 | 
			
		||||
               alpha_flag = size>0 ? 1 : 0;
 | 
			
		||||
            }
 | 
			
		||||
            min_alpha = *parselist++;
 | 
			
		||||
            alpha_flag = (min_alpha > 0);
 | 
			
		||||
	    break;
 | 
			
		||||
	 case GLX_DEPTH_SIZE:
 | 
			
		||||
	    parselist++;
 | 
			
		||||
@@ -1004,6 +1020,16 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list )
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* DEBUG
 | 
			
		||||
   printf("glXChooseVisual:\n");
 | 
			
		||||
   printf("  GLX_RED_SIZE = %d\n", min_red);
 | 
			
		||||
   printf("  GLX_GREEN_SIZE = %d\n", min_green);
 | 
			
		||||
   printf("  GLX_BLUE_SIZE = %d\n", min_blue);
 | 
			
		||||
   printf("  GLX_ALPHA_SIZE = %d\n", min_alpha);
 | 
			
		||||
   printf("  GLX_DEPTH_SIZE = %d\n", depth_size);
 | 
			
		||||
   printf("  GLX_STENCIL_SIZE = %d\n", stencil_size);
 | 
			
		||||
   */
 | 
			
		||||
 | 
			
		||||
   /*
 | 
			
		||||
    * Since we're only simulating the GLX extension this function will never
 | 
			
		||||
    * find any real GL visuals.  Instead, all we can do is try to find an RGB
 | 
			
		||||
@@ -1050,15 +1076,32 @@ Fake_glXChooseVisual( Display *dpy, int screen, int *list )
 | 
			
		||||
   if (vis) {
 | 
			
		||||
      /* Note: we're not exactly obeying the glXChooseVisual rules here.
 | 
			
		||||
       * When GLX_DEPTH_SIZE = 1 is specified we're supposed to choose the
 | 
			
		||||
       * largest depth buffer size, which is 32bits/value.  However, we
 | 
			
		||||
       * largest depth buffer size, which is 32bits/value.  Instead, we
 | 
			
		||||
       * return 16 to maintain performance with earlier versions of Mesa.
 | 
			
		||||
       */
 | 
			
		||||
      if (depth_size == 1)
 | 
			
		||||
         depth_size = DEFAULT_SOFTWARE_DEPTH_BITS;
 | 
			
		||||
      else if (depth_size > 24)
 | 
			
		||||
         depth_size = 31;
 | 
			
		||||
      if (depth_size > 24)
 | 
			
		||||
         depth_size = 31;   /* 32 causes int overflow problems */
 | 
			
		||||
      else if (depth_size > 16)
 | 
			
		||||
         depth_size = 24;
 | 
			
		||||
      else if (depth_size > 0)
 | 
			
		||||
         depth_size = DEFAULT_SOFTWARE_DEPTH_BITS; /*16*/
 | 
			
		||||
 | 
			
		||||
      /* If using Glide, make sure we don't try to setup an impossible
 | 
			
		||||
       * visual.  This fixes the Q3 bug in which 24-bit Z was being reported.
 | 
			
		||||
       */
 | 
			
		||||
      {
 | 
			
		||||
         const char *fx = getenv("MESA_GLX_FX");
 | 
			
		||||
         if (fx && fx[0] != 'd')
 | 
			
		||||
            if (depth_size > 16 ||
 | 
			
		||||
                stencil_size > 0 ||
 | 
			
		||||
                (min_red > 1 && min_red > 5) ||
 | 
			
		||||
                (min_green > 1 && min_green > 6) ||
 | 
			
		||||
                (min_blue > 1 && min_blue > 5) ||
 | 
			
		||||
                alpha_flag)
 | 
			
		||||
               return NULL;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      /* we only support one size of stencil and accum buffers. */
 | 
			
		||||
      if (stencil_size > 0)
 | 
			
		||||
         stencil_size = STENCIL_BITS;
 | 
			
		||||
@@ -1838,7 +1881,7 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
 | 
			
		||||
   {
 | 
			
		||||
      int size = sizeof(struct _glxapi_table) / sizeof(void *);
 | 
			
		||||
      (void) size;
 | 
			
		||||
      assert(_glxapi_get_dispatch_table_size() >= size);
 | 
			
		||||
      assert((GLint) _glxapi_get_dispatch_table_size() >= size);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* initialize the whole table to no-ops */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glxheader.h,v 1.1 1999/11/11 01:29:28 brianp Exp $ */
 | 
			
		||||
/* $Id: glxheader.h,v 1.1.4.1 2001/02/09 08:25:18 joukj Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -28,6 +28,10 @@
 | 
			
		||||
#ifndef GLX_HEADER_H
 | 
			
		||||
#define GLX_HEADER_H
 | 
			
		||||
 | 
			
		||||
#ifdef VMS
 | 
			
		||||
#include <vms_x_fix.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_CONFIG_H
 | 
			
		||||
#include "conf.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: xfonts.c,v 1.6 2000/04/19 01:44:02 brianp Exp $ */
 | 
			
		||||
/* $Id: xfonts.c,v 1.6.4.5 2001/04/26 19:28:29 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
@@ -34,6 +34,11 @@
 | 
			
		||||
#include "conf.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef VMS
 | 
			
		||||
#include <GL/vms_x_fix.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
@@ -41,11 +46,9 @@
 | 
			
		||||
#include <X11/Xutil.h>
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
#include "GL/glx.h"
 | 
			
		||||
#include "GL/xmesa.h"
 | 
			
		||||
#include "context.h"
 | 
			
		||||
#include "mem.h"
 | 
			
		||||
#include "xfonts.h"
 | 
			
		||||
#include "xmesaP.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Some debugging info.  */
 | 
			
		||||
@@ -182,7 +185,7 @@ fill_bitmap (Display *dpy, Window win, GC gc,
 | 
			
		||||
static XCharStruct *isvalid(XFontStruct *fs, int which)
 | 
			
		||||
{
 | 
			
		||||
  unsigned int  rows,pages;
 | 
			
		||||
  int           byte1,byte2;
 | 
			
		||||
  int           byte1 = 0,byte2 = 0;
 | 
			
		||||
  int           i,valid = 1;
 | 
			
		||||
 | 
			
		||||
  rows = fs->max_byte1 - fs->min_byte1 + 1;
 | 
			
		||||
@@ -223,7 +226,6 @@ static XCharStruct *isvalid(XFontStruct *fs, int which)
 | 
			
		||||
 | 
			
		||||
void Fake_glXUseXFont( Font font, int first, int count, int listbase )
 | 
			
		||||
{
 | 
			
		||||
  XMesaContext CC;
 | 
			
		||||
  Display *dpy;
 | 
			
		||||
  Window win;
 | 
			
		||||
  Pixmap pixmap;
 | 
			
		||||
@@ -231,26 +233,23 @@ void Fake_glXUseXFont( Font font, int first, int count, int listbase )
 | 
			
		||||
  XGCValues values;
 | 
			
		||||
  unsigned long valuemask;
 | 
			
		||||
  XFontStruct *fs;
 | 
			
		||||
 | 
			
		||||
  GLint swapbytes, lsbfirst, rowlength;
 | 
			
		||||
  GLint skiprows, skippixels, alignment;
 | 
			
		||||
 | 
			
		||||
  unsigned int max_width, max_height, max_bm_width, max_bm_height;
 | 
			
		||||
  GLubyte *bm;
 | 
			
		||||
 | 
			
		||||
  int i;
 | 
			
		||||
 | 
			
		||||
  CC = XMesaGetCurrentContext();
 | 
			
		||||
  dpy = CC->display;
 | 
			
		||||
  win = CC->xm_buffer->frontbuffer;
 | 
			
		||||
  dpy = glXGetCurrentDisplay();
 | 
			
		||||
  if (!dpy)
 | 
			
		||||
     return;  /* I guess glXMakeCurrent wasn't called */
 | 
			
		||||
  win = RootWindow(dpy, DefaultScreen(dpy));
 | 
			
		||||
 | 
			
		||||
  fs = XQueryFont (dpy, font);
 | 
			
		||||
  if (!fs)
 | 
			
		||||
    {
 | 
			
		||||
      gl_error (CC->gl_ctx, GL_INVALID_VALUE,
 | 
			
		||||
                "Couldn't get font structure information");
 | 
			
		||||
  if (!fs) {
 | 
			
		||||
      gl_error(NULL, GL_INVALID_VALUE,
 | 
			
		||||
               "Couldn't get font structure information");
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* Allocate a bitmap that can fit all characters.  */
 | 
			
		||||
  max_width = fs->max_bounds.rbearing - fs->min_bounds.lbearing;
 | 
			
		||||
@@ -261,11 +260,11 @@ void Fake_glXUseXFont( Font font, int first, int count, int listbase )
 | 
			
		||||
  bm = (GLubyte *) MALLOC((max_bm_width * max_bm_height) * sizeof 
 | 
			
		||||
(GLubyte));
 | 
			
		||||
  if (!bm) {
 | 
			
		||||
      XFreeFontInfo( NULL, fs, 0 );
 | 
			
		||||
      gl_error (CC->gl_ctx, GL_OUT_OF_MEMORY,
 | 
			
		||||
      XFreeFontInfo( NULL, fs, 1 );
 | 
			
		||||
      gl_error(NULL, GL_OUT_OF_MEMORY,
 | 
			
		||||
                "Couldn't allocate bitmap in glXUseXFont()");
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
  /* get the page info */
 | 
			
		||||
@@ -376,7 +375,7 @@ bm_height);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  FREE(bm);
 | 
			
		||||
  XFreeFontInfo( NULL, fs, 0 );
 | 
			
		||||
  XFreeFontInfo( NULL, fs, 1 );
 | 
			
		||||
  XFreeGC (dpy, gc);
 | 
			
		||||
 | 
			
		||||
  /* Restore saved packing modes.  */
 | 
			
		||||
@@ -387,16 +386,3 @@ bm_height);
 | 
			
		||||
  glPixelStorei(GL_UNPACK_SKIP_PIXELS, skippixels);
 | 
			
		||||
  glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern void xmesa_xfonts_dummy( void );
 | 
			
		||||
void xmesa_xfonts_dummy( void )
 | 
			
		||||
{
 | 
			
		||||
   /* silence unused var warnings */
 | 
			
		||||
   (void) kernel8;
 | 
			
		||||
   (void) DitherValues;
 | 
			
		||||
   (void) HPCR_DRGB;
 | 
			
		||||
   (void) kernel1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* The End. */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: xfonts.h,v 1.1 2000/04/19 01:44:02 brianp Exp $ */
 | 
			
		||||
/* $Id: xfonts.h,v 1.1.4.1 2001/02/09 08:25:18 joukj Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -28,6 +28,10 @@
 | 
			
		||||
#ifndef XFONTS_H
 | 
			
		||||
#define XFONTS_H
 | 
			
		||||
 | 
			
		||||
#ifdef VMS
 | 
			
		||||
#include <vms_x_fix.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <X11/Xlib.h>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: xmesaP.h,v 1.11 2000/07/19 23:26:35 brianp Exp $ */
 | 
			
		||||
/* $Id: xmesaP.h,v 1.11.2.1 2001/05/01 22:00:47 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -227,7 +227,11 @@ struct xmesa_buffer {
 | 
			
		||||
 | 
			
		||||
   /* Used to do XAllocColor/XFreeColors accounting: */
 | 
			
		||||
   int num_alloced;
 | 
			
		||||
#if defined(XFree86Server)
 | 
			
		||||
   Pixel alloced_colors[256];
 | 
			
		||||
#else
 | 
			
		||||
   unsigned long alloced_colors[256];
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(GLX_DIRECT_RENDERING) && !defined(XFree86Server)
 | 
			
		||||
  __DRIdrawablePrivate *driDrawPriv;	/* back pointer to DRI drawable
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: glapi.c,v 1.42 2000/05/24 17:53:30 brianp Exp $ */
 | 
			
		||||
/* $Id: glapi.c,v 1.42.4.2 2000/11/05 21:24:00 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
@@ -1479,11 +1479,13 @@ get_static_proc_offset(const char *funcName)
 | 
			
		||||
static GLvoid *
 | 
			
		||||
get_static_proc_address(const char *funcName)
 | 
			
		||||
{
 | 
			
		||||
   GLint i = get_static_proc_offset(funcName);
 | 
			
		||||
   if (i >= 0)
 | 
			
		||||
      return static_functions[i].Address;
 | 
			
		||||
   else
 | 
			
		||||
      return NULL;
 | 
			
		||||
   GLint i;
 | 
			
		||||
   for (i = 0; static_functions[i].Name; i++) {
 | 
			
		||||
      if (strcmp(static_functions[i].Name, funcName) == 0) {
 | 
			
		||||
         return static_functions[i].Address;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1563,7 +1565,7 @@ _glapi_add_entrypoint(const char *funcName, GLuint offset)
 | 
			
		||||
   {
 | 
			
		||||
      GLint index = get_static_proc_offset(funcName);
 | 
			
		||||
      if (index >= 0) {
 | 
			
		||||
         return (GLboolean) (index == offset);  /* bad offset! */
 | 
			
		||||
         return (GLboolean) (index == (GLint) offset);  /* bad offset! */
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
@@ -1671,7 +1673,7 @@ GLint
 | 
			
		||||
_glapi_get_proc_offset(const char *funcName)
 | 
			
		||||
{
 | 
			
		||||
   /* search extension functions first */
 | 
			
		||||
   GLint i;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
   for (i = 0; i < NumExtEntryPoints; i++) {
 | 
			
		||||
      if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
 | 
			
		||||
         return ExtEntryTable[i].Offset;
 | 
			
		||||
@@ -1691,7 +1693,7 @@ const GLvoid *
 | 
			
		||||
_glapi_get_proc_address(const char *funcName)
 | 
			
		||||
{
 | 
			
		||||
   /* search extension functions first */
 | 
			
		||||
   GLint i;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
   for (i = 0; i < NumExtEntryPoints; i++) {
 | 
			
		||||
      if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
 | 
			
		||||
         return ExtEntryTable[i].Address;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,9 @@
 | 
			
		||||
#!/usr/bin/env python
 | 
			
		||||
 | 
			
		||||
# $Id: glx86asm.py,v 1.1 2000/05/11 23:14:57 brianp Exp $
 | 
			
		||||
# $Id: glx86asm.py,v 1.1.4.1 2000/09/06 17:33:32 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
# Version:  3.4
 | 
			
		||||
# 
 | 
			
		||||
# Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
# 
 | 
			
		||||
@@ -48,9 +48,9 @@ def PrintHead():
 | 
			
		||||
	print '#ifndef __WIN32__'
 | 
			
		||||
	print ''
 | 
			
		||||
	print '#if defined(USE_MGL_NAMESPACE)'
 | 
			
		||||
	print '#define GL_PREFIX(n) GLNAME(mgl ## n)'
 | 
			
		||||
	print '#define GL_PREFIX(n) GLNAME(CONCAT(mgl,n))'
 | 
			
		||||
	print '#else'
 | 
			
		||||
	print '#define GL_PREFIX(n) GLNAME(gl ## n)'
 | 
			
		||||
	print '#define GL_PREFIX(n) GLNAME(CONCAT(gl,n))'
 | 
			
		||||
	print '#endif'
 | 
			
		||||
	print ''
 | 
			
		||||
	print '#define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.20 2000/07/14 14:55:04 brianp Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.20.2.2 2001/03/23 17:08:08 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.3
 | 
			
		||||
@@ -77,6 +77,7 @@ CORE_SOURCES = \
 | 
			
		||||
	stages.c \
 | 
			
		||||
	state.c \
 | 
			
		||||
	stencil.c \
 | 
			
		||||
	texformat.c \
 | 
			
		||||
	teximage.c \
 | 
			
		||||
	texobj.c \
 | 
			
		||||
	texstate.c \
 | 
			
		||||
@@ -132,9 +133,9 @@ DRIVER_SOURCES = \
 | 
			
		||||
	FX/fxvsetup.c \
 | 
			
		||||
	FX/fxglidew.c
 | 
			
		||||
 | 
			
		||||
ASM_SOURCES = 
 | 
			
		||||
ASM_SOURCES =
 | 
			
		||||
 | 
			
		||||
ADDITIONAL_OBJ = 
 | 
			
		||||
ADDITIONAL_OBJ =
 | 
			
		||||
 | 
			
		||||
OBJECTS = $(ASM_SOURCES:.S=.o) \
 | 
			
		||||
	$(CORE_SOURCES:.c=.o) \
 | 
			
		||||
@@ -222,6 +223,7 @@ X86/3dnow.o: X86/3dnow.c
 | 
			
		||||
X86/katmai.o: X86/katmai.c
 | 
			
		||||
	$(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### TARGETS #####
 | 
			
		||||
 | 
			
		||||
#default:
 | 
			
		||||
@@ -234,7 +236,7 @@ clean:
 | 
			
		||||
targets: $(LIBDIR)/$(GL_LIB)
 | 
			
		||||
 | 
			
		||||
# Make the library
 | 
			
		||||
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
 | 
			
		||||
$(LIBDIR)/$(GL_LIB): $(GENERATED_SOURCES) $(OBJECTS)
 | 
			
		||||
	$(MAKELIB) $(GL_LIB) $(GL_MAJOR) $(GL_MINOR) $(GL_TINY) $(OBJECTS)
 | 
			
		||||
	rm -f $(LIBDIR)/$(GL_LIB)*
 | 
			
		||||
	mv $(GL_LIB)* $(LIBDIR)
 | 
			
		||||
@@ -249,9 +251,9 @@ include depend
 | 
			
		||||
#
 | 
			
		||||
# Run 'make dep' to update the dependencies if you change what's included
 | 
			
		||||
# by any source file.
 | 
			
		||||
# 
 | 
			
		||||
dep: $(CORE_SOURCES) $(DRIVER_SOURCES)
 | 
			
		||||
	makedepend -fdepend -Y -I../include -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES)
 | 
			
		||||
#
 | 
			
		||||
dep: $(CORE_SOURCES) $(DRIVER_SOURCES) $(ASM_SOURCES)
 | 
			
		||||
	makedepend -fdepend -Y -I../include $(CFLAGS) -DGGI -DSVGA -DFX $(CORE_SOURCES) $(DRIVER_SOURCES) $(ASM_SOURCES)
 | 
			
		||||
 | 
			
		||||
tags:
 | 
			
		||||
	etags `find . -name \*.[ch]` `find ../include`
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: accum.c,v 1.23 2000/07/15 03:14:25 brianp Exp $ */
 | 
			
		||||
/* $Id: accum.c,v 1.23.2.2 2000/11/05 21:24:00 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -235,6 +235,8 @@ _mesa_Accum( GLenum op, GLfloat value )
 | 
			
		||||
         if (ctx->IntegerAccumMode && value != ctx->IntegerAccumScaler)
 | 
			
		||||
            rescale_accum(ctx);
 | 
			
		||||
            
 | 
			
		||||
         RENDER_START(ctx);
 | 
			
		||||
 | 
			
		||||
         if (ctx->IntegerAccumMode) {
 | 
			
		||||
            /* simply add integer color values into accum buffer */
 | 
			
		||||
            GLuint j;
 | 
			
		||||
@@ -278,6 +280,7 @@ _mesa_Accum( GLenum op, GLfloat value )
 | 
			
		||||
         /* restore read buffer = draw buffer (the default) */
 | 
			
		||||
         (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
 | 
			
		||||
                                       ctx->Color.DriverDrawBuffer );
 | 
			
		||||
         RENDER_FINISH(ctx);
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      case GL_LOAD:
 | 
			
		||||
@@ -298,6 +301,7 @@ _mesa_Accum( GLenum op, GLfloat value )
 | 
			
		||||
            ctx->IntegerAccumScaler = 0.0;
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         RENDER_START(ctx);
 | 
			
		||||
         if (ctx->IntegerAccumMode) {
 | 
			
		||||
            /* just copy values into accum buffer */
 | 
			
		||||
            GLuint j;
 | 
			
		||||
@@ -341,6 +345,7 @@ _mesa_Accum( GLenum op, GLfloat value )
 | 
			
		||||
         /* restore read buffer = draw buffer (the default) */
 | 
			
		||||
         (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
 | 
			
		||||
                                       ctx->Color.DriverDrawBuffer );
 | 
			
		||||
         RENDER_FINISH(ctx);
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      case GL_RETURN:
 | 
			
		||||
@@ -348,16 +353,18 @@ _mesa_Accum( GLenum op, GLfloat value )
 | 
			
		||||
         if (ctx->IntegerAccumMode && value != 1.0)
 | 
			
		||||
            rescale_accum(ctx);
 | 
			
		||||
 | 
			
		||||
         RENDER_START(ctx);
 | 
			
		||||
         if (ctx->IntegerAccumMode && ctx->IntegerAccumScaler > 0) {
 | 
			
		||||
            /* build lookup table to avoid many floating point multiplies */
 | 
			
		||||
            const GLfloat mult = ctx->IntegerAccumScaler;
 | 
			
		||||
            static GLchan multTable[32768];
 | 
			
		||||
            static GLfloat prevMult = 0.0;
 | 
			
		||||
            GLuint j;
 | 
			
		||||
            const GLint max = MIN2((GLint) (256 / mult), 32767);
 | 
			
		||||
            GLint k;
 | 
			
		||||
            const GLint max = MIN2((GLuint) (256 / mult), 32767);
 | 
			
		||||
            if (mult != prevMult) {
 | 
			
		||||
               for (j = 0; j < max; j++)
 | 
			
		||||
                  multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F);
 | 
			
		||||
               for (k = 0; k < max; k++)
 | 
			
		||||
                  multTable[k] = (GLint) ((GLfloat) k * mult + 0.5F);
 | 
			
		||||
               prevMult = mult;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
@@ -380,7 +387,7 @@ _mesa_Accum( GLenum op, GLfloat value )
 | 
			
		||||
                  _mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
 | 
			
		||||
               }
 | 
			
		||||
               (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos, 
 | 
			
		||||
                                             (const GLubyte (*)[4])rgba, NULL );
 | 
			
		||||
                                          (CONST GLubyte (*)[4]) rgba, NULL );
 | 
			
		||||
               ypos++;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
@@ -407,10 +414,11 @@ _mesa_Accum( GLenum op, GLfloat value )
 | 
			
		||||
                  _mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
 | 
			
		||||
               }
 | 
			
		||||
               (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos, 
 | 
			
		||||
                                             (const GLubyte (*)[4])rgba, NULL );
 | 
			
		||||
                                          (CONST GLubyte (*)[4]) rgba, NULL );
 | 
			
		||||
               ypos++;
 | 
			
		||||
            }
 | 
			
		||||
	 }
 | 
			
		||||
         RENDER_FINISH(ctx);
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      default:
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: attrib.c,v 1.25 2000/07/19 18:34:00 brianp Exp $ */
 | 
			
		||||
/* $Id: attrib.c,v 1.25.2.3 2001/01/29 22:15:36 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4.1
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -29,13 +29,29 @@
 | 
			
		||||
#include "all.h"
 | 
			
		||||
#else
 | 
			
		||||
#include "glheader.h"
 | 
			
		||||
#include "accum.h"
 | 
			
		||||
#include "alpha.h"
 | 
			
		||||
#include "attrib.h"
 | 
			
		||||
#include "blend.h"
 | 
			
		||||
#include "buffers.h"
 | 
			
		||||
#include "clip.h"
 | 
			
		||||
#include "context.h"
 | 
			
		||||
#include "depth.h"
 | 
			
		||||
#include "enable.h"
 | 
			
		||||
#include "enums.h"
 | 
			
		||||
#include "fog.h"
 | 
			
		||||
#include "hint.h"
 | 
			
		||||
#include "light.h"
 | 
			
		||||
#include "lines.h"
 | 
			
		||||
#include "logic.h"
 | 
			
		||||
#include "masking.h"
 | 
			
		||||
#include "matrix.h"
 | 
			
		||||
#include "mem.h"
 | 
			
		||||
#include "points.h"
 | 
			
		||||
#include "polygon.h"
 | 
			
		||||
#include "scissor.h"
 | 
			
		||||
#include "simple_list.h"
 | 
			
		||||
#include "stencil.h"
 | 
			
		||||
#include "texstate.h"
 | 
			
		||||
#include "types.h"
 | 
			
		||||
#endif
 | 
			
		||||
@@ -213,8 +229,8 @@ _mesa_PushAttrib(GLbitfield mask)
 | 
			
		||||
      attr->RescaleNormals = ctx->Transform.RescaleNormals;
 | 
			
		||||
      attr->Scissor = ctx->Scissor.Enabled;
 | 
			
		||||
      attr->Stencil = ctx->Stencil.Enabled;
 | 
			
		||||
      attr->Texture = ctx->Texture.Enabled;
 | 
			
		||||
      for (i=0; i<MAX_TEXTURE_UNITS; i++) {
 | 
			
		||||
         attr->Texture[i] = ctx->Texture.Unit[i].Enabled;
 | 
			
		||||
         attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled;
 | 
			
		||||
      }
 | 
			
		||||
      newnode = new_attrib_node( GL_ENABLE_BIT );
 | 
			
		||||
@@ -393,6 +409,148 @@ _mesa_PushAttrib(GLbitfield mask)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
 | 
			
		||||
{
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
#define TEST_AND_UPDATE(VALUE, NEWVALUE, ENUM)		\
 | 
			
		||||
	if ((VALUE) != (NEWVALUE)) {			\
 | 
			
		||||
	   _mesa_set_enable( ctx, ENUM, (NEWVALUE) );	\
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Transform.Normalize, enable->AutoNormal, GL_NORMALIZE);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Color.BlendEnabled, enable->Blend, GL_BLEND);
 | 
			
		||||
 | 
			
		||||
   for (i=0;i<MAX_CLIP_PLANES;i++) {
 | 
			
		||||
      if (ctx->Transform.ClipEnabled[i] != enable->ClipPlane[i])
 | 
			
		||||
         _mesa_set_enable(ctx, (GLenum) (GL_CLIP_PLANE0 + i),
 | 
			
		||||
                          enable->ClipPlane[i]);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial,
 | 
			
		||||
                   GL_COLOR_MATERIAL);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Pixel.Convolution1DEnabled, enable->Convolution1D,
 | 
			
		||||
                   GL_CONVOLUTION_1D);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Pixel.Convolution2DEnabled, enable->Convolution2D,
 | 
			
		||||
                   GL_CONVOLUTION_2D);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Pixel.Separable2DEnabled, enable->Separable2D,
 | 
			
		||||
                   GL_SEPARABLE_2D);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Fog.Enabled, enable->Fog, GL_FOG);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Light.Enabled, enable->Lighting, GL_LIGHTING);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Line.SmoothFlag, enable->LineSmooth, GL_LINE_SMOOTH);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Line.StippleFlag, enable->LineStipple,
 | 
			
		||||
                   GL_LINE_STIPPLE);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Color.IndexLogicOpEnabled, enable->IndexLogicOp,
 | 
			
		||||
                   GL_INDEX_LOGIC_OP);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Color.ColorLogicOpEnabled, enable->ColorLogicOp,
 | 
			
		||||
                   GL_COLOR_LOGIC_OP);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1Color4, enable->Map1Color4, GL_MAP1_COLOR_4);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1Index, enable->Map1Index, GL_MAP1_INDEX);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1Normal, enable->Map1Normal, GL_MAP1_NORMAL);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord1, enable->Map1TextureCoord1,
 | 
			
		||||
                   GL_MAP1_TEXTURE_COORD_1);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord2, enable->Map1TextureCoord2,
 | 
			
		||||
                   GL_MAP1_TEXTURE_COORD_2);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord3, enable->Map1TextureCoord3,
 | 
			
		||||
                   GL_MAP1_TEXTURE_COORD_3);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord4, enable->Map1TextureCoord4,
 | 
			
		||||
                   GL_MAP1_TEXTURE_COORD_4);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1Vertex3, enable->Map1Vertex3,
 | 
			
		||||
                   GL_MAP1_VERTEX_3);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map1Vertex4, enable->Map1Vertex4,
 | 
			
		||||
                   GL_MAP1_VERTEX_4);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2Color4, enable->Map2Color4, GL_MAP2_COLOR_4);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2Index, enable->Map2Index, GL_MAP2_INDEX);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2Normal, enable->Map2Normal, GL_MAP2_NORMAL);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord1, enable->Map2TextureCoord1,
 | 
			
		||||
                   GL_MAP2_TEXTURE_COORD_1);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord2, enable->Map2TextureCoord2,
 | 
			
		||||
                   GL_MAP2_TEXTURE_COORD_2);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord3, enable->Map2TextureCoord3,
 | 
			
		||||
                   GL_MAP2_TEXTURE_COORD_3);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord4, enable->Map2TextureCoord4,
 | 
			
		||||
                   GL_MAP2_TEXTURE_COORD_4);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2Vertex3, enable->Map2Vertex3,
 | 
			
		||||
                   GL_MAP2_VERTEX_3);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Eval.Map2Vertex4, enable->Map2Vertex4,
 | 
			
		||||
                   GL_MAP2_VERTEX_4);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Transform.Normalize, enable->Normalize, GL_NORMALIZE);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Transform.RescaleNormals, enable->RescaleNormals,
 | 
			
		||||
                   GL_RESCALE_NORMAL_EXT);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Pixel.PixelTextureEnabled, enable->PixelTexture,
 | 
			
		||||
                   GL_POINT_SMOOTH);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth,
 | 
			
		||||
                   GL_POINT_SMOOTH);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Polygon.OffsetPoint, enable->PolygonOffsetPoint,
 | 
			
		||||
                   GL_POLYGON_OFFSET_POINT);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Polygon.OffsetLine, enable->PolygonOffsetLine,
 | 
			
		||||
                   GL_POLYGON_OFFSET_LINE);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Polygon.OffsetFill, enable->PolygonOffsetFill,
 | 
			
		||||
                   GL_POLYGON_OFFSET_FILL);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Polygon.SmoothFlag, enable->PolygonSmooth,
 | 
			
		||||
                   GL_POLYGON_SMOOTH);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Polygon.StippleFlag, enable->PolygonStipple,
 | 
			
		||||
                   GL_POLYGON_STIPPLE);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Scissor.Enabled, enable->Scissor, GL_SCISSOR_TEST);
 | 
			
		||||
   TEST_AND_UPDATE(ctx->Stencil.Enabled, enable->Stencil, GL_STENCIL_TEST);
 | 
			
		||||
#undef TEST_AND_UPDATE
 | 
			
		||||
 | 
			
		||||
   /* texture unit enables */
 | 
			
		||||
   for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
 | 
			
		||||
      if (ctx->Texture.Unit[i].Enabled != enable->Texture[i]) {
 | 
			
		||||
         ctx->Texture.Unit[i].Enabled = enable->Texture[i];
 | 
			
		||||
         if (ctx->Driver.Enable) {
 | 
			
		||||
            if (ctx->Driver.ActiveTexture) {
 | 
			
		||||
               (*ctx->Driver.ActiveTexture)(ctx, i);
 | 
			
		||||
            }
 | 
			
		||||
            (*ctx->Driver.Enable)( ctx, GL_TEXTURE_1D,
 | 
			
		||||
                             (GLboolean) (enable->Texture[i] & TEXTURE0_1D) );
 | 
			
		||||
            (*ctx->Driver.Enable)( ctx, GL_TEXTURE_2D,
 | 
			
		||||
                             (GLboolean) (enable->Texture[i] & TEXTURE0_2D) );
 | 
			
		||||
            (*ctx->Driver.Enable)( ctx, GL_TEXTURE_3D,
 | 
			
		||||
                             (GLboolean) (enable->Texture[i] & TEXTURE0_3D) );
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (ctx->Texture.Unit[i].TexGenEnabled != enable->TexGen[i]) {
 | 
			
		||||
         ctx->Texture.Unit[i].TexGenEnabled = enable->TexGen[i];
 | 
			
		||||
         if (ctx->Driver.Enable) {
 | 
			
		||||
            if (ctx->Driver.ActiveTexture) {
 | 
			
		||||
               (*ctx->Driver.ActiveTexture)(ctx, i);
 | 
			
		||||
            }
 | 
			
		||||
            if (enable->TexGen[i] & S_BIT)
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_S, GL_TRUE);
 | 
			
		||||
            else
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_S, GL_FALSE);
 | 
			
		||||
            if (enable->TexGen[i] & T_BIT)
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_T, GL_TRUE);
 | 
			
		||||
            else
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_T, GL_FALSE);
 | 
			
		||||
            if (enable->TexGen[i] & R_BIT)
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_R, GL_TRUE);
 | 
			
		||||
            else
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_R, GL_FALSE);
 | 
			
		||||
            if (enable->TexGen[i] & Q_BIT)
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_Q, GL_TRUE);
 | 
			
		||||
            else
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_Q, GL_FALSE);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.ActiveTexture) {
 | 
			
		||||
      (*ctx->Driver.ActiveTexture)(ctx, ctx->Texture.CurrentUnit);
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * This function is kind of long just because we have to call a lot
 | 
			
		||||
 * of device driver functions to update device driver state.
 | 
			
		||||
@@ -421,52 +579,49 @@ _mesa_PopAttrib(void)
 | 
			
		||||
 | 
			
		||||
      switch (attr->kind) {
 | 
			
		||||
         case GL_ACCUM_BUFFER_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Accum, attr->data, sizeof(struct gl_accum_attrib) );
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_accum_attrib *accum;
 | 
			
		||||
               accum = (const struct gl_accum_attrib *) attr->data;
 | 
			
		||||
               _mesa_ClearAccum(accum->ClearColor[0],
 | 
			
		||||
                                accum->ClearColor[1],
 | 
			
		||||
                                accum->ClearColor[2],
 | 
			
		||||
                                accum->ClearColor[3]);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_COLOR_BUFFER_BIT:
 | 
			
		||||
            {
 | 
			
		||||
               GLenum oldDrawBuffer = ctx->Color.DrawBuffer;
 | 
			
		||||
               GLenum oldAlphaFunc = ctx->Color.AlphaFunc;
 | 
			
		||||
               GLubyte oldAlphaRef = ctx->Color.AlphaRef;
 | 
			
		||||
               GLenum oldBlendSrc = ctx->Color.BlendSrcRGB;
 | 
			
		||||
               GLenum oldBlendDst = ctx->Color.BlendDstRGB;
 | 
			
		||||
	       GLenum oldLogicOp = ctx->Color.LogicOp;
 | 
			
		||||
               MEMCPY( &ctx->Color, attr->data,
 | 
			
		||||
                       sizeof(struct gl_colorbuffer_attrib) );
 | 
			
		||||
               if (ctx->Color.DrawBuffer != oldDrawBuffer) {
 | 
			
		||||
                  _mesa_DrawBuffer( ctx->Color.DrawBuffer);
 | 
			
		||||
               }
 | 
			
		||||
               if ((ctx->Color.BlendSrcRGB != oldBlendSrc ||
 | 
			
		||||
                    ctx->Color.BlendDstRGB != oldBlendDst) &&
 | 
			
		||||
                   ctx->Driver.BlendFunc)
 | 
			
		||||
                  (*ctx->Driver.BlendFunc)( ctx, ctx->Color.BlendSrcRGB,
 | 
			
		||||
                                            ctx->Color.BlendDstRGB);
 | 
			
		||||
	       if (ctx->Color.LogicOp != oldLogicOp &&
 | 
			
		||||
		   ctx->Driver.LogicOpcode) {
 | 
			
		||||
		  ctx->Driver.LogicOpcode( ctx, ctx->Color.LogicOp );
 | 
			
		||||
               }
 | 
			
		||||
               if (ctx->Visual->RGBAflag) {
 | 
			
		||||
                  GLubyte r = (GLint) (ctx->Color.ClearColor[0] * 255.0F);
 | 
			
		||||
                  GLubyte g = (GLint) (ctx->Color.ClearColor[1] * 255.0F);
 | 
			
		||||
                  GLubyte b = (GLint) (ctx->Color.ClearColor[2] * 255.0F);
 | 
			
		||||
                  GLubyte a = (GLint) (ctx->Color.ClearColor[3] * 255.0F);
 | 
			
		||||
                  (*ctx->Driver.ClearColor)( ctx, r, g, b, a );
 | 
			
		||||
                  if ((ctx->Color.AlphaFunc != oldAlphaFunc ||
 | 
			
		||||
                       ctx->Color.AlphaRef != oldAlphaRef) &&
 | 
			
		||||
                      ctx->Driver.AlphaFunc)
 | 
			
		||||
                     (*ctx->Driver.AlphaFunc)( ctx, ctx->Color.AlphaFunc,
 | 
			
		||||
                                               ctx->Color.AlphaRef / 255.0F);
 | 
			
		||||
                  if (ctx->Driver.ColorMask) {
 | 
			
		||||
                     (*ctx->Driver.ColorMask)(ctx,
 | 
			
		||||
                                              ctx->Color.ColorMask[0],
 | 
			
		||||
                                              ctx->Color.ColorMask[1],
 | 
			
		||||
                                              ctx->Color.ColorMask[2],
 | 
			
		||||
                                              ctx->Color.ColorMask[3]);
 | 
			
		||||
                  }
 | 
			
		||||
               }
 | 
			
		||||
               else {
 | 
			
		||||
                  (*ctx->Driver.ClearIndex)( ctx, ctx->Color.ClearIndex);
 | 
			
		||||
               }
 | 
			
		||||
               const struct gl_colorbuffer_attrib *color;
 | 
			
		||||
               color = (const struct gl_colorbuffer_attrib *) attr->data;
 | 
			
		||||
               _mesa_ClearIndex(color->ClearIndex);
 | 
			
		||||
               _mesa_ClearColor(color->ClearColor[0],
 | 
			
		||||
                                color->ClearColor[1],
 | 
			
		||||
                                color->ClearColor[2],
 | 
			
		||||
                                color->ClearColor[3]);
 | 
			
		||||
               _mesa_IndexMask(color->IndexMask);
 | 
			
		||||
               _mesa_ColorMask((GLboolean) (color->ColorMask[0] != 0),
 | 
			
		||||
                               (GLboolean) (color->ColorMask[1] != 0),
 | 
			
		||||
                               (GLboolean) (color->ColorMask[2] != 0),
 | 
			
		||||
                               (GLboolean) (color->ColorMask[3] != 0));
 | 
			
		||||
               _mesa_DrawBuffer(color->DrawBuffer);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled);
 | 
			
		||||
               _mesa_AlphaFunc(color->AlphaFunc,
 | 
			
		||||
                               UBYTE_TO_FLOAT(color->AlphaRef));
 | 
			
		||||
               _mesa_set_enable(ctx, GL_BLEND, color->BlendEnabled);
 | 
			
		||||
               _mesa_BlendFuncSeparateEXT(color->BlendSrcRGB,
 | 
			
		||||
                                          color->BlendDstRGB,
 | 
			
		||||
                                          color->BlendSrcA,
 | 
			
		||||
                                          color->BlendDstA);
 | 
			
		||||
               _mesa_BlendEquation(color->BlendEquation);
 | 
			
		||||
               _mesa_BlendColor(color->BlendColor[0],
 | 
			
		||||
                                color->BlendColor[1],
 | 
			
		||||
                                color->BlendColor[2],
 | 
			
		||||
                                color->BlendColor[3]);
 | 
			
		||||
               _mesa_LogicOp(color->LogicOp);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP,
 | 
			
		||||
                                color->ColorLogicOpEnabled);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_INDEX_LOGIC_OP,
 | 
			
		||||
                                color->IndexLogicOpEnabled);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_DITHER, color->DitherFlag);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_CURRENT_BIT:
 | 
			
		||||
@@ -475,136 +630,23 @@ _mesa_PopAttrib(void)
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_DEPTH_BUFFER_BIT:
 | 
			
		||||
            {
 | 
			
		||||
               GLboolean oldDepthTest = ctx->Depth.Test;
 | 
			
		||||
               GLenum oldDepthFunc = ctx->Depth.Func;
 | 
			
		||||
               GLboolean oldDepthMask = ctx->Depth.Mask;
 | 
			
		||||
               GLfloat oldDepthClear = ctx->Depth.Clear;
 | 
			
		||||
               MEMCPY( &ctx->Depth, attr->data,
 | 
			
		||||
                       sizeof(struct gl_depthbuffer_attrib) );
 | 
			
		||||
               if (ctx->Depth.Test != oldDepthTest && ctx->Driver.Enable)
 | 
			
		||||
                  (*ctx->Driver.Enable)( ctx, GL_DEPTH_TEST, ctx->Depth.Test);
 | 
			
		||||
               if (ctx->Depth.Func != oldDepthFunc && ctx->Driver.DepthFunc)
 | 
			
		||||
                  (*ctx->Driver.DepthFunc)( ctx, ctx->Depth.Func );
 | 
			
		||||
               if (ctx->Depth.Mask != oldDepthMask && ctx->Driver.DepthMask)
 | 
			
		||||
                  (*ctx->Driver.DepthMask)( ctx, ctx->Depth.Mask );
 | 
			
		||||
               if (ctx->Depth.Clear != oldDepthClear && ctx->Driver.ClearDepth)
 | 
			
		||||
                  (*ctx->Driver.ClearDepth)( ctx, ctx->Depth.Clear );
 | 
			
		||||
               const struct gl_depthbuffer_attrib *depth;
 | 
			
		||||
               depth = (const struct gl_depthbuffer_attrib *) attr->data;
 | 
			
		||||
               _mesa_DepthFunc(depth->Func);
 | 
			
		||||
               _mesa_ClearDepth(depth->Clear);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_DEPTH_TEST, depth->Test);
 | 
			
		||||
               _mesa_DepthMask(depth->Mask);
 | 
			
		||||
               if (ctx->Extensions.HaveHpOcclusionTest)
 | 
			
		||||
                  _mesa_set_enable(ctx, GL_OCCLUSION_TEST_HP,
 | 
			
		||||
                                   depth->OcclusionTest);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_ENABLE_BIT:
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_enable_attrib *enable;
 | 
			
		||||
               enable = (const struct gl_enable_attrib *) attr->data;
 | 
			
		||||
 | 
			
		||||
#define TEST_AND_UPDATE(VALUE, NEWVALUE, ENUM)		\
 | 
			
		||||
	if ((VALUE) != (NEWVALUE)) {			\
 | 
			
		||||
	   _mesa_set_enable( ctx, ENUM, (NEWVALUE) );	\
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Transform.Normalize, enable->AutoNormal, GL_NORMALIZE);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Color.BlendEnabled, enable->Blend, GL_BLEND);
 | 
			
		||||
               {
 | 
			
		||||
                  GLuint i;
 | 
			
		||||
                  for (i=0;i<MAX_CLIP_PLANES;i++) {
 | 
			
		||||
                     if (ctx->Transform.ClipEnabled[i] != enable->ClipPlane[i])
 | 
			
		||||
                        _mesa_set_enable( ctx, (GLenum) (GL_CLIP_PLANE0 + i), enable->ClipPlane[i] );
 | 
			
		||||
                  }
 | 
			
		||||
               }
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial, GL_COLOR_MATERIAL);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Pixel.Convolution1DEnabled, enable->Convolution1D, GL_CONVOLUTION_1D);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Pixel.Convolution2DEnabled, enable->Convolution2D, GL_CONVOLUTION_2D);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Pixel.Separable2DEnabled, enable->Separable2D, GL_SEPARABLE_2D);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Fog.Enabled, enable->Fog, GL_FOG);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Light.Enabled, enable->Lighting, GL_LIGHTING);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Line.SmoothFlag, enable->LineSmooth, GL_LINE_SMOOTH);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Line.StippleFlag, enable->LineStipple, GL_LINE_STIPPLE);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Color.IndexLogicOpEnabled, enable->IndexLogicOp, GL_INDEX_LOGIC_OP);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Color.ColorLogicOpEnabled, enable->ColorLogicOp, GL_COLOR_LOGIC_OP);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1Color4, enable->Map1Color4, GL_MAP1_COLOR_4);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1Index, enable->Map1Index, GL_MAP1_INDEX);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1Normal, enable->Map1Normal, GL_MAP1_NORMAL);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord1, enable->Map1TextureCoord1, GL_MAP1_TEXTURE_COORD_1);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord2, enable->Map1TextureCoord2, GL_MAP1_TEXTURE_COORD_2);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord3, enable->Map1TextureCoord3, GL_MAP1_TEXTURE_COORD_3);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord4, enable->Map1TextureCoord4, GL_MAP1_TEXTURE_COORD_4);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1Vertex3, enable->Map1Vertex3, GL_MAP1_VERTEX_3);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map1Vertex4, enable->Map1Vertex4, GL_MAP1_VERTEX_4);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2Color4, enable->Map2Color4, GL_MAP2_COLOR_4);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2Index, enable->Map2Index, GL_MAP2_INDEX);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2Normal, enable->Map2Normal, GL_MAP2_NORMAL);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord1, enable->Map2TextureCoord1, GL_MAP2_TEXTURE_COORD_1);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord2, enable->Map2TextureCoord2, GL_MAP2_TEXTURE_COORD_2);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord3, enable->Map2TextureCoord3, GL_MAP2_TEXTURE_COORD_3);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord4, enable->Map2TextureCoord4, GL_MAP2_TEXTURE_COORD_4);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2Vertex3, enable->Map2Vertex3, GL_MAP2_VERTEX_3);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Eval.Map2Vertex4, enable->Map2Vertex4, GL_MAP2_VERTEX_4);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Transform.Normalize, enable->Normalize, GL_NORMALIZE);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Transform.RescaleNormals, enable->RescaleNormals, GL_RESCALE_NORMAL_EXT);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Pixel.PixelTextureEnabled, enable->PixelTexture, GL_POINT_SMOOTH);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth, GL_POINT_SMOOTH);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Polygon.OffsetPoint, enable->PolygonOffsetPoint, GL_POLYGON_OFFSET_POINT);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Polygon.OffsetLine, enable->PolygonOffsetLine, GL_POLYGON_OFFSET_LINE);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Polygon.OffsetFill, enable->PolygonOffsetFill, GL_POLYGON_OFFSET_FILL);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Polygon.SmoothFlag, enable->PolygonSmooth, GL_POLYGON_SMOOTH);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Polygon.StippleFlag, enable->PolygonStipple, GL_POLYGON_STIPPLE);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Scissor.Enabled, enable->Scissor, GL_SCISSOR_TEST);
 | 
			
		||||
               TEST_AND_UPDATE(ctx->Stencil.Enabled, enable->Stencil, GL_STENCIL_TEST);
 | 
			
		||||
               if (ctx->Texture.Enabled != enable->Texture) {
 | 
			
		||||
                  ctx->Texture.Enabled = enable->Texture;
 | 
			
		||||
                  if (ctx->Driver.Enable) {
 | 
			
		||||
                     if (ctx->Driver.ActiveTexture)
 | 
			
		||||
                        (*ctx->Driver.ActiveTexture)( ctx, 0 );
 | 
			
		||||
                     (*ctx->Driver.Enable)( ctx, GL_TEXTURE_1D, (GLboolean) (enable->Texture & TEXTURE0_1D) );
 | 
			
		||||
                     (*ctx->Driver.Enable)( ctx, GL_TEXTURE_2D, (GLboolean) (enable->Texture & TEXTURE0_2D) );
 | 
			
		||||
                     (*ctx->Driver.Enable)( ctx, GL_TEXTURE_3D, (GLboolean) (enable->Texture & TEXTURE0_3D) );
 | 
			
		||||
                     if (ctx->Driver.ActiveTexture)
 | 
			
		||||
                        (*ctx->Driver.ActiveTexture)( ctx, 1 );
 | 
			
		||||
                     (*ctx->Driver.Enable)( ctx, GL_TEXTURE_1D, (GLboolean) (enable->Texture & TEXTURE1_1D) );
 | 
			
		||||
                     (*ctx->Driver.Enable)( ctx, GL_TEXTURE_2D, (GLboolean) (enable->Texture & TEXTURE1_2D) );
 | 
			
		||||
                     (*ctx->Driver.Enable)( ctx, GL_TEXTURE_3D, (GLboolean) (enable->Texture & TEXTURE1_3D) );
 | 
			
		||||
                     if (ctx->Driver.ActiveTexture)
 | 
			
		||||
                        (*ctx->Driver.ActiveTexture)( ctx, ctx->Texture.CurrentUnit );
 | 
			
		||||
                  }
 | 
			
		||||
               }
 | 
			
		||||
#undef TEST_AND_UPDATE
 | 
			
		||||
               {
 | 
			
		||||
                  GLuint i;
 | 
			
		||||
                  for (i=0; i<MAX_TEXTURE_UNITS; i++) {
 | 
			
		||||
                     if (ctx->Texture.Unit[i].TexGenEnabled != enable->TexGen[i]) {
 | 
			
		||||
                        ctx->Texture.Unit[i].TexGenEnabled = enable->TexGen[i];
 | 
			
		||||
 | 
			
		||||
			/* ctx->Enabled recalculated in state change
 | 
			
		||||
                           processing */
 | 
			
		||||
			
 | 
			
		||||
                        if (ctx->Driver.Enable) {
 | 
			
		||||
                           if (ctx->Driver.ActiveTexture)
 | 
			
		||||
                              (*ctx->Driver.ActiveTexture)( ctx, i );
 | 
			
		||||
                           if (enable->TexGen[i] & S_BIT)
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_S, GL_TRUE);
 | 
			
		||||
                           else
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_S, GL_FALSE);
 | 
			
		||||
                           if (enable->TexGen[i] & T_BIT)
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_T, GL_TRUE);
 | 
			
		||||
                           else
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_T, GL_FALSE);
 | 
			
		||||
                           if (enable->TexGen[i] & R_BIT)
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_R, GL_TRUE);
 | 
			
		||||
                           else
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_R, GL_FALSE);
 | 
			
		||||
                           if (enable->TexGen[i] & Q_BIT)
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_Q, GL_TRUE);
 | 
			
		||||
                           else
 | 
			
		||||
                              (*ctx->Driver.Enable)( ctx, GL_TEXTURE_GEN_Q, GL_FALSE);
 | 
			
		||||
                        }
 | 
			
		||||
                     }
 | 
			
		||||
                  }
 | 
			
		||||
                  if (ctx->Driver.ActiveTexture)
 | 
			
		||||
                     (*ctx->Driver.ActiveTexture)( ctx, ctx->Texture.CurrentUnit );
 | 
			
		||||
               }
 | 
			
		||||
               pop_enable_group(ctx, enable);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_POINT_SMOOTH, enable->PointSmooth);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_EVAL_BIT:
 | 
			
		||||
@@ -612,70 +654,81 @@ _mesa_PopAttrib(void)
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_FOG_BIT:
 | 
			
		||||
            {
 | 
			
		||||
               GLboolean anyChange = (GLboolean) (memcmp( &ctx->Fog, attr->data, sizeof(struct gl_fog_attrib) ) != 0);
 | 
			
		||||
               MEMCPY( &ctx->Fog, attr->data, sizeof(struct gl_fog_attrib) );
 | 
			
		||||
               if (anyChange && ctx->Driver.Fogfv) {
 | 
			
		||||
                  const GLfloat mode = (GLfloat) ctx->Fog.Mode;
 | 
			
		||||
                  const GLfloat density = ctx->Fog.Density;
 | 
			
		||||
                  const GLfloat start = ctx->Fog.Start;
 | 
			
		||||
                  const GLfloat end = ctx->Fog.End;
 | 
			
		||||
                  const GLfloat index = ctx->Fog.Index;
 | 
			
		||||
                  (*ctx->Driver.Fogfv)( ctx, GL_FOG_MODE, &mode);
 | 
			
		||||
                  (*ctx->Driver.Fogfv)( ctx, GL_FOG_DENSITY, &density );
 | 
			
		||||
                  (*ctx->Driver.Fogfv)( ctx, GL_FOG_START, &start );
 | 
			
		||||
                  (*ctx->Driver.Fogfv)( ctx, GL_FOG_END, &end );
 | 
			
		||||
                  (*ctx->Driver.Fogfv)( ctx, GL_FOG_INDEX, &index );
 | 
			
		||||
                  (*ctx->Driver.Fogfv)( ctx, GL_FOG_COLOR, ctx->Fog.Color );
 | 
			
		||||
               }
 | 
			
		||||
	       ctx->Enabled &= ~ENABLE_FOG;
 | 
			
		||||
	       if (ctx->Fog.Enabled) ctx->Enabled |= ENABLE_FOG;
 | 
			
		||||
               const struct gl_fog_attrib *fog;
 | 
			
		||||
               fog = (const struct gl_fog_attrib *) attr->data;
 | 
			
		||||
               _mesa_set_enable(ctx, GL_FOG, fog->Enabled);
 | 
			
		||||
               _mesa_Fogfv(GL_FOG_COLOR, fog->Color);
 | 
			
		||||
               _mesa_Fogf(GL_FOG_DENSITY, fog->Density);
 | 
			
		||||
               _mesa_Fogf(GL_FOG_START, fog->Start);
 | 
			
		||||
               _mesa_Fogf(GL_FOG_END, fog->End);
 | 
			
		||||
               _mesa_Fogf(GL_FOG_INDEX, fog->Index);
 | 
			
		||||
               _mesa_Fogi(GL_FOG_MODE, fog->Mode);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_HINT_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Hint, attr->data, sizeof(struct gl_hint_attrib) );
 | 
			
		||||
            if (ctx->Driver.Hint) {
 | 
			
		||||
               (*ctx->Driver.Hint)( ctx, GL_PERSPECTIVE_CORRECTION_HINT,
 | 
			
		||||
                                    ctx->Hint.PerspectiveCorrection );
 | 
			
		||||
               (*ctx->Driver.Hint)( ctx, GL_POINT_SMOOTH_HINT,
 | 
			
		||||
                                    ctx->Hint.PointSmooth);
 | 
			
		||||
               (*ctx->Driver.Hint)( ctx, GL_LINE_SMOOTH_HINT,
 | 
			
		||||
                                    ctx->Hint.LineSmooth );
 | 
			
		||||
               (*ctx->Driver.Hint)( ctx, GL_POLYGON_SMOOTH_HINT,
 | 
			
		||||
                                    ctx->Hint.PolygonSmooth );
 | 
			
		||||
               (*ctx->Driver.Hint)( ctx, GL_FOG_HINT, ctx->Hint.Fog );
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_hint_attrib *hint;
 | 
			
		||||
               hint = (const struct gl_hint_attrib *) attr->data;
 | 
			
		||||
               /* XXX this memcpy is temporary: */
 | 
			
		||||
               MEMCPY(&ctx->Hint, hint, sizeof(struct gl_hint_attrib));
 | 
			
		||||
               _mesa_Hint(GL_PERSPECTIVE_CORRECTION_HINT,
 | 
			
		||||
                          hint->PerspectiveCorrection );
 | 
			
		||||
               _mesa_Hint(GL_POINT_SMOOTH_HINT, hint->PointSmooth);
 | 
			
		||||
               _mesa_Hint(GL_LINE_SMOOTH_HINT, hint->LineSmooth);
 | 
			
		||||
               _mesa_Hint(GL_POLYGON_SMOOTH_HINT, hint->PolygonSmooth);
 | 
			
		||||
               _mesa_Hint(GL_FOG_HINT, hint->Fog);
 | 
			
		||||
               _mesa_Hint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT,
 | 
			
		||||
                          hint->ClipVolumeClipping);
 | 
			
		||||
               if (ctx->Extensions.HaveTextureCompression)
 | 
			
		||||
                  _mesa_Hint(GL_TEXTURE_COMPRESSION_HINT_ARB,
 | 
			
		||||
                             hint->TextureCompression);
 | 
			
		||||
               /* XXX keep PGI_misc_hints? */
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_LIGHTING_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Light, attr->data, sizeof(struct gl_light_attrib) );
 | 
			
		||||
            if (ctx->Driver.Enable) {
 | 
			
		||||
            {
 | 
			
		||||
               GLuint i;
 | 
			
		||||
               const struct gl_light_attrib *light;
 | 
			
		||||
               light = (const struct gl_light_attrib *) attr->data;
 | 
			
		||||
               /* lighting enable */
 | 
			
		||||
               _mesa_set_enable(ctx, GL_LIGHTING, light->Enabled);
 | 
			
		||||
               /* per-light state */
 | 
			
		||||
               for (i = 0; i < MAX_LIGHTS; i++) {
 | 
			
		||||
                  GLenum light = (GLenum) (GL_LIGHT0 + i);
 | 
			
		||||
                  (*ctx->Driver.Enable)( ctx, light, ctx->Light.Light[i].Enabled );
 | 
			
		||||
                  GLenum lgt = (GLenum) (GL_LIGHT0 + i);
 | 
			
		||||
                  _mesa_set_enable(ctx, lgt, light->Light[i].Enabled);
 | 
			
		||||
                  MEMCPY(&ctx->Light.Light[i], &light->Light[i],
 | 
			
		||||
                         sizeof(struct gl_light));
 | 
			
		||||
               }
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_LIGHTING, ctx->Light.Enabled );
 | 
			
		||||
               /* light model */
 | 
			
		||||
               _mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT,
 | 
			
		||||
                                  light->Model.Ambient);
 | 
			
		||||
               _mesa_LightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER,
 | 
			
		||||
                                 (GLfloat) light->Model.LocalViewer);
 | 
			
		||||
               _mesa_LightModelf(GL_LIGHT_MODEL_TWO_SIDE,
 | 
			
		||||
                                 (GLfloat) light->Model.TwoSide);
 | 
			
		||||
               _mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL,
 | 
			
		||||
                                 (GLfloat) light->Model.ColorControl);
 | 
			
		||||
               /* materials */
 | 
			
		||||
               MEMCPY(ctx->Light.Material, light->Material,
 | 
			
		||||
                      2 * sizeof(struct gl_material));
 | 
			
		||||
               /* shade model */
 | 
			
		||||
               _mesa_ShadeModel(light->ShadeModel);
 | 
			
		||||
               /* color material */
 | 
			
		||||
               _mesa_ColorMaterial(light->ColorMaterialFace,
 | 
			
		||||
                                   light->ColorMaterialMode);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_COLOR_MATERIAL,
 | 
			
		||||
                                light->ColorMaterialEnabled);
 | 
			
		||||
            }
 | 
			
		||||
            if (ctx->Light.ShadeModel == GL_FLAT)
 | 
			
		||||
               ctx->TriangleCaps |= DD_FLATSHADE;
 | 
			
		||||
            else
 | 
			
		||||
               ctx->TriangleCaps &= ~DD_FLATSHADE;
 | 
			
		||||
            if (ctx->Driver.ShadeModel)
 | 
			
		||||
               (*ctx->Driver.ShadeModel)(ctx, ctx->Light.ShadeModel);
 | 
			
		||||
	    ctx->Enabled &= ~ENABLE_LIGHT;
 | 
			
		||||
	    if (ctx->Light.Enabled && !is_empty_list(&ctx->Light.EnabledList))
 | 
			
		||||
	       ctx->Enabled |= ENABLE_LIGHT;
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_LINE_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Line, attr->data, sizeof(struct gl_line_attrib) );
 | 
			
		||||
            if (ctx->Driver.Enable) {
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_LINE_SMOOTH, ctx->Line.SmoothFlag );
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_LINE_STIPPLE, ctx->Line.StippleFlag );
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_line_attrib *line;
 | 
			
		||||
               line = (const struct gl_line_attrib *) attr->data;
 | 
			
		||||
               _mesa_set_enable(ctx, GL_LINE_SMOOTH, line->SmoothFlag);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_LINE_STIPPLE, line->StippleFlag);
 | 
			
		||||
               _mesa_LineStipple(line->StippleFactor, line->StipplePattern);
 | 
			
		||||
               _mesa_LineWidth(line->Width);
 | 
			
		||||
            }
 | 
			
		||||
            if (ctx->Driver.LineStipple)
 | 
			
		||||
               (*ctx->Driver.LineStipple)(ctx, ctx->Line.StippleFactor,
 | 
			
		||||
                                          ctx->Line.StipplePattern);
 | 
			
		||||
            if (ctx->Driver.LineWidth)
 | 
			
		||||
               (*ctx->Driver.LineWidth)(ctx, ctx->Line.Width);
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_LIST_BIT:
 | 
			
		||||
            MEMCPY( &ctx->List, attr->data, sizeof(struct gl_list_attrib) );
 | 
			
		||||
@@ -684,30 +737,38 @@ _mesa_PopAttrib(void)
 | 
			
		||||
            MEMCPY( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) );
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_POINT_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Point, attr->data, sizeof(struct gl_point_attrib) );
 | 
			
		||||
            if (ctx->Driver.Enable)
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_POINT_SMOOTH, ctx->Point.SmoothFlag );
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_point_attrib *point;
 | 
			
		||||
               point = (const struct gl_point_attrib *) attr->data;
 | 
			
		||||
               _mesa_PointSize(point->Size);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_POINT_SMOOTH, point->SmoothFlag);
 | 
			
		||||
               _mesa_PointParameterfvEXT(GL_DISTANCE_ATTENUATION_EXT,
 | 
			
		||||
                                         point->Params);
 | 
			
		||||
               _mesa_PointParameterfEXT(GL_POINT_SIZE_MIN_EXT, point->MinSize);
 | 
			
		||||
               _mesa_PointParameterfEXT(GL_POINT_SIZE_MAX_EXT, point->MaxSize);
 | 
			
		||||
               _mesa_PointParameterfEXT(GL_POINT_FADE_THRESHOLD_SIZE_EXT,
 | 
			
		||||
                                        point->Threshold);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_POLYGON_BIT:
 | 
			
		||||
            {
 | 
			
		||||
               GLenum oldFrontMode = ctx->Polygon.FrontMode;
 | 
			
		||||
               GLenum oldBackMode = ctx->Polygon.BackMode;
 | 
			
		||||
               MEMCPY( &ctx->Polygon, attr->data,
 | 
			
		||||
                       sizeof(struct gl_polygon_attrib) );
 | 
			
		||||
               if ((ctx->Polygon.FrontMode != oldFrontMode ||
 | 
			
		||||
                    ctx->Polygon.BackMode != oldBackMode) &&
 | 
			
		||||
                   ctx->Driver.PolygonMode) {
 | 
			
		||||
                  (*ctx->Driver.PolygonMode)( ctx, GL_FRONT, ctx->Polygon.FrontMode);
 | 
			
		||||
                  (*ctx->Driver.PolygonMode)( ctx, GL_BACK, ctx->Polygon.BackMode);
 | 
			
		||||
               }
 | 
			
		||||
	       if (ctx->Driver.CullFace)
 | 
			
		||||
		  ctx->Driver.CullFace( ctx, ctx->Polygon.CullFaceMode );
 | 
			
		||||
 | 
			
		||||
	       if (ctx->Driver.FrontFace)
 | 
			
		||||
		  ctx->Driver.FrontFace( ctx, ctx->Polygon.FrontFace );
 | 
			
		||||
 | 
			
		||||
               if (ctx->Driver.Enable)
 | 
			
		||||
                  (*ctx->Driver.Enable)( ctx, GL_POLYGON_SMOOTH, ctx->Polygon.SmoothFlag );
 | 
			
		||||
               const struct gl_polygon_attrib *polygon;
 | 
			
		||||
               polygon = (const struct gl_polygon_attrib *) attr->data;
 | 
			
		||||
               _mesa_CullFace(polygon->CullFaceMode);
 | 
			
		||||
               _mesa_FrontFace(polygon->FrontFace);
 | 
			
		||||
               _mesa_PolygonMode(GL_FRONT, polygon->FrontMode);
 | 
			
		||||
               _mesa_PolygonMode(GL_BACK, polygon->BackMode);
 | 
			
		||||
               _mesa_PolygonOffset(polygon->OffsetFactor,
 | 
			
		||||
                                   polygon->OffsetUnits);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, polygon->SmoothFlag);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, polygon->StippleFlag);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_CULL_FACE, polygon->CullFlag);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_POLYGON_OFFSET_POINT,
 | 
			
		||||
                                polygon->OffsetPoint);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_POLYGON_OFFSET_LINE,
 | 
			
		||||
                                polygon->OffsetLine);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL,
 | 
			
		||||
                                polygon->OffsetFill);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
	 case GL_POLYGON_STIPPLE_BIT:
 | 
			
		||||
@@ -716,48 +777,53 @@ _mesa_PopAttrib(void)
 | 
			
		||||
	       ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data );
 | 
			
		||||
	    break;
 | 
			
		||||
         case GL_SCISSOR_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Scissor, attr->data,
 | 
			
		||||
		    sizeof(struct gl_scissor_attrib) );
 | 
			
		||||
            if (ctx->Driver.Enable)
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_SCISSOR_TEST, ctx->Scissor.Enabled );
 | 
			
		||||
	    if (ctx->Driver.Scissor)
 | 
			
		||||
	       ctx->Driver.Scissor( ctx, ctx->Scissor.X, ctx->Scissor.Y,
 | 
			
		||||
				    ctx->Scissor.Width, ctx->Scissor.Height );
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_scissor_attrib *scissor;
 | 
			
		||||
               scissor = (const struct gl_scissor_attrib *) attr->data;
 | 
			
		||||
               _mesa_Scissor(scissor->X, scissor->Y,
 | 
			
		||||
                             scissor->Width, scissor->Height);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_SCISSOR_TEST, scissor->Enabled);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_STENCIL_BUFFER_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Stencil, attr->data,
 | 
			
		||||
		    sizeof(struct gl_stencil_attrib) );
 | 
			
		||||
            if (ctx->Driver.StencilFunc)
 | 
			
		||||
               (*ctx->Driver.StencilFunc)( ctx, ctx->Stencil.Function,
 | 
			
		||||
                                   ctx->Stencil.Ref, ctx->Stencil.ValueMask);
 | 
			
		||||
            if (ctx->Driver.StencilMask)
 | 
			
		||||
               (*ctx->Driver.StencilMask)( ctx, ctx->Stencil.WriteMask );
 | 
			
		||||
            if (ctx->Driver.StencilOp)
 | 
			
		||||
               (*ctx->Driver.StencilOp)( ctx, ctx->Stencil.FailFunc,
 | 
			
		||||
                              ctx->Stencil.ZFailFunc, ctx->Stencil.ZPassFunc);
 | 
			
		||||
            if (ctx->Driver.ClearStencil)
 | 
			
		||||
               (*ctx->Driver.ClearStencil)( ctx, ctx->Stencil.Clear );
 | 
			
		||||
            if (ctx->Driver.Enable)
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_STENCIL_TEST, ctx->Stencil.Enabled );
 | 
			
		||||
	    ctx->TriangleCaps &= ~DD_STENCIL;
 | 
			
		||||
	    if (ctx->Stencil.Enabled)
 | 
			
		||||
	       ctx->TriangleCaps |= DD_STENCIL;
 | 
			
		||||
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_stencil_attrib *stencil;
 | 
			
		||||
               stencil = (const struct gl_stencil_attrib *) attr->data;
 | 
			
		||||
               _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled);
 | 
			
		||||
               _mesa_ClearStencil(stencil->Clear);
 | 
			
		||||
               _mesa_StencilFunc(stencil->Function, stencil->Ref,
 | 
			
		||||
                                 stencil->ValueMask);
 | 
			
		||||
               _mesa_StencilMask(stencil->WriteMask);
 | 
			
		||||
               _mesa_StencilOp(stencil->FailFunc, stencil->ZFailFunc,
 | 
			
		||||
                               stencil->ZPassFunc);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_TRANSFORM_BIT:
 | 
			
		||||
            MEMCPY( &ctx->Transform, attr->data,
 | 
			
		||||
		    sizeof(struct gl_transform_attrib) );
 | 
			
		||||
            if (ctx->Driver.Enable) {
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_NORMALIZE, ctx->Transform.Normalize );
 | 
			
		||||
               (*ctx->Driver.Enable)( ctx, GL_RESCALE_NORMAL_EXT, ctx->Transform.RescaleNormals );
 | 
			
		||||
            {
 | 
			
		||||
               GLuint i;
 | 
			
		||||
               const struct gl_transform_attrib *xform;
 | 
			
		||||
               xform = (const struct gl_transform_attrib *) attr->data;
 | 
			
		||||
               _mesa_MatrixMode(xform->MatrixMode);
 | 
			
		||||
               /* clip planes */
 | 
			
		||||
               MEMCPY(ctx->Transform.EyeUserPlane, xform->EyeUserPlane,
 | 
			
		||||
                      sizeof(xform->EyeUserPlane));
 | 
			
		||||
               MEMCPY(ctx->Transform.ClipUserPlane, xform->ClipUserPlane,
 | 
			
		||||
                      sizeof(xform->EyeUserPlane));
 | 
			
		||||
               /* clip plane enable flags */
 | 
			
		||||
               for (i = 0; i < MAX_CLIP_PLANES; i++) {
 | 
			
		||||
                  _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i,
 | 
			
		||||
                                   xform->ClipEnabled[i]);
 | 
			
		||||
               }
 | 
			
		||||
               /* normalize/rescale */
 | 
			
		||||
               _mesa_set_enable(ctx, GL_NORMALIZE, ctx->Transform.Normalize);
 | 
			
		||||
               _mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT,
 | 
			
		||||
                                ctx->Transform.RescaleNormals);
 | 
			
		||||
            }
 | 
			
		||||
	    ctx->Enabled &= ~(ENABLE_NORMALIZE|ENABLE_RESCALE);
 | 
			
		||||
	    if (ctx->Transform.Normalize) ctx->Enabled |= ENABLE_NORMALIZE;
 | 
			
		||||
	    if (ctx->Transform.RescaleNormals) ctx->Enabled |= ENABLE_RESCALE;
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_TEXTURE_BIT:
 | 
			
		||||
            /* Take care of texture object reference counters */
 | 
			
		||||
            {
 | 
			
		||||
               /* XXX call _mesa_Tex*() functions directly? */
 | 
			
		||||
               GLuint u;
 | 
			
		||||
               for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
 | 
			
		||||
		  ctx->Texture.Unit[u].CurrentD[1]->RefCount--;
 | 
			
		||||
@@ -786,14 +852,13 @@ _mesa_PopAttrib(void)
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         case GL_VIEWPORT_BIT: 
 | 
			
		||||
	 {
 | 
			
		||||
	    struct gl_viewport_attrib *v = 
 | 
			
		||||
	       (struct gl_viewport_attrib *)attr->data;
 | 
			
		||||
	    
 | 
			
		||||
	    _mesa_Viewport( v->X, v->Y, v->Width, v->Height );
 | 
			
		||||
	    _mesa_DepthRange( v->Near, v->Far );
 | 
			
		||||
	    break;
 | 
			
		||||
	 }
 | 
			
		||||
            {
 | 
			
		||||
               const struct gl_viewport_attrib *vp;
 | 
			
		||||
               vp = (const struct gl_viewport_attrib *)attr->data;
 | 
			
		||||
               _mesa_Viewport(vp->X, vp->Y, vp->Width, vp->Height);
 | 
			
		||||
               _mesa_DepthRange(vp->Near, vp->Far);
 | 
			
		||||
            }
 | 
			
		||||
            break;
 | 
			
		||||
         default:
 | 
			
		||||
            gl_problem( ctx, "Bad attrib flag in PopAttrib");
 | 
			
		||||
            break;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +1,21 @@
 | 
			
		||||
/* $Id: blend.c,v 1.16 2000/06/29 22:06:22 brianp Exp $ */
 | 
			
		||||
/* $Id: blend.c,v 1.16.4.3 2000/11/05 21:24:00 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * 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"),
 | 
			
		||||
 * 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
 | 
			
		||||
@@ -289,7 +289,7 @@ _mesa_BlendEquation( GLenum mode )
 | 
			
		||||
 | 
			
		||||
   ctx->Color.BlendFunc = NULL;
 | 
			
		||||
   ctx->NewState |= NEW_RASTER_OPS;
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.BlendEquation)
 | 
			
		||||
      ctx->Driver.BlendEquation( ctx, mode );
 | 
			
		||||
}
 | 
			
		||||
@@ -339,11 +339,31 @@ blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
 | 
			
		||||
            /* 100% alpha, no-op */
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
#if 0
 | 
			
		||||
            /* This is pretty close, but Glean complains */
 | 
			
		||||
            const GLint s = CHAN_MAX - t;
 | 
			
		||||
            const GLint r = (rgba[i][RCOMP] * t + dest[i][RCOMP] * s) >> 8;
 | 
			
		||||
            const GLint g = (rgba[i][GCOMP] * t + dest[i][GCOMP] * s) >> 8;
 | 
			
		||||
            const GLint b = (rgba[i][BCOMP] * t + dest[i][BCOMP] * s) >> 8;
 | 
			
		||||
            const GLint a = (rgba[i][ACOMP] * t + dest[i][ACOMP] * s) >> 8;
 | 
			
		||||
            const GLint r = (rgba[i][RCOMP] * t + dest[i][RCOMP] * s + 1) >> 8;
 | 
			
		||||
            const GLint g = (rgba[i][GCOMP] * t + dest[i][GCOMP] * s + 1) >> 8;
 | 
			
		||||
            const GLint b = (rgba[i][BCOMP] * t + dest[i][BCOMP] * s + 1) >> 8;
 | 
			
		||||
            const GLint a = (rgba[i][ACOMP] * t + dest[i][ACOMP] * s + 1) >> 8;
 | 
			
		||||
#elif 0
 | 
			
		||||
            /* This is slower but satisfies Glean */
 | 
			
		||||
            const GLint s = CHAN_MAX - t;
 | 
			
		||||
            const GLint r = (rgba[i][RCOMP] * t + dest[i][RCOMP] * s) / 255;
 | 
			
		||||
            const GLint g = (rgba[i][GCOMP] * t + dest[i][GCOMP] * s) / 255;
 | 
			
		||||
            const GLint b = (rgba[i][BCOMP] * t + dest[i][BCOMP] * s) / 255;
 | 
			
		||||
            const GLint a = (rgba[i][ACOMP] * t + dest[i][ACOMP] * s) / 255;
 | 
			
		||||
#else
 | 
			
		||||
            /* This satisfies Glean and should be reasonably fast */
 | 
			
		||||
            /* Contributed by Nathan Hand */
 | 
			
		||||
#define DIV255(X)  (((X) << 8) + (X) + 256) >> 16
 | 
			
		||||
            const GLint s = CHAN_MAX - t;
 | 
			
		||||
            const GLint r = DIV255(rgba[i][RCOMP] * t + dest[i][RCOMP] * s);
 | 
			
		||||
            const GLint g = DIV255(rgba[i][GCOMP] * t + dest[i][GCOMP] * s);
 | 
			
		||||
            const GLint b = DIV255(rgba[i][BCOMP] * t + dest[i][BCOMP] * s);
 | 
			
		||||
            const GLint a = DIV255(rgba[i][ACOMP] * t + dest[i][ACOMP] * s);
 | 
			
		||||
#undef DIV255
 | 
			
		||||
#endif
 | 
			
		||||
            ASSERT(r <= CHAN_MAX);
 | 
			
		||||
            ASSERT(g <= CHAN_MAX);
 | 
			
		||||
            ASSERT(b <= CHAN_MAX);
 | 
			
		||||
@@ -755,22 +775,22 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
 | 
			
		||||
 | 
			
		||||
         /* compute blended color */
 | 
			
		||||
         if (ctx->Color.BlendEquation==GL_FUNC_ADD_EXT) {
 | 
			
		||||
            r = Rs * sR + Rd * dR;
 | 
			
		||||
            g = Gs * sG + Gd * dG;
 | 
			
		||||
            b = Bs * sB + Bd * dB;
 | 
			
		||||
            a = As * sA + Ad * dA;
 | 
			
		||||
            r = Rs * sR + Rd * dR + 0.5F;
 | 
			
		||||
            g = Gs * sG + Gd * dG + 0.5F;
 | 
			
		||||
            b = Bs * sB + Bd * dB + 0.5F;
 | 
			
		||||
            a = As * sA + Ad * dA + 0.5F;
 | 
			
		||||
         }
 | 
			
		||||
         else if (ctx->Color.BlendEquation==GL_FUNC_SUBTRACT_EXT) {
 | 
			
		||||
            r = Rs * sR - Rd * dR;
 | 
			
		||||
            g = Gs * sG - Gd * dG;
 | 
			
		||||
            b = Bs * sB - Bd * dB;
 | 
			
		||||
            a = As * sA - Ad * dA;
 | 
			
		||||
            r = Rs * sR - Rd * dR + 0.5F;
 | 
			
		||||
            g = Gs * sG - Gd * dG + 0.5F;
 | 
			
		||||
            b = Bs * sB - Bd * dB + 0.5F;
 | 
			
		||||
            a = As * sA - Ad * dA + 0.5F;
 | 
			
		||||
         }
 | 
			
		||||
         else if (ctx->Color.BlendEquation==GL_FUNC_REVERSE_SUBTRACT_EXT) {
 | 
			
		||||
            r = Rd * dR - Rs * sR;
 | 
			
		||||
            g = Gd * dG - Gs * sG;
 | 
			
		||||
            b = Bd * dB - Bs * sB;
 | 
			
		||||
            a = Ad * dA - As * sA;
 | 
			
		||||
            r = Rd * dR - Rs * sR + 0.5F;
 | 
			
		||||
            g = Gd * dG - Gs * sG + 0.5F;
 | 
			
		||||
            b = Bd * dB - Bs * sB + 0.5F;
 | 
			
		||||
            a = Ad * dA - As * sA + 0.5F;
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            /* should never get here */
 | 
			
		||||
@@ -791,7 +811,7 @@ blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
 | 
			
		||||
 | 
			
		||||
#if defined(USE_MMX_ASM)
 | 
			
		||||
#include "X86/mmx.h"
 | 
			
		||||
#include "X86/common_x86asm.h"
 | 
			
		||||
#include "X86/common_x86_asm.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -811,8 +831,8 @@ static void set_blend_function( GLcontext *ctx )
 | 
			
		||||
   /* Hmm.  A table here would have 12^4 == way too many entries.
 | 
			
		||||
    * Provide a hook for MMX instead.
 | 
			
		||||
    */
 | 
			
		||||
   if (gl_x86_cpu_features & GL_CPU_MMX) {
 | 
			
		||||
      gl_mmx_set_blend_function (ctx);
 | 
			
		||||
   if ( cpu_has_mmx ) {
 | 
			
		||||
      gl_mmx_set_blend_function( ctx );
 | 
			
		||||
   }
 | 
			
		||||
   else
 | 
			
		||||
#endif
 | 
			
		||||
@@ -870,7 +890,7 @@ _mesa_blend_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
 | 
			
		||||
   if (!ctx->Color.BlendFunc)
 | 
			
		||||
      set_blend_function(ctx);
 | 
			
		||||
 | 
			
		||||
   (*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (const GLubyte (*)[4])dest );
 | 
			
		||||
   (*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (CONST GLubyte (*)[4])dest );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -905,5 +925,5 @@ _mesa_blend_pixels( GLcontext *ctx,
 | 
			
		||||
   if (!ctx->Color.BlendFunc)
 | 
			
		||||
      set_blend_function(ctx);
 | 
			
		||||
 | 
			
		||||
   (*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (const GLubyte (*)[4])dest );
 | 
			
		||||
   (*ctx->Color.BlendFunc)( ctx, n, mask, rgba, (CONST GLubyte (*)[4])dest );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,8 @@
 | 
			
		||||
/* $Id: buffers.c,v 1.9.4.4 2001/05/15 20:13:22 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -167,7 +168,7 @@ clear_color_buffer(GLcontext *ctx)
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* Color index mode */
 | 
			
		||||
      ASSERT(ctx->Color.IndexMask == ~0);
 | 
			
		||||
      ASSERT(ctx->Color.IndexMask == ((1 << ctx->Visual->IndexBits) - 1));
 | 
			
		||||
      if (ctx->Visual->IndexBits == 8) {
 | 
			
		||||
         /* 8-bit clear */
 | 
			
		||||
         GLubyte span[MAX_WIDTH];
 | 
			
		||||
@@ -208,15 +209,19 @@ clear_color_buffers(GLcontext *ctx)
 | 
			
		||||
      if (bufferBit & ctx->Color.DrawDestMask) {
 | 
			
		||||
         if (bufferBit == FRONT_LEFT_BIT) {
 | 
			
		||||
            (void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_FRONT_LEFT);
 | 
			
		||||
            (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_FRONT_LEFT);
 | 
			
		||||
         }
 | 
			
		||||
         else if (bufferBit == FRONT_RIGHT_BIT) {
 | 
			
		||||
            (void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_FRONT_RIGHT);
 | 
			
		||||
            (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_FRONT_RIGHT);
 | 
			
		||||
         }
 | 
			
		||||
         else if (bufferBit == BACK_LEFT_BIT) {
 | 
			
		||||
            (void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_BACK_LEFT);
 | 
			
		||||
            (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_BACK_LEFT);
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            (void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_BACK_RIGHT);
 | 
			
		||||
            (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_BACK_RIGHT);
 | 
			
		||||
         }
 | 
			
		||||
         
 | 
			
		||||
         if (ctx->Color.SWmasking) {
 | 
			
		||||
@@ -228,8 +233,9 @@ clear_color_buffers(GLcontext *ctx)
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* restore default dest buffer */
 | 
			
		||||
   /* restore default read/draw buffers */
 | 
			
		||||
   (void) (*ctx->Driver.SetDrawBuffer)( ctx, ctx->Color.DriverDrawBuffer );
 | 
			
		||||
   (void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->ReadBuffer, ctx->Pixel.DriverReadBuffer );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -287,6 +293,8 @@ _mesa_Clear( GLbitfield mask )
 | 
			
		||||
      }
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      RENDER_START(ctx);
 | 
			
		||||
 | 
			
		||||
      /* do software clearing here */
 | 
			
		||||
      if (newMask) {
 | 
			
		||||
         if (newMask & ctx->Color.DrawDestMask)   clear_color_buffers(ctx);
 | 
			
		||||
@@ -302,6 +310,8 @@ _mesa_Clear( GLbitfield mask )
 | 
			
		||||
         _mesa_clear_alpha_buffers( ctx );
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      RENDER_FINISH(ctx);
 | 
			
		||||
 | 
			
		||||
#ifdef PROFILE
 | 
			
		||||
      ctx->ClearTime += gl_time() - t0;
 | 
			
		||||
      ctx->ClearCount++;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: clip.c,v 1.8 2000/04/17 18:18:00 keithw Exp $ */
 | 
			
		||||
/* $Id: clip.c,v 1.8.4.1 2001/02/09 16:46:56 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4.1
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -301,14 +301,8 @@ GLuint gl_userclip_point( GLcontext* ctx, const GLfloat v[] )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if 0
 | 
			
		||||
#define NEGATIVE(x) ((*(int *)&x)<0)
 | 
			
		||||
#define DIFFERENT_SIGNS(a,b) ((a*b) < 0)
 | 
			
		||||
#else
 | 
			
		||||
#define NEGATIVE(x) (x < 0)
 | 
			
		||||
#define DIFFERENT_SIGNS(a,b) ((a*b) < 0)
 | 
			
		||||
#endif
 | 
			
		||||
#define NEGATIVE(x) ((x) < 0.0)
 | 
			
		||||
#define DIFFERENT_SIGNS(a, b) (((a) * (b)) <= 0.0 && ((a) != (b)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static clip_poly_func gl_poly_clip_tab[2][5];
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: colortab.c,v 1.20 2000/06/29 18:54:29 brianp Exp $ */
 | 
			
		||||
/* $Id: colortab.c,v 1.20.4.3 2000/11/21 23:00:22 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -325,17 +325,14 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (width > ctx->Const.MaxColorTableSize) {
 | 
			
		||||
   if (width > (GLsizei) ctx->Const.MaxColorTableSize) {
 | 
			
		||||
      if (proxy) {
 | 
			
		||||
         table->Size = 0;
 | 
			
		||||
         table->IntFormat = (GLenum) 0;
 | 
			
		||||
         table->Format = (GLenum) 0;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         if (width > ctx->Const.MaxColorTableSize)
 | 
			
		||||
            gl_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
 | 
			
		||||
         else
 | 
			
		||||
            gl_error(ctx, GL_INVALID_VALUE, "glColorTable(width)");
 | 
			
		||||
         gl_error(ctx, GL_TABLE_TOO_LARGE, "glColorTable(width)");
 | 
			
		||||
      }
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
@@ -356,12 +353,12 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
 | 
			
		||||
      if (floatTable) {
 | 
			
		||||
         GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
 | 
			
		||||
         GLfloat *tableF;
 | 
			
		||||
         GLuint i;
 | 
			
		||||
         GLint i;
 | 
			
		||||
 | 
			
		||||
         _mesa_unpack_float_color_span(ctx, width, table->Format,
 | 
			
		||||
                                       tempTab,  /* dest */
 | 
			
		||||
                                       format, type, data,
 | 
			
		||||
                                       &ctx->Unpack, GL_TRUE, GL_FALSE);
 | 
			
		||||
                                       &ctx->Unpack, GL_FALSE, GL_FALSE);
 | 
			
		||||
 | 
			
		||||
         table->TableType = GL_FLOAT;
 | 
			
		||||
         table->Table = MALLOC(comps * width * sizeof(GLfloat));
 | 
			
		||||
@@ -423,9 +420,9 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
 | 
			
		||||
            return;
 | 
			
		||||
         }
 | 
			
		||||
         _mesa_unpack_ubyte_color_span(ctx, width, table->Format,
 | 
			
		||||
                                       table->Table,  /* dest */
 | 
			
		||||
                                       (GLubyte *) table->Table,  /* dest */
 | 
			
		||||
                                       format, type, data,
 | 
			
		||||
                                       &ctx->Unpack, GL_TRUE);
 | 
			
		||||
                                       &ctx->Unpack, GL_FALSE);
 | 
			
		||||
      } /* floatTable */
 | 
			
		||||
   } /* proxy */
 | 
			
		||||
 | 
			
		||||
@@ -524,7 +521,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
 | 
			
		||||
   comps = _mesa_components_in_format(table->Format);
 | 
			
		||||
   assert(comps > 0);  /* error should have been caught sooner */
 | 
			
		||||
 | 
			
		||||
   if (start + count > table->Size) {
 | 
			
		||||
   if (start + count > (GLint) table->Size) {
 | 
			
		||||
      gl_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)");
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
@@ -537,19 +534,19 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
 | 
			
		||||
   if (table->TableType == GL_UNSIGNED_BYTE) {
 | 
			
		||||
      GLubyte *dest = (GLubyte *) table->Table + start * comps * sizeof(GLubyte);
 | 
			
		||||
      _mesa_unpack_ubyte_color_span(ctx, count, table->Format, dest,
 | 
			
		||||
                                    format, type, data, &ctx->Unpack, GL_TRUE);
 | 
			
		||||
                                   format, type, data, &ctx->Unpack, GL_FALSE);
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
 | 
			
		||||
      GLfloat *tableF;
 | 
			
		||||
      GLuint i;
 | 
			
		||||
      GLint i;
 | 
			
		||||
 | 
			
		||||
      ASSERT(table->TableType == GL_FLOAT);
 | 
			
		||||
 | 
			
		||||
      _mesa_unpack_float_color_span(ctx, count, table->Format,
 | 
			
		||||
                                    tempTab,  /* dest */
 | 
			
		||||
                                    format, type, data,
 | 
			
		||||
                                    &ctx->Unpack, GL_TRUE, GL_FALSE);
 | 
			
		||||
                                    &ctx->Unpack, GL_FALSE, GL_FALSE);
 | 
			
		||||
 | 
			
		||||
      tableF = (GLfloat *) table->Table;
 | 
			
		||||
 | 
			
		||||
@@ -629,7 +626,9 @@ _mesa_CopyColorTable(GLenum target, GLenum internalformat,
 | 
			
		||||
      width = MAX_WIDTH;
 | 
			
		||||
 | 
			
		||||
   /* read the data from framebuffer */
 | 
			
		||||
   RENDER_START(ctx);
 | 
			
		||||
   gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data );
 | 
			
		||||
   RENDER_FINISH(ctx);
 | 
			
		||||
 | 
			
		||||
   /* Restore reading from draw buffer (the default) */
 | 
			
		||||
   (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
 | 
			
		||||
@@ -658,7 +657,9 @@ _mesa_CopyColorSubTable(GLenum target, GLsizei start,
 | 
			
		||||
      width = MAX_WIDTH;
 | 
			
		||||
 | 
			
		||||
   /* read the data from framebuffer */
 | 
			
		||||
   RENDER_START(ctx);
 | 
			
		||||
   gl_read_rgba_span( ctx, ctx->ReadBuffer, width, x, y, data );
 | 
			
		||||
   RENDER_FINISH(ctx);
 | 
			
		||||
 | 
			
		||||
   /* Restore reading from draw buffer (the default) */
 | 
			
		||||
   (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer,
 | 
			
		||||
@@ -677,7 +678,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
 | 
			
		||||
   struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
 | 
			
		||||
   struct gl_color_table *table = NULL;
 | 
			
		||||
   GLubyte rgba[MAX_COLOR_TABLE_SIZE][4];
 | 
			
		||||
   GLint i;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END(ctx, "glGetColorTable");
 | 
			
		||||
 | 
			
		||||
@@ -836,7 +837,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
 | 
			
		||||
         return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   _mesa_pack_rgba_span(ctx, table->Size, (const GLubyte (*)[]) rgba,
 | 
			
		||||
   _mesa_pack_rgba_span(ctx, table->Size, (CONST GLubyte (*)[4]) rgba,
 | 
			
		||||
                        format, type, data, &ctx->Pack, GL_FALSE);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: config.h,v 1.15 2000/07/05 22:40:30 brianp Exp $ */
 | 
			
		||||
/* $Id: config.h,v 1.15.4.1 2001/05/14 19:17:07 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -107,7 +107,7 @@
 | 
			
		||||
 | 
			
		||||
/* Maximum viewport/image size: */
 | 
			
		||||
#define MAX_WIDTH 2048
 | 
			
		||||
#define MAX_HEIGHT 1200
 | 
			
		||||
#define MAX_HEIGHT 2048
 | 
			
		||||
 | 
			
		||||
/* Maxmimum size for CVA.  May be overridden by the drivers.  */
 | 
			
		||||
#define MAX_ARRAY_LOCK_SIZE 3000
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,7 @@
 | 
			
		||||
/* $Id: context.c,v 1.79 2000/07/19 20:58:59 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
@@ -211,10 +210,11 @@ _mesa_initialize_visual( GLvisual *vis,
 | 
			
		||||
 | 
			
		||||
   if (depthBits == 0) {
 | 
			
		||||
      /* Special case.  Even if we don't have a depth buffer we need
 | 
			
		||||
       * good values for DepthMax for Z vertex transformation purposes.
 | 
			
		||||
       * good values for DepthMax for Z vertex transformation purposes
 | 
			
		||||
       * and for per-fragment fog computation.
 | 
			
		||||
       */
 | 
			
		||||
      vis->DepthMax = 1;
 | 
			
		||||
      vis->DepthMaxF = 1.0F;
 | 
			
		||||
      vis->DepthMax = 1 << 16;
 | 
			
		||||
      vis->DepthMaxF = (GLfloat) vis->DepthMax;
 | 
			
		||||
   }
 | 
			
		||||
   else if (depthBits < 32) {
 | 
			
		||||
      vis->DepthMax = (1 << depthBits) - 1;
 | 
			
		||||
@@ -412,10 +412,10 @@ one_time_init( void )
 | 
			
		||||
      _mesa_init_fog();
 | 
			
		||||
      _mesa_init_math();
 | 
			
		||||
      gl_init_lists();
 | 
			
		||||
      gl_init_shade();
 | 
			
		||||
      gl_init_texture();
 | 
			
		||||
      gl_init_transformation();
 | 
			
		||||
      gl_init_translate();
 | 
			
		||||
      gl_init_shade();
 | 
			
		||||
      gl_init_vbrender();
 | 
			
		||||
      gl_init_vbxform();
 | 
			
		||||
      gl_init_vertices();
 | 
			
		||||
@@ -452,9 +452,13 @@ alloc_shared_state( void )
 | 
			
		||||
   if (!ss)
 | 
			
		||||
      return NULL;
 | 
			
		||||
 | 
			
		||||
   ss->DisplayList = _mesa_NewHashTable();
 | 
			
		||||
   _glthread_INIT_MUTEX(ss->Mutex);
 | 
			
		||||
 | 
			
		||||
   ss->DisplayList = _mesa_NewHashTable();
 | 
			
		||||
   ss->TexObjects = _mesa_NewHashTable();
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
   ss->ArrayObjects = _mesa_NewHashTable();
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
   /* Default Texture objects */
 | 
			
		||||
   outOfMemory = GL_FALSE;
 | 
			
		||||
@@ -593,6 +597,8 @@ init_texture_unit( GLcontext *ctx, GLuint unit )
 | 
			
		||||
{
 | 
			
		||||
   struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
 | 
			
		||||
 | 
			
		||||
   texUnit->Enabled = 0;
 | 
			
		||||
   texUnit->ReallyEnabled = 0;
 | 
			
		||||
   texUnit->EnvMode = GL_MODULATE;
 | 
			
		||||
   texUnit->CombineModeRGB = GL_MODULATE;
 | 
			
		||||
   texUnit->CombineModeA = GL_MODULATE;
 | 
			
		||||
@@ -1149,9 +1155,10 @@ init_attrib_groups( GLcontext *ctx )
 | 
			
		||||
   /* Texture group */
 | 
			
		||||
   ctx->Texture.CurrentUnit = 0;      /* multitexture */
 | 
			
		||||
   ctx->Texture.CurrentTransformUnit = 0; /* multitexture */
 | 
			
		||||
   ctx->Texture.Enabled = 0;
 | 
			
		||||
   ctx->Texture.ReallyEnabled = 0;
 | 
			
		||||
   for (i=0; i<MAX_TEXTURE_UNITS; i++)
 | 
			
		||||
      init_texture_unit( ctx, i );
 | 
			
		||||
   ctx->Texture.SharedPalette = GL_FALSE;
 | 
			
		||||
   _mesa_init_colortable(&ctx->Texture.Palette);
 | 
			
		||||
 | 
			
		||||
   /* Transformation group */
 | 
			
		||||
@@ -1184,6 +1191,13 @@ init_attrib_groups( GLcontext *ctx )
 | 
			
		||||
   ctx->Viewport.WindowMap.type = MATRIX_3D_NO_ROT;
 | 
			
		||||
 | 
			
		||||
   /* Vertex arrays */
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
   {
 | 
			
		||||
      struct gl_array_object *arrayObj;
 | 
			
		||||
      arrayObj = _mesa_alloc_vertex_array_object(ctx, 0);
 | 
			
		||||
      ctx->Array.Current = arrayObj;
 | 
			
		||||
   }
 | 
			
		||||
#else
 | 
			
		||||
   ctx->Array.Vertex.Size = 4;
 | 
			
		||||
   ctx->Array.Vertex.Type = GL_FLOAT;
 | 
			
		||||
   ctx->Array.Vertex.Stride = 0;
 | 
			
		||||
@@ -1219,6 +1233,7 @@ init_attrib_groups( GLcontext *ctx )
 | 
			
		||||
   ctx->Array.EdgeFlag.StrideB = 0;
 | 
			
		||||
   ctx->Array.EdgeFlag.Ptr = NULL;
 | 
			
		||||
   ctx->Array.EdgeFlag.Enabled = GL_FALSE;
 | 
			
		||||
#endif
 | 
			
		||||
   ctx->Array.ActiveTexture = 0;   /* GL_ARB_multitexture */
 | 
			
		||||
 | 
			
		||||
   /* Pixel transfer */
 | 
			
		||||
@@ -1376,7 +1391,8 @@ alloc_proxy_textures( GLcontext *ctx )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Initialize a GLcontext struct.
 | 
			
		||||
 * Initialize a GLcontext struct.  This includes allocating all the
 | 
			
		||||
 * other structs and arrays which hang off of the context by pointers.
 | 
			
		||||
 */
 | 
			
		||||
GLboolean
 | 
			
		||||
_mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
@@ -1399,7 +1415,6 @@ _mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
 | 
			
		||||
   ctx->VB = gl_vb_create_for_immediate( ctx );
 | 
			
		||||
   if (!ctx->VB) {
 | 
			
		||||
      FREE( ctx );
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
   ctx->input = ctx->VB->IM;
 | 
			
		||||
@@ -1407,7 +1422,6 @@ _mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
   ctx->PB = gl_alloc_pb();
 | 
			
		||||
   if (!ctx->PB) {
 | 
			
		||||
      ALIGN_FREE( ctx->VB );
 | 
			
		||||
      FREE( ctx );
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
@@ -1421,7 +1435,6 @@ _mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
      if (!ctx->Shared) {
 | 
			
		||||
         ALIGN_FREE( ctx->VB );
 | 
			
		||||
         FREE( ctx->PB );
 | 
			
		||||
         FREE( ctx );
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
@@ -1453,7 +1466,6 @@ _mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
      free_shared_state(ctx, ctx->Shared);
 | 
			
		||||
      ALIGN_FREE( ctx->VB );
 | 
			
		||||
      FREE( ctx->PB );
 | 
			
		||||
      FREE( ctx );
 | 
			
		||||
      return GL_FALSE;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
@@ -1484,7 +1496,6 @@ _mesa_initialize_context( GLcontext *ctx,
 | 
			
		||||
      FREE( ctx->PB );
 | 
			
		||||
      if (ctx->Exec)
 | 
			
		||||
         FREE( ctx->Exec );
 | 
			
		||||
      FREE( ctx );
 | 
			
		||||
   }
 | 
			
		||||
   _mesa_init_exec_table(ctx->Exec, dispatchSize);
 | 
			
		||||
   _mesa_init_dlist_table(ctx->Save, dispatchSize);
 | 
			
		||||
@@ -1879,7 +1890,11 @@ _mesa_get_dispatch(GLcontext *ctx)
 | 
			
		||||
void gl_problem( const GLcontext *ctx, const char *s )
 | 
			
		||||
{
 | 
			
		||||
   fprintf( stderr, "Mesa implementation error: %s\n", s );
 | 
			
		||||
   fprintf( stderr, "Report to Mesa bug database at www.mesa3d.org\n" );
 | 
			
		||||
#ifdef XF86DRI
 | 
			
		||||
   fprintf( stderr, "Please report to the DRI bug database at dri.sourceforge.net\n");
 | 
			
		||||
#else
 | 
			
		||||
   fprintf( stderr, "Please report to the Mesa bug database at www.mesa3d.org\n" );
 | 
			
		||||
#endif
 | 
			
		||||
   (void) ctx;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,8 @@
 | 
			
		||||
/* $Id: dd.h,v 1.26.4.4 2000/09/28 18:25:00 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -640,18 +641,31 @@ struct dd_function_table {
 | 
			
		||||
    * Core Mesa will perform any image format/type conversions that are needed.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   GLboolean (*TestProxyTexImage)(GLcontext *ctx, GLenum target,
 | 
			
		||||
                                  GLint level, GLint internalFormat,
 | 
			
		||||
                                  GLenum format, GLenum type,
 | 
			
		||||
                                  GLint width, GLint height,
 | 
			
		||||
                                  GLint depth, GLint border);
 | 
			
		||||
   /* Called by glTexImage[123]D when user specifies a proxy texture
 | 
			
		||||
    * target.  Return GL_TRUE if the proxy test passes, return GL_FALSE
 | 
			
		||||
    * if the test fails.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   GLboolean (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                                      GLint level, const GLvoid *data,
 | 
			
		||||
                                      GLint level, GLsizei imageSize,
 | 
			
		||||
                                      const GLvoid *data,
 | 
			
		||||
                                      struct gl_texture_object *texObj,
 | 
			
		||||
                                      struct gl_texture_image *texImage,
 | 
			
		||||
                                      GLboolean *retainInternalCopy);
 | 
			
		||||
   GLboolean (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                                      GLint level, const GLvoid *data,
 | 
			
		||||
                                      GLint level, GLsizei imageSize,
 | 
			
		||||
                                      const GLvoid *data,
 | 
			
		||||
                                      struct gl_texture_object *texObj,
 | 
			
		||||
                                      struct gl_texture_image *texImage,
 | 
			
		||||
                                      GLboolean *retainInternalCopy);
 | 
			
		||||
   GLboolean (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                                      GLint level, const GLvoid *data,
 | 
			
		||||
                                      GLint level, GLsizei imageSize,
 | 
			
		||||
                                      const GLvoid *data,
 | 
			
		||||
                                      struct gl_texture_object *texObj,
 | 
			
		||||
                                      struct gl_texture_image *texImage,
 | 
			
		||||
                                      GLboolean *retainInternalCopy);
 | 
			
		||||
@@ -699,6 +713,49 @@ struct dd_function_table {
 | 
			
		||||
    * should do the job.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   GLint (*BaseCompressedTexFormat)(GLcontext *ctx,
 | 
			
		||||
                                    GLint internalFormat);
 | 
			
		||||
   /* Called to compute the base format for a specific compressed
 | 
			
		||||
    * format.  Return -1 if the internalFormat is not a specific
 | 
			
		||||
    * compressed format that the driver recognizes.  Note the
 | 
			
		||||
    * return value differences between this function and
 | 
			
		||||
    * SpecificCompressedTexFormat below.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   GLint (*SpecificCompressedTexFormat)(GLcontext *ctx,
 | 
			
		||||
                                        GLint      internalFormat,
 | 
			
		||||
                                        GLint      numDimensions,
 | 
			
		||||
                                        GLint     *levelp,
 | 
			
		||||
                                        GLsizei   *widthp,
 | 
			
		||||
                                        GLsizei   *heightp,
 | 
			
		||||
                                        GLsizei   *depthp,
 | 
			
		||||
                                        GLint     *borderp,
 | 
			
		||||
                                        GLenum    *formatp,
 | 
			
		||||
                                        GLenum    *typep);
 | 
			
		||||
   /* Called to turn a generic texture format into a specific
 | 
			
		||||
    * texture format.  For example, if a driver implements
 | 
			
		||||
    * GL_3DFX_texture_compression_FXT1, this would map
 | 
			
		||||
    * GL_COMPRESSED_RGBA_ARB to GL_COMPRESSED_RGBA_FXT1_3DFX.
 | 
			
		||||
    *
 | 
			
		||||
    * If the driver does not know how to handle the compressed
 | 
			
		||||
    * format, then just return the generic format, and Mesa will
 | 
			
		||||
    * do the right thing with it.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   GLboolean (*IsCompressedFormat)(GLcontext *ctx, GLint internalFormat);
 | 
			
		||||
   /* Called to tell if a format is a compressed format.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   GLsizei (*CompressedImageSize)(GLcontext *ctx,
 | 
			
		||||
                                  GLenum internalFormat,
 | 
			
		||||
                                  GLuint numDimensions,
 | 
			
		||||
                                  GLuint width,
 | 
			
		||||
                                  GLuint height,
 | 
			
		||||
                                  GLuint depth);
 | 
			
		||||
   /* Calculate the size of a compressed image, given the image's
 | 
			
		||||
    * format and dimensions.
 | 
			
		||||
    */
 | 
			
		||||
 | 
			
		||||
   void (*GetCompressedTexImage)( GLcontext *ctx, GLenum target,
 | 
			
		||||
                                  GLint lod, void *image,
 | 
			
		||||
                                  const struct gl_texture_object *texObj,
 | 
			
		||||
@@ -759,7 +816,7 @@ struct dd_function_table {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
   /***
 | 
			
		||||
    *** Accelerated point, line, polygon, glDrawPixels and glBitmap functions:
 | 
			
		||||
    *** Accelerated point, line, polygon, quad and rect functions:
 | 
			
		||||
    ***/
 | 
			
		||||
 | 
			
		||||
   points_func   PointsFunc;
 | 
			
		||||
@@ -906,6 +963,16 @@ struct dd_function_table {
 | 
			
		||||
   void (*StencilMask)(GLcontext *ctx, GLuint mask);
 | 
			
		||||
   void (*StencilOp)(GLcontext *ctx, GLenum fail, GLenum zfail, GLenum zpass);
 | 
			
		||||
   void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
 | 
			
		||||
 | 
			
		||||
   /* State-query functions
 | 
			
		||||
    *
 | 
			
		||||
    * Return GL_TRUE if query was completed, GL_FALSE otherwise.
 | 
			
		||||
    */
 | 
			
		||||
   GLboolean (*GetBooleanv)(GLcontext *ctx, GLenum pname, GLboolean *result);
 | 
			
		||||
   GLboolean (*GetDoublev)(GLcontext *ctx, GLenum pname, GLdouble *result);
 | 
			
		||||
   GLboolean (*GetFloatv)(GLcontext *ctx, GLenum pname, GLfloat *result);
 | 
			
		||||
   GLboolean (*GetIntegerv)(GLcontext *ctx, GLenum pname, GLint *result);
 | 
			
		||||
   GLboolean (*GetPointerv)(GLcontext *ctx, GLenum pname, GLvoid **result);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: depth.c,v 1.17 2000/04/11 20:42:22 brianp Exp $ */
 | 
			
		||||
/* $Id: depth.c,v 1.17.4.2 2001/02/08 15:54:33 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -1458,14 +1458,14 @@ _mesa_read_depth_span( GLcontext *ctx,
 | 
			
		||||
      /* read from software depth buffer */
 | 
			
		||||
      if (ctx->Visual->DepthBits <= 16) {
 | 
			
		||||
         const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
 | 
			
		||||
         GLuint i;
 | 
			
		||||
         GLint i;
 | 
			
		||||
         for (i = 0; i < n; i++) {
 | 
			
		||||
            depth[i] = zptr[i];
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
 | 
			
		||||
         GLuint i;
 | 
			
		||||
         GLint i;
 | 
			
		||||
         for (i = 0; i < n; i++) {
 | 
			
		||||
            depth[i] = zptr[i];
 | 
			
		||||
         }
 | 
			
		||||
@@ -1530,14 +1530,14 @@ _mesa_read_depth_span_float( GLcontext *ctx,
 | 
			
		||||
      /* read from software depth buffer */
 | 
			
		||||
      if (ctx->Visual->DepthBits <= 16) {
 | 
			
		||||
         const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
 | 
			
		||||
         GLuint i;
 | 
			
		||||
         GLint i;
 | 
			
		||||
         for (i = 0; i < n; i++) {
 | 
			
		||||
            depth[i] = (GLfloat) zptr[i] * scale;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
 | 
			
		||||
         GLuint i;
 | 
			
		||||
         GLint i;
 | 
			
		||||
         for (i = 0; i < n; i++) {
 | 
			
		||||
            depth[i] = (GLfloat) zptr[i] * scale;
 | 
			
		||||
         }
 | 
			
		||||
@@ -1546,7 +1546,7 @@ _mesa_read_depth_span_float( GLcontext *ctx,
 | 
			
		||||
   else if (ctx->Driver.ReadDepthSpan) {
 | 
			
		||||
      /* read from hardware depth buffer */
 | 
			
		||||
      GLdepth d[MAX_WIDTH];
 | 
			
		||||
      GLuint i;
 | 
			
		||||
      GLint i;
 | 
			
		||||
      assert(n <= MAX_WIDTH);
 | 
			
		||||
      (*ctx->Driver.ReadDepthSpan)( ctx, n, x, y, d );
 | 
			
		||||
      for (i = 0; i < n; i++) {
 | 
			
		||||
@@ -1630,29 +1630,31 @@ _mesa_clear_depth_buffer( GLcontext *ctx )
 | 
			
		||||
      if (ctx->Visual->DepthBits <= 16) {
 | 
			
		||||
         const GLushort clearValue = (GLushort) (ctx->Depth.Clear * ctx->Visual->DepthMax);
 | 
			
		||||
         const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin + 1;
 | 
			
		||||
         const GLint width = ctx->DrawBuffer->Width;
 | 
			
		||||
         const GLint cols = ctx->DrawBuffer->Xmax - ctx->DrawBuffer->Xmin + 1;
 | 
			
		||||
         const GLint rowStride = ctx->DrawBuffer->Width;
 | 
			
		||||
         GLushort *dRow = (GLushort *) ctx->DrawBuffer->DepthBuffer
 | 
			
		||||
            + ctx->DrawBuffer->Ymin * width + ctx->DrawBuffer->Xmin;
 | 
			
		||||
            + ctx->DrawBuffer->Ymin * rowStride + ctx->DrawBuffer->Xmin;
 | 
			
		||||
         GLint i, j;
 | 
			
		||||
         for (i = 0; i < rows; i++) {
 | 
			
		||||
            for (j = 0; j < width; j++) {
 | 
			
		||||
            for (j = 0; j < cols; j++) {
 | 
			
		||||
               dRow[j] = clearValue;
 | 
			
		||||
            }
 | 
			
		||||
            dRow += width;
 | 
			
		||||
            dRow += rowStride;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         const GLuint clearValue = (GLuint) (ctx->Depth.Clear * ctx->Visual->DepthMax);
 | 
			
		||||
         const GLint rows = ctx->DrawBuffer->Ymax - ctx->DrawBuffer->Ymin + 1;
 | 
			
		||||
         const GLint width = ctx->DrawBuffer->Width;
 | 
			
		||||
         const GLint cols = ctx->DrawBuffer->Xmax - ctx->DrawBuffer->Xmin + 1;
 | 
			
		||||
         const GLint rowStride = ctx->DrawBuffer->Width;
 | 
			
		||||
         GLuint *dRow = (GLuint *) ctx->DrawBuffer->DepthBuffer
 | 
			
		||||
            + ctx->DrawBuffer->Ymin * width + ctx->DrawBuffer->Xmin;
 | 
			
		||||
            + ctx->DrawBuffer->Ymin * rowStride + ctx->DrawBuffer->Xmin;
 | 
			
		||||
         GLint i, j;
 | 
			
		||||
         for (i = 0; i < rows; i++) {
 | 
			
		||||
            for (j = 0; j < width; j++) {
 | 
			
		||||
            for (j = 0; j < cols; j++) {
 | 
			
		||||
               dRow[j] = clearValue;
 | 
			
		||||
            }
 | 
			
		||||
            dRow += width;
 | 
			
		||||
            dRow += rowStride;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ VPATH = RCS
 | 
			
		||||
 | 
			
		||||
INCDIR = [-.include]
 | 
			
		||||
LIBDIR = [-.lib]
 | 
			
		||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)
 | 
			
		||||
CFLAGS = /include=($(INCDIR),[])/define=(FBIND=1)/name=(as_is,short)
 | 
			
		||||
 | 
			
		||||
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 \
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: drawpix.c,v 1.26 2000/06/30 22:19:41 brianp Exp $ */
 | 
			
		||||
/* $Id: drawpix.c,v 1.26.4.7 2000/11/05 21:24:00 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -122,11 +122,10 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
       && ctx->ColorMatrix.type == MATRIX_IDENTITY
 | 
			
		||||
       && !ctx->Pixel.ColorTableEnabled
 | 
			
		||||
       && !ctx->Pixel.PostColorMatrixColorTableEnabled
 | 
			
		||||
       && ctx->Pixel.PostConvolutionColorTableEnabled
 | 
			
		||||
       && !ctx->Pixel.PostConvolutionColorTableEnabled
 | 
			
		||||
       && !ctx->Pixel.MinMaxEnabled
 | 
			
		||||
       && !ctx->Pixel.HistogramEnabled
 | 
			
		||||
       && ctx->Pixel.IndexShift==0 && ctx->Pixel.IndexOffset==0
 | 
			
		||||
       && ctx->Pixel.MapColorFlag==0
 | 
			
		||||
       && ctx->Texture.ReallyEnabled == 0
 | 
			
		||||
       && unpack->Alignment==1
 | 
			
		||||
       && !unpack->SwapBytes
 | 
			
		||||
@@ -140,7 +139,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
      GLint skipRows = unpack->SkipRows;
 | 
			
		||||
      GLint rowLength;
 | 
			
		||||
      GLdepth zSpan[MAX_WIDTH];  /* only used when zooming */
 | 
			
		||||
      GLint zoomY0;
 | 
			
		||||
      GLint zoomY0 = 0;
 | 
			
		||||
 | 
			
		||||
      if (unpack->RowLength > 0)
 | 
			
		||||
         rowLength = unpack->RowLength;
 | 
			
		||||
@@ -173,14 +172,36 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
            drawHeight -= (destY + drawHeight - ctx->DrawBuffer->Ymax - 1);
 | 
			
		||||
         if (drawHeight <= 0)
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      else if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==-1.0F) {
 | 
			
		||||
         /* upside-down image */
 | 
			
		||||
         /* horizontal clipping */
 | 
			
		||||
         if (destX < ctx->DrawBuffer->Xmin) {
 | 
			
		||||
            skipPixels += (ctx->DrawBuffer->Xmin - destX);
 | 
			
		||||
            drawWidth  -= (ctx->DrawBuffer->Xmin - destX);
 | 
			
		||||
            destX = ctx->DrawBuffer->Xmin;
 | 
			
		||||
         }
 | 
			
		||||
         if (destX + drawWidth > ctx->DrawBuffer->Xmax)
 | 
			
		||||
            drawWidth -= (destX + drawWidth - ctx->DrawBuffer->Xmax - 1);
 | 
			
		||||
         if (drawWidth <= 0)
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
         zoomY0 = 0;  /* not used - silence compiler warning */
 | 
			
		||||
         /* vertical clipping */
 | 
			
		||||
         if (destY > ctx->DrawBuffer->Ymax) {
 | 
			
		||||
            skipRows   += (destY - ctx->DrawBuffer->Ymax - 1);
 | 
			
		||||
            drawHeight -= (destY - ctx->DrawBuffer->Ymax - 1);
 | 
			
		||||
            destY = ctx->DrawBuffer->Ymax + 1;
 | 
			
		||||
         }
 | 
			
		||||
         if (destY - drawHeight < ctx->DrawBuffer->Ymin)
 | 
			
		||||
            drawHeight -= (ctx->DrawBuffer->Ymin - (destY - drawHeight));
 | 
			
		||||
         if (drawHeight <= 0)
 | 
			
		||||
            return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         /* setup array of fragment Z value to pass to zoom function */
 | 
			
		||||
         GLdepth z = (GLdepth) (ctx->Current.RasterPos[2] * ctx->Visual->DepthMaxF);
 | 
			
		||||
         GLint i;
 | 
			
		||||
         assert(drawWidth < MAX_WIDTH);
 | 
			
		||||
         ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
         for (i=0; i<drawWidth; i++)
 | 
			
		||||
            zSpan[i] = z;
 | 
			
		||||
 | 
			
		||||
@@ -197,7 +218,8 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
       * skip "skipRows" rows and skip "skipPixels" pixels/row.
 | 
			
		||||
       */
 | 
			
		||||
 | 
			
		||||
      if (format==GL_RGBA && type==GL_UNSIGNED_BYTE) {
 | 
			
		||||
      if (format==GL_RGBA && type==GL_UNSIGNED_BYTE
 | 
			
		||||
          && ctx->Pixel.MapColorFlag==0) {
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
            GLubyte *src = (GLubyte *) pixels
 | 
			
		||||
               + (skipRows * rowLength + skipPixels) * 4;
 | 
			
		||||
@@ -206,17 +228,27 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  (*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                               (void *) src, NULL);
 | 
			
		||||
                                             (CONST GLubyte (*)[4]) src, NULL);
 | 
			
		||||
                  src += rowLength * 4;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==-1.0F) {
 | 
			
		||||
               /* upside-down */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  destY--;
 | 
			
		||||
                  (*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                             (CONST GLubyte (*)[4]) src, NULL);
 | 
			
		||||
                  src += rowLength * 4;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               /* with zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                            zSpan, (void *) src, zoomY0);
 | 
			
		||||
                                    zSpan, (CONST GLubyte (*)[4]) src, zoomY0);
 | 
			
		||||
                  src += rowLength * 4;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
@@ -224,7 +256,8 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
         }
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      else if (format==GL_RGB && type==GL_UNSIGNED_BYTE) {
 | 
			
		||||
      else if (format==GL_RGB && type==GL_UNSIGNED_BYTE
 | 
			
		||||
               && ctx->Pixel.MapColorFlag==0) {
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
            GLubyte *src = (GLubyte *) pixels
 | 
			
		||||
               + (skipRows * rowLength + skipPixels) * 3;
 | 
			
		||||
@@ -232,17 +265,27 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  (*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                              (void *) src, NULL);
 | 
			
		||||
                                             (CONST GLubyte (*)[3]) src, NULL);
 | 
			
		||||
                  src += rowLength * 3;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==-1.0F) {
 | 
			
		||||
               /* upside-down */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  destY--;
 | 
			
		||||
                  (*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                             (CONST GLubyte (*)[3]) src, NULL);
 | 
			
		||||
                  src += rowLength * 3;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               /* with zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                           zSpan, (void *) src, zoomY0);
 | 
			
		||||
                                    zSpan, (CONST GLubyte (*)[3]) src, zoomY0);
 | 
			
		||||
                  src += rowLength * 3;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
@@ -250,14 +293,15 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
         }
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      else if (format==GL_LUMINANCE && type==GL_UNSIGNED_BYTE) {
 | 
			
		||||
      else if (format==GL_LUMINANCE && type==GL_UNSIGNED_BYTE
 | 
			
		||||
               && ctx->Pixel.MapColorFlag==0) {
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
            GLubyte *src = (GLubyte *) pixels
 | 
			
		||||
               + (skipRows * rowLength + skipPixels);
 | 
			
		||||
            if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
 | 
			
		||||
               /* no zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               assert(drawWidth < MAX_WIDTH);
 | 
			
		||||
               ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  GLint i;
 | 
			
		||||
		  for (i=0;i<drawWidth;i++) {
 | 
			
		||||
@@ -266,15 +310,32 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
                     rgb[i][2] = src[i];
 | 
			
		||||
		  }
 | 
			
		||||
                  (*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                              (void *) rgb, NULL);
 | 
			
		||||
                                             (CONST GLubyte (*)[3]) rgb, NULL);
 | 
			
		||||
                  src += rowLength;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==-1.0F) {
 | 
			
		||||
               /* upside-down */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  GLint i;
 | 
			
		||||
                  for (i=0;i<drawWidth;i++) {
 | 
			
		||||
                     rgb[i][0] = src[i];
 | 
			
		||||
                     rgb[i][1] = src[i];
 | 
			
		||||
                     rgb[i][2] = src[i];
 | 
			
		||||
                  }
 | 
			
		||||
                  destY--;
 | 
			
		||||
                  (*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                             (CONST GLubyte (*)[3]) rgb, NULL);
 | 
			
		||||
                  src += rowLength;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               /* with zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               assert(drawWidth < MAX_WIDTH);
 | 
			
		||||
               ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  GLint i;
 | 
			
		||||
		  for (i=0;i<drawWidth;i++) {
 | 
			
		||||
@@ -283,7 +344,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
                     rgb[i][2] = src[i];
 | 
			
		||||
		  }
 | 
			
		||||
                  gl_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                           zSpan, (void *) rgb, zoomY0);
 | 
			
		||||
                                    zSpan, (CONST GLubyte (*)[3]) rgb, zoomY0);
 | 
			
		||||
                  src += rowLength;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
@@ -291,14 +352,15 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
         }
 | 
			
		||||
         return GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
      else if (format==GL_LUMINANCE_ALPHA && type==GL_UNSIGNED_BYTE) {
 | 
			
		||||
      else if (format==GL_LUMINANCE_ALPHA && type==GL_UNSIGNED_BYTE
 | 
			
		||||
               && ctx->Pixel.MapColorFlag==0) {
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
            GLubyte *src = (GLubyte *) pixels
 | 
			
		||||
               + (skipRows * rowLength + skipPixels)*2;
 | 
			
		||||
            if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==1.0F) {
 | 
			
		||||
               /* no zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               assert(drawWidth < MAX_WIDTH);
 | 
			
		||||
               ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  GLint i;
 | 
			
		||||
                  GLubyte *ptr = src;
 | 
			
		||||
@@ -309,15 +371,34 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
                     rgba[i][3] = *ptr++;
 | 
			
		||||
		  }
 | 
			
		||||
                  (*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                               (void *) rgba, NULL);
 | 
			
		||||
                                            (CONST GLubyte (*)[4]) rgba, NULL);
 | 
			
		||||
                  src += rowLength*2;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==-1.0F) {
 | 
			
		||||
               /* upside-down */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  GLint i;
 | 
			
		||||
                  GLubyte *ptr = src;
 | 
			
		||||
                  for (i=0;i<drawWidth;i++) {
 | 
			
		||||
                     rgba[i][0] = *ptr;
 | 
			
		||||
                     rgba[i][1] = *ptr;
 | 
			
		||||
                     rgba[i][2] = *ptr++;
 | 
			
		||||
                     rgba[i][3] = *ptr++;
 | 
			
		||||
                  }
 | 
			
		||||
                  destY--;
 | 
			
		||||
                  (*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                            (CONST GLubyte (*)[4]) rgba, NULL);
 | 
			
		||||
                  src += rowLength*2;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               /* with zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               assert(drawWidth < MAX_WIDTH);
 | 
			
		||||
               ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  GLubyte *ptr = src;
 | 
			
		||||
                  GLint i;
 | 
			
		||||
@@ -328,7 +409,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
                     rgba[i][3] = *ptr++;
 | 
			
		||||
		  }
 | 
			
		||||
                  gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                            zSpan, (void *) rgba, zoomY0);
 | 
			
		||||
                                   zSpan, (CONST GLubyte (*)[4]) rgba, zoomY0);
 | 
			
		||||
                  src += rowLength*2;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
@@ -344,24 +425,38 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
               /* no zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  assert(drawWidth < MAX_WIDTH);
 | 
			
		||||
                  ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
                  _mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
 | 
			
		||||
                  (*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                               (const GLubyte (*)[4])rgba, 
 | 
			
		||||
                                               (CONST GLubyte (*)[4])rgba, 
 | 
			
		||||
					       NULL);
 | 
			
		||||
                  src += rowLength;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
               return GL_TRUE;
 | 
			
		||||
            }
 | 
			
		||||
            else if (ctx->Pixel.ZoomX==1.0F && ctx->Pixel.ZoomY==-1.0F) {
 | 
			
		||||
               /* upside-down */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
                  _mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
 | 
			
		||||
                  destY--;
 | 
			
		||||
                  (*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                               (CONST GLubyte (*)[4])rgba, 
 | 
			
		||||
                                               NULL);
 | 
			
		||||
                  src += rowLength;
 | 
			
		||||
               }
 | 
			
		||||
               return GL_TRUE;
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               /* with zooming */
 | 
			
		||||
               GLint row;
 | 
			
		||||
               for (row=0; row<drawHeight; row++) {
 | 
			
		||||
                  assert(drawWidth < MAX_WIDTH);
 | 
			
		||||
                  ASSERT(drawWidth < MAX_WIDTH);
 | 
			
		||||
                  _mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
 | 
			
		||||
                  gl_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
 | 
			
		||||
                                            zSpan, (void *) rgba, zoomY0);
 | 
			
		||||
                                   zSpan, (CONST GLubyte (*)[4]) rgba, zoomY0);
 | 
			
		||||
                  src += rowLength;
 | 
			
		||||
                  destY++;
 | 
			
		||||
               }
 | 
			
		||||
@@ -551,8 +646,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
      GLint row;
 | 
			
		||||
      for (row = 0; row < height; row++, y++) {
 | 
			
		||||
         GLdepth zspan[MAX_WIDTH];
 | 
			
		||||
         const GLushort *zptr = _mesa_image_address(&ctx->Unpack,
 | 
			
		||||
                pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
 | 
			
		||||
         const GLushort *zptr = (const GLushort *)
 | 
			
		||||
            _mesa_image_address(&ctx->Unpack, pixels, width, height,
 | 
			
		||||
                                GL_DEPTH_COMPONENT, type, 0, row, 0);
 | 
			
		||||
         GLint i;
 | 
			
		||||
         for (i = 0; i < width; i++)
 | 
			
		||||
            zspan[i] = zptr[i];
 | 
			
		||||
@@ -564,8 +660,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
      /* Special case: directly write 32-bit depth values */
 | 
			
		||||
      GLint row;
 | 
			
		||||
      for (row = 0; row < height; row++, y++) {
 | 
			
		||||
         const GLuint *zptr = _mesa_image_address(&ctx->Unpack,
 | 
			
		||||
                pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
 | 
			
		||||
         const GLuint *zptr = (const GLuint *)
 | 
			
		||||
            _mesa_image_address(&ctx->Unpack, pixels, width, height,
 | 
			
		||||
                                GL_DEPTH_COMPONENT, type, 0, row, 0);
 | 
			
		||||
         gl_write_rgba_span( ctx, width, x, y, zptr, rgba, GL_BITMAP );
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
@@ -581,7 +678,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
            if (zoom) {
 | 
			
		||||
               gl_write_zoomed_rgba_span(ctx, width, x, y, zspan,
 | 
			
		||||
                                         (const GLubyte (*)[4])rgba, desty);
 | 
			
		||||
                                         (CONST GLubyte (*)[4])rgba, desty);
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               gl_write_rgba_span(ctx, width, x, y, zspan, rgba, GL_BITMAP);
 | 
			
		||||
@@ -616,6 +713,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
   GLdepth zspan[MAX_WIDTH];
 | 
			
		||||
   GLboolean quickDraw;
 | 
			
		||||
 | 
			
		||||
   if (!_mesa_is_legal_format_and_type(format, type)) {
 | 
			
		||||
      gl_error(ctx, GL_INVALID_ENUM, "glDrawPixels(format or type)");
 | 
			
		||||
      return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* Try an optimized glDrawPixels first */
 | 
			
		||||
   if (simple_DrawPixels(ctx, x, y, width, height, format, type, pixels))
 | 
			
		||||
      return;
 | 
			
		||||
@@ -652,8 +754,8 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
      for (row = 0; row < height; row++, y++) {
 | 
			
		||||
         const GLvoid *source = _mesa_image_address(unpack,
 | 
			
		||||
                  pixels, width, height, format, type, 0, row, 0);
 | 
			
		||||
         _mesa_unpack_ubyte_color_span(ctx, width, GL_RGBA, (void*) rgba,
 | 
			
		||||
                   format, type, source, unpack, GL_TRUE);
 | 
			
		||||
         _mesa_unpack_ubyte_color_span(ctx, width, GL_RGBA,
 | 
			
		||||
                   (GLubyte *) rgba, format, type, source, unpack, GL_TRUE);
 | 
			
		||||
         if ((ctx->Pixel.MinMaxEnabled && ctx->MinMax.Sink) ||
 | 
			
		||||
             (ctx->Pixel.HistogramEnabled && ctx->Histogram.Sink))
 | 
			
		||||
            continue;
 | 
			
		||||
@@ -667,7 +769,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
            MEMCPY(primary_rgba, rgba, 4 * width * sizeof(GLubyte));
 | 
			
		||||
 | 
			
		||||
            for (unit = 0; unit < MAX_TEXTURE_UNITS; unit++) {
 | 
			
		||||
               _mesa_pixeltexgen(ctx, width, (const GLubyte (*)[4]) rgba,
 | 
			
		||||
               _mesa_pixeltexgen(ctx, width, (CONST GLubyte (*)[4]) rgba,
 | 
			
		||||
                                 s, t, r, q);
 | 
			
		||||
               gl_texture_pixels(ctx, unit, width, s, t, r, NULL,
 | 
			
		||||
                                 primary_rgba, rgba);
 | 
			
		||||
@@ -676,11 +778,11 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
 | 
			
		||||
 | 
			
		||||
         if (quickDraw) {
 | 
			
		||||
            (*ctx->Driver.WriteRGBASpan)( ctx, width, x, y,
 | 
			
		||||
                                          (CONST GLubyte (*)[]) rgba, NULL);
 | 
			
		||||
                                          (CONST GLubyte (*)[4]) rgba, NULL);
 | 
			
		||||
         }
 | 
			
		||||
         else if (zoom) {
 | 
			
		||||
            gl_write_zoomed_rgba_span( ctx, width, x, y, zspan, 
 | 
			
		||||
				       (CONST GLubyte (*)[]) rgba, desty );
 | 
			
		||||
				       (CONST GLubyte (*)[4]) rgba, desty );
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            gl_write_rgba_span( ctx, (GLuint) width, x, y, zspan, rgba, GL_BITMAP);
 | 
			
		||||
@@ -723,6 +825,7 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
 | 
			
		||||
         return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      RENDER_START(ctx);
 | 
			
		||||
      switch (format) {
 | 
			
		||||
	 case GL_STENCIL_INDEX:
 | 
			
		||||
	    draw_stencil_pixels( ctx, x, y, width, height, type, pixels );
 | 
			
		||||
@@ -751,8 +854,8 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
 | 
			
		||||
	    break;
 | 
			
		||||
	 default:
 | 
			
		||||
	    gl_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" );
 | 
			
		||||
            return;
 | 
			
		||||
      }
 | 
			
		||||
      RENDER_FINISH(ctx);
 | 
			
		||||
   }
 | 
			
		||||
   else if (ctx->RenderMode==GL_FEEDBACK) {
 | 
			
		||||
      if (ctx->Current.RasterPosValid) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: enable.c,v 1.21 2000/05/23 15:17:12 brianp Exp $ */
 | 
			
		||||
/* $Id: enable.c,v 1.21.4.4 2001/02/12 17:21:24 brianp Exp $*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999  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"),
 | 
			
		||||
@@ -49,7 +49,7 @@
 | 
			
		||||
 */
 | 
			
		||||
void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
{
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, "gl_enable/disable" );
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH( ctx, state ? "glEnable" : "glDisable" );
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & VERBOSE_API) 
 | 
			
		||||
      fprintf(stderr, "%s %s (newstate is %x)\n", 
 | 
			
		||||
@@ -285,12 +285,14 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
      case GL_POINT_SMOOTH:
 | 
			
		||||
	 if (ctx->Point.SmoothFlag!=state) {
 | 
			
		||||
            ctx->Point.SmoothFlag = state;
 | 
			
		||||
	    ctx->TriangleCaps ^= DD_POINT_SMOOTH;
 | 
			
		||||
            ctx->NewState |= NEW_RASTER_OPS;
 | 
			
		||||
         }
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_POLYGON_SMOOTH:
 | 
			
		||||
	 if (ctx->Polygon.SmoothFlag!=state) {
 | 
			
		||||
            ctx->Polygon.SmoothFlag = state;
 | 
			
		||||
	    ctx->TriangleCaps ^= DD_TRI_SMOOTH;
 | 
			
		||||
            ctx->NewState |= NEW_RASTER_OPS;
 | 
			
		||||
         }
 | 
			
		||||
	 break;
 | 
			
		||||
@@ -350,48 +352,39 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
      case GL_TEXTURE_1D:
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
	    const GLuint curr = ctx->Texture.CurrentUnit;
 | 
			
		||||
	    const GLuint flag = TEXTURE0_1D << (curr * 4);
 | 
			
		||||
            struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
 | 
			
		||||
	    ctx->NewState |= NEW_TEXTURE_ENABLE;
 | 
			
		||||
            if (state) {
 | 
			
		||||
	       texUnit->Enabled |= TEXTURE0_1D;
 | 
			
		||||
	       ctx->Enabled |= flag;
 | 
			
		||||
	    }
 | 
			
		||||
            else {
 | 
			
		||||
               texUnit->Enabled &= ~TEXTURE0_1D;
 | 
			
		||||
               ctx->Enabled &= ~flag;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_2D:
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
	    const GLuint curr = ctx->Texture.CurrentUnit;
 | 
			
		||||
	    const GLuint flag = TEXTURE0_2D << (curr * 4);
 | 
			
		||||
            struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
 | 
			
		||||
	    ctx->NewState |= NEW_TEXTURE_ENABLE;
 | 
			
		||||
            if (state) {
 | 
			
		||||
	       texUnit->Enabled |= TEXTURE0_2D;
 | 
			
		||||
	       ctx->Enabled |= flag;
 | 
			
		||||
	    }
 | 
			
		||||
            else {
 | 
			
		||||
               texUnit->Enabled &= ~TEXTURE0_2D;
 | 
			
		||||
               ctx->Enabled &= ~flag;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_TEXTURE_3D:
 | 
			
		||||
         if (ctx->Visual->RGBAflag) {
 | 
			
		||||
	    const GLuint curr = ctx->Texture.CurrentUnit;
 | 
			
		||||
	    const GLuint flag = TEXTURE0_3D << (curr * 4);
 | 
			
		||||
            struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
 | 
			
		||||
	    ctx->NewState |= NEW_TEXTURE_ENABLE;
 | 
			
		||||
            if (state) {
 | 
			
		||||
	       texUnit->Enabled |= TEXTURE0_3D;
 | 
			
		||||
	       ctx->Enabled |= flag;
 | 
			
		||||
	    }
 | 
			
		||||
            else {
 | 
			
		||||
               texUnit->Enabled &= ~TEXTURE0_3D;
 | 
			
		||||
               ctx->Enabled &= ~flag;
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
         break;
 | 
			
		||||
@@ -440,22 +433,46 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
       * CLIENT STATE!!!
 | 
			
		||||
       */
 | 
			
		||||
      case GL_VERTEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Vertex.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Vertex.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Normal.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Normal.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Color.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Color.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Index.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Index.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->TexCoord[ctx->Array.ActiveTexture].Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->EdgeFlag.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.EdgeFlag.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
 | 
			
		||||
      /* GL_HP_occlusion_test */
 | 
			
		||||
@@ -511,35 +528,24 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
         if (ctx->Extensions.HaveTextureCubeMap) {
 | 
			
		||||
            if (ctx->Visual->RGBAflag) {
 | 
			
		||||
               const GLuint curr = ctx->Texture.CurrentUnit;
 | 
			
		||||
               const GLuint flag = TEXTURE0_CUBE << (curr * 4);
 | 
			
		||||
               struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
 | 
			
		||||
               ctx->NewState |= NEW_TEXTURE_ENABLE;
 | 
			
		||||
               if (state) {
 | 
			
		||||
                  texUnit->Enabled |= TEXTURE0_CUBE;
 | 
			
		||||
                  ctx->Enabled |= flag;
 | 
			
		||||
               }
 | 
			
		||||
               else {
 | 
			
		||||
                  texUnit->Enabled &= ~TEXTURE0_CUBE;
 | 
			
		||||
                  ctx->Enabled &= ~flag;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            if (state)
 | 
			
		||||
               gl_error(ctx, GL_INVALID_ENUM, "glEnable");
 | 
			
		||||
            else
 | 
			
		||||
               gl_error(ctx, GL_INVALID_ENUM, "glDisable");
 | 
			
		||||
            gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable");
 | 
			
		||||
            return;
 | 
			
		||||
         }
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      default:
 | 
			
		||||
	 if (state) {
 | 
			
		||||
	    gl_error( ctx, GL_INVALID_ENUM, "glEnable" );
 | 
			
		||||
	 }
 | 
			
		||||
	 else {
 | 
			
		||||
	    gl_error( ctx, GL_INVALID_ENUM, "glDisable" );
 | 
			
		||||
	 }
 | 
			
		||||
         gl_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable");
 | 
			
		||||
         return;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
@@ -719,17 +725,41 @@ _mesa_IsEnabled( GLenum cap )
 | 
			
		||||
       * CLIENT STATE!!!
 | 
			
		||||
       */
 | 
			
		||||
      case GL_VERTEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         return ctx->Array.Current->Vertex.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         return ctx->Array.Vertex.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
      case GL_NORMAL_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         return ctx->Array.Current->Normal.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         return ctx->Array.Normal.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
      case GL_COLOR_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         return ctx->Array.Current->Color.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         return ctx->Array.Color.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
      case GL_INDEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         return ctx->Array.Current->Index.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         return ctx->Array.Index.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         return ctx->Array.Current->TexCoord[ctx->Array.ActiveTexture].Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         return ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         return ctx->Array.Current->EdgeFlag.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         return ctx->Array.EdgeFlag.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
      /* GL_HP_occlusion_test */
 | 
			
		||||
      case GL_OCCLUSION_TEST_HP:
 | 
			
		||||
@@ -795,22 +825,46 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
 | 
			
		||||
 | 
			
		||||
   switch (cap) {
 | 
			
		||||
      case GL_VERTEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Vertex.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Vertex.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Normal.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Normal.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Color.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Color.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->Index.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.Index.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->TexCoord[ctx->Array.ActiveTexture].Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         ctx->Array.Current->EdgeFlag.Enabled = state;
 | 
			
		||||
#else
 | 
			
		||||
         ctx->Array.EdgeFlag.Enabled = state;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      default:
 | 
			
		||||
         gl_error( ctx, GL_INVALID_ENUM, "glEnable/DisableClientState" );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +1,21 @@
 | 
			
		||||
/* $Id: enums.c,v 1.9 2000/06/27 21:42:13 brianp Exp $ */
 | 
			
		||||
/* $Id: enums.c,v 1.9.4.2 2001/01/06 22:43:00 gareth Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 *
 | 
			
		||||
 * 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"),
 | 
			
		||||
 * 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
 | 
			
		||||
@@ -34,12 +34,12 @@
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
typedef struct { 
 | 
			
		||||
   const char *c; 
 | 
			
		||||
   int n; 
 | 
			
		||||
typedef struct {
 | 
			
		||||
   const char *c;
 | 
			
		||||
   int n;
 | 
			
		||||
} enum_elt;
 | 
			
		||||
 | 
			
		||||
enum_elt all_enums[] = 
 | 
			
		||||
enum_elt all_enums[] =
 | 
			
		||||
{
 | 
			
		||||
   /* Boolean values */
 | 
			
		||||
   { "GL_FALSE", 0 },
 | 
			
		||||
@@ -828,7 +828,11 @@ enum_elt all_enums[] =
 | 
			
		||||
   { "GL_INTERPOLATE_EXT", 0x8575 },
 | 
			
		||||
   { "GL_CONSTANT_EXT", 0x8576 },
 | 
			
		||||
   { "GL_PRIMARY_COLOR_EXT", 0x8577 },
 | 
			
		||||
   { "GL_PREVIOUS_EXT", 0x8578 }
 | 
			
		||||
   { "GL_PREVIOUS_EXT", 0x8578 },
 | 
			
		||||
 | 
			
		||||
   /* GL_EXT_texture_env_dot3 */
 | 
			
		||||
   { "GL_DOT3_RGB_EXT", 0x8740 },
 | 
			
		||||
   { "GL_DOT3_RGBA_EXT", 0x8741 },
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -839,7 +843,7 @@ typedef int (GLWINAPIV *cfunc)(const void *, const void *);
 | 
			
		||||
static enum_elt **index1 = 0;
 | 
			
		||||
static int sorted = 0;
 | 
			
		||||
 | 
			
		||||
static int compar_name( const enum_elt *a, const enum_elt *b ) 
 | 
			
		||||
static int compar_name( const enum_elt *a, const enum_elt *b )
 | 
			
		||||
{
 | 
			
		||||
   return strcmp(a->c, b->c);
 | 
			
		||||
}
 | 
			
		||||
@@ -847,7 +851,7 @@ static int compar_name( const enum_elt *a, const enum_elt *b )
 | 
			
		||||
 | 
			
		||||
/* note the extra level of indirection
 | 
			
		||||
 */
 | 
			
		||||
static int compar_nr( const enum_elt **a, const enum_elt **b ) 
 | 
			
		||||
static int compar_nr( const enum_elt **a, const enum_elt **b )
 | 
			
		||||
{
 | 
			
		||||
   return (*a)->n - (*b)->n;
 | 
			
		||||
}
 | 
			
		||||
@@ -855,14 +859,14 @@ static int compar_nr( const enum_elt **a, const enum_elt **b )
 | 
			
		||||
 | 
			
		||||
static void sort_enums( void )
 | 
			
		||||
{
 | 
			
		||||
   int i;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
   index1 = (enum_elt **)MALLOC( Elements(all_enums) * sizeof(enum_elt *) );
 | 
			
		||||
   sorted = 1;
 | 
			
		||||
 | 
			
		||||
   qsort( all_enums, Elements(all_enums), sizeof(*all_enums), 
 | 
			
		||||
   qsort( all_enums, Elements(all_enums), sizeof(*all_enums),
 | 
			
		||||
	  (cfunc) compar_name );
 | 
			
		||||
 | 
			
		||||
   for (i = 0 ; i < Elements(all_enums) ; i++) 
 | 
			
		||||
   for (i = 0 ; i < Elements(all_enums) ; i++)
 | 
			
		||||
      index1[i] = &all_enums[i];
 | 
			
		||||
 | 
			
		||||
   qsort( index1, Elements(all_enums), sizeof(*index1), (cfunc) compar_nr );
 | 
			
		||||
@@ -875,14 +879,14 @@ int gl_lookup_enum_by_name( const char *symbol )
 | 
			
		||||
   enum_elt tmp;
 | 
			
		||||
   enum_elt *e;
 | 
			
		||||
 | 
			
		||||
   if (!sorted) 
 | 
			
		||||
   if (!sorted)
 | 
			
		||||
      sort_enums();
 | 
			
		||||
 | 
			
		||||
   if (!symbol) 
 | 
			
		||||
   if (!symbol)
 | 
			
		||||
      return 0;
 | 
			
		||||
 | 
			
		||||
   tmp.c = symbol;
 | 
			
		||||
   e = (enum_elt *)bsearch( &tmp, all_enums, Elements(all_enums), 
 | 
			
		||||
   e = (enum_elt *)bsearch( &tmp, all_enums, Elements(all_enums),
 | 
			
		||||
			    sizeof(*all_enums), (cfunc) compar_name );
 | 
			
		||||
 | 
			
		||||
   return e ? e->n : -1;
 | 
			
		||||
@@ -893,13 +897,13 @@ const char *gl_lookup_enum_by_nr( int nr )
 | 
			
		||||
{
 | 
			
		||||
   enum_elt tmp, *e, **f;
 | 
			
		||||
 | 
			
		||||
   if (!sorted) 
 | 
			
		||||
   if (!sorted)
 | 
			
		||||
      sort_enums();
 | 
			
		||||
 | 
			
		||||
   tmp.n = nr;
 | 
			
		||||
   e = &tmp;
 | 
			
		||||
 | 
			
		||||
   f = (enum_elt **)bsearch( &e, index1, Elements(all_enums), 
 | 
			
		||||
   f = (enum_elt **)bsearch( &e, index1, Elements(all_enums),
 | 
			
		||||
			     sizeof(*index1), (cfunc) compar_nr );
 | 
			
		||||
 | 
			
		||||
   return f ? (*f)->c : "(unknown)";
 | 
			
		||||
@@ -920,6 +924,6 @@ int main()
 | 
			
		||||
   for (i = 0 ; i < Elements(test) ; i++) {
 | 
			
		||||
      int d = gl_lookup_enum_by_name( test[i] );
 | 
			
		||||
      printf("%s --> %d --> %s\n", test[i], d, gl_lookup_enum_by_nr( d ));
 | 
			
		||||
   }       
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: eval.c,v 1.10 2000/07/20 15:53:17 keithw Exp $ */
 | 
			
		||||
/* $Id: eval.c,v 1.10.2.1 2000/11/05 21:24:00 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -110,8 +110,8 @@ static void
 | 
			
		||||
horner_bezier_curve(const GLfloat *cp, GLfloat *out, GLfloat t,
 | 
			
		||||
                    GLuint dim, GLuint order)
 | 
			
		||||
{
 | 
			
		||||
  GLfloat s, powert;
 | 
			
		||||
  GLuint i, k, bincoeff;
 | 
			
		||||
  GLfloat s, powert, bincoeff;
 | 
			
		||||
  GLuint i, k;
 | 
			
		||||
 | 
			
		||||
  if(order >= 2)
 | 
			
		||||
  { 
 | 
			
		||||
@@ -162,8 +162,8 @@ horner_bezier_surf(GLfloat *cn, GLfloat *out, GLfloat u, GLfloat v,
 | 
			
		||||
  {
 | 
			
		||||
    if(uorder >= 2)
 | 
			
		||||
    { 
 | 
			
		||||
      GLfloat s, poweru;
 | 
			
		||||
      GLuint j, k, bincoeff;
 | 
			
		||||
      GLfloat s, poweru, bincoeff;
 | 
			
		||||
      GLuint j, k;
 | 
			
		||||
 | 
			
		||||
      /* Compute the control polygon for the surface-curve in u-direction */
 | 
			
		||||
      for(j=0; j<vorder; j++)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +1,21 @@
 | 
			
		||||
/* $Id: extensions.c,v 1.32 2000/06/27 21:42:13 brianp Exp $ */
 | 
			
		||||
/* $Id: extensions.c,v 1.32.4.3 2001/04/24 21:52:50 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * 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"),
 | 
			
		||||
 * 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
 | 
			
		||||
@@ -43,7 +43,7 @@ struct extension {
 | 
			
		||||
   struct extension *next, *prev;
 | 
			
		||||
   GLint enabled;
 | 
			
		||||
   char name[MAX_EXT_NAMELEN+1];
 | 
			
		||||
   void (*notify)( GLcontext *, GLboolean ); 
 | 
			
		||||
   void (*notify)( GLcontext *, GLboolean );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -51,9 +51,9 @@ struct extension {
 | 
			
		||||
static struct { int enabled; const char *name; } default_extensions[] = {
 | 
			
		||||
   { DEFAULT_OFF,    "GL_ARB_imaging" },  /* in progress */
 | 
			
		||||
   { DEFAULT_ON,     "GL_ARB_multitexture" },
 | 
			
		||||
   { DEFAULT_OFF,    "GL_ARB_texture_compression" },  /* in progress */
 | 
			
		||||
   { DEFAULT_OFF,    "GL_ARB_texture_compression" },
 | 
			
		||||
   { DEFAULT_OFF,    "GL_ARB_texture_cube_map" },  /* in progress */
 | 
			
		||||
   { ALWAYS_ENABLED, "GL_ARB_tranpose_matrix" },
 | 
			
		||||
   { ALWAYS_ENABLED, "GL_ARB_transpose_matrix" },
 | 
			
		||||
   { ALWAYS_ENABLED, "GL_EXT_abgr" },
 | 
			
		||||
   { DEFAULT_ON,     "GL_EXT_blend_color" },
 | 
			
		||||
   { DEFAULT_ON,     "GL_EXT_blend_func_separate" },
 | 
			
		||||
@@ -76,6 +76,7 @@ static struct { int enabled; const char *name; } default_extensions[] = {
 | 
			
		||||
   { DEFAULT_OFF,    "GL_EXT_texture_env" },
 | 
			
		||||
   { DEFAULT_ON,     "GL_EXT_texture_env_add" },
 | 
			
		||||
   { DEFAULT_OFF,    "GL_EXT_texture_env_combine" },
 | 
			
		||||
   { DEFAULT_OFF,    "GL_EXT_texture_env_dot3" },
 | 
			
		||||
   { ALWAYS_ENABLED, "GL_EXT_texture_object" },
 | 
			
		||||
   { DEFAULT_ON,     "GL_EXT_texture_lod_bias" },
 | 
			
		||||
   { ALWAYS_ENABLED, "GL_EXT_vertex_array" },
 | 
			
		||||
@@ -105,6 +106,7 @@ update_extension_flags( GLcontext *ctx )
 | 
			
		||||
   /* Update flags */
 | 
			
		||||
   ctx->Extensions.HaveTextureEnvAdd = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_add");
 | 
			
		||||
   ctx->Extensions.HaveTextureEnvCombine = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_combine");
 | 
			
		||||
   ctx->Extensions.HaveTextureEnvDot3 = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_dot3");
 | 
			
		||||
   ctx->Extensions.HaveTextureLodBias = gl_extension_is_enabled(ctx, "GL_EXT_texture_lod_bias");
 | 
			
		||||
   ctx->Extensions.HaveHpOcclusionTest = gl_extension_is_enabled(ctx, "GL_HP_occlusion_test");
 | 
			
		||||
   ctx->Extensions.HaveTextureCubeMap = gl_extension_is_enabled(ctx, "GL_ARB_texture_cube_map");
 | 
			
		||||
@@ -116,14 +118,14 @@ update_extension_flags( GLcontext *ctx )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int gl_extensions_add( GLcontext *ctx, 
 | 
			
		||||
		       int state, 
 | 
			
		||||
		       const char *name, 
 | 
			
		||||
int gl_extensions_add( GLcontext *ctx,
 | 
			
		||||
		       int state,
 | 
			
		||||
		       const char *name,
 | 
			
		||||
		       void (*notify)(void) )
 | 
			
		||||
{
 | 
			
		||||
   (void) notify;
 | 
			
		||||
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0) 
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0)
 | 
			
		||||
   {
 | 
			
		||||
      struct extension *t = MALLOC_STRUCT(extension);
 | 
			
		||||
      t->enabled = state;
 | 
			
		||||
@@ -143,27 +145,27 @@ int gl_extensions_add( GLcontext *ctx,
 | 
			
		||||
static int set_extension( GLcontext *ctx, const char *name, GLint state )
 | 
			
		||||
{
 | 
			
		||||
   struct extension *i;
 | 
			
		||||
   foreach( i, ctx->Extensions.ext_list ) 
 | 
			
		||||
      if (strncmp(i->name, name, MAX_EXT_NAMELEN) == 0) 
 | 
			
		||||
   foreach( i, ctx->Extensions.ext_list )
 | 
			
		||||
      if (strncmp(i->name, name, MAX_EXT_NAMELEN) == 0)
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
   if (i == ctx->Extensions.ext_list)
 | 
			
		||||
      return 1;
 | 
			
		||||
 | 
			
		||||
   if (!(i->enabled & ALWAYS_ENABLED)) {
 | 
			
		||||
      if (i->notify) i->notify( ctx, state );      
 | 
			
		||||
      if (i->notify) i->notify( ctx, state );
 | 
			
		||||
      i->enabled = state;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   update_extension_flags(ctx);
 | 
			
		||||
 | 
			
		||||
   return 0;
 | 
			
		||||
}   
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int gl_extensions_enable( GLcontext *ctx, const char *name )
 | 
			
		||||
{
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0) 
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0)
 | 
			
		||||
      return set_extension( ctx, name, 1 );
 | 
			
		||||
   return 1;
 | 
			
		||||
}
 | 
			
		||||
@@ -171,11 +173,11 @@ int gl_extensions_enable( GLcontext *ctx, const char *name )
 | 
			
		||||
 | 
			
		||||
int gl_extensions_disable( GLcontext *ctx, const char *name )
 | 
			
		||||
{
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0) 
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0)
 | 
			
		||||
      return set_extension( ctx, name, 0 );
 | 
			
		||||
   return 1;
 | 
			
		||||
}
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Test if the named extension is enabled in this context.
 | 
			
		||||
@@ -209,10 +211,10 @@ void gl_extensions_dtr( GLcontext *ctx )
 | 
			
		||||
	 remove_from_list( i );
 | 
			
		||||
	 FREE( i );
 | 
			
		||||
      }
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
      FREE(ctx->Extensions.ext_list);
 | 
			
		||||
      ctx->Extensions.ext_list = 0;
 | 
			
		||||
   }      
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -225,7 +227,7 @@ void gl_extensions_ctr( GLcontext *ctx )
 | 
			
		||||
   make_empty_list( ctx->Extensions.ext_list );
 | 
			
		||||
 | 
			
		||||
   for (i = 0 ; i < Elements(default_extensions) ; i++) {
 | 
			
		||||
      gl_extensions_add( ctx, 
 | 
			
		||||
      gl_extensions_add( ctx,
 | 
			
		||||
			 default_extensions[i].enabled,
 | 
			
		||||
			 default_extensions[i].name,
 | 
			
		||||
			 0 );
 | 
			
		||||
@@ -236,22 +238,22 @@ void gl_extensions_ctr( GLcontext *ctx )
 | 
			
		||||
 | 
			
		||||
const char *gl_extensions_get_string( GLcontext *ctx )
 | 
			
		||||
{
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0) 
 | 
			
		||||
   if (ctx->Extensions.ext_string == 0)
 | 
			
		||||
   {
 | 
			
		||||
      struct extension *i;
 | 
			
		||||
      char *str;
 | 
			
		||||
      GLuint len = 0;
 | 
			
		||||
      foreach (i, ctx->Extensions.ext_list) 
 | 
			
		||||
      foreach (i, ctx->Extensions.ext_list)
 | 
			
		||||
	 if (i->enabled)
 | 
			
		||||
	    len += strlen(i->name) + 1;
 | 
			
		||||
      
 | 
			
		||||
      if (len == 0) 
 | 
			
		||||
 | 
			
		||||
      if (len == 0)
 | 
			
		||||
	 return "";
 | 
			
		||||
 | 
			
		||||
      str = (char *)MALLOC(len * sizeof(char));
 | 
			
		||||
      ctx->Extensions.ext_string = str;
 | 
			
		||||
 | 
			
		||||
      foreach (i, ctx->Extensions.ext_list) 
 | 
			
		||||
      foreach (i, ctx->Extensions.ext_list)
 | 
			
		||||
	 if (i->enabled) {
 | 
			
		||||
	    strcpy(str, i->name);
 | 
			
		||||
	    str += strlen(str);
 | 
			
		||||
@@ -260,6 +262,6 @@ const char *gl_extensions_get_string( GLcontext *ctx )
 | 
			
		||||
 | 
			
		||||
      *(str-1) = 0;
 | 
			
		||||
   }
 | 
			
		||||
      
 | 
			
		||||
 | 
			
		||||
   return ctx->Extensions.ext_string;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: feedback.c,v 1.10 2000/05/09 23:54:09 brianp Exp $ */
 | 
			
		||||
/* $Id: feedback.c,v 1.10.4.1 2000/11/08 16:41:17 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -239,7 +239,7 @@ void gl_feedback_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   const struct vertex_buffer *VB = ctx->VB;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i=first;i<=last;i++) {
 | 
			
		||||
   for (i=first;i<last;i++) {
 | 
			
		||||
      if (VB->ClipMask[i]==0) {
 | 
			
		||||
         FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POINT_TOKEN );
 | 
			
		||||
	 feedback_vertex( ctx, i, i );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: fog.c,v 1.19 2000/07/07 15:10:35 keithw Exp $ */
 | 
			
		||||
/* $Id: fog.c,v 1.19.4.1 2000/10/17 00:24:11 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -331,7 +331,7 @@ _mesa_fog_rgba_pixels( const GLcontext *ctx,
 | 
			
		||||
               GLfloat eyez = d / (c+ndcz);
 | 
			
		||||
               GLfloat f, g;
 | 
			
		||||
               GLfloat tmp = negDensitySquared * eyez * eyez;
 | 
			
		||||
#ifdef __alpha__
 | 
			
		||||
#if defined(__alpha__) || defined(__alpha)
 | 
			
		||||
               /* XXX this underflow check may be needed for other systems */
 | 
			
		||||
               if (tmp < FLT_MIN_10_EXP)
 | 
			
		||||
                  f = exp( FLT_MIN_10_EXP );
 | 
			
		||||
@@ -410,7 +410,7 @@ _mesa_fog_ci_pixels( const GLcontext *ctx,
 | 
			
		||||
               if (eyez < 0.0)
 | 
			
		||||
                  eyez = -eyez;
 | 
			
		||||
               tmp = negDensitySquared * eyez * eyez;
 | 
			
		||||
#ifdef __alpha__
 | 
			
		||||
#if defined(__alpha__) || defined(__alpha)
 | 
			
		||||
               /* XXX this underflow check may be needed for other systems */
 | 
			
		||||
               if (tmp < FLT_MIN_10_EXP)
 | 
			
		||||
                  f = exp( FLT_MIN_10_EXP );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: get.c,v 1.30 2000/07/21 15:41:08 brianp Exp $ */
 | 
			
		||||
/* $Id: get.c,v 1.30.2.5 2001/05/14 19:11:32 brianp Exp $*/
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4.2
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -92,9 +92,16 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetBooleanv");
 | 
			
		||||
 | 
			
		||||
   if (!params)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & VERBOSE_API) 
 | 
			
		||||
      fprintf(stderr, "glGetBooleanv %s\n", gl_lookup_enum_by_nr(pname));
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.GetBooleanv
 | 
			
		||||
       && (*ctx->Driver.GetBooleanv)(ctx, pname, params))
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   switch (pname) {
 | 
			
		||||
      case GL_ACCUM_RED_BITS:
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Visual->AccumRedBits);
 | 
			
		||||
@@ -724,6 +731,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
 | 
			
		||||
      case GL_RENDER_MODE:
 | 
			
		||||
	 *params = ENUM_TO_BOOL(ctx->RenderMode);
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_RESCALE_NORMAL:
 | 
			
		||||
         *params = ctx->Transform.RescaleNormals;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_RGBA_MODE:
 | 
			
		||||
         *params = ctx->Visual->RGBAflag;
 | 
			
		||||
	 break;
 | 
			
		||||
@@ -868,79 +878,159 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
 | 
			
		||||
	 *params = FLOAT_TO_BOOL(ctx->Pixel.ZoomY);
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_VERTEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Vertex.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Vertex.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->Vertex.Size);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Vertex.Size);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Current->Vertex.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Vertex.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->Vertex.Stride);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Vertex.Stride);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = INT_TO_BOOL(0);
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Normal.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Normal.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Current->Normal.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Normal.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->Normal.Stride);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Normal.Stride);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = INT_TO_BOOL(0);
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Color.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Color.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->Color.Size);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Color.Size);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Current->Color.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Color.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->Color.Stride);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Color.Stride);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = INT_TO_BOOL(0);
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Index.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Index.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Current->Index.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Index.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->Index.Stride);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Index.Stride);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = INT_TO_BOOL(0);
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->TexCoord[texUnit].Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.TexCoord[texUnit].Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->TexCoord[texUnit].Size);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.TexCoord[texUnit].Size);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.Current->TexCoord[texUnit].Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_BOOL(ctx->Array.TexCoord[texUnit].Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->TexCoord[texUnit].Stride);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.TexCoord[texUnit].Stride);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = INT_TO_BOOL(0);
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->EdgeFlag.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.EdgeFlag.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.Current->EdgeFlag.Stride);
 | 
			
		||||
#else
 | 
			
		||||
         *params = INT_TO_BOOL(ctx->Array.EdgeFlag.Stride);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
 | 
			
		||||
      /* GL_ARB_multitexture */
 | 
			
		||||
@@ -1051,10 +1141,18 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
 | 
			
		||||
 | 
			
		||||
      /* GL_EXT_compiled_vertex_array */
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = ctx->Array.Current->LockFirst ? GL_TRUE : GL_FALSE;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = ctx->Array.LockFirst ? GL_TRUE : GL_FALSE;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = ctx->Array.Current->LockCount ? GL_TRUE : GL_FALSE;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = ctx->Array.LockCount ? GL_TRUE : GL_FALSE;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      /* GL_ARB_transpose_matrix */
 | 
			
		||||
@@ -1235,9 +1333,15 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetDoublev");
 | 
			
		||||
 | 
			
		||||
   if (!params)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & VERBOSE_API) 
 | 
			
		||||
      fprintf(stderr, "glGetDoublev %s\n", gl_lookup_enum_by_nr(pname));
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.GetDoublev && (*ctx->Driver.GetDoublev)(ctx, pname, params))
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   switch (pname) {
 | 
			
		||||
      case GL_ACCUM_RED_BITS:
 | 
			
		||||
         *params = (GLdouble) ctx->Visual->AccumRedBits;
 | 
			
		||||
@@ -1867,6 +1971,9 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
 | 
			
		||||
      case GL_RENDER_MODE:
 | 
			
		||||
	 *params = ENUM_TO_DOUBLE(ctx->RenderMode);
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_RESCALE_NORMAL:
 | 
			
		||||
         *params = (GLdouble) ctx->Transform.RescaleNormals;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_RGBA_MODE:
 | 
			
		||||
	 *params = (GLdouble) ctx->Visual->RGBAflag;
 | 
			
		||||
	 break;
 | 
			
		||||
@@ -2008,79 +2115,159 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
 | 
			
		||||
	 *params = (GLdouble) ctx->Pixel.ZoomY;
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_VERTEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Vertex.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Vertex.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Vertex.Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Vertex.Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Current->Vertex.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Vertex.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Vertex.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Vertex.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Normal.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Normal.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Current->Normal.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Normal.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Normal.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Normal.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Color.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Color.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Color.Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Color.Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Current->Color.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Color.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Color.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Color.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Index.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Index.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Current->Index.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Index.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->Index.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Index.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->TexCoord[texUnit].Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.TexCoord[texUnit].Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->TexCoord[texUnit].Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.TexCoord[texUnit].Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.Current->TexCoord[texUnit].Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_DOUBLE(ctx->Array.TexCoord[texUnit].Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->TexCoord[texUnit].Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.TexCoord[texUnit].Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->EdgeFlag.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.EdgeFlag.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLdouble) ctx->Array.Current->EdgeFlag.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLdouble) ctx->Array.EdgeFlag.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
@@ -2194,10 +2381,18 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
 | 
			
		||||
 | 
			
		||||
      /* GL_EXT_compiled_vertex_array */
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = (GLdouble) ctx->Array.Current->LockFirst;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = (GLdouble) ctx->Array.LockFirst;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = (GLdouble) ctx->Array.Current->LockCount;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = (GLdouble) ctx->Array.LockCount;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      /* GL_ARB_transpose_matrix */
 | 
			
		||||
@@ -2378,9 +2573,15 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetFloatv");
 | 
			
		||||
 | 
			
		||||
   if (!params)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & VERBOSE_API) 
 | 
			
		||||
      fprintf(stderr, "glGetFloatv %s\n", gl_lookup_enum_by_nr(pname));
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.GetFloatv && (*ctx->Driver.GetFloatv)(ctx, pname, params))
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   switch (pname) {
 | 
			
		||||
      case GL_ACCUM_RED_BITS:
 | 
			
		||||
         *params = (GLfloat) ctx->Visual->AccumRedBits;
 | 
			
		||||
@@ -3009,6 +3210,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
 | 
			
		||||
      case GL_RENDER_MODE:
 | 
			
		||||
	 *params = ENUM_TO_FLOAT(ctx->RenderMode);
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_RESCALE_NORMAL:
 | 
			
		||||
         *params = (GLfloat) ctx->Transform.RescaleNormals;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_RGBA_MODE:
 | 
			
		||||
	 *params = (GLfloat) ctx->Visual->RGBAflag;
 | 
			
		||||
	 break;
 | 
			
		||||
@@ -3150,79 +3354,159 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
 | 
			
		||||
	 *params = (GLfloat) ctx->Pixel.ZoomY;
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_VERTEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Vertex.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Vertex.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Vertex.Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Vertex.Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Current->Vertex.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Vertex.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Vertex.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Vertex.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Normal.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Normal.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Current->Normal.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Normal.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Normal.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Normal.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Color.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Color.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Color.Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Color.Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Current->Color.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Color.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Color.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Color.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Index.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Index.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Current->Index.Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Index.Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->Index.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Index.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->TexCoord[texUnit].Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.TexCoord[texUnit].Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->TexCoord[texUnit].Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.TexCoord[texUnit].Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.Current->TexCoord[texUnit].Type);
 | 
			
		||||
#else
 | 
			
		||||
         *params = ENUM_TO_FLOAT(ctx->Array.TexCoord[texUnit].Type);
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->TexCoord[texUnit].Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.TexCoord[texUnit].Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->EdgeFlag.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.EdgeFlag.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLfloat) ctx->Array.Current->EdgeFlag.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLfloat) ctx->Array.EdgeFlag.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0.0;
 | 
			
		||||
@@ -3336,10 +3620,18 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
 | 
			
		||||
 | 
			
		||||
      /* GL_EXT_compiled_vertex_array */
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = (GLfloat) ctx->Array.Current->LockFirst;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = (GLfloat) ctx->Array.LockFirst;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = (GLfloat) ctx->Array.Current->LockCount;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = (GLfloat) ctx->Array.LockCount;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
 | 
			
		||||
      /* GL_ARB_transpose_matrix */
 | 
			
		||||
@@ -3492,9 +3784,16 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetIntegerv");
 | 
			
		||||
 | 
			
		||||
   if (!params)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & VERBOSE_API) 
 | 
			
		||||
      fprintf(stderr, "glGetIntegerv %s\n", gl_lookup_enum_by_nr(pname));
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.GetIntegerv
 | 
			
		||||
       && (*ctx->Driver.GetIntegerv)(ctx, pname, params))
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   switch (pname) {
 | 
			
		||||
      case GL_ACCUM_RED_BITS:
 | 
			
		||||
         *params = (GLint) ctx->Visual->AccumRedBits;
 | 
			
		||||
@@ -4125,6 +4424,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
 | 
			
		||||
      case GL_RENDER_MODE:
 | 
			
		||||
	 *params = (GLint) ctx->RenderMode;
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_RESCALE_NORMAL:
 | 
			
		||||
         *params = (GLint) ctx->Transform.RescaleNormals;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_RGBA_MODE:
 | 
			
		||||
	 *params = (GLint) ctx->Visual->RGBAflag;
 | 
			
		||||
	 break;
 | 
			
		||||
@@ -4266,79 +4568,159 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
 | 
			
		||||
	 *params = (GLint) ctx->Pixel.ZoomY;
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_VERTEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLint) ctx->Array.Current->Vertex.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLint) ctx->Array.Vertex.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Vertex.Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Vertex.Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Vertex.Type;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Vertex.Type;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Vertex.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Vertex.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_VERTEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLint) ctx->Array.Current->Normal.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLint) ctx->Array.Normal.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Normal.Type;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Normal.Type;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Normal.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Normal.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLint) ctx->Array.Current->Color.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLint) ctx->Array.Color.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Color.Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Color.Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Color.Type;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Color.Type;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Color.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Color.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLint) ctx->Array.Current->Index.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLint) ctx->Array.Index.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Index.Type;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Index.Type;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Index.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Index.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLint) ctx->Array.Current->TexCoord[texUnit].Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLint) ctx->Array.TexCoord[texUnit].Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_SIZE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->TexCoord[texUnit].Size;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.TexCoord[texUnit].Size;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_TYPE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->TexCoord[texUnit].Type;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.TexCoord[texUnit].Type;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->TexCoord[texUnit].Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.TexCoord[texUnit].Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0;
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = (GLint) ctx->Array.Current->EdgeFlag.Enabled;
 | 
			
		||||
#else
 | 
			
		||||
         *params = (GLint) ctx->Array.EdgeFlag.Enabled;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_STRIDE:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->EdgeFlag.Stride;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.EdgeFlag.Stride;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_COUNT_EXT:
 | 
			
		||||
         *params = 0;
 | 
			
		||||
@@ -4452,10 +4834,18 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
 | 
			
		||||
 | 
			
		||||
      /* GL_EXT_compiled_vertex_array */
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = ctx->Array.Current->LockFirst;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = ctx->Array.LockFirst;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
	 *params = ctx->Array.Current->LockCount;
 | 
			
		||||
#else
 | 
			
		||||
	 *params = ctx->Array.LockCount;
 | 
			
		||||
#endif
 | 
			
		||||
	 break;
 | 
			
		||||
	 
 | 
			
		||||
      /* GL_ARB_transpose_matrix */
 | 
			
		||||
@@ -4629,29 +5019,61 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
 | 
			
		||||
{
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   GLuint texUnit = ctx->Texture.CurrentUnit;
 | 
			
		||||
   /*GLuint texTransformUnit = ctx->Texture.CurrentTransformUnit;*/
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetPointerv");
 | 
			
		||||
 | 
			
		||||
   if (!params)
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & VERBOSE_API) 
 | 
			
		||||
      fprintf(stderr, "glGetPointerv %s\n", gl_lookup_enum_by_nr(pname));
 | 
			
		||||
 | 
			
		||||
   if (ctx->Driver.GetPointerv
 | 
			
		||||
       && (*ctx->Driver.GetPointerv)(ctx, pname, params))
 | 
			
		||||
      return;
 | 
			
		||||
 | 
			
		||||
   switch (pname) {
 | 
			
		||||
      case GL_VERTEX_ARRAY_POINTER:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Vertex.Ptr;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Vertex.Ptr;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_NORMAL_ARRAY_POINTER:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Normal.Ptr;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Normal.Ptr;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_COLOR_ARRAY_POINTER:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Color.Ptr;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Color.Ptr;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_INDEX_ARRAY_POINTER:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->Index.Ptr;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.Index.Ptr;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_TEXTURE_COORD_ARRAY_POINTER:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->TexCoord[texUnit].Ptr;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.TexCoord[texUnit].Ptr;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_EDGE_FLAG_ARRAY_POINTER:
 | 
			
		||||
#ifdef VAO
 | 
			
		||||
         *params = ctx->Array.Current->EdgeFlag.Ptr;
 | 
			
		||||
#else
 | 
			
		||||
         *params = ctx->Array.EdgeFlag.Ptr;
 | 
			
		||||
#endif
 | 
			
		||||
         break;
 | 
			
		||||
      case GL_FEEDBACK_BUFFER_POINTER:
 | 
			
		||||
         *params = ctx->Feedback.Buffer;
 | 
			
		||||
@@ -4673,7 +5095,7 @@ _mesa_GetString( GLenum name )
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   static const char *vendor = "Brian Paul";
 | 
			
		||||
   static const char *renderer = "Mesa";
 | 
			
		||||
   static const char *version = "1.2 Mesa 3.3";
 | 
			
		||||
   static const char *version = "1.2 Mesa 3.4.2";
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, "glGetString", 0);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: glheader.h,v 1.11 2000/06/12 15:40:47 brianp Exp $ */
 | 
			
		||||
/* $Id: glheader.h,v 1.11.4.4 2000/12/13 00:54:57 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
@@ -39,15 +39,24 @@
 | 
			
		||||
 * If you touch this file, everything gets recompiled!
 | 
			
		||||
 *
 | 
			
		||||
 * This file should be included before any other header in the .c files.
 | 
			
		||||
 *
 | 
			
		||||
 * Put compiler/OS/assembly pragmas and macros here to avoid
 | 
			
		||||
 * cluttering other source files.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef XFree86LOADER
 | 
			
		||||
#include "xf86_ansic.h"
 | 
			
		||||
#else
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <ctype.h>
 | 
			
		||||
/* If we can use Compaq's Fast Math Library on Alpha */
 | 
			
		||||
#if defined(__alpha__) && defined(CCPML)
 | 
			
		||||
#include <cpml.h>
 | 
			
		||||
#else
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#endif
 | 
			
		||||
#include <limits.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
@@ -65,24 +74,11 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Put compiler/OS/assembly pragmas and macros here to avoid
 | 
			
		||||
 * cluttering other source files.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * XXX move as many of these pragma's and MS Windows-isms into
 | 
			
		||||
 * the new src/glheader.h file.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(__WIN32__)
 | 
			
		||||
#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__)
 | 
			
		||||
#	define __WIN32__
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
 | 
			
		||||
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__))
 | 
			
		||||
#  pragma warning( disable : 4068 ) /* unknown pragma */
 | 
			
		||||
#  pragma warning( disable : 4710 ) /* function 'foo' not inlined */
 | 
			
		||||
#  pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
 | 
			
		||||
@@ -129,16 +125,21 @@
 | 
			
		||||
 | 
			
		||||
/* compatability guard so we don't need to change client code */
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP) && !defined(__CYGWIN__)
 | 
			
		||||
#if 0
 | 
			
		||||
#	define CALLBACK GLCALLBACK
 | 
			
		||||
#endif
 | 
			
		||||
typedef int (GLAPIENTRY *PROC)();
 | 
			
		||||
typedef void *HGLRC;
 | 
			
		||||
typedef void *HDC;
 | 
			
		||||
#endif
 | 
			
		||||
typedef int (GLAPIENTRY *PROC)();
 | 
			
		||||
typedef unsigned long COLORREF;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Make sure we include glext.h from gl.h */
 | 
			
		||||
#define GL_GLEXT_PROTOTYPES
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
 | 
			
		||||
#	define WGL_FONT_LINES      0
 | 
			
		||||
#	define WGL_FONT_POLYGONS   1
 | 
			
		||||
@@ -154,14 +155,14 @@ typedef unsigned long COLORREF;
 | 
			
		||||
typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
 | 
			
		||||
typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
 | 
			
		||||
typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
 | 
			
		||||
#if !defined(GLX_USE_MESA)
 | 
			
		||||
#include <gl/mesa_wgl.h>
 | 
			
		||||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Make sure we include glext.h */
 | 
			
		||||
#define GL_GLEXT_PROTOTYPES
 | 
			
		||||
#include "GL/gl.h"
 | 
			
		||||
#include "GL/glext.h"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: hash.c,v 1.9 2000/03/21 22:20:42 brianp Exp $ */
 | 
			
		||||
/* $Id: hash.c,v 1.9.4.1 2000/11/26 21:10:26 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -101,7 +101,6 @@ void *_mesa_HashLookup(const struct _mesa_HashTable *table, GLuint key)
 | 
			
		||||
   const struct HashEntry *entry;
 | 
			
		||||
 | 
			
		||||
   assert(table);
 | 
			
		||||
   assert(key);
 | 
			
		||||
 | 
			
		||||
   pos = key & (TABLE_SIZE-1);
 | 
			
		||||
   entry = table->Table[pos];
 | 
			
		||||
@@ -130,7 +129,6 @@ void _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data)
 | 
			
		||||
   struct HashEntry *entry;
 | 
			
		||||
 | 
			
		||||
   assert(table);
 | 
			
		||||
   assert(key);
 | 
			
		||||
 | 
			
		||||
   _glthread_LOCK_MUTEX(table->Mutex);
 | 
			
		||||
 | 
			
		||||
@@ -172,7 +170,6 @@ void _mesa_HashRemove(struct _mesa_HashTable *table, GLuint key)
 | 
			
		||||
   struct HashEntry *entry, *prev;
 | 
			
		||||
 | 
			
		||||
   assert(table);
 | 
			
		||||
   assert(key);
 | 
			
		||||
 | 
			
		||||
   _glthread_LOCK_MUTEX(table->Mutex);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: image.h,v 1.9 2000/05/10 14:39:53 brianp Exp $ */
 | 
			
		||||
/* $Id: image.h,v 1.9.4.1 2001/01/25 17:34:22 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4.1
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -79,6 +79,15 @@ _mesa_pack_polygon_stipple( const GLuint pattern[32], GLubyte *dest,
 | 
			
		||||
                            const struct gl_pixelstore_attrib *packing );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern void
 | 
			
		||||
_mesa_pack_float_rgba_span( GLcontext *ctx,
 | 
			
		||||
                            GLuint n, CONST GLfloat rgba[][4],
 | 
			
		||||
                            GLenum dstFormat, GLenum dstType,
 | 
			
		||||
                            GLvoid *dstAddr,
 | 
			
		||||
                            const struct gl_pixelstore_attrib *dstPacking,
 | 
			
		||||
                            GLboolean applyTransferOps );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
extern void
 | 
			
		||||
_mesa_pack_rgba_span( GLcontext *ctx,
 | 
			
		||||
                      GLuint n, CONST GLubyte rgba[][4],
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: lines.c,v 1.12 2000/07/14 14:04:07 brianp Exp $ */
 | 
			
		||||
/* $Id: lines.c,v 1.12.2.1 2000/11/08 16:42:48 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -1058,7 +1058,7 @@ _mesa_print_line_function(GLcontext *ctx)
 | 
			
		||||
   else if (ctx->Driver.LineFunc == null_line)
 | 
			
		||||
      printf("null_line\n");
 | 
			
		||||
   else
 | 
			
		||||
      printf("Driver func %p\n", ctx->Driver.PointsFunc);
 | 
			
		||||
      printf("Driver func %p\n", ctx->Driver.LineFunc);
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,21 +1,21 @@
 | 
			
		||||
/* $Id: macros.h,v 1.8 1999/11/22 18:57:56 brianp Exp $ */
 | 
			
		||||
/* $Id: macros.h,v 1.8.4.1 2001/03/02 16:40:47 gareth Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * 
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * 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
 | 
			
		||||
@@ -90,7 +90,7 @@
 | 
			
		||||
#define TEST_BITS(WORD, BITS)   ((WORD) & (BITS))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Stepping a GLfloat pointer by a byte stride 
 | 
			
		||||
/* Stepping a GLfloat pointer by a byte stride
 | 
			
		||||
 */
 | 
			
		||||
#define STRIDE_F(p, i)  (p = (GLfloat *)((GLubyte *)p + i))
 | 
			
		||||
#define STRIDE_UI(p, i)  (p = (GLuint *)((GLubyte *)p + i))
 | 
			
		||||
@@ -161,7 +161,7 @@ do {						\
 | 
			
		||||
   case 2: (DST)[1] = (SRC)[1];			\
 | 
			
		||||
   case 1: (DST)[0] = (SRC)[0];			\
 | 
			
		||||
   }  						\
 | 
			
		||||
} while(0)			   
 | 
			
		||||
} while(0)
 | 
			
		||||
 | 
			
		||||
#define SUB_4V( DST, SRCA, SRCB )		\
 | 
			
		||||
do {						\
 | 
			
		||||
@@ -497,4 +497,31 @@ do {						\
 | 
			
		||||
#define FLOAT_TO_INT(X)		( (GLint) (2147483647.0 * (X)) )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Generic color packing macros
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#define PACK_COLOR_8888( a, b, c, d )					\
 | 
			
		||||
   (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
 | 
			
		||||
 | 
			
		||||
#define PACK_COLOR_888( a, b, c )					\
 | 
			
		||||
   (((a) << 16) | ((b) << 8) | (c))
 | 
			
		||||
 | 
			
		||||
#define PACK_COLOR_565( a, b, c )					\
 | 
			
		||||
   ((((a) & 0xf8) << 8) | (((b) & 0xfc) << 3) | (((c) & 0xf8) >> 3))
 | 
			
		||||
 | 
			
		||||
#define PACK_COLOR_1555( a, b, c, d )					\
 | 
			
		||||
   ((((b) & 0xf8) << 7) | (((c) & 0xf8) << 2) | (((d) & 0xf8) >> 3) |	\
 | 
			
		||||
    ((a) ? 0x8000 : 0))
 | 
			
		||||
 | 
			
		||||
#define PACK_COLOR_4444( a, b, c, d )					\
 | 
			
		||||
   ((((a) & 0xf0) << 8) | (((b) & 0xf0) << 4) | ((c) & 0xf0) | ((d) >> 4))
 | 
			
		||||
 | 
			
		||||
#define PACK_COLOR_88( a, b )						\
 | 
			
		||||
   (((a) << 8) | (b))
 | 
			
		||||
 | 
			
		||||
#define PACK_COLOR_332( a, b, c )					\
 | 
			
		||||
   (((a) & 0xe0) | (((b) & 0xe0) >> 3) | (((c) & 0xc0) >> 6))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /*MACROS_H*/
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: matrix.c,v 1.18 2000/06/27 22:10:00 brianp Exp $ */
 | 
			
		||||
/* $Id: matrix.c,v 1.18.4.3 2001/03/19 22:45:31 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -597,7 +597,7 @@ void gl_rotation_matrix( GLfloat angle, GLfloat x, GLfloat y, GLfloat z,
 | 
			
		||||
 | 
			
		||||
   mag = GL_SQRT( x*x + y*y + z*z );
 | 
			
		||||
 | 
			
		||||
   if (mag == 0.0) {
 | 
			
		||||
   if (mag <= 1.0e-4) {
 | 
			
		||||
      /* generate an identity matrix and return */
 | 
			
		||||
      MEMCPY(m, Identity, sizeof(GLfloat)*16);
 | 
			
		||||
      return;
 | 
			
		||||
@@ -764,18 +764,16 @@ static void analyze_from_scratch( GLmatrix *mat )
 | 
			
		||||
 | 
			
		||||
   /* Do the real work
 | 
			
		||||
    */
 | 
			
		||||
   if (mask == MASK_IDENTITY) {
 | 
			
		||||
   if (mask == (GLuint) MASK_IDENTITY) {
 | 
			
		||||
      mat->type = MATRIX_IDENTITY;
 | 
			
		||||
   }
 | 
			
		||||
   else if ((mask & MASK_2D_NO_ROT) == MASK_2D_NO_ROT)  
 | 
			
		||||
   {
 | 
			
		||||
   else if ((mask & MASK_2D_NO_ROT) == (GLuint) MASK_2D_NO_ROT) {
 | 
			
		||||
      mat->type = MATRIX_2D_NO_ROT;
 | 
			
		||||
      
 | 
			
		||||
      if ((mask & MASK_NO_2D_SCALE) != MASK_NO_2D_SCALE)
 | 
			
		||||
	 mat->flags = MAT_FLAG_GENERAL_SCALE;
 | 
			
		||||
   }
 | 
			
		||||
   else if ((mask & MASK_2D) == MASK_2D)  
 | 
			
		||||
   {
 | 
			
		||||
   else if ((mask & MASK_2D) == (GLuint) MASK_2D) {
 | 
			
		||||
      GLfloat mm = DOT2(m, m);
 | 
			
		||||
      GLfloat m4m4 = DOT2(m+4,m+4);
 | 
			
		||||
      GLfloat mm4 = DOT2(m,m+4);
 | 
			
		||||
@@ -794,8 +792,7 @@ static void analyze_from_scratch( GLmatrix *mat )
 | 
			
		||||
	 mat->flags |= MAT_FLAG_ROTATION;
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
   else if ((mask & MASK_3D_NO_ROT) == MASK_3D_NO_ROT)
 | 
			
		||||
   {
 | 
			
		||||
   else if ((mask & MASK_3D_NO_ROT) == (GLuint) MASK_3D_NO_ROT) {
 | 
			
		||||
      mat->type = MATRIX_3D_NO_ROT;
 | 
			
		||||
 | 
			
		||||
      /* Check for scale */
 | 
			
		||||
@@ -806,8 +803,7 @@ static void analyze_from_scratch( GLmatrix *mat )
 | 
			
		||||
      } else
 | 
			
		||||
	 mat->flags |= MAT_FLAG_GENERAL_SCALE;
 | 
			
		||||
   }
 | 
			
		||||
   else if ((mask & MASK_3D) == MASK_3D)
 | 
			
		||||
   {
 | 
			
		||||
   else if ((mask & MASK_3D) == (GLuint) MASK_3D) {
 | 
			
		||||
      GLfloat c1 = DOT3(m,m);
 | 
			
		||||
      GLfloat c2 = DOT3(m+4,m+4);
 | 
			
		||||
      GLfloat c3 = DOT3(m+8,m+8);
 | 
			
		||||
@@ -1456,6 +1452,9 @@ _mesa_Viewport( GLint x, GLint y, GLsizei width, GLsizei height )
 | 
			
		||||
void
 | 
			
		||||
gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height )
 | 
			
		||||
{
 | 
			
		||||
   const GLfloat n = ctx->Viewport.Near;
 | 
			
		||||
   const GLfloat f = ctx->Viewport.Far;
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glViewport");
 | 
			
		||||
 | 
			
		||||
   if (width<0 || height<0) {
 | 
			
		||||
@@ -1481,8 +1480,8 @@ gl_Viewport( GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height )
 | 
			
		||||
   ctx->Viewport.WindowMap.m[MAT_TX] = ctx->Viewport.WindowMap.m[MAT_SX] + x;
 | 
			
		||||
   ctx->Viewport.WindowMap.m[MAT_SY] = (GLfloat) height / 2.0F;
 | 
			
		||||
   ctx->Viewport.WindowMap.m[MAT_TY] = ctx->Viewport.WindowMap.m[MAT_SY] + y;
 | 
			
		||||
   ctx->Viewport.WindowMap.m[MAT_SZ] = 0.5 * ctx->Visual->DepthMaxF;
 | 
			
		||||
   ctx->Viewport.WindowMap.m[MAT_TZ] = 0.5 * ctx->Visual->DepthMaxF;
 | 
			
		||||
   ctx->Viewport.WindowMap.m[MAT_SZ] = ctx->Visual->DepthMaxF * ((f - n) / 2.0);
 | 
			
		||||
   ctx->Viewport.WindowMap.m[MAT_TZ] = ctx->Visual->DepthMaxF * ((f - n) / 2.0 + n);
 | 
			
		||||
 | 
			
		||||
   ctx->Viewport.WindowMap.flags = MAT_FLAG_GENERAL_SCALE|MAT_FLAG_TRANSLATION;
 | 
			
		||||
   ctx->Viewport.WindowMap.type = MATRIX_3D_NO_ROT;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: pixel.c,v 1.11 2000/05/07 20:41:30 brianp Exp $ */
 | 
			
		||||
/* $Id: pixel.c,v 1.11.4.1 2000/10/19 20:09:29 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -105,6 +105,14 @@ _mesa_PixelStorei( GLenum pname, GLint param )
 | 
			
		||||
	    ctx->Pack.SkipRows = param;
 | 
			
		||||
	 }
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_PACK_SKIP_IMAGES:
 | 
			
		||||
	 if (param<0) {
 | 
			
		||||
	    gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" );
 | 
			
		||||
	 }
 | 
			
		||||
	 else {
 | 
			
		||||
	    ctx->Pack.SkipImages = param;
 | 
			
		||||
	 }
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_PACK_ALIGNMENT:
 | 
			
		||||
         if (param==1 || param==2 || param==4 || param==8) {
 | 
			
		||||
	    ctx->Pack.Alignment = param;
 | 
			
		||||
@@ -149,6 +157,14 @@ _mesa_PixelStorei( GLenum pname, GLint param )
 | 
			
		||||
	    ctx->Unpack.SkipRows = param;
 | 
			
		||||
	 }
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_UNPACK_SKIP_IMAGES:
 | 
			
		||||
	 if (param < 0) {
 | 
			
		||||
	    gl_error( ctx, GL_INVALID_VALUE, "glPixelStore(param)" );
 | 
			
		||||
	 }
 | 
			
		||||
	 else {
 | 
			
		||||
	    ctx->Unpack.SkipImages = param;
 | 
			
		||||
	 }
 | 
			
		||||
	 break;
 | 
			
		||||
      case GL_UNPACK_ALIGNMENT:
 | 
			
		||||
         if (param==1 || param==2 || param==4 || param==8) {
 | 
			
		||||
	    ctx->Unpack.Alignment = param;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: points.c,v 1.11 2000/07/15 03:13:43 brianp Exp $ */
 | 
			
		||||
/* $Id: points.c,v 1.11.2.2 2000/11/08 16:41:17 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 
 | 
			
		||||
@@ -161,7 +161,7 @@ size1_ci_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   win = &VB->Win.data[first][0];
 | 
			
		||||
   for (i = first; i <= last; i++) {
 | 
			
		||||
   for (i = first; i < last; i++) {
 | 
			
		||||
      if (VB->ClipMask[i] == 0) {
 | 
			
		||||
         pbx[pbcount] = (GLint)  win[0];
 | 
			
		||||
         pby[pbcount] = (GLint)  win[1];
 | 
			
		||||
@@ -187,7 +187,7 @@ size1_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   struct pixel_buffer *PB = ctx->PB;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i = first; i <= last; i++) {
 | 
			
		||||
   for (i = first; i < last; i++) {
 | 
			
		||||
      if (VB->ClipMask[i] == 0) {
 | 
			
		||||
         GLint x, y, z;
 | 
			
		||||
         GLint red, green, blue, alpha;
 | 
			
		||||
@@ -221,7 +221,7 @@ general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   GLint radius = isize >> 1;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i = first; i <= last; i++) {
 | 
			
		||||
   for (i = first; i < last; i++) {
 | 
			
		||||
      if (VB->ClipMask[i] == 0) {
 | 
			
		||||
         GLint x0, x1, y0, y1;
 | 
			
		||||
         GLint ix, iy;
 | 
			
		||||
@@ -270,7 +270,7 @@ general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   GLint radius = isize >> 1;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i = first; i <= last; i++) {
 | 
			
		||||
   for (i = first; i < last; i++) {
 | 
			
		||||
      if (VB->ClipMask[i] == 0) {
 | 
			
		||||
         GLint x0, x1, y0, y1;
 | 
			
		||||
         GLint ix, iy;
 | 
			
		||||
@@ -323,7 +323,7 @@ textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   struct pixel_buffer *PB = ctx->PB;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i = first; i <= last; i++) {
 | 
			
		||||
   for (i = first; i < last; i++) {
 | 
			
		||||
      if (VB->ClipMask[i] == 0) {
 | 
			
		||||
         GLint x0, x1, y0, y1;
 | 
			
		||||
         GLint ix, iy, radius;
 | 
			
		||||
@@ -410,7 +410,7 @@ multitextured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   struct pixel_buffer *PB = ctx->PB;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i = first; i <= last; i++) {
 | 
			
		||||
   for (i = first; i < last; i++) {
 | 
			
		||||
      if (VB->ClipMask[i] == 0) {
 | 
			
		||||
         GLint x0, x1, y0, y1;
 | 
			
		||||
         GLint ix, iy;
 | 
			
		||||
@@ -551,12 +551,12 @@ antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   if (ctx->Texture.ReallyEnabled) {
 | 
			
		||||
      for (i = first; i <= last; i++) {
 | 
			
		||||
      for (i = first; i < last; i++) {
 | 
			
		||||
         if (VB->ClipMask[i] == 0) {
 | 
			
		||||
            GLint x, y;
 | 
			
		||||
            GLint red, green, blue, alpha;
 | 
			
		||||
            GLfloat s, t, u;
 | 
			
		||||
            GLfloat s1, t1, u1;
 | 
			
		||||
            GLfloat s = 0.0F, t = 0.0F, u = 0.0F;
 | 
			
		||||
            GLfloat s1 = 0.0F, t1 = 0.0F, u1 = 0.0F;
 | 
			
		||||
            GLfloat vx = VB->Win.data[i][0];
 | 
			
		||||
            GLfloat vy = VB->Win.data[i][1];
 | 
			
		||||
 | 
			
		||||
@@ -667,7 +667,7 @@ antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* Not texture mapped */
 | 
			
		||||
      for (i=first;i<=last;i++) {
 | 
			
		||||
      for (i=first;i<last;i++) {
 | 
			
		||||
         if (VB->ClipMask[i]==0) {
 | 
			
		||||
            GLint xmin, ymin, xmax, ymax;
 | 
			
		||||
            GLint x, y, z;
 | 
			
		||||
@@ -738,7 +738,7 @@ dist3(GLfloat *out, GLuint first, GLuint last,
 | 
			
		||||
   const GLfloat *p = VEC_ELT(v, GLfloat, first);
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) {
 | 
			
		||||
   for (i = first ; i < last ; i++, STRIDE_F(p, stride) ) {
 | 
			
		||||
      GLfloat dist = GL_SQRT(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]);
 | 
			
		||||
      out[i] = 1.0F / (ctx->Point.Params[0] +
 | 
			
		||||
                       dist * (ctx->Point.Params[1] +
 | 
			
		||||
@@ -755,7 +755,7 @@ dist2(GLfloat *out, GLuint first, GLuint last,
 | 
			
		||||
   const GLfloat *p = VEC_ELT(v, GLfloat, first);
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   for (i = first ; i <= last ; i++, STRIDE_F(p, stride) ) {
 | 
			
		||||
   for (i = first ; i < last ; i++, STRIDE_F(p, stride) ) {
 | 
			
		||||
      GLfloat dist = GL_SQRT(p[0]*p[0]+p[1]*p[1]);
 | 
			
		||||
      out[i] = 1.0F / (ctx->Point.Params[0] +
 | 
			
		||||
                       dist * (ctx->Point.Params[1] +
 | 
			
		||||
@@ -795,7 +795,7 @@ clip_dist(GLfloat *out, GLuint first, GLuint last,
 | 
			
		||||
   const GLfloat *from = (GLfloat *)clip_vec->start;
 | 
			
		||||
   const GLuint stride = clip_vec->stride;
 | 
			
		||||
 | 
			
		||||
   for (i = first ; i <= last ; i++ )
 | 
			
		||||
   for (i = first ; i < last ; i++ )
 | 
			
		||||
   {
 | 
			
		||||
      GLfloat dist = win[i][2];
 | 
			
		||||
      out[i] = 1/(ctx->Point.Params[0]+ 
 | 
			
		||||
@@ -824,7 +824,7 @@ dist_atten_general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   else 
 | 
			
		||||
      clip_dist( dist, first, last, ctx, VB->ClipPtr );
 | 
			
		||||
 | 
			
		||||
   for (i=first;i<=last;i++) {
 | 
			
		||||
   for (i=first;i<last;i++) {
 | 
			
		||||
      if (VB->ClipMask[i]==0) {
 | 
			
		||||
         GLint x0, x1, y0, y1;
 | 
			
		||||
         GLint ix, iy;
 | 
			
		||||
@@ -886,7 +886,7 @@ dist_atten_general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   else 
 | 
			
		||||
      clip_dist( dist, first, last, ctx, VB->ClipPtr );
 | 
			
		||||
 | 
			
		||||
   for (i=first;i<=last;i++) {
 | 
			
		||||
   for (i=first;i<last;i++) {
 | 
			
		||||
      if (VB->ClipMask[i]==0) {
 | 
			
		||||
         GLint x0, x1, y0, y1;
 | 
			
		||||
         GLint ix, iy;
 | 
			
		||||
@@ -956,14 +956,14 @@ dist_atten_textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   else 
 | 
			
		||||
      clip_dist( dist, first, last, ctx, VB->ClipPtr );
 | 
			
		||||
 | 
			
		||||
   for (i=first;i<=last;i++) {
 | 
			
		||||
   for (i=first;i<last;i++) {
 | 
			
		||||
      if (VB->ClipMask[i]==0) {
 | 
			
		||||
         GLint x0, x1, y0, y1;
 | 
			
		||||
         GLint ix, iy;
 | 
			
		||||
         GLint isize, radius;
 | 
			
		||||
         GLint red, green, blue, alpha;
 | 
			
		||||
         GLfloat s, t, u;
 | 
			
		||||
         GLfloat s1, t1, u1;
 | 
			
		||||
         GLfloat s = 0.0F, t = 0.0F, u = 0.0F;
 | 
			
		||||
         GLfloat s1 = 0.0F, t1 = 0.0F, u1 = 0.0F;
 | 
			
		||||
 | 
			
		||||
         GLint x = (GLint)  VB->Win.data[i][0];
 | 
			
		||||
         GLint y = (GLint)  VB->Win.data[i][1];
 | 
			
		||||
@@ -1104,14 +1104,14 @@ dist_atten_antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
      clip_dist( dist, first, last, ctx, VB->ClipPtr );
 | 
			
		||||
 | 
			
		||||
   if (ctx->Texture.ReallyEnabled) {
 | 
			
		||||
      for (i=first;i<=last;i++) {
 | 
			
		||||
      for (i=first;i<last;i++) {
 | 
			
		||||
         if (VB->ClipMask[i]==0) {
 | 
			
		||||
            GLfloat radius, rmin, rmax, rmin2, rmax2, cscale, alphaf;
 | 
			
		||||
            GLint xmin, ymin, xmax, ymax;
 | 
			
		||||
            GLint x, y, z;
 | 
			
		||||
            GLint red, green, blue, alpha;
 | 
			
		||||
            GLfloat s, t, u;
 | 
			
		||||
            GLfloat s1, t1, u1;
 | 
			
		||||
            GLfloat s = 0.0F, t = 0.0F, u = 0.0F;
 | 
			
		||||
            GLfloat s1 = 0.0F, t1 = 0.0F, u1 = 0.0F;
 | 
			
		||||
            GLfloat dsize = psize * dist[i];
 | 
			
		||||
 | 
			
		||||
            if (dsize >= ctx->Point.Threshold) {
 | 
			
		||||
@@ -1232,7 +1232,7 @@ dist_atten_antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /* Not texture mapped */
 | 
			
		||||
      for (i = first; i <= last; i++) {
 | 
			
		||||
      for (i = first; i < last; i++) {
 | 
			
		||||
         if (VB->ClipMask[i] == 0) {
 | 
			
		||||
            GLfloat radius, rmin, rmax, rmin2, rmax2, cscale, alphaf;
 | 
			
		||||
            GLint xmin, ymin, xmax, ymax;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/* $Id: state.c,v 1.21 2000/06/30 14:14:37 brianp Exp $ */
 | 
			
		||||
/* $Id: state.c,v 1.21.4.6 2000/12/09 19:21:01 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 *
 | 
			
		||||
@@ -775,10 +775,10 @@ static void update_pixel_masking( GLcontext *ctx )
 | 
			
		||||
 | 
			
		||||
static void update_fog_mode( GLcontext *ctx )
 | 
			
		||||
{
 | 
			
		||||
   int old_mode = ctx->FogMode;
 | 
			
		||||
   const GLuint old_mode = ctx->FogMode;
 | 
			
		||||
 | 
			
		||||
   if (ctx->Fog.Enabled) {
 | 
			
		||||
      if (ctx->Texture.Enabled)
 | 
			
		||||
      if (ctx->Texture.ReallyEnabled)
 | 
			
		||||
         ctx->FogMode = FOG_FRAGMENT;
 | 
			
		||||
      else if (ctx->Hint.Fog == GL_NICEST)
 | 
			
		||||
         ctx->FogMode = FOG_FRAGMENT;
 | 
			
		||||
@@ -922,32 +922,38 @@ void gl_update_state( GLcontext *ctx )
 | 
			
		||||
      gl_update_client_state( ctx );
 | 
			
		||||
 | 
			
		||||
   if ((ctx->NewState & NEW_TEXTURE_ENABLE) &&
 | 
			
		||||
       (ctx->Enabled & ENABLE_TEX_ANY) != ctx->Texture.Enabled)
 | 
			
		||||
       (ctx->Enabled & ENABLE_TEX_ANY) != ctx->Texture.ReallyEnabled) {
 | 
			
		||||
      ctx->NewState |= NEW_TEXTURING | NEW_RASTER_OPS;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* XXX this is a hack, gone in 3.5 */
 | 
			
		||||
   if (ctx->NewState & NEW_TEXTURE_ENV) {
 | 
			
		||||
      if (ctx->Texture.Unit[0].EnvMode == ctx->Texture.Unit[0].LastEnvMode &&
 | 
			
		||||
	  ctx->Texture.Unit[1].EnvMode == ctx->Texture.Unit[1].LastEnvMode)
 | 
			
		||||
	  ctx->Texture.Unit[1].EnvMode == ctx->Texture.Unit[1].LastEnvMode &&
 | 
			
		||||
          ctx->Texture.Unit[0].EnvMode != GL_COMBINE_EXT &&
 | 
			
		||||
          ctx->Texture.Unit[1].EnvMode != GL_COMBINE_EXT)
 | 
			
		||||
	 ctx->NewState &= ~NEW_TEXTURE_ENV;
 | 
			
		||||
      ctx->Texture.Unit[0].LastEnvMode = ctx->Texture.Unit[0].EnvMode;
 | 
			
		||||
      ctx->Texture.Unit[1].LastEnvMode = ctx->Texture.Unit[1].EnvMode;
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   if (ctx->NewState & NEW_TEXTURE_MATRIX) {
 | 
			
		||||
      ctx->Enabled &= ~(ENABLE_TEXMAT0|ENABLE_TEXMAT1);
 | 
			
		||||
   /* Update ctx->Enabled's ENABLE_TEXMATn flags */
 | 
			
		||||
   if (ctx->NewState & (NEW_TEXTURE_MATRIX | NEW_TEXTURE_ENABLE)) {
 | 
			
		||||
      ctx->Enabled &= ~(ENABLE_TEXMAT0 | ENABLE_TEXMAT1);
 | 
			
		||||
 | 
			
		||||
      for (i=0; i < MAX_TEXTURE_UNITS; i++) {
 | 
			
		||||
	 if (ctx->TextureMatrix[i].flags & MAT_DIRTY_ALL_OVER) {
 | 
			
		||||
	    gl_matrix_analyze( &ctx->TextureMatrix[i] );
 | 
			
		||||
	    ctx->TextureMatrix[i].flags &= ~MAT_DIRTY_DEPENDENTS;
 | 
			
		||||
 | 
			
		||||
	    if (ctx->Texture.Unit[i].Enabled &&
 | 
			
		||||
		ctx->TextureMatrix[i].type != MATRIX_IDENTITY)
 | 
			
		||||
	       ctx->Enabled |= ENABLE_TEXMAT0 << i;
 | 
			
		||||
	 }
 | 
			
		||||
         if (ctx->Texture.Unit[i].Enabled &&
 | 
			
		||||
             ctx->TextureMatrix[i].type != MATRIX_IDENTITY) {
 | 
			
		||||
            ctx->Enabled |= ENABLE_TEXMAT0 << i;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   /* Update ctx->Enabled's ENABLE_TEXGENn and ENABLE_TEXn flags */
 | 
			
		||||
   if (ctx->NewState & (NEW_TEXTURING | NEW_TEXTURE_ENABLE)) {
 | 
			
		||||
      ctx->Texture.NeedNormals = GL_FALSE;
 | 
			
		||||
      gl_update_dirty_texobjs(ctx);
 | 
			
		||||
@@ -974,9 +980,11 @@ void gl_update_state( GLcontext *ctx )
 | 
			
		||||
	       }
 | 
			
		||||
	    }
 | 
			
		||||
	 }
 | 
			
		||||
         else {
 | 
			
		||||
            ctx->Texture.Unit[i].ReallyEnabled = 0;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      ctx->Texture.Enabled = ctx->Enabled & ENABLE_TEX_ANY;
 | 
			
		||||
      ctx->Enabled = (ctx->Enabled & ~ENABLE_TEX_ANY) | ctx->Texture.ReallyEnabled;
 | 
			
		||||
      ctx->NeedNormals = (ctx->Light.Enabled || ctx->Texture.NeedNormals);
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
@@ -1187,8 +1195,9 @@ void gl_update_state( GLcontext *ctx )
 | 
			
		||||
	 }
 | 
			
		||||
	 ctx->NeedEyeNormals = ctx->NeedEyeCoords;
 | 
			
		||||
      }
 | 
			
		||||
      if (ctx->Texture.Enabled || ctx->RenderMode==GL_FEEDBACK) {
 | 
			
		||||
	 if (ctx->Texture.NeedEyeCoords) ctx->NeedEyeCoords = GL_TRUE;
 | 
			
		||||
      if (ctx->Texture.ReallyEnabled || ctx->RenderMode==GL_FEEDBACK) {
 | 
			
		||||
	 if (ctx->Texture.NeedEyeCoords)
 | 
			
		||||
            ctx->NeedEyeCoords = GL_TRUE;
 | 
			
		||||
	 if (ctx->Texture.NeedNormals)
 | 
			
		||||
	    ctx->NeedNormals = ctx->NeedEyeNormals = GL_TRUE;
 | 
			
		||||
      }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: stencil.c,v 1.16 2000/04/11 21:26:57 brianp Exp $ */
 | 
			
		||||
/* $Id: stencil.c,v 1.16.4.3 2001/02/23 23:13:58 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.4.2
 | 
			
		||||
 * 
 | 
			
		||||
 * Copyright (C) 1999-2000  Brian Paul   All Rights Reserved.
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -1039,47 +1039,45 @@ _mesa_stencil_and_ztest_pixels( GLcontext *ctx,
 | 
			
		||||
   if (ctx->Driver.WriteStencilPixels) {
 | 
			
		||||
      /*** Hardware stencil buffer ***/
 | 
			
		||||
      GLstencil stencil[PB_SIZE];
 | 
			
		||||
      GLubyte mask[PB_SIZE];
 | 
			
		||||
      GLubyte origMask[PB_SIZE];
 | 
			
		||||
 | 
			
		||||
      ASSERT(ctx->Driver.ReadStencilPixels);
 | 
			
		||||
      (*ctx->Driver.ReadStencilPixels)(ctx, n, x, y, stencil);
 | 
			
		||||
 | 
			
		||||
      MEMCPY(origMask, mask, n * sizeof(GLubyte));
 | 
			
		||||
 | 
			
		||||
      if (do_stencil_test( ctx, n, stencil, mask ) == GL_FALSE) {
 | 
			
		||||
         /* all fragments failed the stencil test, we're done. */
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
      (void) do_stencil_test( ctx, n, stencil, mask );
 | 
			
		||||
 | 
			
		||||
      if (ctx->Depth.Test == GL_FALSE) {
 | 
			
		||||
         apply_stencil_op( ctx, ctx->Stencil.ZPassFunc, n, stencil, mask );
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         GLubyte passmask[PB_SIZE], failmask[PB_SIZE], oldmask[PB_SIZE];
 | 
			
		||||
         GLuint i;
 | 
			
		||||
 | 
			
		||||
         MEMCPY(oldmask, mask, n * sizeof(GLubyte));
 | 
			
		||||
 | 
			
		||||
         _mesa_depth_test_pixels(ctx, n, x, y, z, mask);
 | 
			
		||||
 | 
			
		||||
         for (i=0;i<n;i++) {
 | 
			
		||||
            ASSERT(mask[i] == 0 || mask[i] == 1);
 | 
			
		||||
            passmask[i] = oldmask[i] & mask[i];
 | 
			
		||||
            failmask[i] = oldmask[i] & (mask[i] ^ 1);
 | 
			
		||||
         }
 | 
			
		||||
 | 
			
		||||
         if (ctx->Stencil.ZFailFunc != GL_KEEP) {
 | 
			
		||||
            apply_stencil_op( ctx, ctx->Stencil.ZFailFunc, n, stencil, failmask );
 | 
			
		||||
            GLubyte failmask[PB_SIZE];
 | 
			
		||||
            GLuint i;
 | 
			
		||||
            for (i = 0; i < n; i++) {
 | 
			
		||||
               ASSERT(mask[i] == 0 || mask[i] == 1);
 | 
			
		||||
               failmask[i] = origMask[i] & (mask[i] ^ 1);
 | 
			
		||||
            }
 | 
			
		||||
            apply_stencil_op(ctx, ctx->Stencil.ZFailFunc, n, stencil, failmask);
 | 
			
		||||
         }
 | 
			
		||||
         if (ctx->Stencil.ZPassFunc != GL_KEEP) {
 | 
			
		||||
            apply_stencil_op( ctx, ctx->Stencil.ZPassFunc, n, stencil, passmask );
 | 
			
		||||
            GLubyte passmask[PB_SIZE];
 | 
			
		||||
            GLuint i;
 | 
			
		||||
            for (i = 0; i < n; i++) {
 | 
			
		||||
               ASSERT(mask[i] == 0 || mask[i] == 1);
 | 
			
		||||
               passmask[i] = origMask[i] & mask[i];
 | 
			
		||||
            }
 | 
			
		||||
            apply_stencil_op(ctx, ctx->Stencil.ZPassFunc, n, stencil, passmask);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      /* Write updated stencil values into hardware stencil buffer */
 | 
			
		||||
      (ctx->Driver.WriteStencilPixels)(ctx, n, x, y, stencil, mask );
 | 
			
		||||
      (ctx->Driver.WriteStencilPixels)(ctx, n, x, y, stencil, origMask );
 | 
			
		||||
 | 
			
		||||
      return GL_TRUE;
 | 
			
		||||
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      /*** Software stencil buffer ***/
 | 
			
		||||
@@ -1089,7 +1087,6 @@ _mesa_stencil_and_ztest_pixels( GLcontext *ctx,
 | 
			
		||||
         return GL_FALSE;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      if (ctx->Depth.Test==GL_FALSE) {
 | 
			
		||||
         apply_stencil_op_to_pixels( ctx, n, x, y, ctx->Stencil.ZPassFunc, mask );
 | 
			
		||||
      }
 | 
			
		||||
@@ -1351,11 +1348,11 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
 | 
			
		||||
            const GLstencil clearVal = (ctx->Stencil.Clear & mask);
 | 
			
		||||
            GLstencil stencil[MAX_WIDTH];
 | 
			
		||||
            GLint i;
 | 
			
		||||
            (*ctx->Driver.ReadStencilSpan)(ctx, x, y, width, stencil);
 | 
			
		||||
            (*ctx->Driver.ReadStencilSpan)(ctx, width, x, y, stencil);
 | 
			
		||||
            for (i = 0; i < width; i++) {
 | 
			
		||||
               stencil[i] = (stencil[i] & invMask) | clearVal;
 | 
			
		||||
            }
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
@@ -1366,7 +1363,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
 | 
			
		||||
            stencil[i] = ctx->Stencil.Clear;
 | 
			
		||||
         }
 | 
			
		||||
         for (y = ctx->DrawBuffer->Ymin; y <= ctx->DrawBuffer->Ymax; y++) {
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
@@ -1384,11 +1381,11 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
 | 
			
		||||
         for (y = 0; y < height; y++) {
 | 
			
		||||
            GLstencil stencil[MAX_WIDTH];
 | 
			
		||||
            GLuint i;
 | 
			
		||||
            (*ctx->Driver.ReadStencilSpan)(ctx, x, y, width, stencil);
 | 
			
		||||
            (*ctx->Driver.ReadStencilSpan)(ctx, width, x, y, stencil);
 | 
			
		||||
            for (i = 0; i < width; i++) {
 | 
			
		||||
               stencil[i] = (stencil[i] & invMask) | clearVal;
 | 
			
		||||
            }
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
@@ -1402,7 +1399,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
 | 
			
		||||
            stencil[i] = ctx->Stencil.Clear;
 | 
			
		||||
         }
 | 
			
		||||
         for (y = 0; y < height; y++) {
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, x, y, width, stencil, NULL);
 | 
			
		||||
            (*ctx->Driver.WriteStencilSpan)(ctx, width, x, y, stencil, NULL);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user