Compare commits
	
		
			32 Commits
		
	
	
		
			mesa_3_2_b
			...
			mesa_3_2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					5febd0ce8b | ||
| 
						 | 
					3d2264b2ce | ||
| 
						 | 
					486565f88a | ||
| 
						 | 
					0931339ea8 | ||
| 
						 | 
					7fbad8f406 | ||
| 
						 | 
					3382e6e359 | ||
| 
						 | 
					96cefd6d02 | ||
| 
						 | 
					8033ed691e | ||
| 
						 | 
					59aa79ea5e | ||
| 
						 | 
					5478ccec45 | ||
| 
						 | 
					ba31a93ae5 | ||
| 
						 | 
					3c5265bf69 | ||
| 
						 | 
					9c7494fc0c | ||
| 
						 | 
					9e077508f9 | ||
| 
						 | 
					95b0d3528a | ||
| 
						 | 
					dcd4ea4746 | ||
| 
						 | 
					e01205dd9e | ||
| 
						 | 
					198ed1fe93 | ||
| 
						 | 
					5c2f9bc2de | ||
| 
						 | 
					e4fb0285f2 | ||
| 
						 | 
					573ab9c964 | ||
| 
						 | 
					37f4e1fe40 | ||
| 
						 | 
					4f4a6b4a4f | ||
| 
						 | 
					884aa6efd8 | ||
| 
						 | 
					ceb817650f | ||
| 
						 | 
					19ac63ce20 | ||
| 
						 | 
					1b4c728f77 | ||
| 
						 | 
					140809c588 | ||
| 
						 | 
					e6df48f9a6 | ||
| 
						 | 
					31bcf75ce1 | ||
| 
						 | 
					9818daae60 | ||
| 
						 | 
					5ade8ed0b4 | 
@@ -1,4 +1,4 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.12.2.8 2000/03/23 00:14:28 brianp Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.12.2.9 2000/04/24 14:47:11 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.2
 | 
			
		||||
@@ -352,7 +352,7 @@ LIB_FILES =	\
 | 
			
		||||
	$(DIRECTORY)/docs/INSTALL.GNU				\
 | 
			
		||||
	$(DIRECTORY)/docs/README				\
 | 
			
		||||
	$(DIRECTORY)/docs/README.*				\
 | 
			
		||||
	$(DIRECTORY)/docs/RELNOTES				\
 | 
			
		||||
	$(DIRECTORY)/docs/RELNOTES*				\
 | 
			
		||||
	$(DIRECTORY)/docs/VERSIONS				\
 | 
			
		||||
	$(DIRECTORY)/docs/*.spec				\
 | 
			
		||||
	$(DIRECTORY)/bin/README					\
 | 
			
		||||
 
 | 
			
		||||
@@ -16,11 +16,11 @@ Status
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_resize_buffers.spec,v 1.1 1999/07/20 00:30:41 brianp Exp $
 | 
			
		||||
    $Id: MESA_resize_buffers.spec,v 1.1.2.1 2000/04/04 23:28:00 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    XXX none assigned
 | 
			
		||||
    196
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,11 +16,11 @@ Status
 | 
			
		||||
 | 
			
		||||
Version
 | 
			
		||||
 | 
			
		||||
    $Id: MESA_window_pos.spec,v 1.1 1999/07/20 00:30:41 brianp Exp $
 | 
			
		||||
    $Id: MESA_window_pos.spec,v 1.1.2.1 2000/04/04 23:28:00 brianp Exp $
 | 
			
		||||
 | 
			
		||||
Number
 | 
			
		||||
 | 
			
		||||
    XXX non assigned
 | 
			
		||||
    197
 | 
			
		||||
 | 
			
		||||
Dependencies
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.1 Unix/X11 Information
 | 
			
		||||
                         Mesa 3.2 Unix/X11 Information
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -25,7 +25,7 @@ There are two ways to compile Mesa on Unix/X11 systems:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
The top-level makefile will execute the makefiles in a number of sub-
 | 
			
		||||
directories.  When finished, the Mesa libraries will be in the Mesa-3.1/lib/
 | 
			
		||||
directories.  When finished, the Mesa libraries will be in the Mesa-3.2/lib/
 | 
			
		||||
directory.  A few GLUT demos in the demos/ directory should be ready to run.
 | 
			
		||||
 | 
			
		||||
If you also downloaded and unpacked the demos there should be executables
 | 
			
		||||
@@ -141,7 +141,7 @@ Xt/Motif Widgets:
 | 
			
		||||
 | 
			
		||||
Togl:
 | 
			
		||||
   Togl is an OpenGL/Mesa widget for Tcl/Tk.
 | 
			
		||||
   See http://www.ssec.wisc.edu/~brianp/Togl.html for more information.
 | 
			
		||||
   See http://togl.sourceforge.net for more information.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -260,6 +260,7 @@ Extensions:
 | 
			
		||||
   The following OpenGL GLX extensions are currently implemented:
 | 
			
		||||
 | 
			
		||||
      GLX_EXT_visual_info - GLX visual and transparent pixel extension
 | 
			
		||||
      GLX_EXT_visual_rating - GLX visual caveats
 | 
			
		||||
 | 
			
		||||
   For detailed information about the extensions see www.opengl.org
 | 
			
		||||
 | 
			
		||||
@@ -322,4 +323,4 @@ Summary of X-related environment variables:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: README.X11,v 3.3.2.3 2000/01/25 17:18:46 brianp Exp $
 | 
			
		||||
$Id: README.X11,v 3.3.2.4 2000/04/04 15:13:41 brianp Exp $
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								docs/RELNOTES-3.2
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								docs/RELNOTES-3.2
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
 | 
			
		||||
                         Mesa 3.2 release notes
 | 
			
		||||
 | 
			
		||||
                             PLEASE READ!!!!
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mesa 3.2 is a stabilization of the Mesa 3.1 release.  No new features
 | 
			
		||||
have been added.  For a list of bug fixes please read the VERSIONS file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
----------------------------------------------------------------------
 | 
			
		||||
$Id: RELNOTES-3.2,v 1.1.2.1 2000/04/06 02:34:31 brianp Exp $
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
$Id: VERSIONS,v 1.13.2.24 2000/03/23 00:12:41 brianp Exp $
 | 
			
		||||
$Id: VERSIONS,v 1.13.2.34 2000/04/24 14:47:45 brianp Exp $
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Mesa Version History
 | 
			
		||||
@@ -672,7 +672,7 @@ Mesa Version History
 | 
			
		||||
	- glXUseXFont() bitmaps were vertically shifted by one pixel
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.2 beta 1 March 23, 2000
 | 
			
		||||
3.2 beta 1  March 23, 2000
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- mixed drawing of lines and bitmaps sometimes had wrong colors
 | 
			
		||||
	- added missing glHintPGI() function
 | 
			
		||||
@@ -708,3 +708,17 @@ Mesa Version History
 | 
			
		||||
    Changes:
 | 
			
		||||
        - glXCopyContext's mask parameter is now unsigned long, per GLX spec
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
3.2 final  April 24, 2000
 | 
			
		||||
    Bug fixes:
 | 
			
		||||
	- fixed memcpy bugs in span.c
 | 
			
		||||
	- fixed missing glEnd problem in demos/tessdemo.c
 | 
			
		||||
	- fixed bug when clearing 24bpp Ximages
 | 
			
		||||
	- fixed clipping problem found in Unreal Tournament
 | 
			
		||||
	- fixed Loki's "ice bug" and "crazy triangles" seen in Heretic2
 | 
			
		||||
	- fixed Loki's 3dfx RGB vs BGR bug
 | 
			
		||||
	- fixed Loki's 3dfx smooth/flat shading bug in SoF
 | 
			
		||||
    Changes:
 | 
			
		||||
	- updated docs/README file
 | 
			
		||||
	- use bcopy() optimizations on FreeBSD
 | 
			
		||||
	- re-enabled the optimized persp_textured_triangle() function
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										381
									
								
								include/GL/glu.h
									
									
									
									
									
								
							
							
						
						
									
										381
									
								
								include/GL/glu.h
									
									
									
									
									
								
							@@ -1,10 +1,9 @@
 | 
			
		||||
/* $Id: glu.h,v 1.16 1999/11/11 03:21:43 kendallb Exp $ */
 | 
			
		||||
/* $Id: glu.h,v 1.14.2.1 2000/03/31 20:07:56 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright (C) 1995-1999  Brian Paul
 | 
			
		||||
 * Version:  3.2
 | 
			
		||||
 * Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 *
 | 
			
		||||
 * This library is free software; you can redistribute it and/or
 | 
			
		||||
 * modify it under the terms of the GNU Library General Public
 | 
			
		||||
@@ -71,149 +70,151 @@ extern "C" {
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define GLU_VERSION_1_1			1
 | 
			
		||||
#define GLU_VERSION_1_2			1
 | 
			
		||||
#define GLU_VERSION_1_1		1
 | 
			
		||||
#define GLU_VERSION_1_2		1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define GLU_TRUE			1
 | 
			
		||||
#define GLU_FALSE			0
 | 
			
		||||
#define GLU_TRUE   GL_TRUE
 | 
			
		||||
#define GLU_FALSE  GL_FALSE
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Normal vectors */
 | 
			
		||||
#define GLU_SMOOTH			100000
 | 
			
		||||
#define GLU_FLAT			100001
 | 
			
		||||
#define GLU_NONE			100002
 | 
			
		||||
enum {
 | 
			
		||||
	/* Normal vectors */
 | 
			
		||||
	GLU_SMOOTH	= 100000,
 | 
			
		||||
	GLU_FLAT	= 100001,
 | 
			
		||||
	GLU_NONE	= 100002,
 | 
			
		||||
 | 
			
		||||
/* Quadric draw styles */
 | 
			
		||||
#define GLU_POINT			100010
 | 
			
		||||
#define GLU_LINE			100011
 | 
			
		||||
#define GLU_FILL			100012
 | 
			
		||||
#define GLU_SILHOUETTE			100013
 | 
			
		||||
	/* Quadric draw styles */
 | 
			
		||||
	GLU_POINT	= 100010,
 | 
			
		||||
	GLU_LINE	= 100011,
 | 
			
		||||
	GLU_FILL	= 100012,
 | 
			
		||||
	GLU_SILHOUETTE	= 100013,
 | 
			
		||||
 | 
			
		||||
/* Quadric orientation */
 | 
			
		||||
#define GLU_OUTSIDE			100020
 | 
			
		||||
#define GLU_INSIDE			100021
 | 
			
		||||
	/* Quadric orientation */
 | 
			
		||||
	GLU_OUTSIDE	= 100020,
 | 
			
		||||
	GLU_INSIDE	= 100021,
 | 
			
		||||
 | 
			
		||||
/* Tessellator */
 | 
			
		||||
#define GLU_TESS_BEGIN			100100
 | 
			
		||||
#define GLU_TESS_VERTEX			100101
 | 
			
		||||
#define GLU_TESS_END			100102
 | 
			
		||||
#define GLU_TESS_ERROR			100103
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG		100104
 | 
			
		||||
#define GLU_TESS_COMBINE		100105
 | 
			
		||||
	/* Tessellator */
 | 
			
		||||
	GLU_TESS_BEGIN		= 100100,
 | 
			
		||||
	GLU_TESS_VERTEX		= 100101,
 | 
			
		||||
	GLU_TESS_END		= 100102,
 | 
			
		||||
	GLU_TESS_ERROR		= 100103,
 | 
			
		||||
	GLU_TESS_EDGE_FLAG	= 100104,
 | 
			
		||||
	GLU_TESS_COMBINE	= 100105,
 | 
			
		||||
 | 
			
		||||
#define GLU_TESS_BEGIN_DATA		100106
 | 
			
		||||
#define GLU_TESS_VERTEX_DATA		100107
 | 
			
		||||
#define GLU_TESS_END_DATA		100108
 | 
			
		||||
#define GLU_TESS_ERROR_DATA		100109
 | 
			
		||||
#define GLU_TESS_EDGE_FLAG_DATA		100110
 | 
			
		||||
#define GLU_TESS_COMBINE_DATA		100111
 | 
			
		||||
	GLU_TESS_BEGIN_DATA	= 100106,
 | 
			
		||||
	GLU_TESS_VERTEX_DATA	= 100107,
 | 
			
		||||
	GLU_TESS_END_DATA	= 100108,
 | 
			
		||||
	GLU_TESS_ERROR_DATA	= 100109,
 | 
			
		||||
	GLU_TESS_EDGE_FLAG_DATA	= 100110,
 | 
			
		||||
	GLU_TESS_COMBINE_DATA	= 100111,
 | 
			
		||||
 | 
			
		||||
/* Winding rules */
 | 
			
		||||
#define GLU_TESS_WINDING_ODD		100130
 | 
			
		||||
#define GLU_TESS_WINDING_NONZERO	100131
 | 
			
		||||
#define GLU_TESS_WINDING_POSITIVE	100132
 | 
			
		||||
#define GLU_TESS_WINDING_NEGATIVE	100133
 | 
			
		||||
#define GLU_TESS_WINDING_ABS_GEQ_TWO	100134
 | 
			
		||||
	/* Winding rules */
 | 
			
		||||
	GLU_TESS_WINDING_ODD		= 100130,
 | 
			
		||||
	GLU_TESS_WINDING_NONZERO	= 100131,
 | 
			
		||||
	GLU_TESS_WINDING_POSITIVE	= 100132,
 | 
			
		||||
	GLU_TESS_WINDING_NEGATIVE	= 100133,
 | 
			
		||||
	GLU_TESS_WINDING_ABS_GEQ_TWO	= 100134,
 | 
			
		||||
 | 
			
		||||
/* Tessellation properties */
 | 
			
		||||
#define GLU_TESS_WINDING_RULE		100140
 | 
			
		||||
#define GLU_TESS_BOUNDARY_ONLY		100141
 | 
			
		||||
#define GLU_TESS_TOLERANCE		100142
 | 
			
		||||
	/* Tessellation properties */
 | 
			
		||||
	GLU_TESS_WINDING_RULE	= 100140,
 | 
			
		||||
	GLU_TESS_BOUNDARY_ONLY	= 100141,
 | 
			
		||||
	GLU_TESS_TOLERANCE	= 100142,
 | 
			
		||||
 | 
			
		||||
/* Tessellation errors */
 | 
			
		||||
#define GLU_TESS_ERROR1			100151  /* Missing gluBeginPolygon */
 | 
			
		||||
#define GLU_TESS_ERROR2			100152  /* Missing gluBeginContour */
 | 
			
		||||
#define GLU_TESS_ERROR3			100153  /* Missing gluEndPolygon */
 | 
			
		||||
#define GLU_TESS_ERROR4			100154  /* Missing gluEndContour */
 | 
			
		||||
#define GLU_TESS_ERROR5			100155  /* */
 | 
			
		||||
#define GLU_TESS_ERROR6			100156  /* */
 | 
			
		||||
#define GLU_TESS_ERROR7			100157  /* */
 | 
			
		||||
#define GLU_TESS_ERROR8			100158  /* */
 | 
			
		||||
	/* Tessellation errors */
 | 
			
		||||
	GLU_TESS_ERROR1	= 100151,  /* Missing gluBeginPolygon */
 | 
			
		||||
	GLU_TESS_ERROR2 = 100152,  /* Missing gluBeginContour */
 | 
			
		||||
	GLU_TESS_ERROR3 = 100153,  /* Missing gluEndPolygon */
 | 
			
		||||
	GLU_TESS_ERROR4 = 100154,  /* Missing gluEndContour */
 | 
			
		||||
	GLU_TESS_ERROR5 = 100155,  /* */
 | 
			
		||||
	GLU_TESS_ERROR6 = 100156,  /* */
 | 
			
		||||
	GLU_TESS_ERROR7 = 100157,  /* */
 | 
			
		||||
	GLU_TESS_ERROR8 = 100158,  /* */
 | 
			
		||||
 | 
			
		||||
/* NURBS */
 | 
			
		||||
#define GLU_AUTO_LOAD_MATRIX		100200
 | 
			
		||||
#define GLU_CULLING			100201
 | 
			
		||||
#define GLU_PARAMETRIC_TOLERANCE	100202
 | 
			
		||||
#define GLU_SAMPLING_TOLERANCE		100203
 | 
			
		||||
#define GLU_DISPLAY_MODE		100204
 | 
			
		||||
#define GLU_SAMPLING_METHOD		100205
 | 
			
		||||
#define GLU_U_STEP			100206
 | 
			
		||||
#define GLU_V_STEP			100207
 | 
			
		||||
	/* NURBS */
 | 
			
		||||
	GLU_AUTO_LOAD_MATRIX	= 100200,
 | 
			
		||||
	GLU_CULLING		= 100201,
 | 
			
		||||
	GLU_PARAMETRIC_TOLERANCE= 100202,
 | 
			
		||||
	GLU_SAMPLING_TOLERANCE	= 100203,
 | 
			
		||||
	GLU_DISPLAY_MODE	= 100204,
 | 
			
		||||
	GLU_SAMPLING_METHOD	= 100205,
 | 
			
		||||
	GLU_U_STEP		= 100206,
 | 
			
		||||
	GLU_V_STEP		= 100207,
 | 
			
		||||
 | 
			
		||||
#define GLU_PATH_LENGTH			100215
 | 
			
		||||
#define GLU_PARAMETRIC_ERROR		100216
 | 
			
		||||
#define GLU_DOMAIN_DISTANCE		100217
 | 
			
		||||
	GLU_PATH_LENGTH		= 100215,
 | 
			
		||||
	GLU_PARAMETRIC_ERROR	= 100216,
 | 
			
		||||
	GLU_DOMAIN_DISTANCE	= 100217,
 | 
			
		||||
 | 
			
		||||
#define GLU_MAP1_TRIM_2			100210
 | 
			
		||||
#define GLU_MAP1_TRIM_3			100211
 | 
			
		||||
	GLU_MAP1_TRIM_2		= 100210,
 | 
			
		||||
	GLU_MAP1_TRIM_3		= 100211,
 | 
			
		||||
 | 
			
		||||
#define GLU_OUTLINE_POLYGON		100240
 | 
			
		||||
#define GLU_OUTLINE_PATCH		100241
 | 
			
		||||
	GLU_OUTLINE_POLYGON	= 100240,
 | 
			
		||||
	GLU_OUTLINE_PATCH	= 100241,
 | 
			
		||||
 | 
			
		||||
#define GLU_NURBS_ERROR1	100251   /* spline order un-supported */
 | 
			
		||||
#define GLU_NURBS_ERROR2	100252   /* too few knots */
 | 
			
		||||
#define GLU_NURBS_ERROR3	100253   /* valid knot range is empty */
 | 
			
		||||
#define GLU_NURBS_ERROR4	100254   /* decreasing knot sequence */
 | 
			
		||||
#define GLU_NURBS_ERROR5	100255   /* knot multiplicity > spline order */
 | 
			
		||||
#define GLU_NURBS_ERROR6	100256   /* endcurve() must follow bgncurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR7	100257   /* bgncurve() must precede endcurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR8	100258   /* ctrlarray or knot vector is NULL */
 | 
			
		||||
#define GLU_NURBS_ERROR9 	100259   /* can't draw pwlcurves */
 | 
			
		||||
#define GLU_NURBS_ERROR10	100260   /* missing gluNurbsCurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR11	100261   /* missing gluNurbsSurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR12	100262   /* endtrim() must precede endsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR13	100263   /* bgnsurface() must precede endsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR14	100264   /* curve of improper type passed as trim curve */
 | 
			
		||||
#define GLU_NURBS_ERROR15	100265   /* bgnsurface() must precede bgntrim() */
 | 
			
		||||
#define GLU_NURBS_ERROR16	100266   /* endtrim() must follow bgntrim() */
 | 
			
		||||
#define GLU_NURBS_ERROR17	100267   /* bgntrim() must precede endtrim()*/
 | 
			
		||||
#define GLU_NURBS_ERROR18	100268   /* invalid or missing trim curve*/
 | 
			
		||||
#define GLU_NURBS_ERROR19	100269   /* bgntrim() must precede pwlcurve() */
 | 
			
		||||
#define GLU_NURBS_ERROR20	100270   /* pwlcurve referenced twice*/
 | 
			
		||||
#define GLU_NURBS_ERROR21	100271   /* pwlcurve and nurbscurve mixed */
 | 
			
		||||
#define GLU_NURBS_ERROR22	100272   /* improper usage of trim data type */
 | 
			
		||||
#define GLU_NURBS_ERROR23	100273   /* nurbscurve referenced twice */
 | 
			
		||||
#define GLU_NURBS_ERROR24	100274   /* nurbscurve and pwlcurve mixed */
 | 
			
		||||
#define GLU_NURBS_ERROR25	100275   /* nurbssurface referenced twice */
 | 
			
		||||
#define GLU_NURBS_ERROR26	100276   /* invalid property */
 | 
			
		||||
#define GLU_NURBS_ERROR27	100277   /* endsurface() must follow bgnsurface() */
 | 
			
		||||
#define GLU_NURBS_ERROR28	100278   /* intersecting or misoriented trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR29	100279   /* intersecting trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR30	100280   /* UNUSED */
 | 
			
		||||
#define GLU_NURBS_ERROR31	100281   /* unconnected trim curves */
 | 
			
		||||
#define GLU_NURBS_ERROR32	100282   /* unknown knot error */
 | 
			
		||||
#define GLU_NURBS_ERROR33	100283   /* negative vertex count encountered */
 | 
			
		||||
#define GLU_NURBS_ERROR34	100284   /* negative byte-stride */
 | 
			
		||||
#define GLU_NURBS_ERROR35	100285   /* unknown type descriptor */
 | 
			
		||||
#define GLU_NURBS_ERROR36	100286   /* null control point reference */
 | 
			
		||||
#define GLU_NURBS_ERROR37	100287   /* duplicate point on pwlcurve */
 | 
			
		||||
	GLU_NURBS_ERROR1  = 100251,   /* spline order un-supported */
 | 
			
		||||
	GLU_NURBS_ERROR2  = 100252,   /* too few knots */
 | 
			
		||||
	GLU_NURBS_ERROR3  = 100253,   /* valid knot range is empty */
 | 
			
		||||
	GLU_NURBS_ERROR4  = 100254,   /* decreasing knot sequence */
 | 
			
		||||
	GLU_NURBS_ERROR5  = 100255,   /* knot multiplicity > spline order */
 | 
			
		||||
	GLU_NURBS_ERROR6  = 100256,   /* endcurve() must follow bgncurve() */
 | 
			
		||||
	GLU_NURBS_ERROR7  = 100257,   /* bgncurve() must precede endcurve() */
 | 
			
		||||
	GLU_NURBS_ERROR8  = 100258,   /* ctrlarray or knot vector is NULL */
 | 
			
		||||
	GLU_NURBS_ERROR9  = 100259,   /* can't draw pwlcurves */
 | 
			
		||||
	GLU_NURBS_ERROR10 = 100260,   /* missing gluNurbsCurve() */
 | 
			
		||||
	GLU_NURBS_ERROR11 = 100261,   /* missing gluNurbsSurface() */
 | 
			
		||||
	GLU_NURBS_ERROR12 = 100262,   /* endtrim() must precede endsurface() */
 | 
			
		||||
	GLU_NURBS_ERROR13 = 100263,   /* bgnsurface() must precede endsurface() */
 | 
			
		||||
	GLU_NURBS_ERROR14 = 100264,   /* curve of improper type passed as trim curve */
 | 
			
		||||
	GLU_NURBS_ERROR15 = 100265,   /* bgnsurface() must precede bgntrim() */
 | 
			
		||||
	GLU_NURBS_ERROR16 = 100266,   /* endtrim() must follow bgntrim() */
 | 
			
		||||
	GLU_NURBS_ERROR17 = 100267,   /* bgntrim() must precede endtrim()*/
 | 
			
		||||
	GLU_NURBS_ERROR18 = 100268,   /* invalid or missing trim curve*/
 | 
			
		||||
	GLU_NURBS_ERROR19 = 100269,   /* bgntrim() must precede pwlcurve() */
 | 
			
		||||
	GLU_NURBS_ERROR20 = 100270,   /* pwlcurve referenced twice*/
 | 
			
		||||
	GLU_NURBS_ERROR21 = 100271,   /* pwlcurve and nurbscurve mixed */
 | 
			
		||||
	GLU_NURBS_ERROR22 = 100272,   /* improper usage of trim data type */
 | 
			
		||||
	GLU_NURBS_ERROR23 = 100273,   /* nurbscurve referenced twice */
 | 
			
		||||
	GLU_NURBS_ERROR24 = 100274,   /* nurbscurve and pwlcurve mixed */
 | 
			
		||||
	GLU_NURBS_ERROR25 = 100275,   /* nurbssurface referenced twice */
 | 
			
		||||
	GLU_NURBS_ERROR26 = 100276,   /* invalid property */
 | 
			
		||||
	GLU_NURBS_ERROR27 = 100277,   /* endsurface() must follow bgnsurface() */
 | 
			
		||||
	GLU_NURBS_ERROR28 = 100278,   /* intersecting or misoriented trim curves */
 | 
			
		||||
	GLU_NURBS_ERROR29 = 100279,   /* intersecting trim curves */
 | 
			
		||||
	GLU_NURBS_ERROR30 = 100280,   /* UNUSED */
 | 
			
		||||
	GLU_NURBS_ERROR31 = 100281,   /* unconnected trim curves */
 | 
			
		||||
	GLU_NURBS_ERROR32 = 100282,   /* unknown knot error */
 | 
			
		||||
	GLU_NURBS_ERROR33 = 100283,   /* negative vertex count encountered */
 | 
			
		||||
	GLU_NURBS_ERROR34 = 100284,   /* negative byte-stride */
 | 
			
		||||
	GLU_NURBS_ERROR35 = 100285,   /* unknown type descriptor */
 | 
			
		||||
	GLU_NURBS_ERROR36 = 100286,   /* null control point reference */
 | 
			
		||||
	GLU_NURBS_ERROR37 = 100287,   /* duplicate point on pwlcurve */
 | 
			
		||||
 | 
			
		||||
/* Errors */
 | 
			
		||||
#define GLU_INVALID_ENUM		100900
 | 
			
		||||
#define GLU_INVALID_VALUE		100901
 | 
			
		||||
#define GLU_OUT_OF_MEMORY		100902
 | 
			
		||||
#define GLU_INCOMPATIBLE_GL_VERSION	100903
 | 
			
		||||
	/* Errors */
 | 
			
		||||
	GLU_INVALID_ENUM		= 100900,
 | 
			
		||||
	GLU_INVALID_VALUE		= 100901,
 | 
			
		||||
	GLU_OUT_OF_MEMORY		= 100902,
 | 
			
		||||
	GLU_INCOMPATIBLE_GL_VERSION	= 100903,
 | 
			
		||||
 | 
			
		||||
/* New in GLU 1.1 */
 | 
			
		||||
#define GLU_VERSION			100800
 | 
			
		||||
#define GLU_EXTENSIONS			100801
 | 
			
		||||
	/* New in GLU 1.1 */
 | 
			
		||||
	GLU_VERSION	= 100800,
 | 
			
		||||
	GLU_EXTENSIONS	= 100801,
 | 
			
		||||
 | 
			
		||||
/*** GLU 1.0 tessellation - obsolete! ***/
 | 
			
		||||
	/*** GLU 1.0 tessellation - obsolete! ***/
 | 
			
		||||
 | 
			
		||||
/* Contour types */
 | 
			
		||||
#define GLU_CW				100120
 | 
			
		||||
#define GLU_CCW				100121
 | 
			
		||||
#define GLU_INTERIOR			100122
 | 
			
		||||
#define GLU_EXTERIOR			100123
 | 
			
		||||
#define GLU_UNKNOWN			100124
 | 
			
		||||
	/* Contour types */
 | 
			
		||||
	GLU_CW		= 100120,
 | 
			
		||||
	GLU_CCW		= 100121,
 | 
			
		||||
	GLU_INTERIOR	= 100122,
 | 
			
		||||
	GLU_EXTERIOR	= 100123,
 | 
			
		||||
	GLU_UNKNOWN	= 100124,
 | 
			
		||||
 | 
			
		||||
/* Tessellator */
 | 
			
		||||
#define GLU_BEGIN			GLU_TESS_BEGIN
 | 
			
		||||
#define GLU_VERTEX			GLU_TESS_VERTEX
 | 
			
		||||
#define GLU_END				GLU_TESS_END
 | 
			
		||||
#define GLU_ERROR			GLU_TESS_ERROR
 | 
			
		||||
#define GLU_EDGE_FLAG			GLU_TESS_EDGE_FLAG
 | 
			
		||||
	/* Tessellator */
 | 
			
		||||
	GLU_BEGIN	= GLU_TESS_BEGIN,
 | 
			
		||||
	GLU_VERTEX	= GLU_TESS_VERTEX,
 | 
			
		||||
	GLU_END		= GLU_TESS_END,
 | 
			
		||||
	GLU_ERROR	= GLU_TESS_ERROR,
 | 
			
		||||
	GLU_EDGE_FLAG	= GLU_TESS_EDGE_FLAG
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
@@ -246,37 +247,37 @@ extern "C" {
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
 | 
			
		||||
                                  GLdouble centerx, GLdouble centery,
 | 
			
		||||
                                  GLdouble centerz,
 | 
			
		||||
                                  GLdouble upx, GLdouble upy, GLdouble upz );
 | 
			
		||||
                                GLdouble centerx, GLdouble centery,
 | 
			
		||||
                                GLdouble centerz,
 | 
			
		||||
                                GLdouble upx, GLdouble upy, GLdouble upz );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluOrtho2D( GLdouble left, GLdouble right,
 | 
			
		||||
                                   GLdouble bottom, GLdouble top );
 | 
			
		||||
                                 GLdouble bottom, GLdouble top );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPerspective( GLdouble fovy, GLdouble aspect,
 | 
			
		||||
                                       GLdouble zNear, GLdouble zFar );
 | 
			
		||||
                                     GLdouble zNear, GLdouble zFar );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPickMatrix( GLdouble x, GLdouble y,
 | 
			
		||||
                                      GLdouble width, GLdouble height,
 | 
			
		||||
                                      const GLint viewport[4] );
 | 
			
		||||
                                    GLdouble width, GLdouble height,
 | 
			
		||||
                                    const GLint viewport[4] );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluProject( GLdouble objx, GLdouble objy, GLdouble objz,
 | 
			
		||||
                                  const GLdouble modelMatrix[16],
 | 
			
		||||
                                  const GLdouble projMatrix[16],
 | 
			
		||||
                                  const GLint viewport[4],
 | 
			
		||||
                                  GLdouble *winx, GLdouble *winy,
 | 
			
		||||
                                  GLdouble *winz );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
 | 
			
		||||
                                    GLdouble winz,
 | 
			
		||||
                                    const GLdouble modelMatrix[16],
 | 
			
		||||
                                    const GLdouble projMatrix[16],
 | 
			
		||||
                                    const GLint viewport[4],
 | 
			
		||||
                                    GLdouble *winx, GLdouble *winy,
 | 
			
		||||
                                    GLdouble *winz );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluUnProject( GLdouble winx, GLdouble winy,
 | 
			
		||||
                                      GLdouble winz,
 | 
			
		||||
                                      const GLdouble modelMatrix[16],
 | 
			
		||||
                                      const GLdouble projMatrix[16],
 | 
			
		||||
                                      const GLint viewport[4],
 | 
			
		||||
                                      GLdouble *objx, GLdouble *objy,
 | 
			
		||||
                                      GLdouble *objz );
 | 
			
		||||
                                    GLdouble *objx, GLdouble *objy,
 | 
			
		||||
                                    GLdouble *objz );
 | 
			
		||||
 | 
			
		||||
GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
 | 
			
		||||
 | 
			
		||||
@@ -289,19 +290,19 @@ GLUAPI const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode );
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluScaleImage( GLenum format,
 | 
			
		||||
                                       GLint widthin, GLint heightin,
 | 
			
		||||
                                       GLenum typein, const void *datain,
 | 
			
		||||
                                       GLint widthout, GLint heightout,
 | 
			
		||||
                                       GLenum typeout, void *dataout );
 | 
			
		||||
                                     GLsizei widthin, GLsizei heightin,
 | 
			
		||||
                                     GLenum typein, const void *datain,
 | 
			
		||||
                                     GLsizei widthout, GLsizei heightout,
 | 
			
		||||
                                     GLenum typeout, void *dataout );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluBuild1DMipmaps( GLenum target, GLint components,
 | 
			
		||||
                                           GLint width, GLenum format,
 | 
			
		||||
                                           GLenum type, const void *data );
 | 
			
		||||
                                         GLsizei width, GLenum format,
 | 
			
		||||
                                         GLenum type, const void *data );
 | 
			
		||||
 | 
			
		||||
GLUAPI GLint GLAPIENTRY gluBuild2DMipmaps( GLenum target, GLint components,
 | 
			
		||||
                                           GLint width, GLint height,
 | 
			
		||||
                                           GLenum format,
 | 
			
		||||
                                           GLenum type, const void *data );
 | 
			
		||||
                                         GLsizei width, GLsizei height,
 | 
			
		||||
                                         GLenum format,
 | 
			
		||||
                                         GLenum type, const void *data );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -316,39 +317,37 @@ GLUAPI GLUquadricObj* GLAPIENTRY gluNewQuadric( void );
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteQuadric( GLUquadricObj *state );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricDrawStyle( GLUquadricObj *quadObject,
 | 
			
		||||
                                            GLenum drawStyle );
 | 
			
		||||
                                          GLenum drawStyle );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricOrientation( GLUquadricObj *quadObject,
 | 
			
		||||
                                              GLenum orientation );
 | 
			
		||||
                                            GLenum orientation );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricNormals( GLUquadricObj *quadObject,
 | 
			
		||||
                                          GLenum normals );
 | 
			
		||||
                                        GLenum normals );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricTexture( GLUquadricObj *quadObject,
 | 
			
		||||
                                          GLboolean textureCoords );
 | 
			
		||||
                                        GLboolean textureCoords );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluQuadricCallback( GLUquadricObj *qobj,
 | 
			
		||||
                                           GLenum which,
 | 
			
		||||
                                           void (GLCALLBACK *fn)() );
 | 
			
		||||
                                         GLenum which, void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluCylinder( GLUquadricObj *qobj,
 | 
			
		||||
                                    GLdouble baseRadius,
 | 
			
		||||
                                    GLdouble topRadius,
 | 
			
		||||
                                    GLdouble height,
 | 
			
		||||
                                    GLint slices, GLint stacks );
 | 
			
		||||
                                  GLdouble baseRadius,
 | 
			
		||||
                                  GLdouble topRadius,
 | 
			
		||||
                                  GLdouble height,
 | 
			
		||||
                                  GLint slices, GLint stacks );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluSphere( GLUquadricObj *qobj,
 | 
			
		||||
                                  GLdouble radius, GLint slices,
 | 
			
		||||
                                  GLint stacks );
 | 
			
		||||
                                GLdouble radius, GLint slices, GLint stacks );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDisk( GLUquadricObj *qobj,
 | 
			
		||||
                                GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
                                GLint slices, GLint loops );
 | 
			
		||||
                              GLdouble innerRadius, GLdouble outerRadius,
 | 
			
		||||
                              GLint slices, GLint loops );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPartialDisk( GLUquadricObj *qobj, GLdouble innerRadius,
 | 
			
		||||
                                       GLdouble outerRadius, GLint slices,
 | 
			
		||||
                                       GLint loops, GLdouble startAngle,
 | 
			
		||||
                                       GLdouble sweepAngle );
 | 
			
		||||
                                     GLdouble outerRadius, GLint slices,
 | 
			
		||||
                                     GLint loops, GLdouble startAngle,
 | 
			
		||||
                                     GLdouble sweepAngle );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -363,47 +362,46 @@ GLUAPI GLUnurbsObj* GLAPIENTRY gluNewNurbsRenderer( void );
 | 
			
		||||
GLUAPI void GLAPIENTRY gluDeleteNurbsRenderer( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluLoadSamplingMatrices( GLUnurbsObj *nobj,
 | 
			
		||||
                                                const GLfloat modelMatrix[16],
 | 
			
		||||
                                                const GLfloat projMatrix[16],
 | 
			
		||||
                                                const GLint viewport[4] );
 | 
			
		||||
                                              const GLfloat modelMatrix[16],
 | 
			
		||||
                                              const GLfloat projMatrix[16],
 | 
			
		||||
                                              const GLint viewport[4] );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsProperty( GLUnurbsObj *nobj, GLenum property,
 | 
			
		||||
                                         GLfloat value );
 | 
			
		||||
                                       GLfloat value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluGetNurbsProperty( GLUnurbsObj *nobj, GLenum property,
 | 
			
		||||
                                            GLfloat *value );
 | 
			
		||||
                                          GLfloat *value );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginCurve( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndCurve( GLUnurbsObj * nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsCurve( GLUnurbsObj *nobj, GLint nknots,
 | 
			
		||||
                                      GLfloat *knot, GLint stride,
 | 
			
		||||
                                      GLfloat *ctlarray, GLint order,
 | 
			
		||||
                                      GLenum type );
 | 
			
		||||
                                    GLfloat *knot, GLint stride,
 | 
			
		||||
                                    GLfloat *ctlarray, GLint order,
 | 
			
		||||
                                    GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginSurface( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndSurface( GLUnurbsObj * nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsSurface( GLUnurbsObj *nobj,
 | 
			
		||||
                                        GLint sknot_count, GLfloat *sknot,
 | 
			
		||||
                                        GLint tknot_count, GLfloat *tknot,
 | 
			
		||||
                                        GLint s_stride, GLint t_stride,
 | 
			
		||||
                                        GLfloat *ctlarray,
 | 
			
		||||
                                        GLint sorder, GLint torder,
 | 
			
		||||
                                        GLenum type );
 | 
			
		||||
                                      GLint sknot_count, GLfloat *sknot,
 | 
			
		||||
                                      GLint tknot_count, GLfloat *tknot,
 | 
			
		||||
                                      GLint s_stride, GLint t_stride,
 | 
			
		||||
                                      GLfloat *ctlarray,
 | 
			
		||||
                                      GLint sorder, GLint torder,
 | 
			
		||||
                                      GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluBeginTrim( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluEndTrim( GLUnurbsObj *nobj );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluPwlCurve( GLUnurbsObj *nobj, GLint count,
 | 
			
		||||
                                    GLfloat *array, GLint stride,
 | 
			
		||||
                                    GLenum type );
 | 
			
		||||
                                  GLfloat *array, GLint stride, GLenum type );
 | 
			
		||||
 | 
			
		||||
GLUAPI void GLAPIENTRY gluNurbsCallback( GLUnurbsObj *nobj, GLenum which,
 | 
			
		||||
                                         void (GLCALLBACK *fn)() );
 | 
			
		||||
                                       void (GLCALLBACK *fn)() );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -465,6 +463,17 @@ GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 *
 | 
			
		||||
 * GLU 1.3 functions
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
GLUAPI GLboolean GLAPIENTRY
 | 
			
		||||
gluCheckExtension( const char *extName, const GLubyte *extString );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
 | 
			
		||||
#pragma export off
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
# $Id: Makefile.X11,v 1.3 1999/10/27 10:09:53 brianp Exp $
 | 
			
		||||
# $Id: Makefile.X11,v 1.3.2.1 2000/04/24 15:29:02 brianp Exp $
 | 
			
		||||
 | 
			
		||||
# Mesa 3-D graphics library
 | 
			
		||||
# Version:  3.1
 | 
			
		||||
# Copyright (C) 1995-1998  Brian Paul
 | 
			
		||||
# Version:  3.2
 | 
			
		||||
# Copyright (C) 1995-2000  Brian Paul
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Makefile for GLUT-based demo programs for Unix/X11
 | 
			
		||||
@@ -19,7 +19,7 @@ LIB_DEP = $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLUT_LIB)
 | 
			
		||||
 | 
			
		||||
PROGS = bounce clearspd drawpix gamma gears glinfo gloss glutfx isosurf \
 | 
			
		||||
	morph3d multiarb osdemo paltex pointblast reflect \
 | 
			
		||||
	renormal spectex stex3d tessdemo texcyl texobj trispd winpos \
 | 
			
		||||
	renormal spectex stex3d tessdemo texcyl texobj trispd winpos
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
##### RULES #####
 | 
			
		||||
 
 | 
			
		||||
@@ -1,53 +1,10 @@
 | 
			
		||||
/* $Id: tessdemo.c,v 1.3.2.1 1999/11/16 11:09:09 gareth Exp $ */
 | 
			
		||||
/* $Id: tessdemo.c,v 1.3.2.2 2000/03/27 15:47:08 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * A demo of the GLU polygon tesselation functions written by Bogdan Sikorski.
 | 
			
		||||
 * This demo isn't built by the Makefile because it needs GLUT.  After you've
 | 
			
		||||
 * installed GLUT you can try this demo.
 | 
			
		||||
 * Here's the command for IRIX, for example:
 | 
			
		||||
   cc -g -ansi -prototypes -fullwarn -float -I../include -DSHM tess_demo.c -L../lib -lglut -lMesaGLU -lMesaGL -lm -lX11 -lXext -lXmu -lfpe -lXext -o tess_demo
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Updated for GLU 1.3 tessellation by Gareth Hughes <garethh@bell-labs.com>
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * $Log: tessdemo.c,v $
 | 
			
		||||
 * Revision 1.3.2.1  1999/11/16 11:09:09  gareth
 | 
			
		||||
 * Added combine callback.  Converted vertices from ints to floats.
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.3  1999/11/04 04:00:42  gareth
 | 
			
		||||
 * Updated demo for new GLU 1.3 tessellation.  Added optimized rendering
 | 
			
		||||
 * by saving the output of the tessellation into display lists.
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.2  1999/09/19 20:09:00  tanner
 | 
			
		||||
 *
 | 
			
		||||
 * lots of autoconf updates
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 1.1.1.1  1999/08/19 00:55:40  jtg
 | 
			
		||||
 * Imported sources
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.5  1999/03/28 18:24:37  brianp
 | 
			
		||||
 * minor clean-up
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.4  1999/02/14 03:37:07  brianp
 | 
			
		||||
 * fixed callback problem
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.3  1998/07/26 01:25:26  brianp
 | 
			
		||||
 * removed include of gl.h and glu.h
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.2  1998/06/29 02:37:30  brianp
 | 
			
		||||
 * minor changes for Windows (Ted Jump)
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.1  1998/06/09 01:53:49  brianp
 | 
			
		||||
 * main() should return an int
 | 
			
		||||
 *
 | 
			
		||||
 * Revision 3.0  1998/02/14 18:42:29  brianp
 | 
			
		||||
 * initial rev
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <GL/glut.h>
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
@@ -390,6 +347,8 @@ void display( void )
 | 
			
		||||
	 }
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      glEnd();
 | 
			
		||||
 | 
			
		||||
      glColor3f( 1.0, 1.0, 0.0 );
 | 
			
		||||
 | 
			
		||||
      for ( i = 0 ; i <= contour_cnt ; i++ )
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,9 @@ in this Software without prior written authorization from The Open Group.
 | 
			
		||||
#include <X11/Xlib.h>
 | 
			
		||||
#include <X11/Xutil.h>
 | 
			
		||||
#include <X11/Xproto.h> /* for CARD32 */
 | 
			
		||||
#ifdef HAVE_MULTIBUF
 | 
			
		||||
#include <X11/extensions/multibuf.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_XIE
 | 
			
		||||
#include <X11/extensions/XIElib.h>
 | 
			
		||||
#endif /* HAVE_XIE */
 | 
			
		||||
@@ -45,7 +47,9 @@ in this Software without prior written authorization from The Open Group.
 | 
			
		||||
#include <X11/extensions/XTest.h>
 | 
			
		||||
#endif /* HAVE_XTEST */
 | 
			
		||||
#include <X11/extensions/sync.h>
 | 
			
		||||
#ifdef HAVE_DBE
 | 
			
		||||
#include <X11/extensions/Xdbe.h>
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_XRECORD
 | 
			
		||||
#include <X11/extensions/record.h>
 | 
			
		||||
#endif /* HAVE_XRECORD */
 | 
			
		||||
@@ -675,6 +679,7 @@ print_standard_extension_info(dpy, extname, majorrev, minorrev)
 | 
			
		||||
    printf("\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_MULTIBUF
 | 
			
		||||
int
 | 
			
		||||
print_multibuf_info(dpy, extname)
 | 
			
		||||
    Display *dpy;
 | 
			
		||||
@@ -717,6 +722,7 @@ print_multibuf_info(dpy, extname)
 | 
			
		||||
    }
 | 
			
		||||
    return 1;
 | 
			
		||||
} /* end print_multibuf_info */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* XIE stuff */
 | 
			
		||||
@@ -805,6 +811,7 @@ print_xtest_info(dpy, extname)
 | 
			
		||||
}
 | 
			
		||||
#endif /* HAVE_XTEST */
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_SYNC
 | 
			
		||||
int
 | 
			
		||||
print_sync_info(dpy, extname)
 | 
			
		||||
    Display *dpy;
 | 
			
		||||
@@ -830,7 +837,10 @@ print_sync_info(dpy, extname)
 | 
			
		||||
    XSyncFreeSystemCounterList(syscounters);
 | 
			
		||||
    return 1;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_SHAPE
 | 
			
		||||
int
 | 
			
		||||
print_shape_info(dpy, extname)
 | 
			
		||||
    Display *dpy;
 | 
			
		||||
@@ -843,6 +853,7 @@ print_shape_info(dpy, extname)
 | 
			
		||||
    print_standard_extension_info(dpy, extname, majorrev, minorrev);
 | 
			
		||||
    return 1;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef MITSHM
 | 
			
		||||
int
 | 
			
		||||
@@ -870,6 +881,7 @@ print_mitshm_info(dpy, extname)
 | 
			
		||||
}
 | 
			
		||||
#endif /* MITSHM */
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_DBE
 | 
			
		||||
int
 | 
			
		||||
print_dbe_info(dpy, extname)
 | 
			
		||||
    Display *dpy;
 | 
			
		||||
@@ -899,6 +911,7 @@ print_dbe_info(dpy, extname)
 | 
			
		||||
    XdbeFreeVisualInfo(svi);
 | 
			
		||||
    return 1;
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_XRECORD
 | 
			
		||||
int
 | 
			
		||||
@@ -935,16 +948,24 @@ ExtensionPrintInfo known_extensions[] =
 | 
			
		||||
#ifdef MITSHM
 | 
			
		||||
    {"MIT-SHM",	print_mitshm_info, False},
 | 
			
		||||
#endif /* MITSHM */
 | 
			
		||||
#ifdef HAVE_MULTIBUF
 | 
			
		||||
    {MULTIBUFFER_PROTOCOL_NAME,	print_multibuf_info, False},
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_SHAPE
 | 
			
		||||
    {"SHAPE", print_shape_info, False},
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_SYNC
 | 
			
		||||
    {SYNC_NAME, print_sync_info, False},
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_XIE
 | 
			
		||||
    {xieExtName, print_xie_info, False},
 | 
			
		||||
#endif /* HAVE_XIE */
 | 
			
		||||
#ifdef HAVE_XTEST
 | 
			
		||||
    {XTestExtensionName, print_xtest_info, False},
 | 
			
		||||
#endif /* HAVE_XTEST */
 | 
			
		||||
#ifdef HAVE_DBE
 | 
			
		||||
    {"DOUBLE-BUFFER", print_dbe_info, False},
 | 
			
		||||
#endif
 | 
			
		||||
#ifdef HAVE_XRECORD
 | 
			
		||||
    {"RECORD", print_record_info, False}    
 | 
			
		||||
#endif /* HAVE_XRECORD */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: glu.c,v 1.16.2.4 2000/03/23 00:13:43 brianp Exp $ */
 | 
			
		||||
/* $Id: glu.c,v 1.16.2.5 2000/04/24 12:33:24 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -275,7 +275,7 @@ const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode )
 | 
			
		||||
const GLubyte* GLAPIENTRY gluGetString( GLenum name )
 | 
			
		||||
{
 | 
			
		||||
   static char *extensions = "GL_EXT_abgr";
 | 
			
		||||
   static char *version = "1.2 Mesa 3.2 beta 1";
 | 
			
		||||
   static char *version = "1.2 Mesa 3.2";
 | 
			
		||||
 | 
			
		||||
   switch (name) {
 | 
			
		||||
      case GLU_EXTENSIONS:
 | 
			
		||||
 
 | 
			
		||||
@@ -866,6 +866,8 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
 | 
			
		||||
   GLcontext *ctx = 0;
 | 
			
		||||
   /*FX_GrContext_t glideContext = 0;*/
 | 
			
		||||
   char *errorstr;
 | 
			
		||||
   GLboolean useBGR;
 | 
			
		||||
   char *system = NULL;
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE&VERBOSE_DRIVER) {
 | 
			
		||||
      fprintf(stderr,"fxmesa: fxMesaCreateContext() Start\n");
 | 
			
		||||
@@ -973,28 +975,82 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
 | 
			
		||||
      goto errorhandler;
 | 
			
		||||
   }
 | 
			
		||||
   
 | 
			
		||||
   /* Pixel tables are use during pixel read-back */
 | 
			
		||||
   /*
 | 
			
		||||
    * Pixel tables are use during pixel read-back
 | 
			
		||||
    * Either initialize them for RGB or BGR order.
 | 
			
		||||
    */
 | 
			
		||||
#if FXMESA_USE_ARGB 
 | 
			
		||||
   fxInitPixelTables(fxMesa, GL_FALSE); /* Force RGB pixel order */	
 | 
			
		||||
   useBGR = GL_FALSE; /* Force RGB pixel order */       
 | 
			
		||||
   system = "FXMESA_USE_ARGB";
 | 
			
		||||
#else
 | 
			
		||||
   if (glbHWConfig.SSTs[glbCurrentBoard].type == GR_SSTTYPE_VOODOO) {
 | 
			
		||||
      /* jk991130 - GROSS HACK!!! - Voodoo 3s don't use BGR!!
 | 
			
		||||
       * the only way to tell if it's a Voodoo 3 at this stage of the
 | 
			
		||||
       * ballgame (no Glide 3.x for linux *yet*) is to query the # of TMUs
 | 
			
		||||
      /* jk991130 - Voodoo 3s don't use BGR. Query the # of TMUs
 | 
			
		||||
       * as Voodoo3s have 2 TMUs on board, Banshee has only 1
 | 
			
		||||
       * Thanks to Joseph Kain for that one
 | 
			
		||||
       * bk000413 - another suggestion from Joseph Kain is using
 | 
			
		||||
       *  VendorID 0x121a for all 3dfx boards
 | 
			
		||||
       *   DeviceID VG  1/V2  2/VB  3/V3  5
 | 
			
		||||
       * For now we cehck for known BGR devices, and presume
 | 
			
		||||
       *  everything else to be a V3/RGB.
 | 
			
		||||
       */
 | 
			
		||||
      if (glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx == 2) {
 | 
			
		||||
         fxInitPixelTables(fxMesa, GL_FALSE); /* use RGB pixel order (Voodoo3) */
 | 
			
		||||
      GrVoodooConfig_t *voodoo;
 | 
			
		||||
      voodoo = &glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig;
 | 
			
		||||
 | 
			
		||||
      if (voodoo->nTexelfx == 1) {
 | 
			
		||||
         /* Voodoo1 or Banshee */
 | 
			
		||||
         useBGR = GL_TRUE;
 | 
			
		||||
         system = "Voodoo1";
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         fxInitPixelTables(fxMesa, GL_TRUE); /* use BGR pixel order on Voodoo1/2 */
 | 
			
		||||
      else if (voodoo->nTexelfx == 2 &&
 | 
			
		||||
               voodoo->fbiRev == 260 &&
 | 
			
		||||
               voodoo->tmuConfig[0].tmuRev == 4 &&
 | 
			
		||||
               voodoo->tmuConfig[0].tmuRam == 2) {
 | 
			
		||||
         /* Voodoo 2 */
 | 
			
		||||
         useBGR = GL_TRUE;
 | 
			
		||||
         system = "Voodoo2";
 | 
			
		||||
      }
 | 
			
		||||
      else if (voodoo->nTexelfx == 2 &&
 | 
			
		||||
               voodoo->fbiRev == 2 &&
 | 
			
		||||
               voodoo->tmuConfig[0].tmuRev == 1 &&
 | 
			
		||||
               voodoo->tmuConfig[0].tmuRam == 4) {
 | 
			
		||||
         /* Quantum3D Obsidian 50/100 */
 | 
			
		||||
         useBGR = GL_TRUE;
 | 
			
		||||
         system = "Quantum3D Obsidian";
 | 
			
		||||
      }
 | 
			
		||||
      else 
 | 
			
		||||
         /* Brian
 | 
			
		||||
          *       (voodoo->nTexelfx == 2 &&
 | 
			
		||||
          *        voodoo->fbiRev == 0 &&
 | 
			
		||||
          *        voodoo->tmuConfig[0].tmuRev == 148441048 &&
 | 
			
		||||
          *        voodoo->tmuConfig[0].tmuRam == 3)
 | 
			
		||||
          * Bernd 
 | 
			
		||||
          *       (voodoo->nTexelfx == 2 &&
 | 
			
		||||
          *        voodoo->fbiRev ==  69634 &&
 | 
			
		||||
          *        voodoo->tmuConfig[0].tmuRev == 69634 &&
 | 
			
		||||
          *        voodoo->tmuConfig[0].tmuRam == 2 )
 | 
			
		||||
          */
 | 
			
		||||
      {
 | 
			
		||||
         /* Presumed Voodoo3 */
 | 
			
		||||
         useBGR =  GL_FALSE;
 | 
			
		||||
         system = "Voodoo3";
 | 
			
		||||
      }
 | 
			
		||||
      if (getenv("MESA_FX_INFO")) { 
 | 
			
		||||
        printf("Voodoo: Texelfx: %d / FBI Rev.: %d / TMU Rev.: %d / TMU RAM: %d\n",
 | 
			
		||||
               voodoo->nTexelfx,
 | 
			
		||||
               voodoo->fbiRev,
 | 
			
		||||
               voodoo->tmuConfig[0].tmuRev,
 | 
			
		||||
               voodoo->tmuConfig[0].tmuRam );
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      fxInitPixelTables(fxMesa, GL_FALSE); /* use RGB pixel order otherwise */
 | 
			
		||||
      useBGR = GL_FALSE; /* use RGB pixel order otherwise */
 | 
			
		||||
      system = "non-voodoo";
 | 
			
		||||
   }
 | 
			
		||||
#endif
 | 
			
		||||
#endif /*FXMESA_USE_ARGB*/
 | 
			
		||||
 | 
			
		||||
   if (getenv("MESA_FX_INFO")) 
 | 
			
		||||
      printf("Voodoo pixel order: %s (%s)\n", useBGR ? "BGR" : "RGB", system);
 | 
			
		||||
 | 
			
		||||
   fxInitPixelTables(fxMesa, useBGR);
 | 
			
		||||
 | 
			
		||||
   fxMesa->width=FX_grSstScreenWidth();
 | 
			
		||||
   fxMesa->height=FX_grSstScreenHeight();
 | 
			
		||||
@@ -1281,6 +1337,8 @@ int GLAPIENTRY fxQueryHardware(void)
 | 
			
		||||
                  glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.fbRam);
 | 
			
		||||
          fprintf(stderr,"Number of TMUs: %d\n",
 | 
			
		||||
                  glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.nTexelfx);
 | 
			
		||||
          fprintf(stderr,"fbiRev: %d\n",
 | 
			
		||||
                  glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.fbiRev);
 | 
			
		||||
          fprintf(stderr,"SLI detected: %d\n",
 | 
			
		||||
                  glbHWConfig.SSTs[glbCurrentBoard].sstBoard.VoodooConfig.sliDetect);
 | 
			
		||||
        } else if(glbHWConfig.SSTs[glbCurrentBoard].type==GR_SSTTYPE_SST96) {
 | 
			
		||||
 
 | 
			
		||||
@@ -428,14 +428,40 @@ void fxDDReadDepthSpanFloat(GLcontext *ctx,
 | 
			
		||||
			    GLuint n, GLint x, GLint y, GLfloat depth[])
 | 
			
		||||
{
 | 
			
		||||
  fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
 | 
			
		||||
  GLuint i;
 | 
			
		||||
  GLint i;
 | 
			
		||||
  GLint bottom=fxMesa->height+fxMesa->y_offset-1;
 | 
			
		||||
  GLushort data[MAX_WIDTH];
 | 
			
		||||
  GLint count = (GLint) n;
 | 
			
		||||
 | 
			
		||||
  if (MESA_VERBOSE&VERBOSE_DRIVER) {
 | 
			
		||||
     fprintf(stderr,"fxmesa: fxDDReadDepthSpanFloat(...)\n");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (y < 0 || y >= ctx->Buffer->Height ||
 | 
			
		||||
      x >= ctx->Buffer->Width || x + count < 0) {
 | 
			
		||||
    /* completely outside frame buffer */
 | 
			
		||||
    for (i = 0; i < count; i++)
 | 
			
		||||
      depth[i] = 0;
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (x < 0) {
 | 
			
		||||
    GLint dx = -x;
 | 
			
		||||
    for (i = 0; i < dx; i++)
 | 
			
		||||
      depth[i] = 0;
 | 
			
		||||
    x = 0;
 | 
			
		||||
    depth += dx;
 | 
			
		||||
    count -= dx;
 | 
			
		||||
  }
 | 
			
		||||
  if (x + count > ctx->Buffer->Width) {
 | 
			
		||||
    GLint dx = x + count - ctx->Buffer->Width;
 | 
			
		||||
    for (i = 0; i < dx; i++)
 | 
			
		||||
      depth[count - dx - 1] = 0;
 | 
			
		||||
    count -= dx;
 | 
			
		||||
  }
 | 
			
		||||
  if (count <= 0)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  x+=fxMesa->x_offset;
 | 
			
		||||
  FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER,x,bottom-y,n,1,0,data);
 | 
			
		||||
 | 
			
		||||
@@ -451,11 +477,38 @@ void fxDDReadDepthSpanInt(GLcontext *ctx,
 | 
			
		||||
{
 | 
			
		||||
  fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
 | 
			
		||||
  GLint bottom=fxMesa->height+fxMesa->y_offset-1;
 | 
			
		||||
  GLint count = (GLint) n;
 | 
			
		||||
  GLint i;
 | 
			
		||||
 | 
			
		||||
  if (MESA_VERBOSE&VERBOSE_DRIVER) {
 | 
			
		||||
     fprintf(stderr,"fxmesa: fxDDReadDepthSpanInt(...)\n");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (y < 0 || y >= ctx->Buffer->Height ||
 | 
			
		||||
      x >= ctx->Buffer->Width || x + count < 0) {
 | 
			
		||||
    /* completely outside frame buffer */
 | 
			
		||||
    for (i = 0; i < count; i++)
 | 
			
		||||
      depth[i] = 0;
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (x < 0) {
 | 
			
		||||
    GLint dx = -x;
 | 
			
		||||
    for (i = 0; i < dx; i++)
 | 
			
		||||
      depth[i] = 0;
 | 
			
		||||
    x = 0;
 | 
			
		||||
    depth += dx;
 | 
			
		||||
    count -= dx;
 | 
			
		||||
  }
 | 
			
		||||
  if (x + count > ctx->Buffer->Width) {
 | 
			
		||||
    GLint dx = x + count - ctx->Buffer->Width;
 | 
			
		||||
    for (i = 0; i < dx; i++)
 | 
			
		||||
      depth[count - dx - 1] = 0;
 | 
			
		||||
    count -= dx;
 | 
			
		||||
  }
 | 
			
		||||
  if (count <= 0)
 | 
			
		||||
    return;
 | 
			
		||||
 | 
			
		||||
  x+=fxMesa->x_offset;
 | 
			
		||||
  FX_grLfbReadRegion(GR_BUFFER_AUXBUFFER,x,bottom-y,n,1,0,depth);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,7 @@ static void fxSetupDepthTest(GLcontext *ctx);
 | 
			
		||||
static void fxSetupScissor(GLcontext *ctx);
 | 
			
		||||
static void fxSetupCull(GLcontext *ctx);
 | 
			
		||||
static void gl_print_fx_state_flags( const char *msg, GLuint flags);
 | 
			
		||||
static GLboolean fxMultipassBlend(struct vertex_buffer *, GLuint);
 | 
			
		||||
/*  static GLboolean fxMultipassBlend(struct vertex_buffer *, GLuint); */
 | 
			
		||||
static GLboolean fxMultipassTexture( struct vertex_buffer *, GLuint );
 | 
			
		||||
 | 
			
		||||
static void fxTexValidate(GLcontext *ctx, struct gl_texture_object *tObj)
 | 
			
		||||
@@ -183,7 +183,7 @@ static GLuint fxGetTexSetConfiguration(GLcontext *ctx,
 | 
			
		||||
  GLuint envmode=0;
 | 
			
		||||
  GLuint ifmt=0;
 | 
			
		||||
 | 
			
		||||
  if((ctx->Light.ShadeModel==GL_SMOOTH) ||
 | 
			
		||||
  if((ctx->Light.ShadeModel==GL_SMOOTH) || 1 ||
 | 
			
		||||
     (ctx->Point.SmoothFlag) ||
 | 
			
		||||
     (ctx->Line.SmoothFlag) ||
 | 
			
		||||
     (ctx->Polygon.SmoothFlag))
 | 
			
		||||
@@ -191,11 +191,13 @@ static GLuint fxGetTexSetConfiguration(GLcontext *ctx,
 | 
			
		||||
  else
 | 
			
		||||
    unitsmode|=FX_UM_ALPHA_CONSTANT;
 | 
			
		||||
 | 
			
		||||
  if(ctx->Light.ShadeModel==GL_SMOOTH)
 | 
			
		||||
  if(ctx->Light.ShadeModel==GL_SMOOTH || 1)
 | 
			
		||||
    unitsmode|=FX_UM_COLOR_ITERATED;
 | 
			
		||||
  else
 | 
			
		||||
    unitsmode|=FX_UM_COLOR_CONSTANT;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  /* 
 | 
			
		||||
     OpenGL Feeds Texture 0 into Texture 1
 | 
			
		||||
     Glide Feeds Texture 1 into Texture 0
 | 
			
		||||
@@ -471,8 +473,8 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset)
 | 
			
		||||
  else
 | 
			
		||||
    unitsmode=fxGetTexSetConfiguration(ctx,NULL,tObj);
 | 
			
		||||
 | 
			
		||||
  if(fxMesa->lastUnitsMode==unitsmode)
 | 
			
		||||
    return;
 | 
			
		||||
/*    if(fxMesa->lastUnitsMode==unitsmode) */
 | 
			
		||||
/*      return; */
 | 
			
		||||
 | 
			
		||||
  fxMesa->lastUnitsMode=unitsmode;
 | 
			
		||||
 | 
			
		||||
@@ -550,9 +552,8 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset)
 | 
			
		||||
			       FXTRUE);
 | 
			
		||||
    ctx->Driver.MultipassFunc = fxMultipassBlend;
 | 
			
		||||
#else
 | 
			
		||||
#ifndef FX_SILENT
 | 
			
		||||
    fprintf(stderr,"fx Driver: GL_BLEND not yet supported\n");
 | 
			
		||||
#endif
 | 
			
		||||
    if (MESA_VERBOSE&VERBOSE_DRIVER)
 | 
			
		||||
      fprintf(stderr,"fx Driver: GL_BLEND not yet supported\n");
 | 
			
		||||
#endif    
 | 
			
		||||
    break;
 | 
			
		||||
  case GL_REPLACE:
 | 
			
		||||
@@ -583,9 +584,9 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset)
 | 
			
		||||
			       FXFALSE);
 | 
			
		||||
    break;
 | 
			
		||||
  default:
 | 
			
		||||
#ifndef FX_SILENT
 | 
			
		||||
    fprintf(stderr,"fx Driver: %x Texture.EnvMode not yet supported\n",ctx->Texture.Unit[textureset].EnvMode);
 | 
			
		||||
#endif
 | 
			
		||||
    if (MESA_VERBOSE&VERBOSE_DRIVER)
 | 
			
		||||
      fprintf(stderr, "fx Driver: %x Texture.EnvMode not yet supported\n",
 | 
			
		||||
	      ctx->Texture.Unit[textureset].EnvMode);
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@@ -759,8 +760,8 @@ static void fxSetupTextureDoubleTMU_NoLock(GLcontext *ctx)
 | 
			
		||||
 | 
			
		||||
  unitsmode=fxGetTexSetConfiguration(ctx,tObj0,tObj1);
 | 
			
		||||
 | 
			
		||||
  if(fxMesa->lastUnitsMode==unitsmode)
 | 
			
		||||
    return;
 | 
			
		||||
/*    if(fxMesa->lastUnitsMode==unitsmode) */
 | 
			
		||||
/*      return; */
 | 
			
		||||
 | 
			
		||||
  fxMesa->lastUnitsMode=unitsmode;
 | 
			
		||||
 | 
			
		||||
@@ -1025,7 +1026,7 @@ static void fxSetupTextureNone_NoLock(GLcontext *ctx)
 | 
			
		||||
     fprintf(stderr,"fxmesa: fxSetupTextureNone(...)\n");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if((ctx->Light.ShadeModel==GL_SMOOTH) ||
 | 
			
		||||
  if((ctx->Light.ShadeModel==GL_SMOOTH) || 1 ||
 | 
			
		||||
     (ctx->Point.SmoothFlag) ||
 | 
			
		||||
     (ctx->Line.SmoothFlag) ||
 | 
			
		||||
     (ctx->Polygon.SmoothFlag))
 | 
			
		||||
@@ -1033,7 +1034,7 @@ static void fxSetupTextureNone_NoLock(GLcontext *ctx)
 | 
			
		||||
  else
 | 
			
		||||
    locala=GR_COMBINE_LOCAL_CONSTANT;
 | 
			
		||||
  
 | 
			
		||||
  if(ctx->Light.ShadeModel==GL_SMOOTH)
 | 
			
		||||
  if(ctx->Light.ShadeModel==GL_SMOOTH || 1)
 | 
			
		||||
    localc=GR_COMBINE_LOCAL_ITERATED;
 | 
			
		||||
  else
 | 
			
		||||
    localc=GR_COMBINE_LOCAL_CONSTANT;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: osmesa.c,v 1.3 1999/11/11 01:28:41 brianp Exp $ */
 | 
			
		||||
/* $Id: osmesa.c,v 1.2.2.3 2000/04/04 00:52:28 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.2
 | 
			
		||||
 * 
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -38,7 +38,7 @@
 | 
			
		||||
#include "GL/osmesa.h"
 | 
			
		||||
#include "context.h"
 | 
			
		||||
#include "depth.h"
 | 
			
		||||
#include "mem.h"
 | 
			
		||||
#include "macros.h"
 | 
			
		||||
#include "matrix.h"
 | 
			
		||||
#include "types.h"
 | 
			
		||||
#include "vb.h"
 | 
			
		||||
@@ -224,6 +224,7 @@ OSMesaContext GLAPIENTRY OSMesaCreateContext( GLenum format, OSMesaContext share
 | 
			
		||||
                                            indexBits,
 | 
			
		||||
                                            8, 8, 8, alphaBits );
 | 
			
		||||
      if (!osmesa->gl_visual) {
 | 
			
		||||
         FREE(osmesa);
 | 
			
		||||
         return NULL;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@@ -400,7 +401,7 @@ GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum
 | 
			
		||||
   /* init viewport */
 | 
			
		||||
   if (ctx->gl_ctx->Viewport.Width==0) {
 | 
			
		||||
      /* initialize viewport and scissor box to buffer size */
 | 
			
		||||
      _mesa_Viewport( 0, 0, width, height );
 | 
			
		||||
      gl_Viewport( ctx->gl_ctx, 0, 0, width, height );
 | 
			
		||||
      ctx->gl_ctx->Scissor.Width = width;
 | 
			
		||||
      ctx->gl_ctx->Scissor.Height = height;
 | 
			
		||||
   }
 | 
			
		||||
@@ -631,8 +632,13 @@ static GLbitfield clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
 | 
			
		||||
            GLuint i, n, *ptr4;
 | 
			
		||||
            n = osmesa->rowlength * osmesa->height;
 | 
			
		||||
            ptr4 = (GLuint *) osmesa->buffer;
 | 
			
		||||
            for (i=0;i<n;i++) {
 | 
			
		||||
               *ptr4++ = osmesa->clearpixel;
 | 
			
		||||
            if (osmesa->clearpixel) {
 | 
			
		||||
               for (i=0;i<n;i++) {
 | 
			
		||||
                  *ptr4++ = osmesa->clearpixel;
 | 
			
		||||
               }
 | 
			
		||||
            }
 | 
			
		||||
            else {
 | 
			
		||||
               BZERO(ptr4, n * sizeof(GLuint));
 | 
			
		||||
            }
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: fakeglx.c,v 1.12.2.7 2000/03/23 00:13:22 brianp Exp $ */
 | 
			
		||||
/* $Id: fakeglx.c,v 1.12.2.8 2000/04/24 12:42:37 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -1452,7 +1452,7 @@ const char *Fake_glXQueryExtensionsString( Display *dpy, int screen )
 | 
			
		||||
const char *Fake_glXQueryServerString( Display *dpy, int screen, int name )
 | 
			
		||||
{
 | 
			
		||||
   static char *vendor = "Brian Paul";
 | 
			
		||||
   static char *version = "1.1 Mesa 3.2 beta 1";
 | 
			
		||||
   static char *version = "1.1 Mesa 3.2";
 | 
			
		||||
 | 
			
		||||
   (void) dpy;
 | 
			
		||||
   (void) screen;
 | 
			
		||||
@@ -1475,7 +1475,7 @@ const char *Fake_glXQueryServerString( Display *dpy, int screen, int name )
 | 
			
		||||
const char *Fake_glXGetClientString( Display *dpy, int name )
 | 
			
		||||
{
 | 
			
		||||
   static char *vendor = "Brian Paul";
 | 
			
		||||
   static char *version = "1.1 Mesa 3.2 beta 1";
 | 
			
		||||
   static char *version = "1.1 Mesa 3.2";
 | 
			
		||||
 | 
			
		||||
   (void) dpy;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: clip.c,v 1.4.2.1 1999/11/25 16:51:24 keithw Exp $ */
 | 
			
		||||
/* $Id: clip.c,v 1.4.2.3 2000/04/17 17:35:47 keithw Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -301,10 +301,12 @@ GLuint gl_userclip_point( GLcontext* ctx, const GLfloat v[] )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if defined(__i386__)
 | 
			
		||||
#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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -374,13 +376,10 @@ void gl_update_clipmask( GLcontext *ctx )
 | 
			
		||||
 | 
			
		||||
   if (ctx->Visual->RGBAflag) 
 | 
			
		||||
   {
 | 
			
		||||
      if (ctx->Light.ShadeModel==GL_SMOOTH) 
 | 
			
		||||
      {
 | 
			
		||||
	 mask |= CLIP_RGBA0;
 | 
			
		||||
      mask |= CLIP_RGBA0;
 | 
			
		||||
      
 | 
			
		||||
	 if (ctx->TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_SEPERATE_SPECULAR))
 | 
			
		||||
	    mask |= CLIP_RGBA1;
 | 
			
		||||
      }
 | 
			
		||||
      if (ctx->TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_SEPERATE_SPECULAR))
 | 
			
		||||
         mask |= CLIP_RGBA1;
 | 
			
		||||
 | 
			
		||||
      if (ctx->Texture.ReallyEnabled & 0xf0)
 | 
			
		||||
	 mask |= CLIP_TEX1|CLIP_TEX0;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: depth.c,v 1.9 1999/11/11 01:22:26 brianp Exp $ */
 | 
			
		||||
/* $Id: depth.c,v 1.8.2.4 2000/04/11 20:40:44 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.2
 | 
			
		||||
 * 
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -24,14 +24,28 @@
 | 
			
		||||
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* $XFree86: xc/lib/GL/mesa/src/depth.c,v 1.3 1999/04/04 00:20:22 dawes Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Depth buffer functions
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 | 
			
		||||
#ifdef PC_HEADER
 | 
			
		||||
#include "all.h"
 | 
			
		||||
#else
 | 
			
		||||
#include "glheader.h"
 | 
			
		||||
#ifndef XFree86Server
 | 
			
		||||
#include <stdio.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#else
 | 
			
		||||
#include "GL/xf86glx.h"
 | 
			
		||||
#endif
 | 
			
		||||
#include "context.h"
 | 
			
		||||
#include "enums.h"
 | 
			
		||||
#include "depth.h"
 | 
			
		||||
#include "mem.h"
 | 
			
		||||
#include "macros.h"
 | 
			
		||||
#include "types.h"
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
@@ -43,10 +57,8 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_mesa_ClearDepth( GLclampd depth )
 | 
			
		||||
void gl_ClearDepth( GLcontext* ctx, GLclampd depth )
 | 
			
		||||
{
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glClearDepth");
 | 
			
		||||
   ctx->Depth.Clear = (GLfloat) CLAMP( depth, 0.0, 1.0 );
 | 
			
		||||
   if (ctx->Driver.ClearDepth)
 | 
			
		||||
@@ -55,10 +67,8 @@ _mesa_ClearDepth( GLclampd depth )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_mesa_DepthFunc( GLenum func )
 | 
			
		||||
void gl_DepthFunc( GLcontext* ctx, GLenum func )
 | 
			
		||||
{
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glDepthFunc");
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
 | 
			
		||||
@@ -98,10 +108,8 @@ _mesa_DepthFunc( GLenum func )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
_mesa_DepthMask( GLboolean flag )
 | 
			
		||||
void gl_DepthMask( GLcontext* ctx, GLboolean flag )
 | 
			
		||||
{
 | 
			
		||||
   GET_CURRENT_CONTEXT(ctx);
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glDepthMask");
 | 
			
		||||
 | 
			
		||||
   if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
 | 
			
		||||
@@ -741,21 +749,48 @@ void gl_depth_test_pixels_greater( GLcontext* ctx,
 | 
			
		||||
void gl_read_depth_span_float( GLcontext* ctx,
 | 
			
		||||
                               GLuint n, GLint x, GLint y, GLfloat depth[] )
 | 
			
		||||
{
 | 
			
		||||
   GLdepth *zptr;
 | 
			
		||||
   GLfloat scale;
 | 
			
		||||
   GLuint i;
 | 
			
		||||
 | 
			
		||||
   scale = 1.0F / DEPTH_SCALE;
 | 
			
		||||
 | 
			
		||||
   if (ctx->Buffer->Depth) {
 | 
			
		||||
      zptr = Z_ADDRESS( ctx, x, y );
 | 
			
		||||
   if (!ctx->Buffer->Depth) {
 | 
			
		||||
      GLint i;
 | 
			
		||||
      for (i=0;i<n;i++) {
 | 
			
		||||
	 depth[i] = (GLfloat) zptr[i] * scale;
 | 
			
		||||
	 depth[i] = 0.0F;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      for (i=0;i<n;i++) {
 | 
			
		||||
	 depth[i] = 0.0F;
 | 
			
		||||
      const GLfloat scale = 1.0F / DEPTH_SCALE;
 | 
			
		||||
      GLint count = (GLint) n;
 | 
			
		||||
      GLint i;
 | 
			
		||||
      GLdepth *zptr;
 | 
			
		||||
 | 
			
		||||
      if (y < 0 || y >= ctx->Buffer->Height ||
 | 
			
		||||
          x >= ctx->Buffer->Width || x + count < 0) {
 | 
			
		||||
         /* completely outside frame buffer */
 | 
			
		||||
         for (i = 0; i < count; i++)
 | 
			
		||||
            depth[i] = 0.0F;
 | 
			
		||||
         return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (x < 0) {
 | 
			
		||||
         GLint dx = -x;
 | 
			
		||||
         for (i = 0; i < dx; i++)
 | 
			
		||||
            depth[i] = 0.0F;
 | 
			
		||||
         x = 0;
 | 
			
		||||
         depth += dx;
 | 
			
		||||
         count -= dx;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (x + count > ctx->Buffer->Width) {
 | 
			
		||||
         GLint dx = x + count - ctx->Buffer->Width;
 | 
			
		||||
         for (i = 0; i < dx; i++)
 | 
			
		||||
            depth[count - dx - 1] = 0;
 | 
			
		||||
         count -= dx;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (count <= 0)
 | 
			
		||||
         return;
 | 
			
		||||
 | 
			
		||||
      zptr = Z_ADDRESS( ctx, x, y );
 | 
			
		||||
      for (i=0;i<count;i++) {
 | 
			
		||||
         depth[i] = (GLfloat) zptr[i] * scale;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
@@ -772,16 +807,45 @@ void gl_read_depth_span_float( GLcontext* ctx,
 | 
			
		||||
void gl_read_depth_span_int( GLcontext* ctx,
 | 
			
		||||
                             GLuint n, GLint x, GLint y, GLdepth depth[] )
 | 
			
		||||
{
 | 
			
		||||
   if (ctx->Buffer->Depth) {
 | 
			
		||||
      GLdepth *zptr = Z_ADDRESS( ctx, x, y );
 | 
			
		||||
      MEMCPY( depth, zptr, n * sizeof(GLdepth) );
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
   if (!ctx->Buffer->Depth) {
 | 
			
		||||
      GLuint i;
 | 
			
		||||
      for (i=0;i<n;i++) {
 | 
			
		||||
	 depth[i] = 0;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
   else {
 | 
			
		||||
      GLint count = (GLint) n;
 | 
			
		||||
      GLdepth *zptr;
 | 
			
		||||
      GLint i;
 | 
			
		||||
 | 
			
		||||
      if (y < 0 || y >= ctx->Buffer->Height ||
 | 
			
		||||
          x >= ctx->Buffer->Width || x + count < 0) {
 | 
			
		||||
         /* completely outside frame buffer */
 | 
			
		||||
         for (i = 0; i < count; i++)
 | 
			
		||||
            depth[i] = 0;
 | 
			
		||||
         return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (x < 0) {
 | 
			
		||||
         GLint dx = -x;
 | 
			
		||||
         for (i = 0; i < dx; i++)
 | 
			
		||||
            depth[i] = 0;
 | 
			
		||||
         x = 0;
 | 
			
		||||
         depth += dx;
 | 
			
		||||
         count -= dx;
 | 
			
		||||
      }
 | 
			
		||||
      if (x + count > ctx->Buffer->Width) {
 | 
			
		||||
         GLint dx = x + count - ctx->Buffer->Width;
 | 
			
		||||
         for (i = 0; i < dx; i++)
 | 
			
		||||
            depth[count - dx - 1] = 0;
 | 
			
		||||
         count -= dx;
 | 
			
		||||
      }
 | 
			
		||||
      if (count <= 0)
 | 
			
		||||
         return;
 | 
			
		||||
 | 
			
		||||
      zptr = Z_ADDRESS( ctx, x, y );
 | 
			
		||||
      MEMCPY( depth, zptr, count * sizeof(GLdepth) );
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -853,9 +917,14 @@ void gl_clear_depth_buffer( GLcontext* ctx )
 | 
			
		||||
   else {
 | 
			
		||||
      /* clear whole buffer */
 | 
			
		||||
      if (sizeof(GLdepth)==2 && (clear_value&0xff)==(clear_value>>8)) {
 | 
			
		||||
         /* lower and upper bytes of clear_value are same, use MEMSET */
 | 
			
		||||
         MEMSET( ctx->Buffer->Depth, clear_value&0xff,
 | 
			
		||||
                 2*ctx->Buffer->Width*ctx->Buffer->Height);
 | 
			
		||||
         if (clear_value == 0) {
 | 
			
		||||
            BZERO(ctx->Buffer->Depth, 2*ctx->Buffer->Width*ctx->Buffer->Height);
 | 
			
		||||
         }
 | 
			
		||||
         else {
 | 
			
		||||
            /* lower and upper bytes of clear_value are same, use MEMSET */
 | 
			
		||||
            MEMSET( ctx->Buffer->Depth, clear_value&0xff,
 | 
			
		||||
                    2*ctx->Buffer->Width*ctx->Buffer->Height);
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
      else {
 | 
			
		||||
         GLdepth *d = ctx->Buffer->Depth;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: drawpix.c,v 1.5.2.2 2000/02/22 18:10:43 brianp Exp $ */
 | 
			
		||||
/* $Id: drawpix.c,v 1.5.2.3 2000/04/15 03:18:44 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -117,7 +117,7 @@ GLboolean gl_direct_DrawPixels( GLcontext *ctx,
 | 
			
		||||
      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;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: get.c,v 1.5.2.7 2000/03/23 00:14:02 brianp Exp $ */
 | 
			
		||||
/* $Id: get.c,v 1.5.2.8 2000/04/24 12:34:34 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -3795,7 +3795,7 @@ const GLubyte *gl_GetString( GLcontext *ctx, GLenum name )
 | 
			
		||||
{
 | 
			
		||||
   static char result[1000];
 | 
			
		||||
   static char *vendor = "Brian Paul";
 | 
			
		||||
   static char *version = "1.2 Mesa 3.2 beta 1";
 | 
			
		||||
   static char *version = "1.2 Mesa 3.2";
 | 
			
		||||
 | 
			
		||||
   ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH_WITH_RETVAL(ctx, "glGetString", 0);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: image.c,v 1.13.2.1 2000/01/05 09:18:35 brianp Exp $ */
 | 
			
		||||
/* $Id: image.c,v 1.13.2.2 2000/04/15 03:18:44 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
@@ -2677,7 +2677,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4],
 | 
			
		||||
{
 | 
			
		||||
   GLint redIndex, greenIndex, blueIndex, alphaIndex;
 | 
			
		||||
   GLint stride;
 | 
			
		||||
   GLint rComp, bComp, gComp, aComp;
 | 
			
		||||
   GLint rComp = 0, bComp = 0, gComp = 0, aComp = 0;
 | 
			
		||||
 | 
			
		||||
   if (0)
 | 
			
		||||
   {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
/* $Id: macros.h,v 1.7 1999/11/11 01:22:27 brianp Exp $ */
 | 
			
		||||
/* $Id: macros.h,v 1.6.2.3 2000/04/04 00:52:28 brianp Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Mesa 3-D graphics library
 | 
			
		||||
 * Version:  3.3
 | 
			
		||||
 * Version:  3.2
 | 
			
		||||
 * 
 | 
			
		||||
 * 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"),
 | 
			
		||||
@@ -25,6 +25,9 @@
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * A collection of useful macros.
 | 
			
		||||
 */
 | 
			
		||||
@@ -33,8 +36,13 @@
 | 
			
		||||
#ifndef MACROS_H
 | 
			
		||||
#define MACROS_H
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include "glheader.h"
 | 
			
		||||
#ifndef XFree86Server
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
#include <math.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
#else
 | 
			
		||||
#include <GL/glx_ansic.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
@@ -157,26 +165,26 @@ do {						\
 | 
			
		||||
 | 
			
		||||
#define ACC_4V( DST, SRC )			\
 | 
			
		||||
do {						\
 | 
			
		||||
      (DST)[0] += (SRC)[0];			\
 | 
			
		||||
      (DST)[1] += (SRC)[1];			\
 | 
			
		||||
      (DST)[2] += (SRC)[2];			\
 | 
			
		||||
      (DST)[3] += (SRC)[3];			\
 | 
			
		||||
      (DST)[0] += (SRC)[0];				\
 | 
			
		||||
      (DST)[1] += (SRC)[1];				\
 | 
			
		||||
      (DST)[2] += (SRC)[2];				\
 | 
			
		||||
      (DST)[3] += (SRC)[3];				\
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define ACC_SCALE_4V( DST, SRCA, SRCB )		\
 | 
			
		||||
do {						\
 | 
			
		||||
      (DST)[0] += (SRCA)[0] * (SRCB)[0];	\
 | 
			
		||||
      (DST)[1] += (SRCA)[1] * (SRCB)[1];	\
 | 
			
		||||
      (DST)[2] += (SRCA)[2] * (SRCB)[2];	\
 | 
			
		||||
      (DST)[3] += (SRCA)[3] * (SRCB)[3];	\
 | 
			
		||||
      (DST)[0] += (SRCA)[0] * (SRCB)[0];		\
 | 
			
		||||
      (DST)[1] += (SRCA)[1] * (SRCB)[1];		\
 | 
			
		||||
      (DST)[2] += (SRCA)[2] * (SRCB)[2];		\
 | 
			
		||||
      (DST)[3] += (SRCA)[3] * (SRCB)[3];		\
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define ACC_SCALE_SCALAR_4V( DST, S, SRCB )	\
 | 
			
		||||
do {						\
 | 
			
		||||
      (DST)[0] += S * (SRCB)[0];		\
 | 
			
		||||
      (DST)[1] += S * (SRCB)[1];		\
 | 
			
		||||
      (DST)[2] += S * (SRCB)[2];		\
 | 
			
		||||
      (DST)[3] += S * (SRCB)[3];		\
 | 
			
		||||
      (DST)[0] += S * (SRCB)[0];			\
 | 
			
		||||
      (DST)[1] += S * (SRCB)[1];			\
 | 
			
		||||
      (DST)[2] += S * (SRCB)[2];			\
 | 
			
		||||
      (DST)[3] += S * (SRCB)[3];			\
 | 
			
		||||
} while (0)
 | 
			
		||||
 | 
			
		||||
#define SCALE_SCALAR_4V( DST, S, SRCB )		\
 | 
			
		||||
@@ -472,6 +480,80 @@ do {						\
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Memory allocation
 | 
			
		||||
 * XXX these should probably go into a new glmemory.h file.
 | 
			
		||||
 */
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
extern void *gl_malloc(size_t bytes);
 | 
			
		||||
extern void *gl_calloc(size_t bytes);
 | 
			
		||||
extern void gl_free(void *ptr);
 | 
			
		||||
#define MALLOC(BYTES)      gl_malloc(BYTES)
 | 
			
		||||
#define CALLOC(BYTES)      gl_calloc(BYTES)
 | 
			
		||||
#define MALLOC_STRUCT(T)   (struct T *) gl_malloc(sizeof(struct T))
 | 
			
		||||
#define CALLOC_STRUCT(T)   (struct T *) gl_calloc(sizeof(struct T))
 | 
			
		||||
#define FREE(PTR)          gl_free(PTR)
 | 
			
		||||
#else
 | 
			
		||||
#define MALLOC(BYTES)      (void *) malloc(BYTES)
 | 
			
		||||
#define CALLOC(BYTES)      (void *) calloc(1, BYTES)
 | 
			
		||||
#define MALLOC_STRUCT(T)   (struct T *) malloc(sizeof(struct T))
 | 
			
		||||
#define CALLOC_STRUCT(T)   (struct T *) calloc(1,sizeof(struct T))
 | 
			
		||||
#define FREE(PTR)          free(PTR)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Memory copy: */
 | 
			
		||||
#ifdef SUNOS4
 | 
			
		||||
#define MEMCPY( DST, SRC, BYTES) \
 | 
			
		||||
	memcpy( (char *) (DST), (char *) (SRC), (int) (BYTES) )
 | 
			
		||||
#else
 | 
			
		||||
#define MEMCPY( DST, SRC, BYTES) \
 | 
			
		||||
	memcpy( (void *) (DST), (void *) (SRC), (size_t) (BYTES) )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Memory set: */
 | 
			
		||||
#ifdef SUNOS4
 | 
			
		||||
#define MEMSET( DST, VAL, N ) \
 | 
			
		||||
	memset( (char *) (DST), (int) (VAL), (int) (N) )
 | 
			
		||||
#else
 | 
			
		||||
#define MEMSET( DST, VAL, N ) \
 | 
			
		||||
	memset( (void *) (DST), (int) (VAL), (size_t) (N) )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* On some systems we might want to use bzero() (but is bzero portable?) */
 | 
			
		||||
#if defined(__FreeBSD__)
 | 
			
		||||
#define BZERO( ADDR, N ) \
 | 
			
		||||
	bzero( (void *) (ADDR), (size_t) (N) )
 | 
			
		||||
#else
 | 
			
		||||
#define BZERO( ADDR, N ) \
 | 
			
		||||
	memset( (void *) (ADDR), 0, (size_t) (N) )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* MACs and BeOS don't support static larger than 32kb, so... */
 | 
			
		||||
#if defined(macintosh) && !defined(__MRC__)
 | 
			
		||||
  extern char *AGLAlloc(int size);
 | 
			
		||||
  extern void AGLFree(char* ptr);
 | 
			
		||||
#  define DEFARRAY(TYPE,NAME,SIZE)  			TYPE *NAME = (TYPE*)AGLAlloc(sizeof(TYPE)*(SIZE))
 | 
			
		||||
#  define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2)		TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])AGLAlloc(sizeof(TYPE)*(SIZE1)*(SIZE2))
 | 
			
		||||
#  define CHECKARRAY(NAME,CMD)				do {if (!(NAME)) {CMD;}} while (0) 
 | 
			
		||||
#  define UNDEFARRAY(NAME)          			do {if ((NAME)) {AGLFree((char*)NAME);}  }while (0)
 | 
			
		||||
#elif defined(__BEOS__)
 | 
			
		||||
#  define DEFARRAY(TYPE,NAME,SIZE)  			TYPE *NAME = (TYPE*)malloc(sizeof(TYPE)*(SIZE))
 | 
			
		||||
#  define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2)  		TYPE (*NAME)[SIZE2] = (TYPE(*)[SIZE2])malloc(sizeof(TYPE)*(SIZE1)*(SIZE2))
 | 
			
		||||
#  define CHECKARRAY(NAME,CMD)				do {if (!(NAME)) {CMD;}} while (0)
 | 
			
		||||
#  define UNDEFARRAY(NAME)          			do {if ((NAME)) {free((char*)NAME);}  }while (0)
 | 
			
		||||
#else
 | 
			
		||||
#  define DEFARRAY(TYPE,NAME,SIZE)  			TYPE NAME[SIZE]
 | 
			
		||||
#  define DEFMARRAY(TYPE,NAME,SIZE1,SIZE2)		TYPE NAME[SIZE1][SIZE2]
 | 
			
		||||
#  define CHECKARRAY(NAME,CMD)				do {} while(0)
 | 
			
		||||
#  define UNDEFARRAY(NAME)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Some compilers don't like some of Mesa's const usage */
 | 
			
		||||
#ifdef NO_CONST
 | 
			
		||||
#  define CONST
 | 
			
		||||
 
 | 
			
		||||
@@ -243,10 +243,7 @@
 | 
			
		||||
#endif /* ACK_ASSEMBLER */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#if (defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) \
 | 
			
		||||
 || (defined(linux) || defined(__OS2ELF__)) && defined(__ELF__) \
 | 
			
		||||
 || defined(__FreeBSD__) && __FreeBSD__ >= 3) \
 | 
			
		||||
 || (defined(__NetBSD__) && defined(__ELF__))
 | 
			
		||||
#if defined(__QNX__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || defined(__ELF__) || defined(__GNU__)
 | 
			
		||||
#define GLNAME(a)       a
 | 
			
		||||
#else
 | 
			
		||||
#define GLNAME(a)       CONCAT(_,a)
 | 
			
		||||
@@ -851,6 +848,8 @@
 | 
			
		||||
#define P_XMM6 	xmm6
 | 
			
		||||
#define P_XMM7 	xmm7
 | 
			
		||||
 | 
			
		||||
#define	CONCAT(x, y)	x ## y
 | 
			
		||||
 | 
			
		||||
#if defined(NASM_ASSEMBLER)
 | 
			
		||||
 | 
			
		||||
#define ST(n) st ## n
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user