aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Hughes <[email protected]>2001-03-12 00:48:37 +0000
committerGareth Hughes <[email protected]>2001-03-12 00:48:37 +0000
commit22144ab7552f0799bcfca506bf4ffa7f70a06649 (patch)
treee7986aa02e97d88071b0769dc8d5359860320614
parent57ffddba9870a0e602ae454e13072a0af48fa150 (diff)
Consistent copyright info (version number, date) across all files.
-rw-r--r--src/mesa/array_cache/ac_context.c10
-rw-r--r--src/mesa/array_cache/ac_context.h9
-rw-r--r--src/mesa/array_cache/ac_import.c111
-rw-r--r--src/mesa/array_cache/acache.h40
-rw-r--r--src/mesa/drivers/common/t_dd.c29
-rw-r--r--src/mesa/drivers/common/t_dd_dmatmp.h147
-rw-r--r--src/mesa/drivers/common/t_dd_rendertmp.h39
-rw-r--r--src/mesa/drivers/common/t_dd_tritmp.h123
-rw-r--r--src/mesa/drivers/common/t_dd_unfilled.h91
-rw-r--r--src/mesa/drivers/common/t_dd_vb.c40
-rw-r--r--src/mesa/drivers/common/t_dd_vbtmp.h174
-rw-r--r--src/mesa/drivers/common/t_dd_vertex.h8
-rw-r--r--src/mesa/glapi/glapi.c6
-rw-r--r--src/mesa/glapi/glapitemp.h18
-rw-r--r--src/mesa/glapi/glthread.c24
-rw-r--r--src/mesa/glapi/glthread.h7
-rw-r--r--src/mesa/main/accum.c4
-rw-r--r--src/mesa/main/accum.h6
-rw-r--r--src/mesa/main/api_arrayelt.c48
-rw-r--r--src/mesa/main/api_loopback.c56
-rw-r--r--src/mesa/main/api_loopback.h30
-rw-r--r--src/mesa/main/api_noop.h41
-rw-r--r--src/mesa/main/api_validate.c34
-rw-r--r--src/mesa/main/api_validate.h12
-rw-r--r--src/mesa/main/attrib.c5
-rw-r--r--src/mesa/main/attrib.h6
-rw-r--r--src/mesa/main/blend.c9
-rw-r--r--src/mesa/main/blend.h4
-rw-r--r--src/mesa/main/buffers.c4
-rw-r--r--src/mesa/main/buffers.h6
-rw-r--r--src/mesa/main/clip.c8
-rw-r--r--src/mesa/main/clip.h6
-rw-r--r--src/mesa/main/colortab.c16
-rw-r--r--src/mesa/main/colortab.h6
-rw-r--r--src/mesa/main/config.h12
-rw-r--r--src/mesa/main/context.h6
-rw-r--r--src/mesa/main/convolve.c7
-rw-r--r--src/mesa/main/dd.h4
-rw-r--r--src/mesa/main/debug.c26
-rw-r--r--src/mesa/main/debug.h26
-rw-r--r--src/mesa/main/depth.c20
-rw-r--r--src/mesa/main/depth.h6
-rw-r--r--src/mesa/main/dispatch.c5
-rw-r--r--src/mesa/main/dlist.c36
-rw-r--r--src/mesa/main/dlist.h6
-rw-r--r--src/mesa/main/drawpix.c5
-rw-r--r--src/mesa/main/drawpix.h6
-rw-r--r--src/mesa/main/enable.c95
-rw-r--r--src/mesa/main/enable.h6
-rw-r--r--src/mesa/main/enums.c10
-rw-r--r--src/mesa/main/enums.h14
-rw-r--r--src/mesa/main/eval.c14
-rw-r--r--src/mesa/main/eval.h6
-rw-r--r--src/mesa/main/extensions.h4
-rw-r--r--src/mesa/main/feedback.c17
-rw-r--r--src/mesa/main/feedback.h7
-rw-r--r--src/mesa/main/fog.c8
-rw-r--r--src/mesa/main/fog.h4
-rw-r--r--src/mesa/main/get.c7
-rw-r--r--src/mesa/main/get.h7
-rw-r--r--src/mesa/main/glheader.h6
-rw-r--r--src/mesa/main/hash.c14
-rw-r--r--src/mesa/main/hash.h14
-rw-r--r--src/mesa/main/hint.c12
-rw-r--r--src/mesa/main/histogram.c6
-rw-r--r--src/mesa/main/histogram.h4
-rw-r--r--src/mesa/main/imports.c4
-rw-r--r--src/mesa/main/imports.h4
-rw-r--r--src/mesa/main/light.c38
-rw-r--r--src/mesa/main/light.h5
-rw-r--r--src/mesa/main/lines.c12
-rw-r--r--src/mesa/main/lines.h6
-rw-r--r--src/mesa/main/macros.h18
-rw-r--r--src/mesa/main/matrix.h4
-rw-r--r--src/mesa/main/pixel.c10
-rw-r--r--src/mesa/main/pixel.h4
-rw-r--r--src/mesa/main/points.c11
-rw-r--r--src/mesa/main/points.h6
-rw-r--r--src/mesa/main/polygon.c4
-rw-r--r--src/mesa/main/polygon.h7
-rw-r--r--src/mesa/main/rastpos.c14
-rw-r--r--src/mesa/main/rastpos.h15
-rw-r--r--src/mesa/main/simple_list.h17
-rw-r--r--src/mesa/main/state.c16
-rw-r--r--src/mesa/main/state.h4
-rw-r--r--src/mesa/main/stencil.c7
-rw-r--r--src/mesa/main/stencil.h6
-rw-r--r--src/mesa/main/teximage.c4
-rw-r--r--src/mesa/main/teximage.h5
-rw-r--r--src/mesa/main/texobj.c9
-rw-r--r--src/mesa/main/texobj.h4
-rw-r--r--src/mesa/main/texstate.h3
-rw-r--r--src/mesa/main/texstore.c3
-rw-r--r--src/mesa/main/texutil.c6
-rw-r--r--src/mesa/main/texutil.h5
-rw-r--r--src/mesa/main/varray.c6
-rw-r--r--src/mesa/main/varray.h6
-rw-r--r--src/mesa/main/vtxfmt.c6
-rw-r--r--src/mesa/main/vtxfmt.h4
-rw-r--r--src/mesa/main/vtxfmt_tmp.h4
-rw-r--r--src/mesa/math/m_clip_tmp.h42
-rw-r--r--src/mesa/math/m_copy_tmp.h6
-rw-r--r--src/mesa/math/m_debug.h4
-rw-r--r--src/mesa/math/m_debug_norm.c6
-rw-r--r--src/mesa/math/m_debug_util.h6
-rw-r--r--src/mesa/math/m_debug_xform.c4
-rw-r--r--src/mesa/math/m_dotprod_tmp.h42
-rw-r--r--src/mesa/math/m_eval.c4
-rw-r--r--src/mesa/math/m_eval.h25
-rw-r--r--src/mesa/math/m_matrix.c172
-rw-r--r--src/mesa/math/m_matrix.h28
-rw-r--r--src/mesa/math/m_norm_tmp.h52
-rw-r--r--src/mesa/math/m_trans_tmp.h20
-rw-r--r--src/mesa/math/m_translate.c39
-rw-r--r--src/mesa/math/m_translate.h10
-rw-r--r--src/mesa/math/m_vector.c54
-rw-r--r--src/mesa/math/m_vector.h48
-rw-r--r--src/mesa/math/m_xform.c4
-rw-r--r--src/mesa/math/m_xform.h46
-rw-r--r--src/mesa/math/m_xform_tmp.h6
-rw-r--r--src/mesa/math/mathmod.h26
-rw-r--r--src/mesa/swrast/s_aaline.c3
-rw-r--r--src/mesa/swrast/s_aaline.h4
-rw-r--r--src/mesa/swrast/s_aalinetemp.h12
-rw-r--r--src/mesa/swrast/s_aatriangle.c10
-rw-r--r--src/mesa/swrast/s_aatriangle.h6
-rw-r--r--src/mesa/swrast/s_aatritemp.h26
-rw-r--r--src/mesa/swrast/s_accum.c24
-rw-r--r--src/mesa/swrast/s_accum.h6
-rw-r--r--src/mesa/swrast/s_alpha.c16
-rw-r--r--src/mesa/swrast/s_alpha.h6
-rw-r--r--src/mesa/swrast/s_alphabuf.c15
-rw-r--r--src/mesa/swrast/s_alphabuf.h5
-rw-r--r--src/mesa/swrast/s_bitmap.c17
-rw-r--r--src/mesa/swrast/s_blend.c18
-rw-r--r--src/mesa/swrast/s_blend.h4
-rw-r--r--src/mesa/swrast/s_buffers.c18
-rw-r--r--src/mesa/swrast/s_context.c16
-rw-r--r--src/mesa/swrast/s_context.h4
-rw-r--r--src/mesa/swrast/s_copypix.c18
-rw-r--r--src/mesa/swrast/s_depth.c14
-rw-r--r--src/mesa/swrast/s_depth.h6
-rw-r--r--src/mesa/swrast/s_drawpix.c21
-rw-r--r--src/mesa/swrast/s_drawpix.h6
-rw-r--r--src/mesa/swrast/s_feedback.c17
-rw-r--r--src/mesa/swrast/s_feedback.h7
-rw-r--r--src/mesa/swrast/s_fog.c25
-rw-r--r--src/mesa/swrast/s_fog.h4
-rw-r--r--src/mesa/swrast/s_lines.c12
-rw-r--r--src/mesa/swrast/s_lines.h8
-rw-r--r--src/mesa/swrast/s_linetemp.h16
-rw-r--r--src/mesa/swrast/s_logic.c12
-rw-r--r--src/mesa/swrast/s_logic.h4
-rw-r--r--src/mesa/swrast/s_masking.c13
-rw-r--r--src/mesa/swrast/s_masking.h5
-rw-r--r--src/mesa/swrast/s_pixeltex.c12
-rw-r--r--src/mesa/swrast/s_pixeltex.h6
-rw-r--r--src/mesa/swrast/s_points.c15
-rw-r--r--src/mesa/swrast/s_points.h8
-rw-r--r--src/mesa/swrast/s_pointtemp.h12
-rw-r--r--src/mesa/swrast/s_readpix.c12
-rw-r--r--src/mesa/swrast/s_span.c52
-rw-r--r--src/mesa/swrast/s_span.h4
-rw-r--r--src/mesa/swrast/s_stencil.c23
-rw-r--r--src/mesa/swrast/s_stencil.h6
-rw-r--r--src/mesa/swrast/s_texture.h3
-rw-r--r--src/mesa/swrast/s_triangle.c62
-rw-r--r--src/mesa/swrast/s_triangle.h11
-rw-r--r--src/mesa/swrast/s_tritemp.h32
-rw-r--r--src/mesa/swrast/s_zoom.c18
-rw-r--r--src/mesa/swrast/s_zoom.h4
-rw-r--r--src/mesa/swrast/swrast.h4
-rw-r--r--src/mesa/swrast_setup/ss_context.c59
-rw-r--r--src/mesa/swrast_setup/ss_context.h8
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c45
-rw-r--r--src/mesa/swrast_setup/ss_triangle.h4
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h35
-rw-r--r--src/mesa/swrast_setup/ss_vb.c23
-rw-r--r--src/mesa/swrast_setup/ss_vb.h4
-rw-r--r--src/mesa/swrast_setup/ss_vbtmp.h36
-rw-r--r--src/mesa/swrast_setup/swrast_setup.h44
-rw-r--r--src/mesa/tnl/t_array_api.c50
-rw-r--r--src/mesa/tnl/t_array_api.h4
-rw-r--r--src/mesa/tnl/t_array_import.c142
-rw-r--r--src/mesa/tnl/t_array_import.h4
-rw-r--r--src/mesa/tnl/t_context.c6
-rw-r--r--src/mesa/tnl/t_context.h62
-rw-r--r--src/mesa/tnl/t_eval_api.c12
-rw-r--r--src/mesa/tnl/t_eval_api.h6
-rw-r--r--src/mesa/tnl/t_imm_alloc.c11
-rw-r--r--src/mesa/tnl/t_imm_alloc.h4
-rw-r--r--src/mesa/tnl/t_imm_api.c103
-rw-r--r--src/mesa/tnl/t_imm_api.h12
-rw-r--r--src/mesa/tnl/t_imm_debug.c29
-rw-r--r--src/mesa/tnl/t_imm_debug.h28
-rw-r--r--src/mesa/tnl/t_imm_dlist.c71
-rw-r--r--src/mesa/tnl/t_imm_dlist.h8
-rw-r--r--src/mesa/tnl/t_imm_elt.c44
-rw-r--r--src/mesa/tnl/t_imm_elt.h8
-rw-r--r--src/mesa/tnl/t_imm_eval.c71
-rw-r--r--src/mesa/tnl/t_imm_eval.h4
-rw-r--r--src/mesa/tnl/t_imm_exec.c82
-rw-r--r--src/mesa/tnl/t_imm_exec.h8
-rw-r--r--src/mesa/tnl/t_imm_fixup.c90
-rw-r--r--src/mesa/tnl/t_imm_fixup.h8
-rw-r--r--src/mesa/tnl/t_pipeline.c47
-rw-r--r--src/mesa/tnl/t_pipeline.h23
-rw-r--r--src/mesa/tnl/t_vb_cliptmp.h18
-rw-r--r--src/mesa/tnl/t_vb_fog.c24
-rw-r--r--src/mesa/tnl/t_vb_light.c41
-rw-r--r--src/mesa/tnl/t_vb_lighttmp.h188
-rw-r--r--src/mesa/tnl/t_vb_normals.c27
-rw-r--r--src/mesa/tnl/t_vb_points.c16
-rw-r--r--src/mesa/tnl/t_vb_render.c42
-rw-r--r--src/mesa/tnl/t_vb_rendertmp.h39
-rw-r--r--src/mesa/tnl/t_vb_texgen.c150
-rw-r--r--src/mesa/tnl/t_vb_texmat.c30
-rw-r--r--src/mesa/tnl/t_vb_vertex.c74
-rw-r--r--src/mesa/tnl/tnl.h4
219 files changed, 2614 insertions, 2434 deletions
diff --git a/src/mesa/array_cache/ac_context.c b/src/mesa/array_cache/ac_context.c
index 5f3115baef1..2e114140794 100644
--- a/src/mesa/array_cache/ac_context.c
+++ b/src/mesa/array_cache/ac_context.c
@@ -1,10 +1,10 @@
-/* $Id: ac_context.c,v 1.2 2001/02/04 00:47:28 keithw Exp $ */
+/* $Id: ac_context.c,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -40,7 +40,7 @@ static void _ac_fallbacks_init( GLcontext *ctx )
ACcontext *ac = AC_CONTEXT(ctx);
struct gl_client_array *cl;
GLuint i;
-
+
cl = &ac->Fallback.Normal;
cl->Size = 3;
cl->Type = GL_FLOAT;
@@ -243,7 +243,7 @@ void _ac_DestroyContext( GLcontext *ctx )
if (ac->Cache.FogCoord.Ptr) FREE( ac->Cache.FogCoord.Ptr );
for (i = 0; i < MAX_TEXTURE_UNITS; i++) {
- if (ac->Cache.TexCoord[i].Ptr)
+ if (ac->Cache.TexCoord[i].Ptr)
FREE( ac->Cache.TexCoord[i].Ptr );
}
diff --git a/src/mesa/array_cache/ac_context.h b/src/mesa/array_cache/ac_context.h
index 986c9b8e234..18a639b3f83 100644
--- a/src/mesa/array_cache/ac_context.h
+++ b/src/mesa/array_cache/ac_context.h
@@ -1,11 +1,10 @@
-
-/* $Id: ac_context.h,v 1.2 2001/02/04 00:47:28 keithw Exp $ */
+/* $Id: ac_context.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -24,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -85,7 +84,7 @@ typedef struct {
struct ac_array_flags IsCached;
GLuint start;
GLuint count;
-
+
/* Facility for importing element lists:
*/
GLuint *Elts;
diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c
index 863f304da39..3ffcdd6fed6 100644
--- a/src/mesa/array_cache/ac_import.c
+++ b/src/mesa/array_cache/ac_import.c
@@ -1,4 +1,4 @@
-/* $Id: ac_import.c,v 1.8 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: ac_import.c,v 1.9 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -35,7 +35,7 @@
#include "math/m_translate.h"
#include "array_cache/ac_context.h"
-#include "math/m_translate.h"
+#include "math/m_translate.h"
#define STRIDE_ARRAY( array, offset ) \
do { \
@@ -59,7 +59,7 @@ static void reset_texcoord( GLcontext *ctx, GLuint unit )
else {
ac->Raw.TexCoord[unit] = ac->Fallback.TexCoord[unit];
- if (ctx->Current.Texcoord[unit][3] != 1.0)
+ if (ctx->Current.Texcoord[unit][3] != 1.0)
ac->Raw.TexCoord[unit].Size = 4;
else if (ctx->Current.Texcoord[unit][2] != 0.0)
ac->Raw.TexCoord[unit].Size = 3;
@@ -108,7 +108,7 @@ static void reset_color( GLcontext *ctx )
ac->Raw.Color = ctx->Array.Color;
STRIDE_ARRAY(ac->Raw.Color, ac->start);
}
- else
+ else
ac->Raw.Color = ac->Fallback.Color;
ac->IsCached.Color = GL_FALSE;
@@ -124,7 +124,7 @@ static void reset_secondarycolor( GLcontext *ctx )
ac->Raw.SecondaryColor = ctx->Array.SecondaryColor;
STRIDE_ARRAY(ac->Raw.SecondaryColor, ac->start);
}
- else
+ else
ac->Raw.SecondaryColor = ac->Fallback.SecondaryColor;
ac->IsCached.SecondaryColor = GL_FALSE;
@@ -140,7 +140,7 @@ static void reset_index( GLcontext *ctx )
ac->Raw.Index = ctx->Array.Index;
STRIDE_ARRAY(ac->Raw.Index, ac->start);
}
- else
+ else
ac->Raw.Index = ac->Fallback.Index;
ac->IsCached.Index = GL_FALSE;
@@ -155,7 +155,7 @@ static void reset_fogcoord( GLcontext *ctx )
ac->Raw.FogCoord = ctx->Array.FogCoord;
STRIDE_ARRAY(ac->Raw.FogCoord, ac->start);
}
- else
+ else
ac->Raw.FogCoord = ac->Fallback.FogCoord;
ac->IsCached.FogCoord = GL_FALSE;
@@ -170,7 +170,7 @@ static void reset_edgeflag( GLcontext *ctx )
ac->Raw.EdgeFlag = ctx->Array.EdgeFlag;
STRIDE_ARRAY(ac->Raw.EdgeFlag, ac->start);
}
- else
+ else
ac->Raw.EdgeFlag = ac->Fallback.EdgeFlag;
ac->IsCached.EdgeFlag = GL_FALSE;
@@ -192,13 +192,13 @@ static void import_texcoord( GLcontext *ctx, GLuint unit,
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
-
+
_math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
from->Size,
- ac->start,
+ ac->start,
ac->count);
to->Size = from->Size;
@@ -224,7 +224,7 @@ static void import_vertex( GLcontext *ctx,
from->StrideB,
from->Type,
from->Size,
- 0,
+ 0,
ac->count - ac->start);
to->Size = from->Size;
@@ -249,7 +249,7 @@ static void import_normal( GLcontext *ctx,
from->Ptr,
from->StrideB,
from->Type,
- 0,
+ 0,
ac->count - ac->start);
to->StrideB = 3 * sizeof(GLfloat);
@@ -275,7 +275,7 @@ static void import_color( GLcontext *ctx,
from->StrideB,
from->Type,
from->Size,
- 0,
+ 0,
ac->count - ac->start);
to->Size = from->Size;
@@ -300,7 +300,7 @@ static void import_index( GLcontext *ctx,
from->Ptr,
from->StrideB,
from->Type,
- 0,
+ 0,
ac->count - ac->start);
to->StrideB = sizeof(GLuint);
@@ -325,7 +325,7 @@ static void import_secondarycolor( GLcontext *ctx,
from->StrideB,
from->Type,
from->Size,
- 0,
+ 0,
ac->count - ac->start);
to->StrideB = 4 * sizeof(GLchan);
@@ -349,9 +349,9 @@ static void import_fogcoord( GLcontext *ctx,
from->Ptr,
from->StrideB,
from->Type,
- 0,
+ 0,
ac->count - ac->start);
-
+
to->StrideB = sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.FogCoord = GL_TRUE;
@@ -373,9 +373,9 @@ static void import_edgeflag( GLcontext *ctx,
from->Ptr,
from->StrideB,
from->Type,
- 0,
+ 0,
ac->count - ac->start);
-
+
to->StrideB = sizeof(GLfloat);
to->Type = GL_FLOAT;
ac->IsCached.EdgeFlag = GL_TRUE;
@@ -385,10 +385,10 @@ static void import_edgeflag( GLcontext *ctx,
/* Externals to request arrays with specific properties:
*/
-struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
+struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
GLuint unit,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
@@ -409,7 +409,7 @@ struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
*/
if (ac->Raw.TexCoord[unit].Type != type ||
(reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.TexCoord[unit])
import_texcoord(ctx, unit, type, reqstride );
@@ -422,9 +422,9 @@ struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
}
}
-struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
+struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
@@ -445,7 +445,7 @@ struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
*/
if (ac->Raw.Vertex.Type != type ||
(reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.Vertex)
import_vertex(ctx, type, reqstride );
@@ -458,9 +458,9 @@ struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
}
}
-struct gl_client_array *_ac_import_normal( GLcontext *ctx,
+struct gl_client_array *_ac_import_normal( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
@@ -468,14 +468,14 @@ struct gl_client_array *_ac_import_normal( GLcontext *ctx,
/* Can we keep the existing version?
*/
- if (ac->NewArrayState & _NEW_ARRAY_NORMAL)
+ if (ac->NewArrayState & _NEW_ARRAY_NORMAL)
reset_normal( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Normal.Type != type ||
(reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.Normal)
import_normal(ctx, type, reqstride );
@@ -488,9 +488,9 @@ struct gl_client_array *_ac_import_normal( GLcontext *ctx,
}
}
-struct gl_client_array *_ac_import_color( GLcontext *ctx,
+struct gl_client_array *_ac_import_color( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
@@ -499,7 +499,7 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx,
/* Can we keep the existing version?
*/
- if (ac->NewArrayState & _NEW_ARRAY_COLOR)
+ if (ac->NewArrayState & _NEW_ARRAY_COLOR)
reset_color( ctx );
/* Is the request impossible?
@@ -512,7 +512,7 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx,
*/
if (ac->Raw.Color.Type != type ||
(reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.Color)
import_color(ctx, type, reqstride );
@@ -525,9 +525,9 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx,
}
}
-struct gl_client_array *_ac_import_index( GLcontext *ctx,
+struct gl_client_array *_ac_import_index( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
@@ -535,7 +535,7 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx,
/* Can we keep the existing version?
*/
- if (ac->NewArrayState & _NEW_ARRAY_INDEX)
+ if (ac->NewArrayState & _NEW_ARRAY_INDEX)
reset_index( ctx );
@@ -543,7 +543,7 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx,
*/
if (ac->Raw.Index.Type != type ||
(reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.Index)
import_index(ctx, type, reqstride );
@@ -556,9 +556,9 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx,
}
}
-struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
+struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwriteable,
GLboolean *writeable )
@@ -567,7 +567,7 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
/* Can we keep the existing version?
*/
- if (ac->NewArrayState & _NEW_ARRAY_SECONDARYCOLOR)
+ if (ac->NewArrayState & _NEW_ARRAY_SECONDARYCOLOR)
reset_secondarycolor( ctx );
/* Is the request impossible?
@@ -579,7 +579,7 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
*/
if (ac->Raw.SecondaryColor.Type != type ||
(reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.SecondaryColor)
import_secondarycolor(ctx, type, reqstride );
@@ -592,9 +592,9 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
}
}
-struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
+struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
@@ -602,14 +602,14 @@ struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
/* Can we keep the existing version?
*/
- if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD)
+ if (ac->NewArrayState & _NEW_ARRAY_FOGCOORD)
reset_fogcoord( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.FogCoord.Type != type ||
(reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.FogCoord)
import_fogcoord(ctx, type, reqstride );
@@ -625,9 +625,9 @@ struct gl_client_array *_ac_import_fogcoord( GLcontext *ctx,
-struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
+struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwriteable,
GLboolean *writeable )
{
@@ -635,14 +635,14 @@ struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
/* Can we keep the existing version?
*/
- if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG)
+ if (ac->NewArrayState & _NEW_ARRAY_EDGEFLAG)
reset_edgeflag( ctx );
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.EdgeFlag.Type != type ||
(reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) ||
- reqwriteable)
+ reqwriteable)
{
if (!ac->IsCached.EdgeFlag)
import_edgeflag(ctx, type, reqstride );
@@ -660,7 +660,7 @@ struct gl_client_array *_ac_import_edgeflag( GLcontext *ctx,
/* Clients must call this function to validate state and set bounds
- * before importing any data:
+ * before importing any data:
*/
void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count )
{
@@ -685,7 +685,7 @@ void _ac_import_range( GLcontext *ctx, GLuint start, GLuint count )
* the whole locked range always be dealt with, otherwise hard to
* maintain cached data in the face of clipping.
*/
- ac->NewArrayState |= ~ctx->Array._Enabled;
+ ac->NewArrayState |= ~ctx->Array._Enabled;
ac->start = ctx->Array.LockFirst;
ac->count = ctx->Array.LockCount;
ASSERT(ac->start == start); /* hmm? */
@@ -706,13 +706,13 @@ _ac_import_elements( GLcontext *ctx,
CONST void *indices )
{
ACcontext *ac = AC_CONTEXT(ctx);
-
+
if (old_type == new_type)
return indices;
if (ac->elt_size < count * sizeof(GLuint)) {
if (ac->Elts) FREE(ac->Elts);
- while (ac->elt_size < count * sizeof(GLuint))
+ while (ac->elt_size < count * sizeof(GLuint))
ac->elt_size *= 2;
ac->Elts = (GLuint *) MALLOC(ac->elt_size);
}
@@ -727,7 +727,7 @@ _ac_import_elements( GLcontext *ctx,
case GL_UNSIGNED_INT: {
GLuint *out = (GLuint *)ac->Elts;
GLuint i;
-
+
switch (old_type) {
case GL_UNSIGNED_BYTE: {
CONST GLubyte *in = (CONST GLubyte *)indices;
@@ -754,4 +754,3 @@ _ac_import_elements( GLcontext *ctx,
return 0;
}
-
diff --git a/src/mesa/array_cache/acache.h b/src/mesa/array_cache/acache.h
index 268723954cc..6cb21153546 100644
--- a/src/mesa/array_cache/acache.h
+++ b/src/mesa/array_cache/acache.h
@@ -1,8 +1,10 @@
+/* $Id: acache.h,v 1.2 2001/03/12 00:48:41 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -41,71 +43,71 @@ extern void
_ac_InvalidateState( GLcontext *ctx, GLuint new_state );
extern struct gl_client_array *
-_ac_import_texcoord( GLcontext *ctx,
+_ac_import_texcoord( GLcontext *ctx,
GLuint unit,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
-_ac_import_vertex( GLcontext *ctx,
+_ac_import_vertex( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
-_ac_import_normal( GLcontext *ctx,
+_ac_import_normal( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
-_ac_import_color( GLcontext *ctx,
+_ac_import_color( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
-_ac_import_index( GLcontext *ctx,
+_ac_import_index( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
-_ac_import_secondarycolor( GLcontext *ctx,
+_ac_import_secondarycolor( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLuint reqsize,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
-_ac_import_fogcoord( GLcontext *ctx,
+_ac_import_fogcoord( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
extern struct gl_client_array *
-_ac_import_edgeflag( GLcontext *ctx,
+_ac_import_edgeflag( GLcontext *ctx,
GLenum type,
- GLuint reqstride,
+ GLuint reqstride,
GLboolean reqwritable,
GLboolean *writable );
/* Clients must call this function to validate state and set bounds
- * before importing any data:
+ * before importing any data:
*/
-extern void
+extern void
_ac_import_range( GLcontext *ctx, GLuint start, GLuint count );
diff --git a/src/mesa/drivers/common/t_dd.c b/src/mesa/drivers/common/t_dd.c
index 27db3058755..0926e23603d 100644
--- a/src/mesa/drivers/common/t_dd.c
+++ b/src/mesa/drivers/common/t_dd.c
@@ -1,3 +1,31 @@
+/* $Id: t_dd.c,v 1.2 2001/03/12 00:48:44 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Keith Whitwell <[email protected]>
+ */
static void copy_pv_rgba4_spec5( GLcontext *ctx, GLuint edst, GLuint esrc )
{
@@ -29,4 +57,3 @@ static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc )
i810Vertex *src = (i810Vertex *)(i810verts + (esrc << shift));
dst->ui[3] = src->ui[3];
}
-
diff --git a/src/mesa/drivers/common/t_dd_dmatmp.h b/src/mesa/drivers/common/t_dd_dmatmp.h
index f2a08c02842..db06f0f92c2 100644
--- a/src/mesa/drivers/common/t_dd_dmatmp.h
+++ b/src/mesa/drivers/common/t_dd_dmatmp.h
@@ -1,19 +1,21 @@
+/* $Id: t_dd_dmatmp.h,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -21,39 +23,39 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
/* Template for render stages which build and emit vertices directly
* to fixed-size dma buffers. Useful for rendering strips and other
* native primitives where clipping and per-vertex tweaks such as
- * those in t_dd_tritmp.h are not required.
+ * those in t_dd_tritmp.h are not required.
*
* Produces code for both inline triangles and indexed triangles.
* Where various primitive types are unaccelerated by hardware, the
* code attempts to fallback to other primitive types (quadstrips to
* tristrips, lineloops to linestrips), or to indexed vertices.
* Ultimately, a FALLBACK() macro is invoked if there is no way to
- * render the primitive natively.
+ * render the primitive natively.
*/
#if !defined(HAVE_TRIANGLES)
#error "must have at least triangles to use render template"
#endif
-#if !HAVE_ELTS
+#if !HAVE_ELTS
#define ELTS_VARS
#define ALLOC_ELTS( nr )
#define EMIT_ELT( offset, elt )
#define INCR_ELTS( nr )
-#define ELT_INIT(prim)
+#define ELT_INIT(prim)
#define GET_CURRENT_VB_MAX_ELTS() 0
#define GET_SUBSEQUENT_VB_MAX_ELTS() 0
#define ALLOC_ELTS_NEW_PRIMITIVE(nr)
-#define RELEASE_ELT_VERTS()
-#define EMIT_INDEXED_VERTS( ctx, start, count )
+#define RELEASE_ELT_VERTS()
+#define EMIT_INDEXED_VERTS( ctx, start, count )
#endif
#ifndef EMIT_TWO_ELTS
@@ -63,21 +65,21 @@ do { \
EMIT_ELT( offset+1, elt1 ); \
} while (0)
#endif
-
+
/**********************************************************************/
/* Render whole begin/end objects */
/**********************************************************************/
-static GLboolean TAG(emit_elt_verts)( GLcontext *ctx,
+static GLboolean TAG(emit_elt_verts)( GLcontext *ctx,
GLuint start, GLuint count )
{
if (HAVE_ELTS) {
LOCAL_VARS;
GLuint nr = count - start;
- if ( nr >= GET_SUBSEQUENT_VB_MAX_VERTS() ) /* assumes same packing for
+ if ( nr >= GET_SUBSEQUENT_VB_MAX_VERTS() ) /* assumes same packing for
* indexed and regualar verts
*/
return GL_FALSE;
@@ -99,8 +101,8 @@ static void TAG(emit_elts)( GLcontext *ctx, GLuint *elts, GLuint nr )
ALLOC_ELTS( nr );
- for ( i = 0 ; i < nr ; i+=2, elts += 2 ) {
- EMIT_TWO_ELTS( 0, elts[0], elts[1] );
+ for ( i = 0 ; i < nr ; i+=2, elts += 2 ) {
+ EMIT_TWO_ELTS( 0, elts[0], elts[1] );
INCR_ELTS( 2 );
}
}
@@ -123,12 +125,12 @@ static void TAG(render_points_verts)( GLcontext *ctx,
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
int currentsz = GET_CURRENT_VB_MAX_VERTS();
GLuint j, nr;
-
+
INIT( GL_POINTS );
-
+
if (currentsz < 8)
currentsz = dmasz;
-
+
for (j = start; j < count; j += nr ) {
nr = MIN2( currentsz, count - j );
EMIT_VERTS( ctx, j, nr );
@@ -151,7 +153,7 @@ static void TAG(render_lines_verts)( GLcontext *ctx,
GLuint j, nr;
INIT( GL_LINES );
-
+
/* Emit whole number of lines in total and in each buffer:
*/
count -= (count-start) & 1;
@@ -214,7 +216,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
NEW_PRIMITIVE();
INIT( GL_LINE_STRIP );
- if (flags & PRIM_BEGIN)
+ if (flags & PRIM_BEGIN)
j = start;
else
j = start + 1;
@@ -224,7 +226,7 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
currentsz--;
dmasz--;
- if (currentsz < 8)
+ if (currentsz < 8)
currentsz = dmasz;
for ( ; j < count - 1; j += nr - 1 ) {
@@ -232,8 +234,8 @@ static void TAG(render_line_loop_verts)( GLcontext *ctx,
EMIT_VERTS( ctx, j, nr );
currentsz = dmasz;
}
-
- if (flags & PRIM_END)
+
+ if (flags & PRIM_END)
EMIT_VERTS( ctx, start, 1 );
} else {
@@ -253,7 +255,7 @@ static void TAG(render_triangles_verts)( GLcontext *ctx,
GLuint j, nr;
INIT(GL_TRIANGLES);
-
+
/* Emit whole number of tris in total. dmasz is already a multiple
* of 3.
*/
@@ -281,12 +283,12 @@ static void TAG(render_tri_strip_verts)( GLcontext *ctx,
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
int currentsz;
-
+
INIT(GL_TRIANGLE_STRIP);
NEW_PRIMITIVE();
-
+
currentsz = GET_CURRENT_VB_MAX_VERTS();
-
+
if (currentsz < 8) {
FIRE_VERTICES();
currentsz = dmasz;
@@ -304,7 +306,7 @@ static void TAG(render_tri_strip_verts)( GLcontext *ctx,
*/
dmasz -= (dmasz & 1);
currentsz -= (currentsz & 1);
-
+
for (j = start ; j < count - 2; j += nr - 2 ) {
nr = MIN2( currentsz, count - j );
EMIT_VERTS( ctx, j, nr );
@@ -325,7 +327,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
GLuint j, nr;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
int currentsz = GET_CURRENT_VB_MAX_VERTS();
-
+
NEW_PRIMITIVE();
INIT(GL_TRIANGLE_FAN);
@@ -340,7 +342,7 @@ static void TAG(render_tri_fan_verts)( GLcontext *ctx,
EMIT_VERTS( ctx, j, nr - 1 );
currentsz = dmasz;
}
- }
+ }
else {
/* Could write code to emit these as indexed vertices (for the
* g400, for instance).
@@ -368,14 +370,14 @@ static void TAG(render_poly_verts)( GLcontext *ctx,
FIRE_VERTICES();
currentsz = dmasz;
}
-
+
for (j = start + 1 ; j < count - 1 ; j += nr - 1 ) {
nr = MIN2( currentsz, count - j + 1 );
EMIT_VERTS( ctx, start, 1 );
EMIT_VERTS( ctx, j, nr - 1 );
currentsz = dmasz;
}
- }
+ }
else if (HAVE_TRI_FANS && !(ctx->_TriangleCaps & DD_FLATSHADE)) {
TAG(render_tri_fan_verts)( ctx, start, count, flags );
} else {
@@ -394,7 +396,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
/* TODO.
*/
} else if (HAVE_TRI_STRIPS && ctx->_TriangleCaps & DD_FLATSHADE) {
- if (TAG(emit_elt_verts)( ctx, start, count )) {
+ if (TAG(emit_elt_verts)( ctx, start, count )) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
int currentsz;
@@ -412,7 +414,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
dmasz -= dmasz & 1;
count -= (count-start) & 1;
currentsz -= currentsz & 1;
-
+
if (currentsz < 12)
currentsz = dmasz;
@@ -428,28 +430,28 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
NEW_PRIMITIVE();
ALLOC_ELTS_NEW_PRIMITIVE( quads*6 );
-
+
for ( i = 0 ; i < quads*2 ; i+=2 ) {
EMIT_TWO_ELTS( 0, (i+0), (i+1) );
EMIT_TWO_ELTS( 2, (i+2), (i+1) );
EMIT_TWO_ELTS( 4, (i+3), (i+2) );
INCR_ELTS( 6 );
}
-
+
NEW_PRIMITIVE();
}
currentsz = dmasz;
}
RELEASE_ELT_VERTS();
- }
+ }
else {
/* Vertices won't fit in a single buffer or elts not available,
* VERT_FALLBACK.
*/
VERT_FALLBACK( ctx, start, count, flags );
}
- }
+ }
else if (HAVE_TRI_STRIPS) {
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_VERTS();
@@ -465,7 +467,7 @@ static void TAG(render_quad_strip_verts)( GLcontext *ctx,
dmasz -= dmasz & 1;
currentsz -= currentsz & 1;
count -= (count-start) & 1;
-
+
if (currentsz < 8) {
FIRE_VERTICES();
currentsz = dmasz;
@@ -488,10 +490,10 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
GLuint flags )
{
if (HAVE_QUADS && 0) {
- } else if (TAG(emit_elt_verts)( ctx, start, count )) {
+ } else if (TAG(emit_elt_verts)( ctx, start, count )) {
/* Hardware doesn't have a quad primitive type -- try to
* simulate it using indexed vertices and the triangle
- * primitive:
+ * primitive:
*/
LOCAL_VARS;
int dmasz = GET_SUBSEQUENT_VB_MAX_ELTS();
@@ -532,14 +534,14 @@ static void TAG(render_quads_verts)( GLcontext *ctx,
EMIT_TWO_ELTS( 4, (i+2), (i+3) );
INCR_ELTS( 6 );
}
-
+
NEW_PRIMITIVE();
}
currentsz = dmasz;
}
-
+
RELEASE_ELT_VERTS();
- }
+ }
else {
/* Vertices won't fit in a single buffer, fallback.
*/
@@ -557,7 +559,7 @@ static void TAG(render_noop)( GLcontext *ctx,
-static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
+static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
{
TAG(render_points_verts),
TAG(render_lines_verts),
@@ -577,7 +579,7 @@ static render_func TAG(render_tab_verts)[GL_POLYGON+2] =
* Render elts using hardware indexed verts *
****************************************************************************/
-#if (HAVE_ELTS)
+#if (HAVE_ELTS)
static void TAG(render_points_elts)( GLcontext *ctx,
GLuint start,
GLuint count,
@@ -589,9 +591,9 @@ static void TAG(render_points_elts)( GLcontext *ctx,
int currentsz;
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
GLuint j, nr;
-
+
ELT_INIT( GL_POINTS );
-
+
currentsz = GET_CURRENT_VB_MAX_ELTS();
if (currentsz < 8)
currentsz = dmasz;
@@ -689,34 +691,34 @@ static void TAG(render_line_loop_elts)( GLcontext *ctx,
int currentsz;
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
GLuint j, nr;
-
+
NEW_PRIMITIVE();
ELT_INIT( GL_LINE_STRIP );
-
- if (flags & PRIM_BEGIN)
+
+ if (flags & PRIM_BEGIN)
j = start;
else
j = start + 1;
-
+
currentsz = GET_CURRENT_VB_MAX_ELTS();
if (currentsz < 8) {
FIRE_VERTICES();
currentsz = dmasz;
}
-
+
/* Ensure last vertex doesn't wrap:
*/
currentsz--;
dmasz--;
-
+
for ( ; j < count - 1; j += nr - 1 ) {
nr = MIN2( currentsz, count - j );
/* NEW_PRIMITIVE(); */
TAG(emit_elts)( ctx, elts+j, nr );
currentsz = dmasz;
}
-
- if (flags & PRIM_END)
+
+ if (flags & PRIM_END)
TAG(emit_elts)( ctx, elts+start, 1 );
NEW_PRIMITIVE();
@@ -744,7 +746,7 @@ static void TAG(render_triangles_elts)( GLcontext *ctx,
NEW_PRIMITIVE();
ELT_INIT( GL_TRIANGLES );
-
+
currentsz = GET_CURRENT_VB_MAX_ELTS();
/* Emit whole number of tris in total. dmasz is already a multiple
@@ -779,17 +781,17 @@ static void TAG(render_tri_strip_elts)( GLcontext *ctx,
NEW_PRIMITIVE();
ELT_INIT( GL_TRIANGLE_STRIP );
-
+
currentsz = GET_CURRENT_VB_MAX_ELTS();
if (currentsz < 8) {
FIRE_VERTICES();
currentsz = dmasz;
}
-
+
if (flags & PRIM_PARITY) {
TAG(emit_elts)( ctx, elts+start, 1 );
}
-
+
/* Keep the same winding over multiple buffers:
*/
dmasz -= (dmasz & 1);
@@ -882,7 +884,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
GLuint flags )
{
if (HAVE_QUAD_STRIPS && 0) {
- }
+ }
else if (HAVE_TRI_STRIPS) {
LOCAL_VARS;
GLuint *elts = TNL_CONTEXT(ctx)->vb.Elts;
@@ -898,11 +900,11 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
dmasz -= dmasz & 1;
count -= (count-start) & 1;
currentsz -= currentsz & 1;
-
+
if (currentsz < 12)
currentsz = dmasz;
- if (ctx->_TriangleCaps & DD_FLATSHADE) {
+ if (ctx->_TriangleCaps & DD_FLATSHADE) {
ELT_INIT( GL_TRIANGLES );
currentsz = currentsz/6*2;
@@ -911,7 +913,7 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
for (j = start; j < count - 3; j += nr - 2 ) {
nr = MIN2( currentsz, count - j );
- if (nr >= 4)
+ if (nr >= 4)
{
GLint i;
GLint quads = (nr/2)-1;
@@ -920,20 +922,20 @@ static void TAG(render_quad_strip_elts)( GLcontext *ctx,
NEW_PRIMITIVE();
ALLOC_ELTS_NEW_PRIMITIVE( quads*6 );
-
+
for ( i = 0 ; i < quads ; i++, elts += 2 ) {
EMIT_TWO_ELTS( 0, elts[0], elts[1] );
EMIT_TWO_ELTS( 2, elts[2], elts[1] );
EMIT_TWO_ELTS( 4, elts[3], elts[2] );
INCR_ELTS( 6 );
}
-
+
NEW_PRIMITIVE();
}
currentsz = dmasz;
}
- }
+ }
else {
ELT_INIT( GL_TRIANGLE_STRIP );
@@ -981,7 +983,7 @@ static void TAG(render_quads_elts)( GLcontext *ctx,
for (j = start; j < count - 3; j += nr - 2 ) {
nr = MIN2( currentsz, count - j );
- if (nr >= 4)
+ if (nr >= 4)
{
GLint quads = nr/4;
GLint i;
@@ -1005,7 +1007,7 @@ static void TAG(render_quads_elts)( GLcontext *ctx,
-static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
+static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
{
TAG(render_points_elts),
TAG(render_lines_elts),
@@ -1020,4 +1022,3 @@ static render_func TAG(render_tab_elts)[GL_POLYGON+2] =
TAG(render_noop),
};
#endif
-
diff --git a/src/mesa/drivers/common/t_dd_rendertmp.h b/src/mesa/drivers/common/t_dd_rendertmp.h
index 2524bf44b8d..b75643bb5f1 100644
--- a/src/mesa/drivers/common/t_dd_rendertmp.h
+++ b/src/mesa/drivers/common/t_dd_rendertmp.h
@@ -1,21 +1,21 @@
-/* $Id: t_dd_rendertmp.h,v 1.1 2001/02/16 18:14:42 keithw Exp $ */
+/* $Id: t_dd_rendertmp.h,v 1.2 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -33,13 +33,13 @@
#endif
#ifndef INIT
-#define INIT(x)
+#define INIT(x)
#endif
#ifndef NEED_EDGEFLAG_SETUP
#define NEED_EDGEFLAG_SETUP 0
#define EDGEFLAG_GET(a) 0
-#define EDGEFLAG_SET(a,b) (void)b
+#define EDGEFLAG_SET(a,b) (void)b
#endif
#ifndef RESET_STIPPLE
@@ -109,7 +109,7 @@ static void TAG(render_line_strip)( GLcontext *ctx,
RESET_OCCLUSION;
INIT(GL_LINE_STRIP);
- for (j=start+1; j<count; j++ )
+ for (j=start+1; j<count; j++ )
RENDER_LINE( ELT(j-1), ELT(j) );
if (TEST_PRIM_END(flags))
@@ -124,7 +124,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
GLuint count,
GLuint flags )
{
- GLuint i;
+ GLuint i;
LOCAL_VARS;
(void) flags;
@@ -186,10 +186,10 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
GLuint j;
GLuint parity = 0;
LOCAL_VARS;
-
+
if (TEST_PRIM_PARITY(flags))
parity = 1;
-
+
INIT(GL_TRIANGLE_STRIP);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+2;j<count;j++,parity^=1) {
@@ -273,13 +273,13 @@ static void TAG(render_poly)( GLcontext *ctx,
/* If the primitive does not begin here, the first edge
* is non-boundary.
*/
- if (!TEST_PRIM_BEGIN(flags))
+ if (!TEST_PRIM_BEGIN(flags))
EDGEFLAG_SET( ELT(start), GL_FALSE );
/* If the primitive does not end here, the final edge is
* non-boundary.
*/
- if (!TEST_PRIM_END(flags))
+ if (!TEST_PRIM_END(flags))
EDGEFLAG_SET( ELT(count-1), GL_FALSE );
/* Draw the first triangles (possibly zero)
@@ -290,7 +290,7 @@ static void TAG(render_poly)( GLcontext *ctx,
RENDER_TRI( ELT(j-1), ELT(j), ELT(start) );
EDGEFLAG_SET( ELT(j), ef );
j++;
-
+
/* Don't render the first edge again:
*/
EDGEFLAG_SET( ELT(start), GL_FALSE );
@@ -312,7 +312,7 @@ static void TAG(render_poly)( GLcontext *ctx,
*/
EDGEFLAG_SET( ELT(count-1), efcount );
EDGEFLAG_SET( ELT(start), efstart );
-
+
if (TEST_PRIM_END(flags)) {
RESET_STIPPLE;
}
@@ -348,7 +348,7 @@ static void TAG(render_quads)( GLcontext *ctx,
}
}
POSTFIX;
-}
+}
static void TAG(render_quad_strip)( GLcontext *ctx,
GLuint start,
@@ -399,7 +399,7 @@ static void TAG(render_noop)( GLcontext *ctx,
RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
GLuint,
GLuint,
- GLuint) =
+ GLuint) =
{
TAG(render_points),
TAG(render_lines),
@@ -436,4 +436,3 @@ RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
#undef PRESERVE_VB_DEFS
#undef PRESERVE_TAG
-
diff --git a/src/mesa/drivers/common/t_dd_tritmp.h b/src/mesa/drivers/common/t_dd_tritmp.h
index b3ab9f612f0..2a98b9fedf2 100644
--- a/src/mesa/drivers/common/t_dd_tritmp.h
+++ b/src/mesa/drivers/common/t_dd_tritmp.h
@@ -1,20 +1,22 @@
+/* $Id: t_dd_tritmp.h,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -22,19 +24,19 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
/* Template for building functions to plug into the driver interface
* of t_vb_render.c:
- * ctx->Driver.QuadFunc
- * ctx->Driver.TriangleFunc
- * ctx->Driver.LineFunc
- * ctx->Driver.PointsFunc
+ * ctx->Driver.QuadFunc
+ * ctx->Driver.TriangleFunc
+ * ctx->Driver.LineFunc
+ * ctx->Driver.PointsFunc
*
- * DO_TWOSIDE: Plug back-color values from the VB into backfacing triangles,
+ * DO_TWOSIDE: Plug back-color values from the VB into backfacing triangles,
* and restore vertices afterwards.
* DO_OFFSET: Calculate offset for triangles and adjust vertices. Restore
* vertices after rendering.
@@ -67,39 +69,39 @@
#if HAVE_RGBA
#define VERT_SET_IND( v, c ) (void) c
#define VERT_COPY_IND( v0, v1 )
-#define VERT_SAVE_IND( idx )
-#define VERT_RESTORE_IND( idx )
-#if HAVE_BACK_COLORS
-#define VERT_SET_RGBA( v, c )
-#endif
+#define VERT_SAVE_IND( idx )
+#define VERT_RESTORE_IND( idx )
+#if HAVE_BACK_COLORS
+#define VERT_SET_RGBA( v, c )
+#endif
#else
#define VERT_SET_RGBA( v, c ) (void) c
#define VERT_COPY_RGBA( v0, v1 )
-#define VERT_SAVE_RGBA( idx )
-#define VERT_RESTORE_RGBA( idx )
-#if HAVE_BACK_COLORS
-#define VERT_SET_IND( v, c )
-#endif
+#define VERT_SAVE_RGBA( idx )
+#define VERT_RESTORE_RGBA( idx )
+#if HAVE_BACK_COLORS
+#define VERT_SET_IND( v, c )
+#endif
#endif
#if !HAVE_SPEC
#define VERT_SET_SPEC( v, c ) (void) c
#define VERT_COPY_SPEC( v0, v1 )
-#define VERT_SAVE_SPEC( idx )
-#define VERT_RESTORE_SPEC( idx )
+#define VERT_SAVE_SPEC( idx )
+#define VERT_RESTORE_SPEC( idx )
#if HAVE_BACK_COLORS
#define VERT_COPY_SPEC1( v )
#endif
#else
#if HAVE_BACK_COLORS
-#define VERT_SET_SPEC( v, c )
+#define VERT_SET_SPEC( v, c )
#endif
#endif
#if !HAVE_BACK_COLORS
#define VERT_COPY_SPEC1( v )
#define VERT_COPY_IND1( v )
-#define VERT_COPY_RGBA1( v )
+#define VERT_COPY_RGBA1( v )
#endif
#ifndef INSANE_VERTICES
@@ -139,7 +141,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (DO_UNFILLED) {
if (facing) {
mode = ctx->Polygon.BackMode;
- if (ctx->Polygon.CullFlag &&
+ if (ctx->Polygon.CullFlag &&
ctx->Polygon.CullFaceMode != GL_FRONT) {
return;
}
@@ -174,7 +176,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_SAVE_SPEC( 2 );
VERT_COPY_SPEC1( v[2] );
}
- }
+ }
else {
GLchan (*vbcolor)[4] = VB->ColorPtr[1]->data;
ASSERT(VB->ColorPtr[1]->stride == 4*sizeof(GLchan));
@@ -185,17 +187,17 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_SET_RGBA( v[1], vbcolor[e1] );
}
VERT_SET_RGBA( v[2], vbcolor[e2] );
-
+
if (HAVE_SPEC && VB->SecondaryColorPtr[1]) {
GLchan (*vbspec)[4] = VB->SecondaryColorPtr[1]->data;
-
+
if (!DO_FLAT) {
VERT_SET_SPEC( v[0], vbspec[e0] );
VERT_SET_SPEC( v[1], vbspec[e1] );
}
VERT_SET_SPEC( v[2], vbspec[e2] );
}
- }
+ }
}
else {
GLuint *vbindex = VB->IndexPtr[1]->data;
@@ -243,7 +245,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_COPY_SPEC( v[0], v[2] );
VERT_COPY_SPEC( v[1], v[2] );
}
- }
+ }
else {
VERT_SAVE_IND( 0 );
VERT_SAVE_IND( 1 );
@@ -274,7 +276,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
}
if (DO_UNFILLED)
RASTERIZE( GL_TRIANGLES );
- TRI( v[0], v[1], v[2] );
+ TRI( v[0], v[1], v[2] );
}
if (DO_OFFSET)
@@ -296,22 +298,22 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_RESTORE_SPEC( 1 );
VERT_RESTORE_SPEC( 2 );
}
- }
+ }
else {
GLchan (*vbcolor)[4] = VB->ColorPtr[0]->data;
ASSERT(VB->ColorPtr[0]->stride == 4*sizeof(GLchan));
(void) vbcolor;
-
+
if (!DO_FLAT) {
VERT_SET_RGBA( v[0], vbcolor[e0] );
VERT_SET_RGBA( v[1], vbcolor[e1] );
}
VERT_SET_RGBA( v[2], vbcolor[e2] );
-
+
if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
GLchan (*vbspec)[4] = VB->SecondaryColorPtr[0]->data;
ASSERT(VB->SecondaryColorPtr[0]->stride == 4*sizeof(GLchan));
-
+
if (!DO_FLAT) {
VERT_SET_SPEC( v[0], vbspec[e0] );
VERT_SET_SPEC( v[1], vbspec[e1] );
@@ -319,7 +321,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_SET_SPEC( v[2], vbspec[e2] );
}
}
- }
+ }
else {
GLuint *vbindex = VB->IndexPtr[0]->data;
if (!DO_FLAT) {
@@ -339,7 +341,7 @@ static void TAG(triangle)( GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
VERT_RESTORE_SPEC( 0 );
VERT_RESTORE_SPEC( 1 );
}
- }
+ }
else {
VERT_RESTORE_IND( 0 );
VERT_RESTORE_IND( 1 );
@@ -381,7 +383,7 @@ static void TAG(quad)( GLcontext *ctx,
if (DO_UNFILLED) {
if (facing) {
mode = ctx->Polygon.BackMode;
- if (ctx->Polygon.CullFlag &&
+ if (ctx->Polygon.CullFlag &&
ctx->Polygon.CullFaceMode != GL_FRONT) {
return;
}
@@ -399,7 +401,7 @@ static void TAG(quad)( GLcontext *ctx,
if (HAVE_RGBA) {
GLchan (*vbcolor)[4] = VB->ColorPtr[1]->data;
(void)vbcolor;
-
+
if (!DO_FLAT) {
VERT_SET_RGBA( v[0], vbcolor[e0] );
VERT_SET_RGBA( v[1], vbcolor[e1] );
@@ -471,7 +473,7 @@ static void TAG(quad)( GLcontext *ctx,
VERT_COPY_SPEC( v[1], v[3] );
VERT_COPY_SPEC( v[2], v[3] );
}
- }
+ }
else {
VERT_SAVE_IND( 0 );
VERT_SAVE_IND( 1 );
@@ -506,7 +508,7 @@ static void TAG(quad)( GLcontext *ctx,
VERT_Z_ADD(v[3], offset);
}
RASTERIZE( GL_TRIANGLES );
- QUAD( (v[0]), (v[1]), (v[2]), (v[3]) );
+ QUAD( (v[0]), (v[1]), (v[2]), (v[3]) );
}
if (DO_OFFSET)
@@ -515,7 +517,7 @@ static void TAG(quad)( GLcontext *ctx,
VERT_SET_Z(v[1], z[1]);
VERT_SET_Z(v[2], z[2]);
VERT_SET_Z(v[3], z[3]);
- }
+ }
if (DO_TWOSIDE && facing == 1)
{
@@ -523,18 +525,18 @@ static void TAG(quad)( GLcontext *ctx,
GLchan (*vbcolor)[4] = VB->ColorPtr[0]->data;
ASSERT(VB->ColorPtr[0]->stride == 4*sizeof(GLchan));
(void) vbcolor;
-
+
if (!DO_FLAT) {
VERT_SET_RGBA( v[0], vbcolor[e0] );
VERT_SET_RGBA( v[1], vbcolor[e1] );
VERT_SET_RGBA( v[2], vbcolor[e2] );
}
VERT_SET_RGBA( v[3], vbcolor[e3] );
-
+
if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
GLchan (*vbspec)[4] = VB->SecondaryColorPtr[0]->data;
ASSERT(VB->SecondaryColorPtr[0]->stride == 4*sizeof(GLchan));
-
+
if (!DO_FLAT) {
VERT_SET_SPEC( v[0], vbspec[e0] );
VERT_SET_SPEC( v[1], vbspec[e1] );
@@ -542,7 +544,7 @@ static void TAG(quad)( GLcontext *ctx,
}
VERT_SET_SPEC( v[3], vbspec[e3] );
}
- }
+ }
else {
GLuint *vbindex = VB->IndexPtr[0]->data;
if (!DO_FLAT) {
@@ -565,7 +567,7 @@ static void TAG(quad)( GLcontext *ctx,
VERT_RESTORE_SPEC( 1 );
VERT_RESTORE_SPEC( 2 );
}
- }
+ }
else {
VERT_RESTORE_IND( 0 );
VERT_RESTORE_IND( 1 );
@@ -573,7 +575,7 @@ static void TAG(quad)( GLcontext *ctx,
}
}
}
-#else
+#else
static void TAG(quad)( GLcontext *ctx, GLuint e0,
GLuint e1, GLuint e2, GLuint e3 )
{
@@ -581,12 +583,12 @@ static void TAG(quad)( GLcontext *ctx, GLuint e0,
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLubyte ef1 = VB->EdgeFlag[e1];
GLubyte ef3 = VB->EdgeFlag[e3];
- VB->EdgeFlag[e1] = 0;
+ VB->EdgeFlag[e1] = 0;
TAG(triangle)( ctx, e0, e1, e3 );
VB->EdgeFlag[e1] = ef1;
- VB->EdgeFlag[e3] = 0;
- TAG(triangle)( ctx, e1, e2, e3 );
- VB->EdgeFlag[e3] = ef3;
+ VB->EdgeFlag[e3] = 0;
+ TAG(triangle)( ctx, e1, e2, e3 );
+ VB->EdgeFlag[e3] = ef3;
} else {
TAG(triangle)( ctx, e0, e1, e3 );
TAG(triangle)( ctx, e1, e2, e3 );
@@ -613,7 +615,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
VERT_SAVE_SPEC( 0 );
VERT_COPY_SPEC( v[0], v[1] );
}
- }
+ }
else {
VERT_SAVE_IND( 0 );
VERT_COPY_IND( v[0], v[1] );
@@ -629,7 +631,7 @@ static void TAG(line)( GLcontext *ctx, GLuint e0, GLuint e1 )
if (HAVE_SPEC && VB->SecondaryColorPtr[0]) {
VERT_RESTORE_SPEC( 0 );
}
- }
+ }
else {
VERT_RESTORE_IND( 0 );
}
@@ -687,17 +689,17 @@ static void TAG(init)( void )
#undef VERT_COPY_IND
#undef VERT_SAVE_IND
#undef VERT_RESTORE_IND
-#if HAVE_BACK_COLORS
+#if HAVE_BACK_COLORS
#undef VERT_SET_RGBA
-#endif
+#endif
#else
#undef VERT_SET_RGBA
#undef VERT_COPY_RGBA
#undef VERT_SAVE_RGBA
#undef VERT_RESTORE_RGBA
-#if HAVE_BACK_COLORS
+#if HAVE_BACK_COLORS
#undef VERT_SET_IND
-#endif
+#endif
#endif
#if !HAVE_SPEC
@@ -724,4 +726,3 @@ static void TAG(init)( void )
#undef VERT_SET_Z
#undef VERT_Z_ADD
#endif
-
diff --git a/src/mesa/drivers/common/t_dd_unfilled.h b/src/mesa/drivers/common/t_dd_unfilled.h
index 59c9bfdc5ab..08fc69f0a95 100644
--- a/src/mesa/drivers/common/t_dd_unfilled.h
+++ b/src/mesa/drivers/common/t_dd_unfilled.h
@@ -1,18 +1,47 @@
+/* $Id: t_dd_unfilled.h,v 1.3 2001/03/12 00:48:44 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Keith Whitwell <[email protected]>
+ */
+
#if HAVE_RGBA
-#define VERT_SET_IND( v, c )
+#define VERT_SET_IND( v, c )
#define VERT_COPY_IND( v0, v1 )
-#define VERT_SAVE_IND( idx )
-#define VERT_RESTORE_IND( idx )
+#define VERT_SAVE_IND( idx )
+#define VERT_RESTORE_IND( idx )
#endif
#if !HAVE_SPEC
-#define VERT_SET_SPEC( v, c )
+#define VERT_SET_SPEC( v, c )
#define VERT_COPY_SPEC( v0, v1 )
-#define VERT_SAVE_SPEC( idx )
-#define VERT_RESTORE_SPEC( idx )
+#define VERT_SAVE_SPEC( idx )
+#define VERT_RESTORE_SPEC( idx )
#endif
-static void TAG(unfilled_tri)( GLcontext *ctx,
+static void TAG(unfilled_tri)( GLcontext *ctx,
GLenum mode,
GLuint e0, GLuint e1, GLuint e2 )
{
@@ -31,7 +60,7 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
VERT_SAVE_RGBA(1);
VERT_COPY_RGBA(v[0], v[2]);
VERT_COPY_RGBA(v[1], v[2]);
-
+
if (HAVE_SPEC) {
VERT_SAVE_SPEC(0);
VERT_SAVE_SPEC(1);
@@ -48,21 +77,21 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
if (mode == GL_POINT) {
RASTERIZE(GL_POINTS);
- if (ef[e0]) POINT( v[0] );
- if (ef[e1]) POINT( v[1] );
- if (ef[e2]) POINT( v[2] );
+ if (ef[e0]) POINT( v[0] );
+ if (ef[e1]) POINT( v[1] );
+ if (ef[e2]) POINT( v[2] );
}
else {
RASTERIZE(GL_LINES);
if (RENDER_PRIMITIVE == GL_POLYGON) {
- if (ef[e2]) LINE( v[2], v[0] );
- if (ef[e0]) LINE( v[0], v[1] );
- if (ef[e1]) LINE( v[1], v[2] );
- }
+ if (ef[e2]) LINE( v[2], v[0] );
+ if (ef[e0]) LINE( v[0], v[1] );
+ if (ef[e1]) LINE( v[1], v[2] );
+ }
else {
- if (ef[e0]) LINE( v[0], v[1] );
- if (ef[e1]) LINE( v[1], v[2] );
- if (ef[e2]) LINE( v[2], v[0] );
+ if (ef[e0]) LINE( v[0], v[1] );
+ if (ef[e1]) LINE( v[1], v[2] );
+ if (ef[e2]) LINE( v[2], v[0] );
}
}
@@ -70,7 +99,7 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
if (HAVE_RGBA) {
VERT_RESTORE_RGBA(0);
VERT_RESTORE_RGBA(1);
-
+
if (HAVE_SPEC) {
VERT_RESTORE_SPEC(0);
VERT_RESTORE_SPEC(1);
@@ -83,9 +112,9 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
}
-static void TAG(unfilled_quad)( GLcontext *ctx,
+static void TAG(unfilled_quad)( GLcontext *ctx,
GLenum mode,
- GLuint e0, GLuint e1,
+ GLuint e0, GLuint e1,
GLuint e2, GLuint e3 )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -109,7 +138,7 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
VERT_COPY_RGBA(v[0], v[3]);
VERT_COPY_RGBA(v[1], v[3]);
VERT_COPY_RGBA(v[2], v[3]);
-
+
if (HAVE_SPEC) {
VERT_SAVE_SPEC(0);
VERT_SAVE_SPEC(1);
@@ -130,17 +159,17 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
if (mode == GL_POINT) {
RASTERIZE(GL_POINTS);
- if (ef[e0]) POINT( v[0] );
- if (ef[e1]) POINT( v[1] );
- if (ef[e2]) POINT( v[2] );
- if (ef[e3]) POINT( v[3] );
+ if (ef[e0]) POINT( v[0] );
+ if (ef[e1]) POINT( v[1] );
+ if (ef[e2]) POINT( v[2] );
+ if (ef[e3]) POINT( v[3] );
}
else {
RASTERIZE(GL_LINES);
- if (ef[e0]) LINE( v[0], v[1] );
- if (ef[e1]) LINE( v[1], v[2] );
- if (ef[e2]) LINE( v[2], v[3] );
- if (ef[e3]) LINE( v[3], v[0] );
+ if (ef[e0]) LINE( v[0], v[1] );
+ if (ef[e1]) LINE( v[1], v[2] );
+ if (ef[e2]) LINE( v[2], v[3] );
+ if (ef[e3]) LINE( v[3], v[0] );
}
if ((ctx->_TriangleCaps & DD_FLATSHADE) && HAVE_HW_FLATSHADE) {
@@ -148,7 +177,7 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
VERT_RESTORE_RGBA(0);
VERT_RESTORE_RGBA(1);
VERT_RESTORE_RGBA(2);
-
+
if (HAVE_SPEC) {
VERT_RESTORE_SPEC(0);
VERT_RESTORE_SPEC(1);
diff --git a/src/mesa/drivers/common/t_dd_vb.c b/src/mesa/drivers/common/t_dd_vb.c
index 9d5277ee010..a5a9f53ab42 100644
--- a/src/mesa/drivers/common/t_dd_vb.c
+++ b/src/mesa/drivers/common/t_dd_vb.c
@@ -1,19 +1,21 @@
+/* $Id: t_dd_vb.c,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -21,8 +23,8 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
#if (HAVE_HW_VIEWPORT)
@@ -65,8 +67,8 @@ static void copy_pv_rgba3( GLcontext *ctx, GLuint edst, GLuint esrc )
}
-void TAG(translate_vertex)(GLcontext *ctx,
- const VERTEX *src,
+void TAG(translate_vertex)(GLcontext *ctx,
+ const VERTEX *src,
SWvertex *dst)
{
GLuint format = GET_VERTEX_FORMAT();
@@ -90,7 +92,7 @@ void TAG(translate_vertex)(GLcontext *ctx,
dst->color[1] = src->tv.color.green;
dst->color[2] = src->tv.color.blue;
dst->color[3] = src->tv.color.alpha;
- }
+ }
else {
GLfloat oow = (HAVE_HW_DIVIDE) ? 1.0 / src->v.w : src->v.w;
@@ -121,10 +123,10 @@ void TAG(translate_vertex)(GLcontext *ctx,
dst->specular[0] = src->v.specular.red;
dst->specular[1] = src->v.specular.green;
dst->specular[2] = src->v.specular.blue;
-
+
dst->fog = src->v.color.alpha/255.0;
- if (HAVE_PTEX_VERTICES &&
+ if (HAVE_PTEX_VERTICES &&
((HAVE_TEX2_VERTICES && format == PROJ_TEX3_VERTEX_FORMAT) ||
(format == PROJ_TEX1_VERTEX_FORMAT))) {
@@ -175,7 +177,7 @@ void TAG(translate_vertex)(GLcontext *ctx,
}
#if 0
-static void
+static void
mga_translate_vertex( GLcontext *ctx, const mgaVertex *src, SWvertex *dst)
{
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
@@ -184,7 +186,7 @@ mga_translate_vertex( GLcontext *ctx, const mgaVertex *src, SWvertex *dst)
dst->win[1] = - src->v.y + mmesa->driDrawable->h + mmesa->drawY + SUBPIXEL_Y;
dst->win[2] = src->v.z / mmesa->depth_scale;
dst->win[3] = src->v.oow;
-
+
dst->color[0] = src->v.color.red;
dst->color[1] = src->v.color.green;
dst->color[2] = src->v.color.blue;
@@ -215,22 +217,22 @@ void TAG(print_vertex)( GLcontext *ctx, const VERTEX *v )
if (format == TINY_VERTEX_FORMAT) {
fprintf(stderr, "x %f y %f z %f\n", v->v.x, v->v.y, v->v.z);
- fprintf(stderr, "r %d g %d b %d a %d\n",
+ fprintf(stderr, "r %d g %d b %d a %d\n",
v->tv.color.red,
v->tv.color.green,
v->tv.color.blue,
v->tv.color.alpha);
- }
+ }
else {
- fprintf(stderr, "x %f y %f z %f oow %f\n",
+ fprintf(stderr, "x %f y %f z %f oow %f\n",
v->v.x, v->v.y, v->v.z, v->v.w);
- fprintf(stderr, "r %d g %d b %d a %d\n",
+ fprintf(stderr, "r %d g %d b %d a %d\n",
v->v.color.red,
v->v.color.green,
v->v.color.blue,
v->v.color.alpha);
}
-
+
fprintf(stderr, "\n");
}
diff --git a/src/mesa/drivers/common/t_dd_vbtmp.h b/src/mesa/drivers/common/t_dd_vbtmp.h
index 2e9a7ec9bcc..4b87fe6a321 100644
--- a/src/mesa/drivers/common/t_dd_vbtmp.h
+++ b/src/mesa/drivers/common/t_dd_vbtmp.h
@@ -1,19 +1,21 @@
+/* $Id: t_dd_vbtmp.h,v 1.8 2001/03/12 00:48:44 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -21,8 +23,8 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
@@ -58,7 +60,7 @@
* unsigned int ui[16];
* unsigned char ub4[4][16];
* }
- *
+ *
* DO_XYZW: Emit xyz and maybe w coordinates.
* DO_RGBA: Emit color.
@@ -74,7 +76,7 @@
*
* HAVE_HW_VIEWPORT: Hardware performs viewport transform.
* HAVE_HW_DIVIDE: Hardware performs perspective divide.
- *
+ *
* HAVE_TINY_VERTICES: Hardware understands v.tv format.
* HAVE_PTEX_VERTICES: Hardware understands v.pv format.
* HAVE_NOTEX_VERTICES: Hardware understands v.v format with texcount 0.
@@ -186,7 +188,7 @@ static void TAG(emit)( GLcontext *ctx,
if (VB->TexCoordPtr[t0]) {
tc0_stride = VB->TexCoordPtr[t0]->stride;
tc0 = VB->TexCoordPtr[t0]->data;
- if (DO_PTEX)
+ if (DO_PTEX)
tc0_size = VB->TexCoordPtr[t0]->size;
}
else {
@@ -228,21 +230,21 @@ static void TAG(emit)( GLcontext *ctx,
if (DO_TEX3)
if (tc3)
tc3 = (GLfloat (*)[4])((GLubyte *)tc3 + start * tc3_stride);
- if (DO_RGBA)
+ if (DO_RGBA)
STRIDE_4UB(col, start * col_stride);
- if (DO_SPEC)
+ if (DO_SPEC)
STRIDE_4UB(spec, start * spec_stride);
- if (DO_FOG)
+ if (DO_FOG)
STRIDE_F(fog, start * fog_stride);
}
for (i=start; i < end; i++, v = (VERTEX *)((GLubyte *)v + stride)) {
if (DO_XYZW) {
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
- VIEWPORT_X(v->v.x, coord[0][0]);
- VIEWPORT_Y(v->v.y, coord[0][1]);
- VIEWPORT_Z(v->v.z, coord[0][2]);
- v->v.w = coord[0][3];
+ VIEWPORT_X(v->v.x, coord[0][0]);
+ VIEWPORT_Y(v->v.y, coord[0][1]);
+ VIEWPORT_Z(v->v.z, coord[0][2]);
+ v->v.w = coord[0][3];
}
coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride);
}
@@ -274,18 +276,18 @@ static void TAG(emit)( GLcontext *ctx,
v->v.v0 = tc0[0][1];
if (DO_PTEX) {
if (HAVE_PTEX_VERTICES) {
- if (tc0_size == 4)
+ if (tc0_size == 4)
v->pv.q0 = tc0[0][3];
else
v->pv.q0 = 1.0;
- }
+ }
else if (tc0_size == 4) {
float rhw = 1.0 / tc0[0][3];
v->v.w *= tc0[0][3];
v->v.u0 *= rhw;
v->v.v0 *= rhw;
- }
- }
+ }
+ }
tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + tc0_stride);
}
}
@@ -294,18 +296,18 @@ static void TAG(emit)( GLcontext *ctx,
if (DO_PTEX) {
v->pv.u1 = tc1[0][0];
v->pv.v1 = tc1[0][1];
- if (tc1_size == 4)
+ if (tc1_size == 4)
v->pv.q1 = tc1[0][3];
else
v->pv.q1 = 1.0;
- }
+ }
else {
v->v.u1 = tc1[0][0];
v->v.v1 = tc1[0][1];
}
tc1 = (GLfloat (*)[4])((GLubyte *)tc1 + tc1_stride);
}
- }
+ }
else if (DO_PTEX) {
*(GLuint *)&v->pv.q1 = 0; /* avoid culling on radeon */
}
@@ -314,45 +316,45 @@ static void TAG(emit)( GLcontext *ctx,
if (DO_PTEX) {
v->pv.u2 = tc2[0][0];
v->pv.v2 = tc2[0][1];
- if (tc2_size == 4)
+ if (tc2_size == 4)
v->pv.q2 = tc2[0][3];
else
v->pv.q2 = 1.0;
- }
+ }
else {
v->v.u2 = tc2[0][0];
v->v.v2 = tc2[0][1];
}
tc2 = (GLfloat (*)[4])((GLubyte *)tc2 + tc2_stride);
}
- }
+ }
if (DO_TEX3) {
if (tc3) {
if (DO_PTEX) {
v->pv.u3 = tc3[0][0];
v->pv.v3 = tc3[0][1];
- if (tc3_size == 4)
+ if (tc3_size == 4)
v->pv.q3 = tc3[0][3];
else
v->pv.q3 = 1.0;
- }
+ }
else {
v->v.u3 = tc3[0][0];
v->v.v3 = tc3[0][1];
}
tc3 = (GLfloat (*)[4])((GLubyte *)tc3 + tc3_stride);
}
- }
+ }
}
}
else {
for (i=start; i < end; i++, v = (VERTEX *)((GLubyte *)v + stride)) {
if (DO_XYZW) {
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
- VIEWPORT_X(v->v.x, coord[i][0]);
- VIEWPORT_Y(v->v.y, coord[i][1]);
- VIEWPORT_Z(v->v.z, coord[i][2]);
- v->v.w = coord[i][3];
+ VIEWPORT_X(v->v.x, coord[i][0]);
+ VIEWPORT_Y(v->v.y, coord[i][1]);
+ VIEWPORT_Z(v->v.z, coord[i][2]);
+ v->v.w = coord[i][3];
}
}
if (DO_RGBA) {
@@ -380,20 +382,20 @@ static void TAG(emit)( GLcontext *ctx,
v->pv.u0 = tc0[i][0];
v->pv.v0 = tc0[i][1];
if (HAVE_PTEX_VERTICES) {
- if (tc0_size == 4)
+ if (tc0_size == 4)
v->pv.q0 = tc0[i][3];
else
v->pv.q0 = 1.0;
v->pv.q1 = 0; /* radeon */
- }
+ }
else if (tc0_size == 4) {
float rhw = 1.0 / tc0[i][3];
v->v.w *= tc0[i][3];
v->v.u0 *= rhw;
v->v.v0 *= rhw;
- }
- }
+ }
+ }
else {
v->v.u0 = tc0[i][0];
v->v.v0 = tc0[i][1];
@@ -405,11 +407,11 @@ static void TAG(emit)( GLcontext *ctx,
if (DO_PTEX) {
v->pv.u1 = tc1[i][0];
v->pv.v1 = tc1[i][1];
- if (tc1_size == 4)
+ if (tc1_size == 4)
v->pv.q1 = tc1[i][3];
else
v->pv.q1 = 1.0;
- }
+ }
else {
v->v.u1 = tc1[i][0];
v->v.v1 = tc1[i][1];
@@ -419,7 +421,7 @@ static void TAG(emit)( GLcontext *ctx,
}
}
}
-#else
+#else
#if DO_XYZW
#if HAVE_HW_DIVIDE
@@ -432,7 +434,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLubyte (*col)[4] = VB->ColorPtr[0]->data;
GLuint col_stride = VB->ColorPtr[0]->stride;
- GLfloat (*coord)[4] = VB->ProjectedClipPtr->data;
+ GLfloat (*coord)[4] = VB->ProjectedClipPtr->data;
GLuint coord_stride = VB->ProjectedClipPtr->stride;
GLfloat *v = (GLfloat *)dest;
const GLubyte *mask = VB->ClipMask;
@@ -444,7 +446,7 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
ASSERT(stride == 4);
/* Pack what's left into a 4-dword vertex. Color is in a different
- * place, and there is no 'w' coordinate.
+ * place, and there is no 'w' coordinate.
*/
if (VB->importable_data) {
if (start) {
@@ -454,15 +456,15 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
for (i=start; i < end; i++, v+=4) {
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
- VIEWPORT_X(v[0], coord[0][0]);
- VIEWPORT_Y(v[1], coord[0][1]);
- VIEWPORT_Z(v[2], coord[0][2]);
+ VIEWPORT_X(v[0], coord[0][0]);
+ VIEWPORT_Y(v[1], coord[0][1]);
+ VIEWPORT_Z(v[2], coord[0][2]);
}
coord = (GLfloat (*)[4])((GLubyte *)coord + coord_stride);
if (DO_RGBA) {
if (HAVE_RGBA_COLOR) {
*(GLuint *)&v[3] = *(GLuint *)col;
- }
+ }
else {
GLubyte *b = (GLubyte *)&v[3];
b[0] = col[0][2];
@@ -477,9 +479,9 @@ static void TAG(emit)( GLcontext *ctx, GLuint start, GLuint end,
else {
for (i=start; i < end; i++, v+=4) {
if (HAVE_HW_VIEWPORT || mask[i] == 0) {
- VIEWPORT_X(v[0], coord[i][0]);
- VIEWPORT_Y(v[1], coord[i][1]);
- VIEWPORT_Z(v[2], coord[i][2]);
+ VIEWPORT_X(v[0], coord[i][0]);
+ VIEWPORT_Y(v[1], coord[i][1]);
+ VIEWPORT_Z(v[2], coord[i][2]);
}
if (DO_RGBA) {
if (HAVE_RGBA_COLOR) {
@@ -551,13 +553,13 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
if (DO_PTEX)
return GL_TRUE;
-
+
if ((DO_TEX3 && VB->TexCoordPtr[3]->size == 4) ||
(DO_TEX2 && VB->TexCoordPtr[2]->size == 4) ||
(DO_TEX1 && VB->TexCoordPtr[1]->size == 4) ||
(DO_TEX0 && VB->TexCoordPtr[0]->size == 4))
return GL_FALSE;
-
+
return GL_TRUE;
}
#else
@@ -574,11 +576,11 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
if (DO_TEX1 && VB->TexCoordPtr[0] == 0)
VB->TexCoordPtr[0] = VB->TexCoordPtr[1];
- if (DO_PTEX)
+ if (DO_PTEX)
return GL_TRUE;
-
+
/* No hardware support for projective texture. Can fake it for
- * TEX0 only.
+ * TEX0 only.
*/
if ((DO_TEX3 && VB->TexCoordPtr[3]->size == 4) ||
(DO_TEX2 && VB->TexCoordPtr[2]->size == 4) ||
@@ -600,7 +602,7 @@ static GLboolean TAG(check_tex_sizes)( GLcontext *ctx )
static void TAG(interp)( GLcontext *ctx,
- GLfloat t,
+ GLfloat t,
GLuint edst, GLuint eout, GLuint ein,
GLboolean force_boundary )
{
@@ -617,25 +619,25 @@ static void TAG(interp)( GLcontext *ctx,
(void)s;
-
+
if (!HAVE_HW_DIVIDE) {
w = 1.0 / dstclip[3];
- VIEWPORT_X( dst->v.x, dstclip[0] * w );
- VIEWPORT_Y( dst->v.y, dstclip[1] * w );
- VIEWPORT_Z( dst->v.z, dstclip[2] * w );
- }
+ VIEWPORT_X( dst->v.x, dstclip[0] * w );
+ VIEWPORT_Y( dst->v.y, dstclip[1] * w );
+ VIEWPORT_Z( dst->v.z, dstclip[2] * w );
+ }
else {
- VIEWPORT_X( dst->v.x, dstclip[0] );
- VIEWPORT_Y( dst->v.y, dstclip[1] );
- VIEWPORT_Z( dst->v.z, dstclip[2] );
- w = dstclip[3];
+ VIEWPORT_X( dst->v.x, dstclip[0] );
+ VIEWPORT_Y( dst->v.y, dstclip[1] );
+ VIEWPORT_Z( dst->v.z, dstclip[2] );
+ w = dstclip[3];
}
- if (HAVE_HW_DIVIDE || DO_FOG || DO_SPEC || DO_TEX0 || DO_TEX1 ||
+ if (HAVE_HW_DIVIDE || DO_FOG || DO_SPEC || DO_TEX0 || DO_TEX1 ||
DO_TEX2 || DO_TEX3) {
- dst->v.w = w;
-
+ dst->v.w = w;
+
INTERP_UB( t, dst->ub4[4][0], out->ub4[4][0], in->ub4[4][0] );
INTERP_UB( t, dst->ub4[4][1], out->ub4[4][1], in->ub4[4][1] );
INTERP_UB( t, dst->ub4[4][2], out->ub4[4][2], in->ub4[4][2] );
@@ -663,17 +665,17 @@ static void TAG(interp)( GLcontext *ctx,
GLfloat qdst, rqdst;
ASSERT( !HAVE_HW_DIVIDE );
-
+
INTERP_F( t, dst->v.u0, out->v.u0 * qout, in->v.u0 * qin );
INTERP_F( t, dst->v.v0, out->v.v0 * qout, in->v.v0 * qin );
INTERP_F( t, qdst, qout, qin );
-
+
rqdst = 1.0 / qdst;
dst->v.u0 *= rqdst;
dst->v.v0 *= rqdst;
dst->v.w *= rqdst;
}
- }
+ }
else {
INTERP_F( t, dst->v.u0, out->v.u0, in->v.u0 );
INTERP_F( t, dst->v.v0, out->v.v0, in->v.v0 );
@@ -728,12 +730,12 @@ static void TAG(interp)( GLcontext *ctx,
static void TAG(init)( void )
{
setup_tab[IND].emit = TAG(emit);
-
+
#if (DO_XYZW && DO_RGBA)
setup_tab[IND].check_tex_sizes = TAG(check_tex_sizes);
setup_tab[IND].interp = TAG(interp);
#endif
-
+
if (DO_SPEC)
setup_tab[IND].copy_pv = copy_pv_rgba4_spec5;
else if (HAVE_HW_DIVIDE || DO_SPEC || DO_FOG || DO_TEX0 || DO_TEX1 ||
@@ -747,55 +749,55 @@ static void TAG(init)( void )
ASSERT(HAVE_PTEX_VERTICES);
setup_tab[IND].vertex_format = PROJ_TEX3_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 18;
- setup_tab[IND].vertex_stride_shift = 7;
+ setup_tab[IND].vertex_stride_shift = 7;
}
else {
setup_tab[IND].vertex_format = TEX3_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 14;
- setup_tab[IND].vertex_stride_shift = 6;
+ setup_tab[IND].vertex_stride_shift = 6;
}
- }
+ }
else if (DO_TEX2) {
if (DO_PTEX) {
ASSERT(HAVE_PTEX_VERTICES);
setup_tab[IND].vertex_format = PROJ_TEX3_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 18;
- setup_tab[IND].vertex_stride_shift = 7;
+ setup_tab[IND].vertex_stride_shift = 7;
}
else {
setup_tab[IND].vertex_format = TEX2_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 12;
- setup_tab[IND].vertex_stride_shift = 6;
+ setup_tab[IND].vertex_stride_shift = 6;
}
- }
+ }
else if (DO_TEX1) {
if (DO_PTEX) {
ASSERT(HAVE_PTEX_VERTICES);
setup_tab[IND].vertex_format = PROJ_TEX1_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 12;
- setup_tab[IND].vertex_stride_shift = 6;
+ setup_tab[IND].vertex_stride_shift = 6;
}
else {
setup_tab[IND].vertex_format = TEX1_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 10;
- setup_tab[IND].vertex_stride_shift = 6;
+ setup_tab[IND].vertex_stride_shift = 6;
}
- }
+ }
else if (DO_TEX0) {
if (DO_PTEX && HAVE_PTEX_VERTICES) {
setup_tab[IND].vertex_format = PROJ_TEX1_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 12;
- setup_tab[IND].vertex_stride_shift = 6;
+ setup_tab[IND].vertex_stride_shift = 6;
} else {
setup_tab[IND].vertex_format = TEX0_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 8;
- setup_tab[IND].vertex_stride_shift = 5;
+ setup_tab[IND].vertex_stride_shift = 5;
}
}
else if (!HAVE_HW_DIVIDE && !DO_SPEC && !DO_FOG && HAVE_TINY_VERTICES) {
setup_tab[IND].vertex_format = TINY_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 4;
- setup_tab[IND].vertex_stride_shift = 4;
+ setup_tab[IND].vertex_stride_shift = 4;
} else if (HAVE_NOTEX_VERTICES) {
setup_tab[IND].vertex_format = NOTEX_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 6;
@@ -803,7 +805,7 @@ static void TAG(init)( void )
} else {
setup_tab[IND].vertex_format = TEX0_VERTEX_FORMAT;
setup_tab[IND].vertex_size = 8;
- setup_tab[IND].vertex_stride_shift = 5;
+ setup_tab[IND].vertex_stride_shift = 5;
}
assert(setup_tab[IND].vertex_size * 4 <=
diff --git a/src/mesa/drivers/common/t_dd_vertex.h b/src/mesa/drivers/common/t_dd_vertex.h
index 61c69b87191..10a06ff2212 100644
--- a/src/mesa/drivers/common/t_dd_vertex.h
+++ b/src/mesa/drivers/common/t_dd_vertex.h
@@ -1,8 +1,10 @@
+/* $Id: t_dd_vertex.h,v 1.5 2001/03/12 00:48:44 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -21,8 +23,8 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
#ifdef COLOR_IS_RGBA
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 82c48ea0658..64459e7a167 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -1,4 +1,4 @@
-/* $Id: glapi.c,v 1.50 2001/03/07 05:06:11 brianp Exp $ */
+/* $Id: glapi.c,v 1.51 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -1912,7 +1912,3 @@ _glapi_check_table(const struct _glapi_table *table)
}
#endif
}
-
-
-
-
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index 481949989ca..62038f54a9b 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -1,21 +1,21 @@
-/* $Id: glapitemp.h,v 1.24 2000/12/26 05:09:28 keithw Exp $ */
+/* $Id: glapitemp.h,v 1.25 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -3011,7 +3011,7 @@ KEYWORD1 void KEYWORD2 NAME(TexCoord4fv)(const GLfloat *v)
{
DISPATCH(TexCoord4fv, (v), (F, ";"));
}
-
+
KEYWORD1 void KEYWORD2 NAME(TexCoord4iv)(const GLint *v)
{
DISPATCH(TexCoord4iv, (v), (F, ";"));
@@ -3426,7 +3426,7 @@ KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort *v
#ifdef DO_INIT
-static void NAME(InitDispatch)( void )
+static void NAME(InitDispatch)( void )
{
INITARGS;
INIT(GetCompressedTexImageARB);
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index 4599f39dcc9..16b3336b9f4 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -1,21 +1,21 @@
-/* $Id: glthread.c,v 1.7 2001/03/07 05:06:11 brianp Exp $ */
+/* $Id: glthread.c,v 1.8 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -35,7 +35,7 @@
#include "all.h"
#else
#include "glheader.h"
-#include "glthread.h"
+#include "glthread.h"
#endif
@@ -117,9 +117,9 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
/*
- * Solaris/Unix International Threads -- Use only if POSIX threads
+ * Solaris/Unix International Threads -- Use only if POSIX threads
* aren't available on your Unix platform. Solaris 2.[34] are examples
- * of platforms where this is the case. Be sure to use -mt and/or
+ * of platforms where this is the case. Be sure to use -mt and/or
* -D_REENTRANT when compiling.
*/
#ifdef SOLARIS_THREADS
@@ -156,7 +156,7 @@ _glthread_GetTSD(_glthread_TSD *tsd)
#ifdef USE_LOCK_FOR_KEY
mutex_lock(&tsd->keylock);
thr_getspecific(tsd->key, &ret);
- mutex_unlock(&tsd->keylock);
+ mutex_unlock(&tsd->keylock);
#else
if ((errno = thr_getspecific(tsd->key, &ret)) != 0) {
perror(GET_TSD_ERROR);
@@ -188,7 +188,7 @@ _glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
* Win32 Threads. The only available option for Windows 95/NT.
* Be sure that you compile using the Multithreaded runtime, otherwise
* bad things will happen.
- */
+ */
#ifdef WIN32_THREADS
unsigned long
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index 864ea4a0d1c..639c46e427e 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -1,10 +1,10 @@
-/* $Id: glthread.h,v 1.7 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: glthread.h,v 1.8 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -249,4 +249,3 @@ _glthread_SetTSD(_glthread_TSD *, void *);
#endif /* THREADS_H */
-
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 32c2298c74e..85b856a20a3 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,10 +1,10 @@
-/* $Id: accum.c,v 1.36 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: accum.c,v 1.37 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/accum.h b/src/mesa/main/accum.h
index 4c39a3ebc88..dde8dfe17b4 100644
--- a/src/mesa/main/accum.h
+++ b/src/mesa/main/accum.h
@@ -1,10 +1,10 @@
-/* $Id: accum.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: accum.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index 004977c36c9..8934fca98c4 100644
--- a/src/mesa/main/api_arrayelt.c
+++ b/src/mesa/main/api_arrayelt.c
@@ -1,3 +1,29 @@
+/* $Id: api_arrayelt.c,v 1.2 2001/03/12 00:48:37 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
#include "glheader.h"
#include "api_noop.h"
#include "context.h"
@@ -13,7 +39,7 @@ typedef struct {
struct gl_client_array *array;
void *func;
} AAtexarray;
-
+
typedef struct {
struct gl_client_array *array;
@@ -170,7 +196,7 @@ static void _aa_update_state( GLcontext *ctx )
AAarray *aa = actx->arrays;
int i;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
if (ctx->Array.TexCoord[i].Enabled) {
ta->unit = i;
ta->array = &ctx->Array.TexCoord[i];
@@ -237,14 +263,14 @@ static void _aa_loopback_array_elt( GLint elt )
AAarray *aa;
for (ta = actx->texarrays ; ta->func ; ta++) {
- void (*func)( GLint, const void * ) =
- (void (*)( GLint, const void * )) ta->func;
+ void (*func)( GLint, const void * ) =
+ (void (*)( GLint, const void * )) ta->func;
func( ta->unit, (char *)ta->array->Ptr + elt * ta->array->SizeB );
}
for (aa = actx->arrays ; aa->func ; aa++) {
- void (*func)( GLint, const void * ) =
- (void (*)( GLint, const void * )) aa->func;
+ void (*func)( GLint, const void * ) =
+ (void (*)( GLint, const void * )) aa->func;
func( (char *)aa->array->Ptr + elt * aa->array->SizeB );
}
}
@@ -254,8 +280,8 @@ void _aa_exec_array_elt( GLint elt )
{
GET_CURRENT_CONTEXT(ctx);
AAcontext *actx = AA_CONTEXT(ctx);
-
- if (actx->NewState)
+
+ if (actx->NewState)
_aa_update_state( ctx );
ctx->Exec->ArrayElement = _aa_loopback_array_elt;
@@ -268,8 +294,8 @@ void _aa_save_array_elt( GLint elt )
{
GET_CURRENT_CONTEXT(ctx);
AAcontext *actx = AA_CONTEXT(ctx);
-
- if (actx->NewState)
+
+ if (actx->NewState)
_aa_update_state( ctx );
ctx->Save->ArrayElement = _aa_loopback_array_elt;
@@ -279,6 +305,6 @@ void _aa_save_array_elt( GLint elt )
void aa_invalidate_state( GLcontext *ctx, GLuint new_state )
{
- if (AA_CONTEXT(ctx))
+ if (AA_CONTEXT(ctx))
AA_CONTEXT(ctx)->NewState |= new_state;
}
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index adbf015bbe7..9c33cce6900 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -1,32 +1,30 @@
-/* $Id: api_loopback.c,v 1.6 2001/01/02 22:05:55 brianp Exp $ */
+/* $Id: api_loopback.c,v 1.7 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-/*
+ *
* Authors:
- * Keith Whitwell <[email protected]>
+ * Keith Whitwell <[email protected]>
*/
@@ -57,10 +55,10 @@
#define TEXCOORD2(s,t) DRIVER(TexCoord2f)(s,t)
#define TEXCOORD3(s,t,u) DRIVER(TexCoord3f)(s,t,u)
#define TEXCOORD4(s,t,u,v) DRIVER(TexCoord4f)(s,t,u,v)
-#define INDEX(c) DRIVER(Indexi)(c)
-#define MULTI_TEXCOORD1(z,s) DRIVER(MultiTexCoord1fARB)(z,s)
+#define INDEX(c) DRIVER(Indexi)(c)
+#define MULTI_TEXCOORD1(z,s) DRIVER(MultiTexCoord1fARB)(z,s)
#define MULTI_TEXCOORD2(z,s,t) DRIVER(MultiTexCoord2fARB)(z,s,t)
-#define MULTI_TEXCOORD3(z,s,t,u) DRIVER(MultiTexCoord3fARB)(z,s,t,u)
+#define MULTI_TEXCOORD3(z,s,t,u) DRIVER(MultiTexCoord3fARB)(z,s,t,u)
#define MULTI_TEXCOORD4(z,s,t,u,v) DRIVER(MultiTexCoord4fARB)(z,s,t,u,v)
#define EVALCOORD1(x) DRIVER(EvalCoord1f)(x)
#define EVALCOORD2(x,y) DRIVER(EvalCoord2f)(x,y)
@@ -177,7 +175,7 @@ loopback_Color4i( GLint red, GLint green, GLint blue, GLint alpha )
}
static void
-loopback_Color4s( GLshort red, GLshort green, GLshort blue,
+loopback_Color4s( GLshort red, GLshort green, GLshort blue,
GLshort alpha )
{
GLubyte col[4];
@@ -200,7 +198,7 @@ loopback_Color4ui( GLuint red, GLuint green, GLuint blue, GLuint alpha )
}
static void
-loopback_Color4us( GLushort red, GLushort green, GLushort blue,
+loopback_Color4us( GLushort red, GLushort green, GLushort blue,
GLushort alpha )
{
GLubyte col[4];
@@ -249,7 +247,7 @@ loopback_Color3iv( const GLint *v )
static void
loopback_Color3sv( const GLshort *v )
-{
+{
GLubyte col[4];
col[0] = SHORT_TO_UBYTE(v[0]);
col[1] = SHORT_TO_UBYTE(v[1]);
@@ -354,9 +352,9 @@ loopback_Color4usv( const GLushort *v)
static void
loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue )
{
- COLORF( BYTE_TO_FLOAT(red),
+ COLORF( BYTE_TO_FLOAT(red),
BYTE_TO_FLOAT(green),
- BYTE_TO_FLOAT(blue),
+ BYTE_TO_FLOAT(blue),
1.0 );
}
@@ -438,7 +436,7 @@ loopback_Color3usv_f( const GLushort *v )
static void
-loopback_Color4b_f( GLbyte red, GLbyte green, GLbyte blue,
+loopback_Color4b_f( GLbyte red, GLbyte green, GLbyte blue,
GLbyte alpha )
{
COLORF( BYTE_TO_FLOAT(red), BYTE_TO_FLOAT(green),
@@ -460,7 +458,7 @@ loopback_Color4i_f( GLint red, GLint green, GLint blue, GLint alpha )
}
static void
-loopback_Color4s_f( GLshort red, GLshort green, GLshort blue,
+loopback_Color4s_f( GLshort red, GLshort green, GLshort blue,
GLshort alpha )
{
COLORF( SHORT_TO_FLOAT(red), SHORT_TO_FLOAT(green),
@@ -878,21 +876,21 @@ loopback_Vertex3sv( const GLshort *v )
static void
loopback_Vertex4dv( const GLdouble *v )
{
- VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
+ VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
(GLfloat) v[2], (GLfloat) v[3] );
}
static void
loopback_Vertex4iv( const GLint *v )
{
- VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
+ VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
(GLfloat) v[2], (GLfloat) v[3] );
}
static void
loopback_Vertex4sv( const GLshort *v )
{
- VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
+ VERTEX4( (GLfloat) v[0], (GLfloat) v[1],
(GLfloat) v[2], (GLfloat) v[3] );
}
@@ -1365,7 +1363,7 @@ loopback_SecondaryColor3usvEXT_f( const GLushort *v )
void
-_mesa_loopback_prefer_float( struct _glapi_table *dest,
+_mesa_loopback_prefer_float( struct _glapi_table *dest,
GLboolean prefer_float_colors )
{
if (!prefer_float_colors) {
@@ -1405,7 +1403,7 @@ _mesa_loopback_prefer_float( struct _glapi_table *dest,
dest->SecondaryColor3svEXT = loopback_SecondaryColor3svEXT;
dest->SecondaryColor3uivEXT = loopback_SecondaryColor3uivEXT;
dest->SecondaryColor3usvEXT = loopback_SecondaryColor3usvEXT;
- }
+ }
else {
dest->Color3b = loopback_Color3b_f;
dest->Color3d = loopback_Color3d_f;
@@ -1448,13 +1446,13 @@ _mesa_loopback_prefer_float( struct _glapi_table *dest,
/* Passing prefer_f_colors as true will mean that all colors
* *except* Color{34}ub{v} are passed as floats. Setting it false will
- * mean all colors *except* Color{34}f{v} are passed as ubytes.
- *
+ * mean all colors *except* Color{34}f{v} are passed as ubytes.
+ *
* This code never registers handlers for any of the entry points
- * listed in vtxfmt.h.
+ * listed in vtxfmt.h.
*/
void
-_mesa_loopback_init_api_table( struct _glapi_table *dest,
+_mesa_loopback_init_api_table( struct _glapi_table *dest,
GLboolean prefer_float_colors )
{
_mesa_loopback_prefer_float( dest, prefer_float_colors );
diff --git a/src/mesa/main/api_loopback.h b/src/mesa/main/api_loopback.h
index 1c8e81733f5..901c70cde6a 100644
--- a/src/mesa/main/api_loopback.h
+++ b/src/mesa/main/api_loopback.h
@@ -1,3 +1,29 @@
+/* $Id: api_loopback.h,v 1.2 2001/03/12 00:48:37 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
#ifndef API_LOOPBACK_H
#define API_LOOPBACK_H
@@ -5,10 +31,10 @@
struct _glapi_table;
-extern void _mesa_loopback_prefer_float( struct _glapi_table *dest,
+extern void _mesa_loopback_prefer_float( struct _glapi_table *dest,
GLboolean prefer_float_colors );
-extern void _mesa_loopback_init_api_table( struct _glapi_table *dest,
+extern void _mesa_loopback_init_api_table( struct _glapi_table *dest,
GLboolean prefer_float_colors );
#endif
diff --git a/src/mesa/main/api_noop.h b/src/mesa/main/api_noop.h
index b656ec6d442..c80179d2930 100644
--- a/src/mesa/main/api_noop.h
+++ b/src/mesa/main/api_noop.h
@@ -1,3 +1,28 @@
+/* $Id: api_noop.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
#ifndef _API_NOOP_H
#define _API_NOOP_H
@@ -52,17 +77,17 @@ extern void _mesa_noop_MultiTexCoord1fARB( GLenum target, GLfloat a );
extern void _mesa_noop_MultiTexCoord1fvARB( GLenum target, GLfloat *v );
-extern void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a,
+extern void _mesa_noop_MultiTexCoord2fARB( GLenum target, GLfloat a,
GLfloat b );
extern void _mesa_noop_MultiTexCoord2fvARB( GLenum target, GLfloat *v );
-extern void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a,
+extern void _mesa_noop_MultiTexCoord3fARB( GLenum target, GLfloat a,
GLfloat b, GLfloat c);
extern void _mesa_noop_MultiTexCoord3fvARB( GLenum target, GLfloat *v );
-extern void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a,
+extern void _mesa_noop_MultiTexCoord4fARB( GLenum target, GLfloat a,
GLfloat b, GLfloat c, GLfloat d );
extern void _mesa_noop_MultiTexCoord4fvARB( GLenum target, GLfloat *v );
@@ -94,17 +119,17 @@ extern void _mesa_noop_TexCoord4fv( GLfloat *v );
/* Not strictly a noop -- translate Rectf down to Begin/End and
* vertices. Closer to the loopback operations, but doesn't meet the
- * criteria for inclusion there (cannot be used in the Save table).
+ * criteria for inclusion there (cannot be used in the Save table).
*/
extern void _mesa_noop_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 );
extern void _mesa_noop_DrawArrays(GLenum mode, GLint start, GLsizei count);
-extern void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
+extern void _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices);
-extern void _mesa_noop_DrawRangeElements(GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
+extern void _mesa_noop_DrawRangeElements(GLenum mode,
+ GLuint start, GLuint end,
+ GLsizei count, GLenum type,
const GLvoid *indices);
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 8d3cbafc64c..3a0ce52b960 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -1,11 +1,10 @@
-
-/* $Id: api_validate.c,v 1.4 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: api_validate.c,v 1.5 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -34,10 +33,10 @@
GLboolean
_mesa_validate_DrawElements(GLcontext *ctx,
- GLenum mode, GLsizei count, GLenum type,
+ GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count <= 0) {
if (count < 0)
@@ -45,14 +44,14 @@ _mesa_validate_DrawElements(GLcontext *ctx,
return GL_FALSE;
}
- if (mode < 0 ||
+ if (mode < 0 ||
mode > GL_POLYGON) {
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)" );
return GL_FALSE;
}
- if (type != GL_UNSIGNED_INT &&
- type != GL_UNSIGNED_BYTE &&
+ if (type != GL_UNSIGNED_INT &&
+ type != GL_UNSIGNED_BYTE &&
type != GL_UNSIGNED_SHORT)
{
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
@@ -70,12 +69,12 @@ _mesa_validate_DrawElements(GLcontext *ctx,
GLboolean
-_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
+_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
+ GLuint start, GLuint end,
+ GLsizei count, GLenum type,
const GLvoid *indices)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count <= 0) {
if (count < 0)
@@ -93,8 +92,8 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
return GL_FALSE;
}
- if (type != GL_UNSIGNED_INT &&
- type != GL_UNSIGNED_BYTE &&
+ if (type != GL_UNSIGNED_INT &&
+ type != GL_UNSIGNED_BYTE &&
type != GL_UNSIGNED_SHORT)
{
_mesa_error(ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
@@ -113,10 +112,10 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
GLboolean
-_mesa_validate_DrawArrays(GLcontext *ctx,
+_mesa_validate_DrawArrays(GLcontext *ctx,
GLenum mode, GLint start, GLsizei count)
{
- ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (count<0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glDrawArrays(count)" );
@@ -131,9 +130,8 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
if (ctx->NewState)
_mesa_update_state( ctx );
- if (!ctx->Array.Vertex.Enabled)
+ if (!ctx->Array.Vertex.Enabled)
return GL_FALSE;
return GL_TRUE;
}
-
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h
index 7f381a04292..f24365055bb 100644
--- a/src/mesa/main/api_validate.h
+++ b/src/mesa/main/api_validate.h
@@ -1,10 +1,10 @@
-/* $Id: api_validate.h,v 1.1 2000/12/26 05:09:27 keithw Exp $ */
+/* $Id: api_validate.h,v 1.2 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -37,13 +37,13 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
extern GLboolean
_mesa_validate_DrawElements(GLcontext *ctx,
- GLenum mode, GLsizei count, GLenum type,
+ GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices);
extern GLboolean
-_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
+_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
+ GLuint start, GLuint end,
+ GLsizei count, GLenum type,
const GLvoid *indices);
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 00394a7970d..700106ea8f1 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.45 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: attrib.c,v 1.46 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -983,6 +983,3 @@ _mesa_PopClientAttrib(void)
attr = next;
}
}
-
-
-
diff --git a/src/mesa/main/attrib.h b/src/mesa/main/attrib.h
index d478aeb0654..5ce75fcd913 100644
--- a/src/mesa/main/attrib.h
+++ b/src/mesa/main/attrib.h
@@ -1,10 +1,10 @@
-/* $Id: attrib.h,v 1.4 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: attrib.h,v 1.5 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 342d0a48d98..ef26563add6 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -1,4 +1,4 @@
-/* $Id: blend.c,v 1.30 2001/03/07 00:21:32 brianp Exp $ */
+/* $Id: blend.c,v 1.31 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -40,7 +40,7 @@
void
_mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
{
-
+
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -112,7 +112,7 @@ _mesa_BlendFunc( GLenum sfactor, GLenum dfactor )
ctx->Color.BlendDstRGB = ctx->Color.BlendDstA = dfactor;
ctx->Color.BlendSrcRGB = ctx->Color.BlendSrcA = sfactor;
- if (ctx->Driver.BlendFunc)
+ if (ctx->Driver.BlendFunc)
ctx->Driver.BlendFunc( ctx, sfactor, dfactor );
}
@@ -309,7 +309,7 @@ _mesa_BlendEquation( GLenum mode )
/* This is needed to support 1.1's RGB logic ops AND
* 1.0's blending logicops.
*/
- ctx->Color.ColorLogicOpEnabled = (mode==GL_LOGIC_OP &&
+ ctx->Color.ColorLogicOpEnabled = (mode==GL_LOGIC_OP &&
ctx->Color.BlendEnabled);
if (ctx->Driver.BlendEquation)
@@ -339,4 +339,3 @@ _mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
if (ctx->Driver.BlendColor)
(*ctx->Driver.BlendColor)(ctx, tmp);
}
-
diff --git a/src/mesa/main/blend.h b/src/mesa/main/blend.h
index 186cee857de..c2ec7093e28 100644
--- a/src/mesa/main/blend.h
+++ b/src/mesa/main/blend.h
@@ -1,10 +1,10 @@
-/* $Id: blend.h,v 1.7 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: blend.h,v 1.8 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 6d7bb9b3758..c2737ad5f05 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -1,4 +1,4 @@
-/* $Id: buffers.c,v 1.27 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: buffers.c,v 1.28 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -53,7 +53,7 @@ _mesa_ClearIndex( GLfloat c )
if (ctx->Color.ClearIndex == (GLuint) c)
return;
-
+
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.ClearIndex = (GLuint) c;
diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h
index 8700e407009..a453c3e1a29 100644
--- a/src/mesa/main/buffers.h
+++ b/src/mesa/main/buffers.h
@@ -1,10 +1,10 @@
-/* $Id: buffers.h,v 1.2 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: buffers.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/clip.c b/src/mesa/main/clip.c
index 14930e2be34..026d3e5695d 100644
--- a/src/mesa/main/clip.c
+++ b/src/mesa/main/clip.c
@@ -1,10 +1,10 @@
-/* $Id: clip.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
+/* $Id: clip.c,v 1.22 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -84,7 +84,7 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq )
if (TEST_EQ_4V(ctx->Transform.EyeUserPlane[p], equation))
return;
-
+
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
COPY_4FV(ctx->Transform.EyeUserPlane[p], equation);
diff --git a/src/mesa/main/clip.h b/src/mesa/main/clip.h
index 19c5fe6a5dd..6d034b64b83 100644
--- a/src/mesa/main/clip.h
+++ b/src/mesa/main/clip.h
@@ -1,10 +1,10 @@
-/* $Id: clip.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: clip.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index c3ba3c50c9d..eae856b300c 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -1,21 +1,21 @@
-/* $Id: colortab.c,v 1.36 2001/03/07 05:06:11 brianp Exp $ */
+/* $Id: colortab.c,v 1.37 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -184,7 +184,7 @@ set_component_sizes( struct gl_color_table *table )
-void
+void
_mesa_ColorTable( GLenum target, GLenum internalFormat,
GLsizei width, GLenum format, GLenum type,
const GLvoid *data )
@@ -424,7 +424,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
(*ctx->Driver.UpdateTexturePalette)( ctx, texObj );
}
}
-
+
ctx->NewState |= _NEW_PIXEL;
}
@@ -598,7 +598,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
(*ctx->Driver.UpdateTexturePalette)( ctx, texObj );
}
}
-
+
ctx->NewState |= _NEW_PIXEL;
}
diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h
index cf866c66c24..813b4e28771 100644
--- a/src/mesa/main/colortab.h
+++ b/src/mesa/main/colortab.h
@@ -1,10 +1,10 @@
-/* $Id: colortab.h,v 1.8 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: colortab.h,v 1.9 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index fd2e1b599a6..dff7c401380 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -1,21 +1,21 @@
-/* $Id: config.h,v 1.26 2000/12/28 22:11:05 keithw Exp $ */
+/* $Id: config.h,v 1.27 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 792862c0270..e4e5c5f1c20 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -1,10 +1,10 @@
-/* $Id: context.h,v 1.24 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: context.h,v 1.25 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index dcc4d59f800..5031f95b622 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -1,4 +1,4 @@
-/* $Id: convolve.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
+/* $Id: convolve.c,v 1.22 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -550,13 +550,13 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi
ctx->Unpack.SkipImages = 0;
ctx->Unpack.SwapBytes = GL_FALSE;
ctx->Unpack.LsbFirst = GL_FALSE;
- ctx->NewState |= _NEW_PACKUNPACK;
+ ctx->NewState |= _NEW_PACKUNPACK;
_mesa_ConvolutionFilter2D(target, internalFormat, width, height,
GL_RGBA, CHAN_TYPE, rgba);
ctx->Unpack = packSave; /* restore pixel packing params */
- ctx->NewState |= _NEW_PACKUNPACK;
+ ctx->NewState |= _NEW_PACKUNPACK;
}
@@ -1450,4 +1450,3 @@ _mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions,
*height = *height - (MAX2(ctx->Separable2D.Height, 1) - 1);
}
}
-
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 4f4cff75561..1e3671b5e56 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1,10 +1,10 @@
-/* $Id: dd.h,v 1.57 2001/03/11 18:49:11 gareth Exp $ */
+/* $Id: dd.h,v 1.58 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 62c3e1fc34b..2295916b320 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -1,3 +1,29 @@
+/* $Id: debug.c,v 1.9 2001/03/12 00:48:37 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
#include "mtypes.h"
#include "debug.h"
diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h
index 929a877cf98..2565f018c53 100644
--- a/src/mesa/main/debug.h
+++ b/src/mesa/main/debug.h
@@ -1,3 +1,29 @@
+/* $Id: debug.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
#ifndef _DEBUG_H
#define _DEBUG_H
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index 82ca1bd3454..fa77439394d 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -1,10 +1,10 @@
-/* $Id: depth.c,v 1.26 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: depth.c,v 1.27 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -87,9 +87,9 @@ _mesa_DepthFunc( GLenum func )
return;
}
- if (ctx->Depth.Func == func)
+ if (ctx->Depth.Func == func)
return;
-
+
FLUSH_VERTICES(ctx, _NEW_DEPTH);
ctx->Depth.Func = func;
@@ -98,7 +98,7 @@ _mesa_DepthFunc( GLenum func )
else
ctx->_TriangleCaps &= ~DD_Z_NEVER;
- if (ctx->Driver.DepthFunc)
+ if (ctx->Driver.DepthFunc)
ctx->Driver.DepthFunc( ctx, func );
}
@@ -117,14 +117,12 @@ _mesa_DepthMask( GLboolean flag )
* GL_TRUE indicates depth buffer writing is enabled (default)
* GL_FALSE indicates depth buffer writing is disabled
*/
- if (ctx->Depth.Mask == flag)
+ if (ctx->Depth.Mask == flag)
return;
-
+
FLUSH_VERTICES(ctx, _NEW_DEPTH);
ctx->Depth.Mask = flag;
- if (ctx->Driver.DepthMask)
+ if (ctx->Driver.DepthMask)
ctx->Driver.DepthMask( ctx, flag );
}
-
-
diff --git a/src/mesa/main/depth.h b/src/mesa/main/depth.h
index 2120507fdf8..e9c2885b7f3 100644
--- a/src/mesa/main/depth.h
+++ b/src/mesa/main/depth.h
@@ -1,10 +1,10 @@
-/* $Id: depth.h,v 1.10 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: depth.h,v 1.11 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c
index 3c19e562e50..7582732e235 100644
--- a/src/mesa/main/dispatch.c
+++ b/src/mesa/main/dispatch.c
@@ -1,10 +1,10 @@
-/* $Id: dispatch.c,v 1.19 2001/01/08 04:09:41 keithw Exp $ */
+/* $Id: dispatch.c,v 1.20 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -117,4 +117,3 @@ trace(void)
#define DO_GEOMETRY
#include "glapitemp.h"
-
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 4f93d0d7684..d727a118c2d 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,4 +1,4 @@
-/* $Id: dlist.c,v 1.66 2001/03/07 05:06:11 brianp Exp $ */
+/* $Id: dlist.c,v 1.67 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -4767,7 +4767,7 @@ _mesa_NewList( GLuint list, GLenum mode )
/*
- * End definition of current display list. Is the current
+ * End definition of current display list. Is the current
* ASSERT_OUTSIDE_BEGIN_END strong enough to really guarentee that
* we are outside begin/end calls?
*/
@@ -5088,7 +5088,7 @@ static void exec_GetTexLevelParameteriv( GLenum target, GLint level,
ctx->Exec->GetTexLevelParameteriv( target, level, pname, params );
}
-static void exec_GetTexParameterfv( GLenum target, GLenum pname,
+static void exec_GetTexParameterfv( GLenum target, GLenum pname,
GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
@@ -5161,7 +5161,7 @@ static GLboolean exec_AreTexturesResident(GLsizei n, const GLuint *texName,
return ctx->Exec->AreTexturesResident( n, texName, residences);
}
-static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
+static void exec_ColorPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5218,7 +5218,7 @@ static void exec_IndexPointer(GLenum type, GLsizei stride, const GLvoid *ptr)
ctx->Exec->IndexPointer( type, stride, ptr);
}
-static void exec_InterleavedArrays(GLenum format, GLsizei stride,
+static void exec_InterleavedArrays(GLenum format, GLsizei stride,
const GLvoid *pointer)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5254,7 +5254,7 @@ static void exec_PushClientAttrib(GLbitfield mask)
ctx->Exec->PushClientAttrib( mask);
}
-static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
+static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5262,7 +5262,7 @@ static void exec_TexCoordPointer(GLint size, GLenum type, GLsizei stride,
ctx->Exec->TexCoordPointer( size, type, stride, ptr);
}
-static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
+static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
GLvoid *img)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5270,7 +5270,7 @@ static void exec_GetCompressedTexImageARB(GLenum target, GLint level,
ctx->Exec->GetCompressedTexImageARB( target, level, img);
}
-static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
+static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5278,7 +5278,7 @@ static void exec_VertexPointer(GLint size, GLenum type, GLsizei stride,
ctx->Exec->VertexPointer( size, type, stride, ptr);
}
-static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
+static void exec_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat,
GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5304,7 +5304,7 @@ static void exec_GetColorTable( GLenum target, GLenum format,
ctx->Exec->GetColorTable( target, format, type, data );
}
-static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
+static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
@@ -5312,7 +5312,7 @@ static void exec_GetColorTableParameterfv( GLenum target, GLenum pname,
ctx->Exec->GetColorTableParameterfv( target, pname, params );
}
-static void exec_GetColorTableParameteriv( GLenum target, GLenum pname,
+static void exec_GetColorTableParameteriv( GLenum target, GLenum pname,
GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
@@ -5328,7 +5328,7 @@ static void exec_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
ctx->Exec->GetConvolutionFilter( target, format, type, image);
}
-static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
+static void exec_GetConvolutionParameterfv(GLenum target, GLenum pname,
GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5344,7 +5344,7 @@ static void exec_GetConvolutionParameteriv(GLenum target, GLenum pname,
ctx->Exec->GetConvolutionParameteriv( target, pname, params);
}
-static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
+static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5352,7 +5352,7 @@ static void exec_GetHistogram(GLenum target, GLboolean reset, GLenum format,
ctx->Exec->GetHistogram( target, reset, format, type, values);
}
-static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
+static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5360,7 +5360,7 @@ static void exec_GetHistogramParameterfv(GLenum target, GLenum pname,
ctx->Exec->GetHistogramParameterfv( target, pname, params);
}
-static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
+static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5368,7 +5368,7 @@ static void exec_GetHistogramParameteriv(GLenum target, GLenum pname,
ctx->Exec->GetHistogramParameteriv( target, pname, params);
}
-static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
+static void exec_GetMinmax(GLenum target, GLboolean reset, GLenum format,
GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5392,7 +5392,7 @@ static void exec_GetMinmaxParameteriv(GLenum target, GLenum pname,
ctx->Exec->GetMinmaxParameteriv( target, pname, params);
}
-static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
+static void exec_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
GLvoid *row, GLvoid *column, GLvoid *span)
{
GET_CURRENT_CONTEXT(ctx);
@@ -5502,7 +5502,7 @@ static void exec_SecondaryColorPointerEXT(GLint size, GLenum type,
ctx->Exec->SecondaryColorPointerEXT( size, type, stride, ptr);
}
-static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
+static void exec_FogCoordPointerEXT(GLenum type, GLsizei stride,
const GLvoid *ptr)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h
index ad98244e83f..62623d9377d 100644
--- a/src/mesa/main/dlist.h
+++ b/src/mesa/main/dlist.h
@@ -1,10 +1,10 @@
-/* $Id: dlist.h,v 1.13 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: dlist.h,v 1.14 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -91,7 +91,7 @@ _mesa_alloc_opcode( GLcontext *ctx, GLuint sz,
void (*destroy)( GLcontext *, void * ),
void (*print)( GLcontext *, void * ) );
-extern void _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2,
+extern void _mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2,
GLint j1, GLint j2 );
extern void _mesa_save_EvalMesh1( GLenum mode, GLint i1, GLint i2 );
extern void _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists );
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 77da0f7ed89..4d7d938a69b 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,10 +1,10 @@
-/* $Id: drawpix.c,v 1.49 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: drawpix.c,v 1.50 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -102,4 +102,3 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
}
}
}
-
diff --git a/src/mesa/main/drawpix.h b/src/mesa/main/drawpix.h
index 37c8d3ab99f..c199877e4ac 100644
--- a/src/mesa/main/drawpix.h
+++ b/src/mesa/main/drawpix.h
@@ -1,10 +1,10 @@
-/* $Id: drawpix.h,v 1.5 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: drawpix.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 3e0de24314e..e9642cca5ef 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.44 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: enable.c,v 1.45 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -67,7 +67,7 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
var = &ctx->Array.Index.Enabled;
flag = _NEW_ARRAY_INDEX;
break;
- case GL_TEXTURE_COORD_ARRAY:
+ case GL_TEXTURE_COORD_ARRAY:
var = &ctx->Array.TexCoord[ctx->Array.ActiveTexture].Enabled;
flag = _NEW_ARRAY_TEXCOORD(ctx->Array.ActiveTexture);
break;
@@ -95,7 +95,7 @@ client_state( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Array.NewState |= flag;
*var = state;
- if (state)
+ if (state)
ctx->Array._Enabled |= flag;
else
ctx->Array._Enabled &= ~flag;
@@ -139,7 +139,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
switch (cap) {
case GL_ALPHA_TEST:
- if (ctx->Color.AlphaEnabled == state)
+ if (ctx->Color.AlphaEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.AlphaEnabled = state;
@@ -151,13 +151,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Eval.AutoNormal = state;
break;
case GL_BLEND:
- if (ctx->Color.BlendEnabled == state)
+ if (ctx->Color.BlendEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.BlendEnabled = state;
/* The following needed to accomodate 1.0 RGB logic op blending */
- ctx->Color.ColorLogicOpEnabled =
+ ctx->Color.ColorLogicOpEnabled =
(ctx->Color.BlendEquation == GL_LOGIC_OP && state);
break;
case GL_CLIP_PLANE0:
@@ -167,7 +167,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
case GL_CLIP_PLANE4:
case GL_CLIP_PLANE5: {
GLuint p = cap-GL_CLIP_PLANE0;
-
+
if (ctx->Transform.ClipEnabled[p] == state)
return;
@@ -177,11 +177,11 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
if (state) {
ctx->_Enabled |= ENABLE_USERCLIP;
ctx->Transform._AnyClip++;
-
+
if (ctx->ProjectionMatrix.flags & MAT_DIRTY) {
_math_matrix_analyse( &ctx->ProjectionMatrix );
}
-
+
/* This derived state also calculated in clip.c and
* from _mesa_update_state() on changes to EyeUserPlane
* and ctx->ProjectionMatrix respectively.
@@ -191,12 +191,12 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->ProjectionMatrix.inv );
} else {
if (--ctx->Transform._AnyClip == 0)
- ctx->_Enabled &= ~ENABLE_USERCLIP;
- }
+ ctx->_Enabled &= ~ENABLE_USERCLIP;
+ }
}
break;
case GL_COLOR_MATERIAL:
- if (ctx->Light.ColorMaterialEnabled == state)
+ if (ctx->Light.ColorMaterialEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.ColorMaterialEnabled = state;
@@ -206,7 +206,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
}
break;
case GL_CULL_FACE:
- if (ctx->Polygon.CullFlag == state)
+ if (ctx->Polygon.CullFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.CullFlag = state;
@@ -216,7 +216,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
_mesa_warning(ctx,"glEnable(GL_DEPTH_TEST) but no depth buffer");
return;
}
- if (ctx->Depth.Test==state)
+ if (ctx->Depth.Test==state)
return;
FLUSH_VERTICES(ctx, _NEW_DEPTH);
ctx->Depth.Test = state;
@@ -225,13 +225,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
if (ctx->NoDither) {
state = GL_FALSE; /* MESA_NO_DITHER env var */
}
- if (ctx->Color.DitherFlag==state)
+ if (ctx->Color.DitherFlag==state)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.DitherFlag = state;
break;
case GL_FOG:
- if (ctx->Fog.Enabled==state)
+ if (ctx->Fog.Enabled==state)
return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.Enabled = state;
@@ -255,7 +255,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
case GL_LIGHT5:
case GL_LIGHT6:
case GL_LIGHT7:
- if (ctx->Light.Light[cap-GL_LIGHT0].Enabled == state)
+ if (ctx->Light.Light[cap-GL_LIGHT0].Enabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Light[cap-GL_LIGHT0].Enabled = state;
@@ -268,7 +268,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
}
break;
case GL_LIGHTING:
- if (ctx->Light.Enabled == state)
+ if (ctx->Light.Enabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
ctx->Light.Enabled = state;
@@ -277,33 +277,33 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
if ((ctx->Light.Enabled &&
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|| ctx->Fog.ColorSumEnabled)
- ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
+ ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
else
- ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
+ ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
break;
case GL_LINE_SMOOTH:
- if (ctx->Line.SmoothFlag == state)
+ if (ctx->Line.SmoothFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.SmoothFlag = state;
ctx->_TriangleCaps ^= DD_LINE_SMOOTH;
break;
case GL_LINE_STIPPLE:
- if (ctx->Line.StippleFlag == state)
+ if (ctx->Line.StippleFlag == state)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.StippleFlag = state;
ctx->_TriangleCaps ^= DD_LINE_STIPPLE;
break;
case GL_INDEX_LOGIC_OP:
- if (ctx->Color.IndexLogicOpEnabled == state)
+ if (ctx->Color.IndexLogicOpEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.IndexLogicOpEnabled = state;
break;
case GL_COLOR_LOGIC_OP:
- if (ctx->Color.ColorLogicOpEnabled == state)
+ if (ctx->Color.ColorLogicOpEnabled == state)
return;
FLUSH_VERTICES(ctx, _NEW_COLOR);
ctx->Color.ColorLogicOpEnabled = state;
@@ -423,61 +423,61 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Pixel.MinMaxEnabled = state;
break;
case GL_NORMALIZE:
- if (ctx->Transform.Normalize == state)
+ if (ctx->Transform.Normalize == state)
return;
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
ctx->Transform.Normalize = state;
ctx->_Enabled ^= ENABLE_NORMALIZE;
break;
case GL_POINT_SMOOTH:
- if (ctx->Point.SmoothFlag==state)
+ if (ctx->Point.SmoothFlag==state)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.SmoothFlag = state;
ctx->_TriangleCaps ^= DD_POINT_SMOOTH;
break;
case GL_POLYGON_SMOOTH:
- if (ctx->Polygon.SmoothFlag==state)
+ if (ctx->Polygon.SmoothFlag==state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.SmoothFlag = state;
ctx->_TriangleCaps ^= DD_TRI_SMOOTH;
break;
case GL_POLYGON_STIPPLE:
- if (ctx->Polygon.StippleFlag==state)
+ if (ctx->Polygon.StippleFlag==state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.StippleFlag = state;
ctx->_TriangleCaps ^= DD_TRI_STIPPLE;
break;
case GL_POLYGON_OFFSET_POINT:
- if (ctx->Polygon.OffsetPoint==state)
+ if (ctx->Polygon.OffsetPoint==state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.OffsetPoint = state;
break;
case GL_POLYGON_OFFSET_LINE:
- if (ctx->Polygon.OffsetLine==state)
+ if (ctx->Polygon.OffsetLine==state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.OffsetLine = state;
break;
case GL_POLYGON_OFFSET_FILL:
/*case GL_POLYGON_OFFSET_EXT:*/
- if (ctx->Polygon.OffsetFill==state)
+ if (ctx->Polygon.OffsetFill==state)
return;
FLUSH_VERTICES(ctx, _NEW_POLYGON);
ctx->Polygon.OffsetFill = state;
break;
case GL_RESCALE_NORMAL_EXT:
- if (ctx->Transform.RescaleNormals == state)
+ if (ctx->Transform.RescaleNormals == state)
return;
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
ctx->Transform.RescaleNormals = state;
ctx->_Enabled ^= ENABLE_RESCALE;
break;
case GL_SCISSOR_TEST:
- if (ctx->Scissor.Enabled==state)
+ if (ctx->Scissor.Enabled==state)
return;
FLUSH_VERTICES(ctx, _NEW_SCISSOR);
ctx->Scissor.Enabled = state;
@@ -493,7 +493,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
_mesa_warning(ctx, "glEnable(GL_STENCIL_TEST) but no stencil buffer");
return;
}
- if (ctx->Stencil.Enabled==state)
+ if (ctx->Stencil.Enabled==state)
return;
FLUSH_VERTICES(ctx, _NEW_STENCIL);
ctx->Stencil.Enabled = state;
@@ -503,7 +503,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
const GLuint curr = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_1D;
- if (state)
+ if (state)
newenabled |= TEXTURE0_1D;
if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled)
return;
@@ -515,7 +515,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
const GLuint curr = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_2D;
- if (state)
+ if (state)
newenabled |= TEXTURE0_2D;
if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled)
return;
@@ -527,7 +527,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
const GLuint curr = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_3D;
- if (state)
+ if (state)
newenabled |= TEXTURE0_3D;
if (!ctx->Visual.rgbMode || texUnit->Enabled == newenabled)
return;
@@ -558,7 +558,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texUnit->TexGenEnabled = newenabled;
break;
- }
+ }
break;
case GL_TEXTURE_GEN_S: {
GLuint unit = ctx->Texture.CurrentUnit;
@@ -571,7 +571,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
texUnit->TexGenEnabled = newenabled;
break;
- }
+ }
break;
case GL_TEXTURE_GEN_T: {
GLuint unit = ctx->Texture.CurrentUnit;
@@ -594,7 +594,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
case GL_NORMAL_ARRAY:
case GL_COLOR_ARRAY:
case GL_INDEX_ARRAY:
- case GL_TEXTURE_COORD_ARRAY:
+ case GL_TEXTURE_COORD_ARRAY:
case GL_EDGE_FLAG_ARRAY:
case GL_FOG_COORDINATE_ARRAY_EXT:
case GL_SECONDARY_COLOR_ARRAY_EXT:
@@ -710,7 +710,7 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
const GLuint curr = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
GLuint newenabled = texUnit->Enabled & ~TEXTURE0_CUBE;
- if (state)
+ if (state)
newenabled |= TEXTURE0_CUBE;
if (!ctx->Extensions.ARB_texture_cube_map) {
_mesa_error(ctx, GL_INVALID_ENUM, state ? "glEnable" : "glDisable");
@@ -732,13 +732,13 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.ColorSumEnabled = state;
-
+
if ((ctx->Light.Enabled &&
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|| ctx->Fog.ColorSumEnabled)
- ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
+ ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
else
- ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
+ ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
break;
@@ -1011,10 +1011,3 @@ _mesa_IsEnabled( GLenum cap )
return GL_FALSE;
}
}
-
-
-
-
-
-
-
diff --git a/src/mesa/main/enable.h b/src/mesa/main/enable.h
index f47e807c591..24f48f0aefa 100644
--- a/src/mesa/main/enable.h
+++ b/src/mesa/main/enable.h
@@ -1,10 +1,10 @@
-/* $Id: enable.h,v 1.3 2000/11/22 07:32:16 joukj Exp $ */
+/* $Id: enable.h,v 1.4 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index faaa92c6580..bccd0a861db 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -1,10 +1,10 @@
-/* $Id: enums.c,v 1.13 2001/03/07 05:06:11 brianp Exp $ */
+/* $Id: enums.c,v 1.14 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -22,7 +22,7 @@
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
+ *
* Author:
* Keith Whitwell <[email protected]>
*/
@@ -911,5 +911,3 @@ const char *_mesa_lookup_enum_by_nr( int nr )
return f ? (*f)->c : "(unknown)";
}
-
-
diff --git a/src/mesa/main/enums.h b/src/mesa/main/enums.h
index a6b2141f7af..6a859172530 100644
--- a/src/mesa/main/enums.h
+++ b/src/mesa/main/enums.h
@@ -1,21 +1,21 @@
-/* $Id: enums.h,v 1.2 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: enums.h,v 1.3 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
- *
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c
index d012ace8c54..a992a3922e1 100644
--- a/src/mesa/main/eval.c
+++ b/src/mesa/main/eval.c
@@ -1,10 +1,10 @@
-/* $Id: eval.c,v 1.18 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: eval.c,v 1.19 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -252,7 +252,7 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride,
GLint k;
GLfloat *pnts;
struct gl_1d_map *map = 0;
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
assert(type == GL_FLOAT || type == GL_DOUBLE);
@@ -432,8 +432,8 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
else
pnts = _mesa_copy_map_points2d(target, ustride, uorder,
vstride, vorder, (GLdouble*) points);
-
-
+
+
FLUSH_VERTICES(ctx, _NEW_EVAL);
map->Uorder = uorder;
map->u1 = u1;
@@ -1354,7 +1354,3 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
{
_mesa_MapGrid2f( un, u1, u2, vn, v1, v2 );
}
-
-
-
-
diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h
index 8db01370a67..ce1e9b279b7 100644
--- a/src/mesa/main/eval.h
+++ b/src/mesa/main/eval.h
@@ -1,10 +1,10 @@
-/* $Id: eval.h,v 1.5 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: eval.h,v 1.6 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/extensions.h b/src/mesa/main/extensions.h
index 6be585b0851..c5015bf478f 100644
--- a/src/mesa/main/extensions.h
+++ b/src/mesa/main/extensions.h
@@ -1,4 +1,4 @@
-/* $Id: extensions.h,v 1.12 2001/02/26 23:58:12 brianp Exp $ */
+/* $Id: extensions.h,v 1.13 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -51,5 +51,3 @@ extern void _mesa_extensions_ctr( GLcontext *ctx );
extern const char *_mesa_extensions_get_string( GLcontext *ctx );
#endif
-
-
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c
index 806f3e2cd29..85363b11d6f 100644
--- a/src/mesa/main/feedback.c
+++ b/src/mesa/main/feedback.c
@@ -1,4 +1,4 @@
-/* $Id: feedback.c,v 1.22 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: feedback.c,v 1.23 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -52,7 +52,7 @@ void
_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
{
GET_CURRENT_CONTEXT(ctx);
- ASSERT_OUTSIDE_BEGIN_END(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
if (ctx->RenderMode==GL_FEEDBACK) {
_mesa_error( ctx, GL_INVALID_OPERATION, "glFeedbackBuffer" );
@@ -64,7 +64,7 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
}
if (!buffer) {
_mesa_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(buffer==NULL)" );
- ctx->Feedback.BufferSize = 0;
+ ctx->Feedback.BufferSize = 0;
return;
}
@@ -76,16 +76,16 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
ctx->Feedback._Mask = FB_3D;
break;
case GL_3D_COLOR:
- ctx->Feedback._Mask = (FB_3D |
+ ctx->Feedback._Mask = (FB_3D |
(ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX));
break;
case GL_3D_COLOR_TEXTURE:
- ctx->Feedback._Mask = (FB_3D |
- (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
+ ctx->Feedback._Mask = (FB_3D |
+ (ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
FB_TEXTURE);
break;
case GL_4D_COLOR_TEXTURE:
- ctx->Feedback._Mask = (FB_3D | FB_4D |
+ ctx->Feedback._Mask = (FB_3D | FB_4D |
(ctx->Visual.rgbMode ? FB_COLOR : FB_INDEX) |
FB_TEXTURE);
break;
@@ -405,9 +405,8 @@ _mesa_RenderMode( GLenum mode )
}
ctx->RenderMode = mode;
- if (ctx->Driver.RenderMode)
+ if (ctx->Driver.RenderMode)
ctx->Driver.RenderMode( ctx, mode );
return result;
}
-
diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h
index be2dd9a75f5..1d77032d972 100644
--- a/src/mesa/main/feedback.h
+++ b/src/mesa/main/feedback.h
@@ -1,10 +1,10 @@
-/* $Id: feedback.h,v 1.6 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: feedback.h,v 1.7 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -75,4 +75,3 @@ _mesa_RenderMode( GLenum mode );
#endif
-
diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c
index 0c1214e9a3b..a6ebb3e1101 100644
--- a/src/mesa/main/fog.c
+++ b/src/mesa/main/fog.c
@@ -1,10 +1,10 @@
-/* $Id: fog.c,v 1.33 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: fog.c,v 1.34 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -132,7 +132,7 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
ctx->Fog.Index = *params;
break;
case GL_FOG_COLOR:
- if (TEST_EQ_4V(ctx->Fog.Color, params))
+ if (TEST_EQ_4V(ctx->Fog.Color, params))
return;
FLUSH_VERTICES(ctx, _NEW_FOG);
ctx->Fog.Color[0] = params[0];
@@ -161,5 +161,3 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
(*ctx->Driver.Fogfv)( ctx, pname, params );
}
}
-
-
diff --git a/src/mesa/main/fog.h b/src/mesa/main/fog.h
index 2fdac07f5e7..af448bfb837 100644
--- a/src/mesa/main/fog.h
+++ b/src/mesa/main/fog.h
@@ -1,10 +1,10 @@
-/* $Id: fog.h,v 1.11 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: fog.h,v 1.12 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 200d66cd948..83c4d16f3af 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1,4 +1,4 @@
-/* $Id: get.c,v 1.55 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: get.c,v 1.56 2001/03/12 00:48:37 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -1214,7 +1214,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
*params = ctx->Pixel.PostColorMatrixColorTableEnabled;
break;
-
+
/* GL_EXT_secondary_color */
case GL_COLOR_SUM_EXT:
*params = ctx->Fog.ColorSumEnabled;
@@ -4568,7 +4568,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
case GL_ARRAY_ELEMENT_LOCK_COUNT_EXT:
*params = ctx->Array.LockCount;
break;
-
+
/* GL_ARB_transpose_matrix */
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
{
@@ -4937,4 +4937,3 @@ _mesa_GetError( void )
ctx->ErrorValue = (GLenum) GL_NO_ERROR;
return e;
}
-
diff --git a/src/mesa/main/get.h b/src/mesa/main/get.h
index 530a0b5f05f..92a927b0455 100644
--- a/src/mesa/main/get.h
+++ b/src/mesa/main/get.h
@@ -1,10 +1,10 @@
-/* $Id: get.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: get.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -56,4 +56,3 @@ _mesa_GetError( void );
#endif
-
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 401bbabb6dc..65aeadfb2d2 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -1,10 +1,10 @@
-/* $Id: glheader.h,v 1.17 2001/02/09 23:39:02 brianp Exp $ */
+/* $Id: glheader.h,v 1.18 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -61,7 +61,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#if defined(__linux__) && defined(__i386__)
+#if defined(__linux__) && defined(__i386__)
#include <fpu_control.h>
#endif
#endif
diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c
index 17bcd1c5f3e..0d73fc9fd21 100644
--- a/src/mesa/main/hash.c
+++ b/src/mesa/main/hash.c
@@ -1,21 +1,21 @@
-/* $Id: hash.c,v 1.9 2000/03/21 22:20:42 brianp Exp $ */
+/* $Id: hash.c,v 1.10 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
diff --git a/src/mesa/main/hash.h b/src/mesa/main/hash.h
index 90659c81b41..e31c247e3d4 100644
--- a/src/mesa/main/hash.h
+++ b/src/mesa/main/hash.h
@@ -1,21 +1,21 @@
-/* $Id: hash.h,v 1.4 2000/03/21 22:20:42 brianp Exp $ */
+/* $Id: hash.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c
index 4f132c4dd4a..ce0b27394fa 100644
--- a/src/mesa/main/hint.c
+++ b/src/mesa/main/hint.c
@@ -1,21 +1,21 @@
-/* $Id: hint.c,v 1.8 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: hint.c,v 1.9 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -117,6 +117,6 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode )
if (ctx->Driver.Hint) {
(*ctx->Driver.Hint)( ctx, target, mode );
}
-
+
return GL_TRUE;
}
diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index e616e4cf672..f115519dc63 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -1,4 +1,4 @@
-/* $Id: histogram.c,v 1.9 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: histogram.c,v 1.10 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -950,7 +950,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
ctx->Histogram.AlphaSize = 8 * sizeof(GLuint);
ctx->Histogram.LuminanceSize = 8 * sizeof(GLuint);
}
-
+
ctx->NewState |= _NEW_PIXEL;
}
@@ -975,7 +975,7 @@ _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
_mesa_error(ctx, GL_INVALID_ENUM, "glMinMax(internalFormat)");
return;
}
-
+
if (ctx->MinMax.Sink == sink)
return;
FLUSH_VERTICES(ctx, _NEW_PIXEL);
diff --git a/src/mesa/main/histogram.h b/src/mesa/main/histogram.h
index 66928e772e4..6432d91cf50 100644
--- a/src/mesa/main/histogram.h
+++ b/src/mesa/main/histogram.h
@@ -1,10 +1,10 @@
-/* $Id: histogram.h,v 1.2 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: histogram.h,v 1.3 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index d611c6e8d74..5dcd7fc64fc 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -1,4 +1,4 @@
-/* $Id: imports.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: imports.c,v 1.8 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -79,7 +79,7 @@ _mesa_warning(__GLcontext *gc, char *str)
/* Whacko XFree86 macro:
*/
#ifdef getenv
-#undef getenv
+#undef getenv
#endif
if (gc->imports.getenv(gc, "MESA_DEBUG")) {
debug = GL_TRUE;
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 6153ce117da..cf4ca182b68 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -1,10 +1,10 @@
-/* $Id: imports.h,v 1.1 2000/09/26 20:53:53 brianp Exp $ */
+/* $Id: imports.h,v 1.2 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 1ce12e35ff7..ed449b9f58f 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1,10 +1,10 @@
-/* $Id: light.c,v 1.40 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: light.c,v 1.41 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -64,7 +64,7 @@ _mesa_ShadeModel( GLenum mode )
return;
}
- if (ctx->Light.ShadeModel == mode)
+ if (ctx->Light.ShadeModel == mode)
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
@@ -146,7 +146,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
_mesa_error( ctx, GL_INVALID_VALUE, "glLight" );
return;
}
- if (l->SpotExponent == params[0])
+ if (l->SpotExponent == params[0])
return;
FLUSH_VERTICES(ctx, _NEW_LIGHT);
l->SpotExponent = params[0];
@@ -409,9 +409,9 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params )
ctx->Light.Model.TwoSide = newbool;
break;
case GL_LIGHT_MODEL_COLOR_CONTROL:
- if (params[0] == (GLfloat) GL_SINGLE_COLOR)
+ if (params[0] == (GLfloat) GL_SINGLE_COLOR)
newenum = GL_SINGLE_COLOR;
- else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR)
+ else if (params[0] == (GLfloat) GL_SEPARATE_SPECULAR_COLOR)
newenum = GL_SEPARATE_SPECULAR_COLOR;
else {
_mesa_error( ctx, GL_INVALID_ENUM, "glLightModel(param)" );
@@ -425,9 +425,9 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params )
if ((ctx->Light.Enabled &&
ctx->Light.Model.ColorControl==GL_SEPARATE_SPECULAR_COLOR)
|| ctx->Fog.ColorSumEnabled)
- ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
+ ctx->_TriangleCaps |= DD_SEPERATE_SPECULAR;
else
- ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
+ ctx->_TriangleCaps &= ~DD_SEPERATE_SPECULAR;
break;
default:
@@ -600,7 +600,7 @@ void _mesa_copy_material_pairs( struct gl_material dst[2],
*
* src[0] is front material, src[1] is back material
*
- * Additionally keeps the precomputed lighting state uptodate.
+ * Additionally keeps the precomputed lighting state uptodate.
*/
void _mesa_update_material( GLcontext *ctx,
const struct gl_material src[2],
@@ -647,13 +647,13 @@ void _mesa_update_material( GLcontext *ctx,
if (bitmask & (FRONT_EMISSION_BIT | FRONT_AMBIENT_BIT)) {
struct gl_material *mat = &ctx->Light.Material[0];
COPY_3V( ctx->Light._BaseColor[0], mat->Emission );
- ACC_SCALE_3V( ctx->Light._BaseColor[0], mat->Ambient,
+ ACC_SCALE_3V( ctx->Light._BaseColor[0], mat->Ambient,
ctx->Light.Model.Ambient );
}
if (bitmask & (BACK_EMISSION_BIT | BACK_AMBIENT_BIT)) {
struct gl_material *mat = &ctx->Light.Material[1];
COPY_3V( ctx->Light._BaseColor[1], mat->Emission );
- ACC_SCALE_3V( ctx->Light._BaseColor[1], mat->Ambient,
+ ACC_SCALE_3V( ctx->Light._BaseColor[1], mat->Ambient,
ctx->Light.Model.Ambient );
}
@@ -1071,7 +1071,7 @@ static void validate_spot_exp_table( struct gl_light *l )
l->_SpotExpTable[i][0] = tmp;
}
for (i = 0; i < EXP_TABLE_SIZE - 1; i++) {
- l->_SpotExpTable[i][1] = (l->_SpotExpTable[i+1][0] -
+ l->_SpotExpTable[i][1] = (l->_SpotExpTable[i+1][0] -
l->_SpotExpTable[i][0]);
}
l->_SpotExpTable[EXP_TABLE_SIZE-1][1] = 0.0;
@@ -1087,7 +1087,7 @@ static void validate_spot_exp_table( struct gl_light *l )
void
_mesa_invalidate_shine_table( GLcontext *ctx, GLuint i )
{
- if (ctx->_ShineTable[i])
+ if (ctx->_ShineTable[i])
ctx->_ShineTable[i]->refcount--;
ctx->_ShineTable[i] = 0;
}
@@ -1132,7 +1132,7 @@ static void validate_shine_table( GLcontext *ctx, GLuint i, GLfloat shininess )
s->shininess = shininess;
}
- if (ctx->_ShineTable[i])
+ if (ctx->_ShineTable[i])
ctx->_ShineTable[i]->refcount--;
ctx->_ShineTable[i] = s;
@@ -1140,7 +1140,7 @@ static void validate_shine_table( GLcontext *ctx, GLuint i, GLfloat shininess )
s->refcount++;
}
-void
+void
_mesa_validate_all_lighting_tables( GLcontext *ctx )
{
GLint i;
@@ -1154,7 +1154,7 @@ _mesa_validate_all_lighting_tables( GLcontext *ctx )
if (!ctx->_ShineTable[1] || ctx->_ShineTable[1]->shininess != shininess)
validate_shine_table( ctx, 1, shininess );
- for (i = 0 ; i < MAX_LIGHTS ; i++)
+ for (i = 0 ; i < MAX_LIGHTS ; i++)
if (ctx->Light.Light[i]._SpotExpTable[0][0] == -1)
validate_spot_exp_table( &ctx->Light.Light[i] );
}
@@ -1210,7 +1210,7 @@ _mesa_update_lighting( GLcontext *ctx )
/* Precompute some shading values. Although we reference
* Light.Material here, we can get away without flushing
* FLUSH_UPDATE_CURRENT, as when any outstanding material changes
- * are flushed, they will update the derived state at that time.
+ * are flushed, they will update the derived state at that time.
*/
if (ctx->Visual.rgbMode) {
GLuint sides = ctx->Light.Model.TwoSide ? 2 : 1;
@@ -1227,7 +1227,7 @@ _mesa_update_lighting( GLcontext *ctx )
ctx->Light.Material[side].Diffuse[3] );
}
- foreach (light, &ctx->Light.EnabledList) {
+ foreach (light, &ctx->Light.EnabledList) {
for (side=0; side< sides; side++) {
const struct gl_material *mat = &ctx->Light.Material[side];
SCALE_3V( light->_MatDiffuse[side], light->Diffuse, mat->Diffuse );
@@ -1323,5 +1323,3 @@ _mesa_compute_light_positions( GLcontext *ctx )
}
}
}
-
-
diff --git a/src/mesa/main/light.h b/src/mesa/main/light.h
index 82f6d7884c9..82b6d74a552 100644
--- a/src/mesa/main/light.h
+++ b/src/mesa/main/light.h
@@ -1,10 +1,10 @@
-/* $Id: light.h,v 1.11 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: light.h,v 1.12 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -120,4 +120,3 @@ extern void _mesa_update_color_material( GLcontext *ctx,
#endif
-
diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c
index 13e50832ad9..303ab71379c 100644
--- a/src/mesa/main/lines.c
+++ b/src/mesa/main/lines.c
@@ -1,10 +1,10 @@
-/* $Id: lines.c,v 1.28 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: lines.c,v 1.29 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -51,17 +51,17 @@ _mesa_LineWidth( GLfloat width )
return;
}
- if (ctx->Line.Width == width)
+ if (ctx->Line.Width == width)
return;
FLUSH_VERTICES(ctx, _NEW_LINE);
ctx->Line.Width = width;
- ctx->Line._Width = CLAMP(width,
+ ctx->Line._Width = CLAMP(width,
ctx->Const.MinLineWidth,
ctx->Const.MaxLineWidth);
- if (width != 1.0)
+ if (width != 1.0)
ctx->_TriangleCaps |= DD_LINE_WIDTH;
else
ctx->_TriangleCaps &= ~DD_LINE_WIDTH;
@@ -91,5 +91,3 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
if (ctx->Driver.LineStipple)
ctx->Driver.LineStipple( ctx, factor, pattern );
}
-
-
diff --git a/src/mesa/main/lines.h b/src/mesa/main/lines.h
index 163663d78be..08848ea7b14 100644
--- a/src/mesa/main/lines.h
+++ b/src/mesa/main/lines.h
@@ -1,10 +1,10 @@
-/* $Id: lines.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: lines.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 9a3f227758f..1cfb55552d3 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -1,21 +1,21 @@
-/* $Id: macros.h,v 1.18 2001/01/24 00:04:58 brianp Exp $ */
+/* $Id: macros.h,v 1.19 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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,7 +68,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))
@@ -92,7 +92,7 @@
(a)[2] == (b)[2])
#if defined(__i386__)
-#define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC))
+#define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC))
#else
#define TEST_EQ_4UBV(DST, SRC) TEST_EQ_4V(DST, SRC)
#endif
@@ -169,7 +169,7 @@ do { \
case 2: (DST)[1] = (SRC)[1]; \
case 1: (DST)[0] = (SRC)[0]; \
} \
-} while(0)
+} while(0)
#define COPY_CLEAN_4V(DST, SZ, SRC) \
do { \
diff --git a/src/mesa/main/matrix.h b/src/mesa/main/matrix.h
index 53fd29aa31c..59c0a6fad4f 100644
--- a/src/mesa/main/matrix.h
+++ b/src/mesa/main/matrix.h
@@ -1,10 +1,10 @@
-/* $Id: matrix.h,v 1.11 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: matrix.h,v 1.12 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index 3b4cada93b8..6a31d5a59fe 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -1,4 +1,4 @@
-/* $Id: pixel.c,v 1.26 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: pixel.c,v 1.27 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -75,13 +75,13 @@ _mesa_PixelStorei( GLenum pname, GLint param )
switch (pname) {
case GL_PACK_SWAP_BYTES:
- if (param == (GLint)ctx->Pack.SwapBytes)
+ if (param == (GLint)ctx->Pack.SwapBytes)
return;
FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.SwapBytes = param ? GL_TRUE : GL_FALSE;
break;
case GL_PACK_LSB_FIRST:
- if (param == (GLint)ctx->Pack.LsbFirst)
+ if (param == (GLint)ctx->Pack.LsbFirst)
return;
FLUSH_VERTICES(ctx, _NEW_PACKUNPACK);
ctx->Pack.LsbFirst = param ? GL_TRUE : GL_FALSE;
@@ -147,7 +147,7 @@ _mesa_PixelStorei( GLenum pname, GLint param )
ctx->Pack.Alignment = param;
break;
case GL_UNPACK_SWAP_BYTES:
- if (param == (GLint)ctx->Unpack.SwapBytes)
+ if (param == (GLint)ctx->Unpack.SwapBytes)
return;
if ((GLint)ctx->Unpack.SwapBytes == param)
return;
@@ -155,7 +155,7 @@ _mesa_PixelStorei( GLenum pname, GLint param )
ctx->Unpack.SwapBytes = param ? GL_TRUE : GL_FALSE;
break;
case GL_UNPACK_LSB_FIRST:
- if (param == (GLint)ctx->Unpack.LsbFirst)
+ if (param == (GLint)ctx->Unpack.LsbFirst)
return;
if ((GLint)ctx->Unpack.LsbFirst == param)
return;
diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h
index 6698d8c13f0..94f84e0fe0d 100644
--- a/src/mesa/main/pixel.h
+++ b/src/mesa/main/pixel.h
@@ -1,10 +1,10 @@
-/* $Id: pixel.h,v 1.9 2000/12/13 00:46:21 brianp Exp $ */
+/* $Id: pixel.h,v 1.10 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 895bf752713..493a96c0e98 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -1,10 +1,10 @@
-/* $Id: points.c,v 1.29 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: points.c,v 1.30 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.4
+ * Version: 3.5
*
- * 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"),
@@ -50,12 +50,12 @@ _mesa_PointSize( GLfloat size )
return;
}
- if (ctx->Point.Size == size)
+ if (ctx->Point.Size == size)
return;
FLUSH_VERTICES(ctx, _NEW_POINT);
ctx->Point.Size = size;
- ctx->Point._Size = CLAMP(size,
+ ctx->Point._Size = CLAMP(size,
ctx->Const.MinPointSize,
ctx->Const.MaxPointSize);
@@ -146,4 +146,3 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
if (ctx->Driver.PointParameterfv)
(*ctx->Driver.PointParameterfv)(ctx, pname, params);
}
-
diff --git a/src/mesa/main/points.h b/src/mesa/main/points.h
index 58973c80381..283432c6c1d 100644
--- a/src/mesa/main/points.h
+++ b/src/mesa/main/points.h
@@ -1,10 +1,10 @@
-/* $Id: points.h,v 1.4 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: points.h,v 1.5 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index 396c897b70e..3126ff6087c 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -1,4 +1,4 @@
-/* $Id: polygon.c,v 1.19 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: polygon.c,v 1.20 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -137,7 +137,7 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
}
ctx->_TriangleCaps &= ~DD_TRI_UNFILLED;
- if (ctx->Polygon.FrontMode!=GL_FILL || ctx->Polygon.BackMode!=GL_FILL)
+ if (ctx->Polygon.FrontMode!=GL_FILL || ctx->Polygon.BackMode!=GL_FILL)
ctx->_TriangleCaps |= DD_TRI_UNFILLED;
if (ctx->Driver.PolygonMode) {
diff --git a/src/mesa/main/polygon.h b/src/mesa/main/polygon.h
index af8b34b53e1..58013369654 100644
--- a/src/mesa/main/polygon.h
+++ b/src/mesa/main/polygon.h
@@ -1,10 +1,10 @@
-/* $Id: polygon.h,v 1.3 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: polygon.h,v 1.4 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -55,4 +55,3 @@ _mesa_GetPolygonStipple( GLubyte *mask );
#endif
-
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index 730d9256852..09a4ebe8c63 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -1,4 +1,4 @@
-/* $Id: rastpos.c,v 1.21 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: rastpos.c,v 1.22 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -128,10 +128,10 @@ shade_rastpos(GLcontext *ctx,
}
else {
GLfloat d;
-
+
SUB_3V(VP, light->_Position, vertex);
d = LEN_3FV( VP );
-
+
if ( d > 1e-6) {
GLfloat invd = 1.0F / d;
SELF_SCALE_SCALAR_3V(VP, invd);
@@ -139,10 +139,10 @@ shade_rastpos(GLcontext *ctx,
attenuation = 1.0F / (light->ConstantAttenuation + d *
(light->LinearAttenuation + d *
light->QuadraticAttenuation));
-
+
if (light->_Flags & LIGHT_SPOT) {
GLfloat PV_dot_dir = - DOT3(VP, light->_NormDirection);
-
+
if (PV_dot_dir<light->_CosCutoff) {
continue;
}
@@ -188,7 +188,7 @@ shade_rastpos(GLcontext *ctx,
h = light->_h_inf_norm;
normalized = 1;
}
-
+
n_dot_h = DOT3(normal, h);
if (n_dot_h > 0.0F) {
@@ -201,7 +201,7 @@ shade_rastpos(GLcontext *ctx,
n_dot_h /= LEN_SQUARED_3FV( h );
shininess *= .5;
}
-
+
GET_SHINE_TAB_ENTRY( ctx->_ShineTable[0], n_dot_h, spec_coef );
if (spec_coef > 1.0e-10) {
diff --git a/src/mesa/main/rastpos.h b/src/mesa/main/rastpos.h
index 49223ce236c..40ccc9760cd 100644
--- a/src/mesa/main/rastpos.h
+++ b/src/mesa/main/rastpos.h
@@ -1,21 +1,21 @@
-/* $Id: rastpos.h,v 1.2 1999/11/11 01:22:27 brianp Exp $ */
+/* $Id: rastpos.h,v 1.3 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -106,4 +106,3 @@ _mesa_RasterPos4sv(const GLshort *v);
#endif
-
diff --git a/src/mesa/main/simple_list.h b/src/mesa/main/simple_list.h
index 994d955b7fb..3755e70f12d 100644
--- a/src/mesa/main/simple_list.h
+++ b/src/mesa/main/simple_list.h
@@ -1,21 +1,21 @@
-/* $Id: simple_list.h,v 1.1 1999/08/19 00:55:41 jtg Exp $ */
+/* $Id: simple_list.h,v 1.2 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
- *
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -28,7 +28,7 @@
* (C) 1997, Keith Whitwell
*
* Intended to work with a list sentinal which is created as an empty
- * list. Insert & delete are O(1).
+ * list. Insert & delete are O(1).
*/
@@ -96,4 +96,3 @@ do { \
#endif
-
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 4bd1ade6dcd..9c4685ed853 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -1,4 +1,4 @@
-/* $Id: state.c,v 1.60 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: state.c,v 1.61 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -566,14 +566,14 @@ update_tnl_spaces( GLcontext *ctx, GLuint oldneedeyecoords )
GLuint new_state = ctx->NewState;
/* Recalculate that same state only if it has been invalidated
- * by other statechanges.
+ * by other statechanges.
*/
if (new_state & _NEW_MODELVIEW)
update_modelview_scale(ctx);
if (new_state & (_NEW_MODELVIEW|_NEW_PROJECTION))
calculate_model_project_matrix(ctx);
-
+
if (new_state & (_NEW_LIGHT|_NEW_MODELVIEW))
_mesa_compute_light_positions( ctx );
}
@@ -613,7 +613,7 @@ static void
update_projection( GLcontext *ctx )
{
_math_matrix_analyse( &ctx->ProjectionMatrix );
-
+
/* Recompute clip plane positions in clipspace. This is also done
* in _mesa_ClipPlane().
*/
@@ -865,7 +865,7 @@ update_texture_state( GLcontext *ctx )
* state references this value, and must be treated with care to
* ensure that updates are done correctly. All state dependent on
* _NeedEyeCoords is calculated from within _mesa_update_tnl_spaces(),
- * and from nowhere else.
+ * and from nowhere else.
*/
void _mesa_update_state( GLcontext *ctx )
{
@@ -926,7 +926,7 @@ void _mesa_update_state( GLcontext *ctx )
* normal transform.
*
* If the lighting space hasn't changed, may still need to recompute
- * light positions & normal transforms for other reasons.
+ * light positions & normal transforms for other reasons.
*/
if (new_state & (_NEW_MODELVIEW |
_NEW_PROJECTION |
@@ -948,12 +948,12 @@ void _mesa_update_state( GLcontext *ctx )
ctx->Array.NewState = 0;
/* At this point we can do some assertions to be sure the required
- * device driver function pointers are all initialized.
+ * device driver function pointers are all initialized.
*
* KW: Moved the some of these asserts to t_vb_render.c, as they
* are strictly only required for that stage. The Driver struct
* should probably be split; the read/write span/pixels functions
- * should be referenced only from swrast, for instance.
+ * should be referenced only from swrast, for instance.
*/
ASSERT(ctx->Driver.GetString);
ASSERT(ctx->Driver.UpdateState);
diff --git a/src/mesa/main/state.h b/src/mesa/main/state.h
index 8a45096c663..67a62c3d4e1 100644
--- a/src/mesa/main/state.h
+++ b/src/mesa/main/state.h
@@ -1,10 +1,10 @@
-/* $Id: state.h,v 1.6 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: state.h,v 1.7 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/stencil.c b/src/mesa/main/stencil.c
index 1520fe8c966..86050b24a66 100644
--- a/src/mesa/main/stencil.c
+++ b/src/mesa/main/stencil.c
@@ -1,10 +1,10 @@
-/* $Id: stencil.c,v 1.25 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: stencil.c,v 1.26 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -46,7 +46,7 @@ _mesa_ClearStencil( GLint s )
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
-
+
if (ctx->Stencil.Clear == (GLstencil) s)
return;
@@ -197,4 +197,3 @@ _mesa_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
(*ctx->Driver.StencilOp)(ctx, fail, zfail, zpass);
}
}
-
diff --git a/src/mesa/main/stencil.h b/src/mesa/main/stencil.h
index dda7b043d1b..6d659d3eb85 100644
--- a/src/mesa/main/stencil.h
+++ b/src/mesa/main/stencil.h
@@ -1,10 +1,10 @@
-/* $Id: stencil.h,v 1.8 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: stencil.h,v 1.9 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 53fcffb5128..5a231d182dc 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,10 +1,10 @@
-/* $Id: teximage.c,v 1.83 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: teximage.c,v 1.84 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index e547a352b1c..a19f806118c 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -1,10 +1,10 @@
-/* $Id: teximage.h,v 1.16 2001/02/06 21:42:48 brianp Exp $ */
+/* $Id: teximage.h,v 1.17 2001/03/12 00:48:38 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -188,4 +188,3 @@ _mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img);
#endif
-
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index ca405bd78e7..0bcc0deae8b 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1,10 +1,10 @@
-/* $Id: texobj.c,v 1.43 2001/03/08 15:23:46 brianp Exp $ */
+/* $Id: texobj.c,v 1.44 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -54,7 +54,7 @@
* Return: pointer to new texture object
*/
struct gl_texture_object *
-_mesa_alloc_texture_object( struct gl_shared_state *shared,
+_mesa_alloc_texture_object( struct gl_shared_state *shared,
GLuint name, GLuint dimensions )
{
struct gl_texture_object *obj;
@@ -609,7 +609,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
newTexObj->RefCount++;
-
+
/* do the actual binding, but first flush outstanding vertices:
*/
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
@@ -743,4 +743,3 @@ _mesa_IsTexture( GLuint texture )
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
return texture > 0 && _mesa_HashLookup(ctx->Shared->TexObjects, texture);
}
-
diff --git a/src/mesa/main/texobj.h b/src/mesa/main/texobj.h
index b58c02fb8fa..d359aa9ba20 100644
--- a/src/mesa/main/texobj.h
+++ b/src/mesa/main/texobj.h
@@ -1,10 +1,10 @@
-/* $Id: texobj.h,v 1.5 2000/11/22 07:32:17 joukj Exp $ */
+/* $Id: texobj.h,v 1.6 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/texstate.h b/src/mesa/main/texstate.h
index a3e825513c8..551da19dcc9 100644
--- a/src/mesa/main/texstate.h
+++ b/src/mesa/main/texstate.h
@@ -1,4 +1,4 @@
-/* $Id: texstate.h,v 1.6 2001/02/06 21:42:48 brianp Exp $ */
+/* $Id: texstate.h,v 1.7 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -123,4 +123,3 @@ _mesa_ClientActiveTextureARB( GLenum target );
#endif
-
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 4164e7a0dfb..3354f864070 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1,4 +1,4 @@
-/* $Id: texstore.c,v 1.10 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: texstore.c,v 1.11 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -1450,4 +1450,3 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
return GL_TRUE;
}
-
diff --git a/src/mesa/main/texutil.c b/src/mesa/main/texutil.c
index 08e991f4aa9..345d431d6ec 100644
--- a/src/mesa/main/texutil.c
+++ b/src/mesa/main/texutil.c
@@ -1,10 +1,10 @@
-/* $Id: texutil.c,v 1.13 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: texutil.c,v 1.14 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.4
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/texutil.h b/src/mesa/main/texutil.h
index 3cdd5545500..03f7d28bf4d 100644
--- a/src/mesa/main/texutil.h
+++ b/src/mesa/main/texutil.h
@@ -1,10 +1,10 @@
-/* $Id: texutil.h,v 1.7 2001/01/24 00:04:58 brianp Exp $ */
+/* $Id: texutil.h,v 1.8 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -90,4 +90,3 @@ _mesa_set_teximage_component_sizes(MesaIntTexFormat mesaFormat,
#endif
-
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 6d63bc11950..54e471a5e88 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1,10 +1,10 @@
-/* $Id: varray.c,v 1.38 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: varray.c,v 1.39 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -711,7 +711,7 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
count <= (GLint) ctx->Const.MaxArrayLockSize) {
ctx->Array.LockFirst = first;
ctx->Array.LockCount = count;
- }
+ }
else {
ctx->Array.LockFirst = 0;
ctx->Array.LockCount = 0;
diff --git a/src/mesa/main/varray.h b/src/mesa/main/varray.h
index c365d914a57..a99c0ab863e 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -1,10 +1,10 @@
-/* $Id: varray.h,v 1.11 2000/11/24 10:25:06 keithw Exp $ */
+/* $Id: varray.h,v 1.12 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index b248cb85327..a9e7e67433c 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -1,4 +1,4 @@
-/* $Id: vtxfmt.c,v 1.4 2001/03/11 23:55:19 gareth Exp $ */
+/* $Id: vtxfmt.c,v 1.5 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
* Gareth Hughes <[email protected]>
*/
@@ -154,6 +154,7 @@ void _mesa_init_exec_vtxfmt( GLcontext *ctx )
install_vtxfmt( ctx->Exec, &neutral_vtxfmt );
}
+
void _mesa_install_exec_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
{
ctx->TnlModule.Current = vfmt;
@@ -169,6 +170,7 @@ void _mesa_install_save_vtxfmt( GLcontext *ctx, GLvertexformat *vfmt )
_mesa_loopback_prefer_float( ctx->Save, vfmt->prefer_float_colors );
}
+
void _mesa_restore_exec_vtxfmt( GLcontext *ctx )
{
struct gl_tnl_module *tnl = &(ctx->TnlModule);
diff --git a/src/mesa/main/vtxfmt.h b/src/mesa/main/vtxfmt.h
index 945457ebd73..25a458936e7 100644
--- a/src/mesa/main/vtxfmt.h
+++ b/src/mesa/main/vtxfmt.h
@@ -1,4 +1,4 @@
-/* $Id: vtxfmt.h,v 1.3 2001/03/11 23:49:20 gareth Exp $ */
+/* $Id: vtxfmt.h,v 1.4 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
* Gareth Hughes <[email protected]>
*/
diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h
index faea1d48c60..028e6dd9da7 100644
--- a/src/mesa/main/vtxfmt_tmp.h
+++ b/src/mesa/main/vtxfmt_tmp.h
@@ -1,4 +1,4 @@
-/* $Id: vtxfmt_tmp.h,v 1.3 2001/03/11 18:49:11 gareth Exp $ */
+/* $Id: vtxfmt_tmp.h,v 1.4 2001/03/12 00:48:39 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Gareth Hughes <[email protected]>
*/
diff --git a/src/mesa/math/m_clip_tmp.h b/src/mesa/math/m_clip_tmp.h
index 9c97f97de0e..5f27d82959a 100644
--- a/src/mesa/math/m_clip_tmp.h
+++ b/src/mesa/math/m_clip_tmp.h
@@ -1,21 +1,21 @@
-/* $Id: m_clip_tmp.h,v 1.5 2001/03/03 20:57:00 brianp Exp $ */
+/* $Id: m_clip_tmp.h,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -35,10 +35,10 @@
* the case where the cliptest passes. This isn't essential,
* and an asm implementation needn't replicate that behaviour.
*/
-static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
- GLvector4f *proj_vec,
+static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
+ GLvector4f *proj_vec,
GLubyte clipMask[],
- GLubyte *orMask,
+ GLubyte *orMask,
GLubyte *andMask )
{
const GLuint stride = clip_vec->stride;
@@ -83,12 +83,12 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
vProj[i][2] = 0;
vProj[i][3] = 1;
} else {
- GLfloat oow = 1.0F / cw;
+ GLfloat oow = 1.0F / cw;
vProj[i][0] = cx * oow;
vProj[i][1] = cy * oow;
- vProj[i][2] = cz * oow;
+ vProj[i][2] = cz * oow;
vProj[i][3] = oow;
- }
+ }
}
*orMask = tmpOrMask;
@@ -102,10 +102,10 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points4)( GLvector4f *clip_vec,
-static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
- GLvector4f *proj_vec,
+static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
+ GLvector4f *proj_vec,
GLubyte clipMask[],
- GLubyte *orMask,
+ GLubyte *orMask,
GLubyte *andMask )
{
const GLuint stride = clip_vec->stride;
@@ -144,7 +144,7 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
c++;
tmpAndMask &= mask;
tmpOrMask |= mask;
- }
+ }
}
*orMask = tmpOrMask;
@@ -153,10 +153,10 @@ static GLvector4f * _XFORMAPI TAG(cliptest_np_points4)( GLvector4f *clip_vec,
}
-static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec,
- GLvector4f *proj_vec,
+static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec,
+ GLvector4f *proj_vec,
GLubyte clipMask[],
- GLubyte *orMask,
+ GLubyte *orMask,
GLubyte *andMask )
{
const GLuint stride = clip_vec->stride;
@@ -186,10 +186,10 @@ static GLvector4f * _XFORMAPI TAG(cliptest_points3)( GLvector4f *clip_vec,
}
-static GLvector4f * _XFORMAPI TAG(cliptest_points2)( GLvector4f *clip_vec,
- GLvector4f *proj_vec,
+static GLvector4f * _XFORMAPI TAG(cliptest_points2)( GLvector4f *clip_vec,
+ GLvector4f *proj_vec,
GLubyte clipMask[],
- GLubyte *orMask,
+ GLubyte *orMask,
GLubyte *andMask )
{
const GLuint stride = clip_vec->stride;
diff --git a/src/mesa/math/m_copy_tmp.h b/src/mesa/math/m_copy_tmp.h
index 755536f3e20..609f5abdd83 100644
--- a/src/mesa/math/m_copy_tmp.h
+++ b/src/mesa/math/m_copy_tmp.h
@@ -1,10 +1,10 @@
-/* $Id: m_copy_tmp.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: m_copy_tmp.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/math/m_debug.h b/src/mesa/math/m_debug.h
index b098aa0abcf..8bb2a1976d3 100644
--- a/src/mesa/math/m_debug.h
+++ b/src/mesa/math/m_debug.h
@@ -1,4 +1,4 @@
-/* $Id: m_debug.h,v 1.2 2001/02/05 19:17:31 brianp Exp $ */
+/* $Id: m_debug.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Gareth Hughes <[email protected]>
*/
diff --git a/src/mesa/math/m_debug_norm.c b/src/mesa/math/m_debug_norm.c
index 9b7bafa7ca0..a6f0cb76a75 100644
--- a/src/mesa/math/m_debug_norm.c
+++ b/src/mesa/math/m_debug_norm.c
@@ -1,10 +1,10 @@
-/* $Id: m_debug_norm.c,v 1.4 2001/03/08 15:23:46 brianp Exp $ */
+/* $Id: m_debug_norm.c,v 1.5 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Gareth Hughes <[email protected]>
*/
diff --git a/src/mesa/math/m_debug_util.h b/src/mesa/math/m_debug_util.h
index e49f3615c72..79e369ebd5d 100644
--- a/src/mesa/math/m_debug_util.h
+++ b/src/mesa/math/m_debug_util.h
@@ -1,10 +1,10 @@
-/* $Id: m_debug_util.h,v 1.1 2001/02/03 08:41:04 gareth Exp $ */
+/* $Id: m_debug_util.h,v 1.2 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Gareth Hughes <[email protected]>
*/
diff --git a/src/mesa/math/m_debug_xform.c b/src/mesa/math/m_debug_xform.c
index dc81705acac..9600bec804c 100644
--- a/src/mesa/math/m_debug_xform.c
+++ b/src/mesa/math/m_debug_xform.c
@@ -1,10 +1,10 @@
-/* $Id: m_debug_xform.c,v 1.4 2001/03/08 15:23:46 brianp Exp $ */
+/* $Id: m_debug_xform.c,v 1.5 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/math/m_dotprod_tmp.h b/src/mesa/math/m_dotprod_tmp.h
index 88a9b37fa55..232c5389ca6 100644
--- a/src/mesa/math/m_dotprod_tmp.h
+++ b/src/mesa/math/m_dotprod_tmp.h
@@ -1,21 +1,21 @@
-/* $Id: m_dotprod_tmp.h,v 1.3 2001/03/03 20:57:00 brianp Exp $ */
+/* $Id: m_dotprod_tmp.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
- *
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -31,10 +31,10 @@
/* Note - respects the stride of the output vector.
*/
-static void TAG(dotprod_vec2)( GLfloat *out,
+static void TAG(dotprod_vec2)( GLfloat *out,
GLuint outstride,
- const GLvector4f *coord_vec,
- const GLfloat plane[4],
+ const GLvector4f *coord_vec,
+ const GLfloat plane[4],
const GLubyte mask[])
{
GLuint stride = coord_vec->stride;
@@ -42,9 +42,9 @@ static void TAG(dotprod_vec2)( GLfloat *out,
GLuint count = coord_vec->count;
GLuint i;
-
+
const GLfloat plane0 = plane[0], plane1 = plane[1], plane3 = plane[3];
-
+
(void) mask;
for (i=0;i<count;i++,STRIDE_F(coord,stride),STRIDE_F(out,outstride)) {
@@ -53,13 +53,13 @@ static void TAG(dotprod_vec2)( GLfloat *out,
coord[1] * plane1 +
plane3);
}
- }
+ }
}
-static void TAG(dotprod_vec3)( GLfloat *out,
+static void TAG(dotprod_vec3)( GLfloat *out,
GLuint outstride,
- const GLvector4f *coord_vec,
- const GLfloat plane[4],
+ const GLvector4f *coord_vec,
+ const GLfloat plane[4],
const GLubyte mask[])
{
GLuint stride = coord_vec->stride;
@@ -80,13 +80,13 @@ static void TAG(dotprod_vec3)( GLfloat *out,
coord[2] * plane2 +
plane3);
}
- }
+ }
}
-static void TAG(dotprod_vec4)( GLfloat *out,
+static void TAG(dotprod_vec4)( GLfloat *out,
GLuint outstride,
- const GLvector4f *coord_vec,
- const GLfloat plane[4],
+ const GLvector4f *coord_vec,
+ const GLfloat plane[4],
const GLubyte mask[])
{
GLuint stride = coord_vec->stride;
@@ -106,7 +106,7 @@ static void TAG(dotprod_vec4)( GLfloat *out,
coord[2] * plane2 +
coord[3] * plane3);
}
- }
+ }
}
diff --git a/src/mesa/math/m_eval.c b/src/mesa/math/m_eval.c
index 9316625d976..ded7247b3f8 100644
--- a/src/mesa/math/m_eval.c
+++ b/src/mesa/math/m_eval.c
@@ -1,10 +1,10 @@
-/* $Id: m_eval.c,v 1.4 2001/03/08 17:17:28 brianp Exp $ */
+/* $Id: m_eval.c,v 1.5 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/math/m_eval.h b/src/mesa/math/m_eval.h
index b478b39351e..2553c96a678 100644
--- a/src/mesa/math/m_eval.h
+++ b/src/mesa/math/m_eval.h
@@ -1,3 +1,28 @@
+/* $Id: m_eval.h,v 1.2 2001/03/12 00:48:41 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
#ifndef _M_EVAL_H
#define _M_EVAL_H
diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index 8f8320f2565..de002adb5d2 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -1,21 +1,21 @@
-/* $Id: m_matrix.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: m_matrix.c,v 1.8 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -66,13 +66,13 @@ static GLfloat Identity[16] = {
/*
- * This matmul was contributed by Thomas Malik
+ * This matmul was contributed by Thomas Malik
*
* Perform a 4x4 matrix multiplication (product = a x b).
* Input: a, b - matrices to multiply
* Output: product - product of a and b
* WARNING: (product != b) assumed
- * NOTE: (product == a) allowed
+ * NOTE: (product == a) allowed
*
* KW: 4*16 = 64 muls
*/
@@ -94,7 +94,7 @@ static void matmul4( GLfloat *product, const GLfloat *a, const GLfloat *b )
/* Multiply two matrices known to occupy only the top three rows, such
- * as typical model matrices, and ortho matrices.
+ * as typical model matrices, and ortho matrices.
*/
static void matmul34( GLfloat *product, const GLfloat *a, const GLfloat *b )
{
@@ -127,8 +127,8 @@ static void matrix_multf( GLmatrix *mat, const GLfloat *m, GLuint flags )
if (TEST_MAT_FLAGS(mat, MAT_FLAGS_3D))
matmul34( mat->m, mat->m, m );
- else
- matmul4( mat->m, mat->m, m );
+ else
+ matmul4( mat->m, mat->m, m );
}
@@ -140,7 +140,7 @@ static void print_matrix_floats( const GLfloat m[16] )
}
}
-void
+void
_math_matrix_print( const GLmatrix *m )
{
fprintf(stderr, "Matrix type: %s, flags: %x\n", types[m->type], m->flags);
@@ -176,31 +176,31 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
GLfloat wtmp[4][8];
GLfloat m0, m1, m2, m3, s;
GLfloat *r0, *r1, *r2, *r3;
-
+
r0 = wtmp[0], r1 = wtmp[1], r2 = wtmp[2], r3 = wtmp[3];
-
+
r0[0] = MAT(m,0,0), r0[1] = MAT(m,0,1),
r0[2] = MAT(m,0,2), r0[3] = MAT(m,0,3),
r0[4] = 1.0, r0[5] = r0[6] = r0[7] = 0.0,
-
+
r1[0] = MAT(m,1,0), r1[1] = MAT(m,1,1),
r1[2] = MAT(m,1,2), r1[3] = MAT(m,1,3),
r1[5] = 1.0, r1[4] = r1[6] = r1[7] = 0.0,
-
+
r2[0] = MAT(m,2,0), r2[1] = MAT(m,2,1),
r2[2] = MAT(m,2,2), r2[3] = MAT(m,2,3),
r2[6] = 1.0, r2[4] = r2[5] = r2[7] = 0.0,
-
+
r3[0] = MAT(m,3,0), r3[1] = MAT(m,3,1),
r3[2] = MAT(m,3,2), r3[3] = MAT(m,3,3),
r3[7] = 1.0, r3[4] = r3[5] = r3[6] = 0.0;
-
+
/* choose pivot - or die */
if (fabs(r3[0])>fabs(r2[0])) SWAP_ROWS(r3, r2);
if (fabs(r2[0])>fabs(r1[0])) SWAP_ROWS(r2, r1);
if (fabs(r1[0])>fabs(r0[0])) SWAP_ROWS(r1, r0);
if (0.0 == r0[0]) return GL_FALSE;
-
+
/* eliminate first variable */
m1 = r1[0]/r0[0]; m2 = r2[0]/r0[0]; m3 = r3[0]/r0[0];
s = r0[1]; r1[1] -= m1 * s; r2[1] -= m2 * s; r3[1] -= m3 * s;
@@ -214,12 +214,12 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
if (s != 0.0) { r1[6] -= m1 * s; r2[6] -= m2 * s; r3[6] -= m3 * s; }
s = r0[7];
if (s != 0.0) { r1[7] -= m1 * s; r2[7] -= m2 * s; r3[7] -= m3 * s; }
-
+
/* choose pivot - or die */
if (fabs(r3[1])>fabs(r2[1])) SWAP_ROWS(r3, r2);
if (fabs(r2[1])>fabs(r1[1])) SWAP_ROWS(r2, r1);
if (0.0 == r1[1]) return GL_FALSE;
-
+
/* eliminate second variable */
m2 = r2[1]/r1[1]; m3 = r3[1]/r1[1];
r2[2] -= m2 * r1[2]; r3[2] -= m3 * r1[2];
@@ -228,23 +228,23 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
s = r1[5]; if (0.0 != s) { r2[5] -= m2 * s; r3[5] -= m3 * s; }
s = r1[6]; if (0.0 != s) { r2[6] -= m2 * s; r3[6] -= m3 * s; }
s = r1[7]; if (0.0 != s) { r2[7] -= m2 * s; r3[7] -= m3 * s; }
-
+
/* choose pivot - or die */
if (fabs(r3[2])>fabs(r2[2])) SWAP_ROWS(r3, r2);
if (0.0 == r2[2]) return GL_FALSE;
-
+
/* eliminate third variable */
m3 = r3[2]/r2[2];
r3[3] -= m3 * r2[3], r3[4] -= m3 * r2[4],
r3[5] -= m3 * r2[5], r3[6] -= m3 * r2[6],
r3[7] -= m3 * r2[7];
-
+
/* last check */
if (0.0 == r3[3]) return GL_FALSE;
-
+
s = 1.0/r3[3]; /* now back substitute row 3 */
r3[4] *= s; r3[5] *= s; r3[6] *= s; r3[7] *= s;
-
+
m2 = r2[3]; /* now back substitute row 2 */
s = 1.0/r2[2];
r2[4] = s * (r2[4] - r3[4] * m2), r2[5] = s * (r2[5] - r3[5] * m2),
@@ -255,7 +255,7 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
m0 = r0[3];
r0[4] -= r3[4] * m0, r0[5] -= r3[5] * m0,
r0[6] -= r3[6] * m0, r0[7] -= r3[7] * m0;
-
+
m1 = r1[2]; /* now back substitute row 1 */
s = 1.0/r1[1];
r1[4] = s * (r1[4] - r2[4] * m1), r1[5] = s * (r1[5] - r2[5] * m1),
@@ -263,12 +263,12 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
m0 = r0[2];
r0[4] -= r2[4] * m0, r0[5] -= r2[5] * m0,
r0[6] -= r2[6] * m0, r0[7] -= r2[7] * m0;
-
+
m0 = r0[1]; /* now back substitute row 0 */
s = 1.0/r0[0];
r0[4] = s * (r0[4] - r1[4] * m0), r0[5] = s * (r0[5] - r1[5] * m0),
r0[6] = s * (r0[6] - r1[6] * m0), r0[7] = s * (r0[7] - r1[7] * m0);
-
+
MAT(out,0,0) = r0[4]; MAT(out,0,1) = r0[5],
MAT(out,0,2) = r0[6]; MAT(out,0,3) = r0[7],
MAT(out,1,0) = r1[4]; MAT(out,1,1) = r1[5],
@@ -276,15 +276,15 @@ static GLboolean invert_matrix_general( GLmatrix *mat )
MAT(out,2,0) = r2[4]; MAT(out,2,1) = r2[5],
MAT(out,2,2) = r2[6]; MAT(out,2,3) = r2[7],
MAT(out,3,0) = r3[4]; MAT(out,3,1) = r3[5],
- MAT(out,3,2) = r3[6]; MAT(out,3,3) = r3[7];
-
+ MAT(out,3,2) = r3[6]; MAT(out,3,3) = r3[7];
+
return GL_TRUE;
}
#undef SWAP_ROWS
/* Adapted from graphics gems II.
- */
+ */
static GLboolean invert_matrix_3d_general( GLmatrix *mat )
{
const GLfloat *in = mat->m;
@@ -293,7 +293,7 @@ static GLboolean invert_matrix_3d_general( GLmatrix *mat )
GLfloat det;
/* Calculate the determinant of upper left 3x3 submatrix and
- * determine if the matrix is singular.
+ * determine if the matrix is singular.
*/
pos = neg = 0.0;
t = MAT(in,0,0) * MAT(in,1,1) * MAT(in,2,2);
@@ -316,9 +316,9 @@ static GLboolean invert_matrix_3d_general( GLmatrix *mat )
det = pos + neg;
- if (det*det < 1e-25)
+ if (det*det < 1e-25)
return GL_FALSE;
-
+
det = 1.0 / det;
MAT(out,0,0) = ( (MAT(in,1,1)*MAT(in,2,2) - MAT(in,2,1)*MAT(in,1,2) )*det);
MAT(out,0,1) = (- (MAT(in,0,1)*MAT(in,2,2) - MAT(in,2,1)*MAT(in,0,2) )*det);
@@ -340,7 +340,7 @@ static GLboolean invert_matrix_3d_general( GLmatrix *mat )
MAT(out,2,3) = - (MAT(in,0,3) * MAT(out,2,0) +
MAT(in,1,3) * MAT(out,2,1) +
MAT(in,2,3) * MAT(out,2,2) );
-
+
return GL_TRUE;
}
@@ -353,13 +353,13 @@ static GLboolean invert_matrix_3d( GLmatrix *mat )
if (!TEST_MAT_FLAGS(mat, MAT_FLAGS_ANGLE_PRESERVING)) {
return invert_matrix_3d_general( mat );
}
-
+
if (mat->flags & MAT_FLAG_UNIFORM_SCALE) {
GLfloat scale = (MAT(in,0,0) * MAT(in,0,0) +
MAT(in,0,1) * MAT(in,0,1) +
MAT(in,0,2) * MAT(in,0,2));
- if (scale == 0.0)
+ if (scale == 0.0)
return GL_FALSE;
scale = 1.0 / scale;
@@ -395,7 +395,7 @@ static GLboolean invert_matrix_3d( GLmatrix *mat )
MAT(out,2,3) = - MAT(in,2,3);
return GL_TRUE;
}
-
+
if (mat->flags & MAT_FLAG_TRANSLATION) {
/* Do the translation part */
MAT(out,0,3) = - (MAT(in,0,3) * MAT(out,0,0) +
@@ -411,11 +411,11 @@ static GLboolean invert_matrix_3d( GLmatrix *mat )
else {
MAT(out,0,3) = MAT(out,1,3) = MAT(out,2,3) = 0.0;
}
-
+
return GL_TRUE;
}
-
+
static GLboolean invert_matrix_identity( GLmatrix *mat )
{
@@ -429,9 +429,9 @@ static GLboolean invert_matrix_3d_no_rot( GLmatrix *mat )
const GLfloat *in = mat->m;
GLfloat *out = mat->inv;
- if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0 || MAT(in,2,2) == 0 )
+ if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0 || MAT(in,2,2) == 0 )
return GL_FALSE;
-
+
MEMCPY( out, Identity, 16 * sizeof(GLfloat) );
MAT(out,0,0) = 1.0 / MAT(in,0,0);
MAT(out,1,1) = 1.0 / MAT(in,1,1);
@@ -452,9 +452,9 @@ static GLboolean invert_matrix_2d_no_rot( GLmatrix *mat )
const GLfloat *in = mat->m;
GLfloat *out = mat->inv;
- if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0)
+ if (MAT(in,0,0) == 0 || MAT(in,1,1) == 0)
return GL_FALSE;
-
+
MEMCPY( out, Identity, 16 * sizeof(GLfloat) );
MAT(out,0,0) = 1.0 / MAT(in,0,0);
MAT(out,1,1) = 1.0 / MAT(in,1,1);
@@ -517,7 +517,7 @@ static GLboolean matrix_invert( GLmatrix *mat )
mat->flags |= MAT_FLAG_SINGULAR;
MEMCPY( mat->inv, Identity, sizeof(Identity) );
return GL_FALSE;
- }
+ }
}
@@ -529,15 +529,15 @@ static GLboolean matrix_invert( GLmatrix *mat )
* Generate a 4x4 transformation matrix from glRotate parameters, and
* postmultiply the input matrix by it.
*/
-void
-_math_matrix_rotate( GLmatrix *mat,
+void
+_math_matrix_rotate( GLmatrix *mat,
GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
{
/* This function contributed by Erich Boleyn ([email protected]) */
GLfloat mag, s, c;
GLfloat xx, yy, zz, xy, yz, zx, xs, ys, zs, one_c;
GLfloat m[16];
-
+
s = sin( angle * DEG2RAD );
c = cos( angle * DEG2RAD );
@@ -646,9 +646,9 @@ _math_matrix_rotate( GLmatrix *mat,
void
-_math_matrix_frustum( GLmatrix *mat,
+_math_matrix_frustum( GLmatrix *mat,
GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
+ GLfloat bottom, GLfloat top,
GLfloat nearval, GLfloat farval )
{
GLfloat x, y, a, b, c, d;
@@ -672,9 +672,9 @@ _math_matrix_frustum( GLmatrix *mat,
}
void
-_math_matrix_ortho( GLmatrix *mat,
+_math_matrix_ortho( GLmatrix *mat,
GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
+ GLfloat bottom, GLfloat top,
GLfloat nearval, GLfloat farval )
{
GLfloat x, y, z;
@@ -738,7 +738,7 @@ _math_matrix_ortho( GLmatrix *mat,
ZERO(3) | ZERO(7) | ZERO(15) )
#define SQ(x) ((x)*(x))
-
+
/* Determine type and flags from scratch. This is expensive enough to
* only want to do it once.
*/
@@ -751,7 +751,7 @@ static void analyse_from_scratch( GLmatrix *mat )
for (i = 0 ; i < 16 ; i++) {
if (m[i] == 0.0) mask |= (1<<i);
}
-
+
if (m[0] == 1.0F) mask |= (1<<16);
if (m[5] == 1.0F) mask |= (1<<21);
if (m[10] == 1.0F) mask |= (1<<26);
@@ -759,10 +759,10 @@ static void analyse_from_scratch( GLmatrix *mat )
mat->flags &= ~MAT_FLAGS_GEOMETRY;
- /* Check for translation - no-one really cares
+ /* Check for translation - no-one really cares
*/
- if ((mask & MASK_NO_TRX) != MASK_NO_TRX)
- mat->flags |= MAT_FLAG_TRANSLATION;
+ if ((mask & MASK_NO_TRX) != MASK_NO_TRX)
+ mat->flags |= MAT_FLAG_TRANSLATION;
/* Do the real work
*/
@@ -771,7 +771,7 @@ static void analyse_from_scratch( GLmatrix *mat )
}
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;
}
@@ -784,7 +784,7 @@ static void analyse_from_scratch( GLmatrix *mat )
/* Check for scale */
if (SQ(mm-1) > SQ(1e-6) ||
- SQ(m4m4-1) > SQ(1e-6))
+ SQ(m4m4-1) > SQ(1e-6))
mat->flags |= MAT_FLAG_GENERAL_SCALE;
/* Check for rotation */
@@ -798,7 +798,7 @@ static void analyse_from_scratch( GLmatrix *mat )
mat->type = MATRIX_3D_NO_ROT;
/* Check for scale */
- if (SQ(m[0]-m[5]) < SQ(1e-6) &&
+ if (SQ(m[0]-m[5]) < SQ(1e-6) &&
SQ(m[0]-m[10]) < SQ(1e-6)) {
if (SQ(m[0]-1.0) > SQ(1e-6)) {
mat->flags |= MAT_FLAG_UNIFORM_SCALE;
@@ -831,7 +831,7 @@ static void analyse_from_scratch( GLmatrix *mat )
if (SQ(d1) < SQ(1e-6)) {
CROSS3( cp, m, m+4 );
SUB_3V( cp, cp, (m+8) );
- if (LEN_SQUARED_3FV(cp) < SQ(1e-6))
+ if (LEN_SQUARED_3FV(cp) < SQ(1e-6))
mat->flags |= MAT_FLAG_ROTATION;
else
mat->flags |= MAT_FLAG_GENERAL_3D;
@@ -852,7 +852,7 @@ static void analyse_from_scratch( GLmatrix *mat )
/* Analyse a matrix given that its flags are accurate - this is the
- * more common operation, hopefully.
+ * more common operation, hopefully.
*/
static void analyse_from_flags( GLmatrix *mat )
{
@@ -872,7 +872,7 @@ static void analyse_from_flags( GLmatrix *mat )
}
}
else if (TEST_MAT_FLAGS(mat, MAT_FLAGS_3D)) {
- if ( m[ 8]==0.0F
+ if ( m[ 8]==0.0F
&& m[ 9]==0.0F
&& m[2]==0.0F && m[6]==0.0F && m[10]==1.0F && m[14]==0.0F) {
mat->type = MATRIX_2D;
@@ -893,11 +893,11 @@ static void analyse_from_flags( GLmatrix *mat )
}
-void
-_math_matrix_analyse( GLmatrix *mat )
+void
+_math_matrix_analyse( GLmatrix *mat )
{
if (mat->flags & MAT_DIRTY_TYPE) {
- if (mat->flags & MAT_DIRTY_FLAGS)
+ if (mat->flags & MAT_DIRTY_FLAGS)
analyse_from_scratch( mat );
else
analyse_from_flags( mat );
@@ -913,7 +913,7 @@ _math_matrix_analyse( GLmatrix *mat )
}
-void
+void
_math_matrix_copy( GLmatrix *to, const GLmatrix *from )
{
MEMCPY( to->m, from->m, sizeof(Identity) );
@@ -931,7 +931,7 @@ _math_matrix_copy( GLmatrix *to, const GLmatrix *from )
}
-void
+void
_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
{
GLfloat *m = mat->m;
@@ -945,12 +945,12 @@ _math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
else
mat->flags |= MAT_FLAG_GENERAL_SCALE;
- mat->flags |= (MAT_DIRTY_TYPE |
+ mat->flags |= (MAT_DIRTY_TYPE |
MAT_DIRTY_INVERSE);
}
-void
+void
_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
{
GLfloat *m = mat->m;
@@ -959,20 +959,20 @@ _math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
m[14] = m[2] * x + m[6] * y + m[10] * z + m[14];
m[15] = m[3] * x + m[7] * y + m[11] * z + m[15];
- mat->flags |= (MAT_FLAG_TRANSLATION |
- MAT_DIRTY_TYPE |
+ mat->flags |= (MAT_FLAG_TRANSLATION |
+ MAT_DIRTY_TYPE |
MAT_DIRTY_INVERSE);
}
-void
+void
_math_matrix_loadf( GLmatrix *mat, const GLfloat *m )
{
MEMCPY( mat->m, m, 16*sizeof(GLfloat) );
mat->flags = (MAT_FLAG_GENERAL | MAT_DIRTY);
}
-void
+void
_math_matrix_ctr( GLmatrix *m )
{
if ( m->m == 0 ) {
@@ -984,7 +984,7 @@ _math_matrix_ctr( GLmatrix *m )
m->flags = 0;
}
-void
+void
_math_matrix_dtr( GLmatrix *m )
{
if ( m->m != 0 ) {
@@ -998,7 +998,7 @@ _math_matrix_dtr( GLmatrix *m )
}
-void
+void
_math_matrix_alloc_inv( GLmatrix *m )
{
if ( m->inv == 0 ) {
@@ -1008,32 +1008,32 @@ _math_matrix_alloc_inv( GLmatrix *m )
}
-void
+void
_math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b )
{
dest->flags = (a->flags |
b->flags |
- MAT_DIRTY_TYPE |
+ MAT_DIRTY_TYPE |
MAT_DIRTY_INVERSE);
if (TEST_MAT_FLAGS(dest, MAT_FLAGS_3D))
matmul34( dest->m, a->m, b->m );
- else
+ else
matmul4( dest->m, a->m, b->m );
}
-void
+void
_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *m )
{
dest->flags |= (MAT_FLAG_GENERAL |
- MAT_DIRTY_TYPE |
+ MAT_DIRTY_TYPE |
MAT_DIRTY_INVERSE);
- matmul4( dest->m, dest->m, m );
+ matmul4( dest->m, dest->m, m );
}
-void
+void
_math_matrix_set_identity( GLmatrix *mat )
{
MEMCPY( mat->m, Identity, 16*sizeof(GLfloat) );
@@ -1049,7 +1049,7 @@ _math_matrix_set_identity( GLmatrix *mat )
-void
+void
_math_transposef( GLfloat to[16], const GLfloat from[16] )
{
to[0] = from[0];
@@ -1071,7 +1071,7 @@ _math_transposef( GLfloat to[16], const GLfloat from[16] )
}
-void
+void
_math_transposed( GLdouble to[16], const GLdouble from[16] )
{
to[0] = from[0];
@@ -1092,7 +1092,7 @@ _math_transposed( GLdouble to[16], const GLdouble from[16] )
to[15] = from[15];
}
-void
+void
_math_transposefd( GLfloat to[16], const GLdouble from[16] )
{
to[0] = from[0];
diff --git a/src/mesa/math/m_matrix.h b/src/mesa/math/m_matrix.h
index 66600330b83..d042b746282 100644
--- a/src/mesa/math/m_matrix.h
+++ b/src/mesa/math/m_matrix.h
@@ -1,21 +1,21 @@
-/* $Id: m_matrix.h,v 1.3 2001/02/05 18:48:52 brianp Exp $ */
+/* $Id: m_matrix.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -119,35 +119,35 @@ _math_matrix_mul_matrix( GLmatrix *dest, const GLmatrix *a, const GLmatrix *b );
extern void
_math_matrix_mul_floats( GLmatrix *dest, const GLfloat *b );
-extern void
+extern void
_math_matrix_loadf( GLmatrix *mat, const GLfloat *m );
-extern void
+extern void
_math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z );
extern void
-_math_matrix_rotate( GLmatrix *m, GLfloat angle,
+_math_matrix_rotate( GLmatrix *m, GLfloat angle,
GLfloat x, GLfloat y, GLfloat z );
-extern void
+extern void
_math_matrix_scale( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z );
extern void
-_math_matrix_ortho( GLmatrix *mat,
+_math_matrix_ortho( GLmatrix *mat,
GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
+ GLfloat bottom, GLfloat top,
GLfloat nearval, GLfloat farval );
extern void
-_math_matrix_frustum( GLmatrix *mat,
+_math_matrix_frustum( GLmatrix *mat,
GLfloat left, GLfloat right,
- GLfloat bottom, GLfloat top,
+ GLfloat bottom, GLfloat top,
GLfloat nearval, GLfloat farval );
extern void
_math_matrix_set_identity( GLmatrix *dest );
-extern void
+extern void
_math_matrix_copy( GLmatrix *to, const GLmatrix *from );
extern void
diff --git a/src/mesa/math/m_norm_tmp.h b/src/mesa/math/m_norm_tmp.h
index ccaa2247e87..aea3a4b65bf 100644
--- a/src/mesa/math/m_norm_tmp.h
+++ b/src/mesa/math/m_norm_tmp.h
@@ -1,21 +1,21 @@
-/* $Id: m_norm_tmp.h,v 1.4 2001/03/03 20:57:00 brianp Exp $ */
+/* $Id: m_norm_tmp.h,v 1.5 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -39,7 +39,7 @@ TAG(transform_normalize_normals)( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -113,7 +113,7 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -153,7 +153,7 @@ TAG(transform_normalize_normals_no_rot)( const GLmatrix *mat,
/* scale has been snapped to 1.0 if it is close.
*/
if (scale != 1.0) {
- m0 *= scale;
+ m0 *= scale;
m5 *= scale;
m10 *= scale;
}
@@ -188,7 +188,7 @@ TAG(transform_rescale_normals_no_rot)( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -218,7 +218,7 @@ TAG(transform_rescale_normals)( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -252,7 +252,7 @@ TAG(transform_normals_no_rot)(const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -284,7 +284,7 @@ TAG(transform_normals)( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -316,7 +316,7 @@ TAG(normalize_normals)( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -332,7 +332,7 @@ TAG(normalize_normals)( const GLmatrix *mat,
out[i][0] = x * invlen;
out[i][1] = y * invlen;
out[i][2] = z * invlen;
- }
+ }
}
}
else {
@@ -351,7 +351,7 @@ TAG(normalize_normals)( const GLmatrix *mat,
out[i][1] = y;
out[i][2] = z;
}
- }
+ }
}
}
dest->count = in->count;
@@ -366,7 +366,7 @@ TAG(rescale_normals)( const GLmatrix *mat,
const GLubyte mask[],
GLvector3f *dest )
{
- GLuint i;
+ GLuint i;
const GLfloat *from = in->start;
GLuint stride = in->stride;
GLuint count = in->count;
@@ -387,27 +387,27 @@ TAG(rescale_normals)( const GLmatrix *mat,
static void _XFORMAPI
TAG(init_c_norm_transform)( void )
{
- _mesa_normal_tab[NORM_TRANSFORM_NO_ROT][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM_NO_ROT][IDX] =
TAG(transform_normals_no_rot);
- _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_RESCALE][IDX] =
TAG(transform_rescale_normals_no_rot);
- _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM_NO_ROT | NORM_NORMALIZE][IDX] =
TAG(transform_normalize_normals_no_rot);
- _mesa_normal_tab[NORM_TRANSFORM][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM][IDX] =
TAG(transform_normals);
- _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM | NORM_RESCALE][IDX] =
TAG(transform_rescale_normals);
- _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE][IDX] =
+ _mesa_normal_tab[NORM_TRANSFORM | NORM_NORMALIZE][IDX] =
TAG(transform_normalize_normals);
- _mesa_normal_tab[NORM_RESCALE][IDX] =
+ _mesa_normal_tab[NORM_RESCALE][IDX] =
TAG(rescale_normals);
- _mesa_normal_tab[NORM_NORMALIZE][IDX] =
+ _mesa_normal_tab[NORM_NORMALIZE][IDX] =
TAG(normalize_normals);
}
diff --git a/src/mesa/math/m_trans_tmp.h b/src/mesa/math/m_trans_tmp.h
index 1b20266fbce..e425d0584d6 100644
--- a/src/mesa/math/m_trans_tmp.h
+++ b/src/mesa/math/m_trans_tmp.h
@@ -1,21 +1,21 @@
-/* $Id: m_trans_tmp.h,v 1.3 2001/01/24 00:04:59 brianp Exp $ */
+/* $Id: m_trans_tmp.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -48,7 +48,7 @@ static void DEST_4F( GLfloat (*t)[4],
(void) first;
(void) start;
for (i = DST_START ; i < n ; i++, NEXT_F) {
- CHECK {
+ CHECK {
NEXT_F2;
if (SZ >= 1) t[i][0] = TRX_4F(f, 0);
if (SZ >= 2) t[i][1] = TRX_4F(f, 1);
@@ -118,7 +118,7 @@ static void DEST_4UB( GLubyte (*t)[4],
NEXT_F2;
if (SZ >= 1) TRX_UB(t[i][0], f, 0);
if (SZ >= 2) TRX_UB(t[i][1], f, 1);
- if (SZ >= 3) TRX_UB(t[i][2], f, 2);
+ if (SZ >= 3) TRX_UB(t[i][2], f, 2);
if (SZ == 4) TRX_UB(t[i][3], f, 3); else t[i][3] = 255;
}
}
@@ -142,7 +142,7 @@ static void DEST_4US( GLushort (*t)[4],
NEXT_F2;
if (SZ >= 1) TRX_US(t[i][0], f, 0);
if (SZ >= 2) TRX_US(t[i][1], f, 1);
- if (SZ >= 3) TRX_US(t[i][2], f, 2);
+ if (SZ >= 3) TRX_US(t[i][2], f, 2);
if (SZ == 4) TRX_US(t[i][3], f, 3); else t[i][3] = 65535;
}
}
@@ -220,7 +220,7 @@ static void INIT(void)
#ifdef DEST_4F
TAB(_4f)[SZ][SRC_IDX] = DEST_4F;
#endif
-
+
}
@@ -234,5 +234,3 @@ static void INIT(void)
#undef DEST_1F
#undef SZ
#undef TAG
-
-
diff --git a/src/mesa/math/m_translate.c b/src/mesa/math/m_translate.c
index 967f6a54cf5..47f6c61f5f5 100644
--- a/src/mesa/math/m_translate.c
+++ b/src/mesa/math/m_translate.c
@@ -1,21 +1,21 @@
-/* $Id: m_translate.c,v 1.5 2001/02/20 18:28:52 keithw Exp $ */
+/* $Id: m_translate.c,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -42,13 +42,13 @@
typedef void (*trans_1f_func)(GLfloat *to,
CONST void *ptr,
GLuint stride,
- GLuint start,
+ GLuint start,
GLuint n );
typedef void (*trans_1ui_func)(GLuint *to,
CONST void *ptr,
GLuint stride,
- GLuint start,
+ GLuint start,
GLuint n );
typedef void (*trans_1ub_func)(GLubyte *to,
@@ -72,13 +72,13 @@ typedef void (*trans_4us_func)(GLushort (*to)[4],
typedef void (*trans_4f_func)(GLfloat (*to)[4],
CONST void *ptr,
GLuint stride,
- GLuint start,
+ GLuint start,
GLuint n );
typedef void (*trans_3f_func)(GLfloat (*to)[3],
CONST void *ptr,
GLuint stride,
- GLuint start,
+ GLuint start,
GLuint n );
@@ -436,9 +436,9 @@ static trans_4f_func _math_trans_4f_tab[5][MAX_TYPES];
#define SRC GLfloat
#define SRC_IDX TYPE_IDX(GL_FLOAT)
#define SZ 4
-#define INIT init_trans_4_GLfloat_raw
-#define DEST_4UB trans_4_GLfloat_4ub_raw
-#define DEST_4US trans_4_GLfloat_4us_raw
+#define INIT init_trans_4_GLfloat_raw
+#define DEST_4UB trans_4_GLfloat_4ub_raw
+#define DEST_4US trans_4_GLfloat_4us_raw
#define DEST_4F trans_4_GLfloat_4f_raw
#include "m_trans_tmp.h"
@@ -481,7 +481,7 @@ static void trans_4_GLubyte_4ub_raw(GLubyte (*t)[4],
const GLubyte *f = (GLubyte *) Ptr + SRC_START * stride;
GLuint i;
- if (((((long) f | (long) stride)) & 3L) == 0L) {
+ if (((((long) f | (long) stride)) & 3L) == 0L) {
/* Aligned.
*/
for (i = DST_START ; i < n ; i++, f += stride) {
@@ -579,7 +579,7 @@ void _math_trans_1ui(GLuint *to,
GLuint start,
GLuint n )
{
- _math_trans_1ui_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_1ui_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
}
void _math_trans_1ub(GLubyte *to,
@@ -589,7 +589,7 @@ void _math_trans_1ub(GLubyte *to,
GLuint start,
GLuint n )
{
- _math_trans_1ub_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_1ub_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
}
@@ -601,7 +601,7 @@ void _math_trans_4ub(GLubyte (*to)[4],
GLuint start,
GLuint n )
{
- _math_trans_4ub_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_4ub_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
}
void _math_trans_4chan( GLchan (*to)[4],
@@ -629,7 +629,7 @@ void _math_trans_4us(GLushort (*to)[4],
GLuint start,
GLuint n )
{
- _math_trans_4us_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_4us_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
}
void _math_trans_4f(GLfloat (*to)[4],
@@ -640,7 +640,7 @@ void _math_trans_4f(GLfloat (*to)[4],
GLuint start,
GLuint n )
{
- _math_trans_4f_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_4f_tab[size][TYPE_IDX(type)]( to, ptr, stride, start, n );
}
void _math_trans_3f(GLfloat (*to)[3],
@@ -650,6 +650,5 @@ void _math_trans_3f(GLfloat (*to)[3],
GLuint start,
GLuint n )
{
- _math_trans_3f_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
+ _math_trans_3f_tab[TYPE_IDX(type)]( to, ptr, stride, start, n );
}
-
diff --git a/src/mesa/math/m_translate.h b/src/mesa/math/m_translate.h
index 55ac887e241..f15bb77e2d3 100644
--- a/src/mesa/math/m_translate.h
+++ b/src/mesa/math/m_translate.h
@@ -1,21 +1,21 @@
-/* $Id: m_translate.h,v 1.5 2001/02/20 18:28:52 keithw Exp $ */
+/* $Id: m_translate.h,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
diff --git a/src/mesa/math/m_vector.c b/src/mesa/math/m_vector.c
index 2cb227594d0..0195faf7e4e 100644
--- a/src/mesa/math/m_vector.c
+++ b/src/mesa/math/m_vector.c
@@ -1,21 +1,21 @@
-/* $Id: m_vector.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: m_vector.c,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -45,14 +45,14 @@ void _mesa_vector4f_clean_elem( GLvector4f *vec, GLuint count, GLuint elt )
{
static const GLubyte elem_bits[4] = {
VEC_DIRTY_0,
- VEC_DIRTY_1,
- VEC_DIRTY_2,
+ VEC_DIRTY_1,
+ VEC_DIRTY_2,
VEC_DIRTY_3
};
static const GLfloat clean[4] = { 0, 0, 0, 1 };
const GLfloat v = clean[elt];
GLfloat (*data)[4] = (GLfloat (*)[4])vec->start;
- GLuint i;
+ GLuint i;
for (i = 0 ; i < count ; i++)
data[i][elt] = v;
@@ -234,7 +234,7 @@ void _mesa_vector1ub_alloc( GLvector1ub *v, GLuint flags, GLuint count,
{
v->stride = 1 * sizeof(GLubyte);
v->storage = ALIGN_MALLOC( count * sizeof(GLubyte), alignment );
- v->start = (GLubyte *) v->storage;
+ v->start = (GLubyte *) v->storage;
v->data = (GLubyte *) v->storage;
v->count = 0;
v->flags = flags | VEC_MALLOC ;
@@ -245,7 +245,7 @@ void _mesa_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count,
{
v->stride = 1 * sizeof(GLuint);
v->storage = ALIGN_MALLOC( count * sizeof(GLuint), alignment );
- v->start = (GLuint *) v->storage;
+ v->start = (GLuint *) v->storage;
v->data = (GLuint *) v->storage;
v->count = 0;
v->flags = flags | VEC_MALLOC ;
@@ -368,20 +368,20 @@ void _mesa_vector4f_print( GLvector4f *v, GLubyte *cullmask, GLboolean culling )
GLuint j, i = 0, count;
printf("data-start\n");
- for ( ; d != v->start ; STRIDE_F(d, v->stride), i++)
+ for ( ; d != v->start ; STRIDE_F(d, v->stride), i++)
printf( t, i, d[0], d[1], d[2], d[3]);
-
+
printf("start-count(%u)\n", v->count);
count = i + v->count;
if (culling) {
- for ( ; i < count ; STRIDE_F(d, v->stride), i++)
- if (cullmask[i])
- printf( t, i, d[0], d[1], d[2], d[3]);
+ for ( ; i < count ; STRIDE_F(d, v->stride), i++)
+ if (cullmask[i])
+ printf( t, i, d[0], d[1], d[2], d[3]);
}
else {
- for ( ; i < count ; STRIDE_F(d, v->stride), i++)
- printf( t, i, d[0], d[1], d[2], d[3]);
+ for ( ; i < count ; STRIDE_F(d, v->stride), i++)
+ printf( t, i, d[0], d[1], d[2], d[3]);
}
for (j = v->size ; j < 4; j++) {
@@ -389,13 +389,13 @@ void _mesa_vector4f_print( GLvector4f *v, GLubyte *cullmask, GLboolean culling )
printf("checking col %u is clean as advertised ", j);
- for (i = 0, d = (GLfloat *) v->data ;
- i < count && d[j] == c[j] ;
+ for (i = 0, d = (GLfloat *) v->data ;
+ i < count && d[j] == c[j] ;
i++, STRIDE_F(d, v->stride)) {};
- if (i == count)
+ if (i == count)
printf(" --> ok\n");
- else
+ else
printf(" --> Failed at %u ******\n", i);
}
}
@@ -411,19 +411,19 @@ void _mesa_vector3f_print( GLvector3f *v, GLubyte *cullmask, GLboolean culling )
GLuint i = 0, count;
printf("data-start\n");
- for ( ; d != v->start ; STRIDE_F(d,v->stride), i++)
+ for ( ; d != v->start ; STRIDE_F(d,v->stride), i++)
printf( "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
-
+
printf("start-count(%u)\n", v->count);
count = i + v->count;
if (culling) {
- for ( ; i < count ; STRIDE_F(d,v->stride), i++)
+ for ( ; i < count ; STRIDE_F(d,v->stride), i++)
if (cullmask[i])
- printf( "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
+ printf( "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
}
else {
- for ( ; i < count ; STRIDE_F(d,v->stride), i++)
- printf( "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
+ for ( ; i < count ; STRIDE_F(d,v->stride), i++)
+ printf( "%u:\t%f, %f, %f\n", i, d[0], d[1], d[2]);
}
}
diff --git a/src/mesa/math/m_vector.h b/src/mesa/math/m_vector.h
index 0615d3056ff..222a49880bc 100644
--- a/src/mesa/math/m_vector.h
+++ b/src/mesa/math/m_vector.h
@@ -1,21 +1,21 @@
-/* $Id: m_vector.h,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: m_vector.h,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -36,7 +36,7 @@
#include "mtypes.h" /* hack for GLchan */
-#define VEC_DIRTY_0 0x1
+#define VEC_DIRTY_0 0x1
#define VEC_DIRTY_1 0x2
#define VEC_DIRTY_2 0x4
#define VEC_DIRTY_3 0x8
@@ -55,7 +55,7 @@
/* Wrap all the information about vectors up in a struct. Has
* additional fields compared to the other vectors to help us track of
* different vertex sizes, and whether we need to clean columns out
- * because they contain non-(0,0,0,1) values.
+ * because they contain non-(0,0,0,1) values.
*
* The start field is used to reserve data for copied vertices at the
* end of _mesa_transform_vb, and avoids the need for a multiplication in
@@ -82,10 +82,10 @@ extern void _mesa_vector4f_clean_elem( GLvector4f *vec, GLuint nr, GLuint elt );
/* Could use a single vector type for normals and vertices, but
- * this way avoids some casts.
+ * this way avoids some casts.
*/
typedef struct {
- GLfloat (*data)[3];
+ GLfloat (*data)[3];
GLfloat *start;
GLuint count;
GLuint stride;
@@ -101,7 +101,7 @@ extern void _mesa_vector3f_print( GLvector3f *v, GLubyte *, GLboolean );
typedef struct {
- GLfloat *data;
+ GLfloat *data;
GLfloat *start;
GLuint count;
GLuint stride;
@@ -121,12 +121,12 @@ typedef struct {
GLubyte (*data)[4];
GLubyte *start;
GLuint count;
- GLuint stride;
- GLuint flags;
+ GLuint stride;
+ GLuint flags;
void *storage;
} GLvector4ub;
-extern void _mesa_vector4ub_init( GLvector4ub *v, GLuint flags,
+extern void _mesa_vector4ub_init( GLvector4ub *v, GLuint flags,
GLubyte (*storage)[4] );
extern void _mesa_vector4ub_alloc( GLvector4ub *v, GLuint flags, GLuint count,
GLuint alignment );
@@ -139,12 +139,12 @@ typedef struct {
GLchan (*data)[4];
GLchan *start;
GLuint count;
- GLuint stride;
- GLuint flags;
+ GLuint stride;
+ GLuint flags;
void *storage;
} GLvector4chan;
-extern void _mesa_vector4chan_init( GLvector4chan *v, GLuint flags,
+extern void _mesa_vector4chan_init( GLvector4chan *v, GLuint flags,
GLchan (*storage)[4] );
extern void _mesa_vector4chan_alloc( GLvector4chan *v, GLuint flags, GLuint count,
GLuint alignment );
@@ -159,12 +159,12 @@ typedef struct {
GLushort (*data)[4];
GLushort *start;
GLuint count;
- GLuint stride;
- GLuint flags;
+ GLuint stride;
+ GLuint flags;
void *storage;
} GLvector4us;
-extern void _mesa_vector4us_init( GLvector4us *v, GLuint flags,
+extern void _mesa_vector4us_init( GLvector4us *v, GLuint flags,
GLushort (*storage)[4] );
extern void _mesa_vector4us_alloc( GLvector4us *v, GLuint flags, GLuint count,
GLuint alignment );
@@ -179,8 +179,8 @@ typedef struct {
GLubyte *data;
GLubyte *start;
GLuint count;
- GLuint stride;
- GLuint flags;
+ GLuint stride;
+ GLuint flags;
void *storage;
} GLvector1ub;
@@ -198,13 +198,13 @@ typedef struct {
GLuint *data;
GLuint *start;
GLuint count;
- GLuint stride;
- GLuint flags;
+ GLuint stride;
+ GLuint flags;
void *storage;
} GLvector1ui;
extern void _mesa_vector1ui_init( GLvector1ui *v, GLuint flags, GLuint *storage );
-extern void _mesa_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count,
+extern void _mesa_vector1ui_alloc( GLvector1ui *v, GLuint flags, GLuint count,
GLuint alignment );
extern void _mesa_vector1ui_free( GLvector1ui * );
diff --git a/src/mesa/math/m_xform.c b/src/mesa/math/m_xform.c
index f896bb1e03b..7103f11f94b 100644
--- a/src/mesa/math/m_xform.c
+++ b/src/mesa/math/m_xform.c
@@ -1,10 +1,10 @@
-/* $Id: m_xform.c,v 1.10 2001/03/03 20:57:00 brianp Exp $ */
+/* $Id: m_xform.c,v 1.11 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/math/m_xform.h b/src/mesa/math/m_xform.h
index d8b019cc548..3e24ceac4a8 100644
--- a/src/mesa/math/m_xform.h
+++ b/src/mesa/math/m_xform.h
@@ -1,21 +1,21 @@
-/* $Id: m_xform.h,v 1.7 2001/03/03 20:57:00 brianp Exp $ */
+/* $Id: m_xform.h,v 1.8 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -78,7 +78,7 @@ extern void _mesa_transform_vector( GLfloat u[4],
CONST GLfloat m[16] );
-extern void
+extern void
_math_init_transformation( void );
@@ -94,7 +94,7 @@ _math_init_transformation( void );
*
* There are two cases where we wouldn't want to do the divide in cliptest:
* - When we aren't clipping. We still might want to cull backfaces
- * so the divide should be done elsewhere. This currently never
+ * so the divide should be done elsewhere. This currently never
* happens.
*
* - When culling isn't likely to help us, such as when the GL culling
@@ -105,17 +105,17 @@ _math_init_transformation( void );
* application wouldn't turn on culling in such cases.
*
* We supply a buffer to hold the [x/w,y/w,z/w,1/w] values which
- * are the result of the projection. This is only used in the
+ * are the result of the projection. This is only used in the
* 4-vector case - in other cases, we just use the clip coordinates
* as the projected coordinates - they are identical.
- *
+ *
* This is doubly convenient because it means the Win[] array is now
* of the same stride as all the others, so I can now turn map_vertices
* into a straight-forward matrix transformation, with asm acceleration
- * automatically available.
+ * automatically available.
*/
-/* Vertex buffer clipping flags
+/* Vertex buffer clipping flags
*/
#define CLIP_RIGHT_SHIFT 0
#define CLIP_LEFT_SHIFT 1
@@ -135,19 +135,19 @@ _math_init_transformation( void );
typedef GLvector4f * (_XFORMAPIP clip_func)( GLvector4f *vClip,
- GLvector4f *vProj,
+ GLvector4f *vProj,
GLubyte clipMask[],
- GLubyte *orMask,
+ GLubyte *orMask,
GLubyte *andMask );
-typedef void (*dotprod_func)( GLfloat *out,
+typedef void (*dotprod_func)( GLfloat *out,
GLuint out_stride,
- CONST GLvector4f *coord_vec,
- CONST GLfloat plane[4],
+ CONST GLvector4f *coord_vec,
+ CONST GLfloat plane[4],
CONST GLubyte mask[]);
-typedef void (*vec_copy_func)( GLvector4f *to,
- CONST GLvector4f *from,
+typedef void (*vec_copy_func)( GLvector4f *to,
+ CONST GLvector4f *from,
CONST GLubyte mask[]);
@@ -163,7 +163,7 @@ typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat,
GLvector3f *dest );
-/* Flags for selecting a normal transformation function.
+/* Flags for selecting a normal transformation function.
*/
#define NORM_RESCALE 0x1 /* apply the scale factor */
#define NORM_NORMALIZE 0x2 /* normalize */
@@ -176,11 +176,11 @@ typedef void (_NORMAPIP normal_func)( CONST GLmatrix *mat,
/* KW: New versions of the transform function allow a mask array
* specifying that individual vector transform should be skipped
* when the mask byte is zero. This is always present as a
- * parameter, to allow a unified interface.
+ * parameter, to allow a unified interface.
*/
typedef void (_XFORMAPIP transform_func)( GLvector4f *to_vec,
CONST GLfloat m[16],
- CONST GLvector4f *from_vec,
+ CONST GLvector4f *from_vec,
CONST GLubyte *clipmask,
CONST GLubyte flag );
diff --git a/src/mesa/math/m_xform_tmp.h b/src/mesa/math/m_xform_tmp.h
index eca41f5f762..dd5a233b5ce 100644
--- a/src/mesa/math/m_xform_tmp.h
+++ b/src/mesa/math/m_xform_tmp.h
@@ -1,10 +1,10 @@
-/* $Id: m_xform_tmp.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: m_xform_tmp.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/math/mathmod.h b/src/mesa/math/mathmod.h
index f27427d81b4..44bf2b97d5b 100644
--- a/src/mesa/math/mathmod.h
+++ b/src/mesa/math/mathmod.h
@@ -1,3 +1,29 @@
+/* $Id: mathmod.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
#ifndef _MESA_MATH_H_
#define _MESA_MATH_H_
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index cfaea45053b..f0a8a8d06a7 100644
--- a/src/mesa/swrast/s_aaline.c
+++ b/src/mesa/swrast/s_aaline.c
@@ -1,4 +1,4 @@
-/* $Id: s_aaline.c,v 1.5 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_aaline.c,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -506,4 +506,3 @@ _swrast_choose_aa_line_function(GLcontext *ctx)
swrast->Line = aa_ci_line;
}
}
-
diff --git a/src/mesa/swrast/s_aaline.h b/src/mesa/swrast/s_aaline.h
index 1fdd1c0e0de..c470bfecbfa 100644
--- a/src/mesa/swrast/s_aaline.h
+++ b/src/mesa/swrast/s_aaline.h
@@ -1,10 +1,10 @@
-/* $Id: s_aaline.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_aaline.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h
index 91d588eee0a..9ab1abb292e 100644
--- a/src/mesa/swrast/s_aalinetemp.h
+++ b/src/mesa/swrast/s_aalinetemp.h
@@ -1,21 +1,21 @@
-/* $Id: s_aalinetemp.h,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_aalinetemp.h,v 1.7 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 423318d0934..1de030c776c 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -1,21 +1,21 @@
-/* $Id: s_aatriangle.c,v 1.8 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_aatriangle.c,v 1.9 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
diff --git a/src/mesa/swrast/s_aatriangle.h b/src/mesa/swrast/s_aatriangle.h
index 68d393002e8..0e25414e65d 100644
--- a/src/mesa/swrast/s_aatriangle.h
+++ b/src/mesa/swrast/s_aatriangle.h
@@ -1,10 +1,10 @@
-/* $Id: s_aatriangle.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_aatriangle.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h
index 26e1352c99b..5eb2455af65 100644
--- a/src/mesa/swrast/s_aatritemp.h
+++ b/src/mesa/swrast/s_aatritemp.h
@@ -1,21 +1,21 @@
-/* $Id: s_aatritemp.h,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_aatritemp.h,v 1.8 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -137,10 +137,10 @@
/* plane setup */
#ifdef DO_Z
compute_plane(p0, p1, p2, p0[2], p1[2], p2[2], zPlane);
- compute_plane(p0, p1, p2,
- v0->fog,
- v1->fog,
- v2->fog,
+ compute_plane(p0, p1, p2,
+ v0->fog,
+ v1->fog,
+ v2->fog,
fogPlane);
#endif
#ifdef DO_RGBA
@@ -470,16 +470,16 @@
(const GLchan (*)[4]) (spec + left),
GL_POLYGON);
# else
- _mesa_write_texture_span(ctx, n, left, iy, z + left, fog + left,
+ _mesa_write_texture_span(ctx, n, left, iy, z + left, fog + left,
s + left, t + left,
u + left, lambda + left,
rgba + left, NULL, GL_POLYGON);
# endif
#elif defined(DO_RGBA)
- _mesa_write_rgba_span(ctx, n, left, iy, z + left, fog + left,
+ _mesa_write_rgba_span(ctx, n, left, iy, z + left, fog + left,
rgba + left, GL_POLYGON);
#elif defined(DO_INDEX)
- _mesa_write_index_span(ctx, n, left, iy, z + left, fog + left,
+ _mesa_write_index_span(ctx, n, left, iy, z + left, fog + left,
index + left, GL_POLYGON);
#endif
}
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index 0c1fdbe929f..240992066e7 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -1,21 +1,21 @@
-/* $Id: s_accum.c,v 1.7 2001/03/08 15:23:46 brianp Exp $ */
+/* $Id: s_accum.c,v 1.8 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -236,7 +236,7 @@ _mesa_clear_accum_buffer( GLcontext *ctx )
void
_swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
- GLint xpos, GLint ypos,
+ GLint xpos, GLint ypos,
GLint width, GLint height )
{
@@ -247,13 +247,13 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask);
const GLint iChanMax = (1 << (sizeof(GLchan) * 8)) - 1;
const GLfloat fChanMax = (1 << (sizeof(GLchan) * 8)) - 1;
-
+
if (SWRAST_CONTEXT(ctx)->NewState)
_swrast_validate_derived( ctx );
if (!ctx->DrawBuffer->Accum) {
- _mesa_warning(ctx,
+ _mesa_warning(ctx,
"Calling glAccum() without an accumulation "
"buffer (low memory?)");
return;
@@ -320,7 +320,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
swrast->_IntegerAccumScaler = value;
if (swrast->_IntegerAccumMode && value != swrast->_IntegerAccumScaler)
rescale_accum(ctx);
-
+
RENDER_START(ctx);
if (swrast->_IntegerAccumMode) {
@@ -330,7 +330,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
assert(swrast->_IntegerAccumScaler > 0.0);
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
-
+
GLint i, i4;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i = i4 = 0; i < width; i++, i4+=4) {
@@ -471,7 +471,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
if (colorMask != 0xffffffff) {
_mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
}
- (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
+ (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
(const GLchan (*)[4])rgba, NULL );
if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
&& ctx->Color.ColorMask[ACOMP]) {
@@ -503,7 +503,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
if (colorMask != 0xffffffff) {
_mesa_mask_rgba_span( ctx, width, xpos, ypos, rgba );
}
- (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
+ (*ctx->Driver.WriteRGBASpan)( ctx, width, xpos, ypos,
(const GLchan (*)[4])rgba, NULL );
if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
&& ctx->Color.ColorMask[ACOMP]) {
diff --git a/src/mesa/swrast/s_accum.h b/src/mesa/swrast/s_accum.h
index b7680e56cff..014ca98b94b 100644
--- a/src/mesa/swrast/s_accum.h
+++ b/src/mesa/swrast/s_accum.h
@@ -1,10 +1,10 @@
-/* $Id: s_accum.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_accum.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c
index e6bd0c32489..c0d76fd9e1d 100644
--- a/src/mesa/swrast/s_alpha.c
+++ b/src/mesa/swrast/s_alpha.c
@@ -1,21 +1,21 @@
-/* $Id: s_alpha.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_alpha.c,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
@@ -60,7 +60,7 @@ _mesa_alpha_test( const GLcontext *ctx,
}
return 1;
case GL_LEQUAL:
- for (i=0;i<n;i++)
+ for (i=0;i<n;i++)
mask[i] &= (rgba[i][ACOMP] <= ref);
return 1;
case GL_GEQUAL:
diff --git a/src/mesa/swrast/s_alpha.h b/src/mesa/swrast/s_alpha.h
index 95d1788c878..5338df58ae0 100644
--- a/src/mesa/swrast/s_alpha.h
+++ b/src/mesa/swrast/s_alpha.h
@@ -1,10 +1,10 @@
-/* $Id: s_alpha.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_alpha.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_alphabuf.c b/src/mesa/swrast/s_alphabuf.c
index 5fbb6a36095..9d88c609209 100644
--- a/src/mesa/swrast/s_alphabuf.c
+++ b/src/mesa/swrast/s_alphabuf.c
@@ -1,21 +1,21 @@
-/* $Id: s_alphabuf.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_alphabuf.c,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -53,7 +53,7 @@
* Input: ctx - the context
*
*/
-static void
+static void
alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf )
{
GLint bytes = buf->Width * buf->Height * sizeof(GLchan);
@@ -309,6 +309,3 @@ _mesa_read_alpha_pixels( GLcontext *ctx,
}
}
}
-
-
-
diff --git a/src/mesa/swrast/s_alphabuf.h b/src/mesa/swrast/s_alphabuf.h
index c7208cf4d8e..889a6c94e6b 100644
--- a/src/mesa/swrast/s_alphabuf.h
+++ b/src/mesa/swrast/s_alphabuf.h
@@ -1,10 +1,10 @@
-/* $Id: s_alphabuf.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_alphabuf.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -79,4 +79,3 @@ _mesa_read_alpha_pixels( GLcontext* ctx,
#endif
-
diff --git a/src/mesa/swrast/s_bitmap.c b/src/mesa/swrast/s_bitmap.c
index 3a77004520c..243219b75c4 100644
--- a/src/mesa/swrast/s_bitmap.c
+++ b/src/mesa/swrast/s_bitmap.c
@@ -1,21 +1,21 @@
-/* $Id: s_bitmap.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_bitmap.c,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -39,7 +39,7 @@
/*
* Render a bitmap.
*/
-void
+void
_swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
GLsizei width, GLsizei height,
const struct gl_pixelstore_attrib *unpack,
@@ -70,7 +70,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
}
fragZ = (GLdepth) ( ctx->Current.RasterPos[2] * ctx->DepthMaxF);
-
+
_mesa_win_fog_coords_from_z( ctx, 1, &fragZ, &fogCoord );
for (row=0; row<height; row++) {
@@ -125,6 +125,3 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
_mesa_flush_pb(ctx);
}
-
-
-
diff --git a/src/mesa/swrast/s_blend.c b/src/mesa/swrast/s_blend.c
index d22616e36b5..3e15ae5deb3 100644
--- a/src/mesa/swrast/s_blend.c
+++ b/src/mesa/swrast/s_blend.c
@@ -1,21 +1,21 @@
-/* $Id: s_blend.c,v 1.5 2001/03/08 15:23:46 brianp Exp $ */
+/* $Id: s_blend.c,v 1.6 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -577,7 +577,7 @@ void _swrast_choose_blend_func( GLcontext *ctx )
SWRAST_CONTEXT(ctx)->BlendFunc = blend_general;
}
else if (eq==GL_FUNC_ADD_EXT && srcRGB==GL_SRC_ALPHA
- && dstRGB==GL_ONE_MINUS_SRC_ALPHA)
+ && dstRGB==GL_ONE_MINUS_SRC_ALPHA)
{
#if defined(USE_MMX_ASM)
if ( cpu_has_mmx ) {
@@ -632,7 +632,7 @@ _mesa_blend_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
/* Read span of current frame buffer pixels */
_mesa_read_rgba_span( ctx, ctx->DrawBuffer, n, x, y, dest );
- SWRAST_CONTEXT(ctx)->BlendFunc( ctx, n, mask, rgba,
+ SWRAST_CONTEXT(ctx)->BlendFunc( ctx, n, mask, rgba,
(const GLchan (*)[4]) dest );
}
@@ -667,5 +667,3 @@ _mesa_blend_pixels( GLcontext *ctx,
swrast->BlendFunc( ctx, n, mask, rgba, (const GLchan (*)[4])dest );
}
-
-
diff --git a/src/mesa/swrast/s_blend.h b/src/mesa/swrast/s_blend.h
index 58407a1c5d1..14488060685 100644
--- a/src/mesa/swrast/s_blend.h
+++ b/src/mesa/swrast/s_blend.h
@@ -1,10 +1,10 @@
-/* $Id: s_blend.h,v 1.3 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_blend.h,v 1.4 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c
index 9dc01e89919..003e4695592 100644
--- a/src/mesa/swrast/s_buffers.c
+++ b/src/mesa/swrast/s_buffers.c
@@ -1,21 +1,21 @@
-/* $Id: s_buffers.c,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_buffers.c,v 1.7 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -180,7 +180,7 @@ clear_color_buffers(GLcontext *ctx)
(void) (*ctx->Driver.SetDrawBuffer)( ctx, GL_BACK_RIGHT);
(void) (*ctx->Driver.SetReadBuffer)( ctx, ctx->DrawBuffer, GL_BACK_RIGHT);
}
-
+
if (colorMask != 0xffffffff) {
clear_color_buffer_with_masking(ctx);
}
@@ -197,9 +197,9 @@ clear_color_buffers(GLcontext *ctx)
-void
+void
_swrast_Clear( GLcontext *ctx, GLbitfield mask,
- GLboolean all,
+ GLboolean all,
GLint x, GLint y, GLint width, GLint height )
{
@@ -254,5 +254,3 @@ _swrast_alloc_buffers( GLcontext *ctx )
_mesa_alloc_alpha_buffers( ctx );
}
}
-
-
diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index a681ac6d119..ffcdc718c2c 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -1,10 +1,10 @@
-/* $Id: s_context.c,v 1.16 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_context.c,v 1.17 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -201,7 +201,7 @@ _swrast_validate_triangle( GLcontext *ctx,
_swrast_validate_derived( ctx );
swrast->choose_triangle( ctx );
- if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) &&
+ if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) &&
!ctx->Texture._ReallyEnabled) {
swrast->SpecTriangle = swrast->Triangle;
swrast->Triangle = _swrast_add_spec_terms_triangle;
@@ -218,7 +218,7 @@ _swrast_validate_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1 )
_swrast_validate_derived( ctx );
swrast->choose_line( ctx );
- if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) &&
+ if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) &&
!ctx->Texture._ReallyEnabled) {
swrast->SpecLine = swrast->Line;
swrast->Line = _swrast_add_spec_terms_line;
@@ -236,7 +236,7 @@ _swrast_validate_point( GLcontext *ctx, const SWvertex *v0 )
_swrast_validate_derived( ctx );
swrast->choose_point( ctx );
- if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) &&
+ if ((ctx->_TriangleCaps & DD_SEPERATE_SPECULAR) &&
!ctx->Texture._ReallyEnabled) {
swrast->SpecPoint = swrast->Point;
swrast->Point = _swrast_add_spec_terms_point;
@@ -476,15 +476,15 @@ _swrast_print_vertex( GLcontext *ctx, const SWvertex *v )
{
GLuint i;
- fprintf(stderr, "win %f %f %f %f\n",
+ fprintf(stderr, "win %f %f %f %f\n",
v->win[0], v->win[1], v->win[2], v->win[3]);
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
fprintf(stderr, "texcoord[%d] %f %f %f %f\n", i,
- v->texcoord[i][0], v->texcoord[i][1],
+ v->texcoord[i][0], v->texcoord[i][1],
v->texcoord[i][2], v->texcoord[i][3]);
- fprintf(stderr, "color %d %d %d %d\n",
+ fprintf(stderr, "color %d %d %d %d\n",
v->color[0], v->color[1], v->color[2], v->color[3]);
fprintf(stderr, "spec %d %d %d %d\n",
v->specular[0], v->specular[1], v->specular[2], v->specular[3]);
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index 63596083bcc..7449cb28963 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -1,4 +1,4 @@
-/* $Id: s_context.h,v 1.6 2001/03/07 04:50:49 brianp Exp $ */
+/* $Id: s_context.h,v 1.7 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -149,7 +149,7 @@ typedef struct
swrast_tri_func Triangle;
/* Placeholders for when seperate specular (or secondary color) is
- * enabled but texturing is not.
+ * enabled but texturing is not.
*/
swrast_point_func SpecPoint;
swrast_line_func SpecLine;
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 7af64ff0453..1a8c0a069c2 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -1,21 +1,21 @@
-/* $Id: s_copypix.c,v 1.14 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_copypix.c,v 1.15 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -277,11 +277,11 @@ copy_conv_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
dy = desty + row;
if (quick_draw && dy >= 0 && dy < ctx->DrawBuffer->Height) {
- (*ctx->Driver.WriteRGBASpan)( ctx, width, destx, dy,
+ (*ctx->Driver.WriteRGBASpan)( ctx, width, destx, dy,
(const GLchan (*)[4])rgba, NULL );
}
else if (zoom) {
- _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0,
+ _mesa_write_zoomed_rgba_span( ctx, width, destx, dy, zspan, 0,
(const GLchan (*)[4])rgba, desty);
}
else {
@@ -521,7 +521,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
}
if (quick_draw && dy >= 0 && dy < ctx->DrawBuffer->Height) {
- (*ctx->Driver.WriteRGBASpan)( ctx, width, destx, dy,
+ (*ctx->Driver.WriteRGBASpan)( ctx, width, destx, dy,
(const GLchan (*)[4])rgba, NULL );
}
else if (zoom) {
@@ -747,7 +747,7 @@ static void copy_depth_pixels( GLcontext *ctx, GLint srcx, GLint srcy,
(const GLchan (*)[4])rgba, desty );
}
else {
- _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0,
+ _mesa_write_rgba_span( ctx, width, destx, dy, zspan, 0,
rgba, GL_BITMAP);
}
}
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index b051cdc4891..19101a24c48 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -1,21 +1,21 @@
-/* $Id: s_depth.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_depth.c,v 1.8 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
+ * Version: 3.5
+ *
+ * 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
diff --git a/src/mesa/swrast/s_depth.h b/src/mesa/swrast/s_depth.h
index e44b98eee5e..4d53de350f1 100644
--- a/src/mesa/swrast/s_depth.h
+++ b/src/mesa/swrast/s_depth.h
@@ -1,10 +1,10 @@
-/* $Id: s_depth.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_depth.h,v 1.3 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 1e03fa903e1..925d5dba6e0 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -1,21 +1,21 @@
-/* $Id: s_drawpix.c,v 1.13 2001/03/08 15:23:46 brianp Exp $ */
+/* $Id: s_drawpix.c,v 1.14 2001/03/12 00:48:41 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -411,7 +411,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
ASSERT(drawWidth < MAX_WIDTH);
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (const GLchan (*)[4]) rgba,
+ (const GLchan (*)[4]) rgba,
NULL);
src += rowLength;
destY++;
@@ -426,7 +426,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
destY--;
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (CONST GLchan (*)[4]) rgba,
+ (CONST GLchan (*)[4]) rgba,
NULL);
src += rowLength;
}
@@ -526,7 +526,7 @@ draw_index_pixels( GLcontext *ctx, GLint x, GLint y,
* Do glDrawPixels of stencil image. The image datatype may either
* be GLubyte or GLbitmap.
*/
-static void
+static void
draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y,
GLsizei width, GLsizei height,
GLenum type, const GLvoid *pixels )
@@ -855,10 +855,10 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
* Execute glDrawPixels
*/
void
-_swrast_DrawPixels( GLcontext *ctx,
+_swrast_DrawPixels( GLcontext *ctx,
GLint x, GLint y,
GLsizei width, GLsizei height,
- GLenum format, GLenum type,
+ GLenum format, GLenum type,
const struct gl_pixelstore_attrib *unpack,
const GLvoid *pixels )
{
@@ -897,4 +897,3 @@ _swrast_DrawPixels( GLcontext *ctx,
_mesa_error( ctx, GL_INVALID_ENUM, "glDrawPixels(format)" );
}
}
-
diff --git a/src/mesa/swrast/s_drawpix.h b/src/mesa/swrast/s_drawpix.h
index 7debca81dac..a792ef8dd44 100644
--- a/src/mesa/swrast/s_drawpix.h
+++ b/src/mesa/swrast/s_drawpix.h
@@ -1,10 +1,10 @@
-/* $Id: s_drawpix.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_drawpix.h,v 1.3 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_feedback.c b/src/mesa/swrast/s_feedback.c
index 2bb9f301e80..c86dc4f6d5f 100644
--- a/src/mesa/swrast/s_feedback.c
+++ b/src/mesa/swrast/s_feedback.c
@@ -1,21 +1,21 @@
-/* $Id: s_feedback.c,v 1.6 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_feedback.c,v 1.7 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -94,7 +94,7 @@ void _mesa_feedback_triangle( GLcontext *ctx,
if (_mesa_cull_triangle( ctx, v0, v1, v2 )) {
FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) GL_POLYGON_TOKEN );
FEEDBACK_TOKEN( ctx, (GLfloat) 3 ); /* three vertices */
-
+
if (ctx->Light.ShadeModel == GL_SMOOTH) {
feedback_vertex( ctx, v0, v0 );
feedback_vertex( ctx, v1, v1 );
@@ -113,7 +113,7 @@ void _mesa_feedback_line( GLcontext *ctx, const SWvertex *v0, const SWvertex *v1
GLenum token = GL_LINE_TOKEN;
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- if (swrast->StippleCounter==0)
+ if (swrast->StippleCounter==0)
token = GL_LINE_RESET_TOKEN;
FEEDBACK_TOKEN( ctx, (GLfloat) (GLint) token );
@@ -165,6 +165,3 @@ void _mesa_select_point( GLcontext *ctx, const SWvertex *v )
const GLfloat zs = 1.0F / ctx->DepthMaxF;
_mesa_update_hitflag( ctx, v->win[2] * zs );
}
-
-
-
diff --git a/src/mesa/swrast/s_feedback.h b/src/mesa/swrast/s_feedback.h
index bd84f0dc8ab..9acae42db63 100644
--- a/src/mesa/swrast/s_feedback.h
+++ b/src/mesa/swrast/s_feedback.h
@@ -1,10 +1,10 @@
-/* $Id: s_feedback.h,v 1.4 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_feedback.h,v 1.5 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -50,4 +50,3 @@ extern void _mesa_select_triangle( GLcontext *ctx, const SWvertex *v0,
const SWvertex *v1, const SWvertex *v2 );
#endif
-
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c
index debca659e43..cc55913f37d 100644
--- a/src/mesa/swrast/s_fog.c
+++ b/src/mesa/swrast/s_fog.c
@@ -1,21 +1,21 @@
-/* $Id: s_fog.c,v 1.10 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_fog.c,v 1.11 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -45,8 +45,8 @@
*/
void
_mesa_fog_rgba_pixels( const GLcontext *ctx,
- GLuint n,
- const GLfixed fog[],
+ GLuint n,
+ const GLfixed fog[],
GLchan rgba[][4] )
{
GLuint i;
@@ -101,18 +101,18 @@ _mesa_fog_ci_pixels( const GLcontext *ctx,
/*
- * Calculate fog coords from window z values
+ * Calculate fog coords from window z values
* Input: n - number of pixels
* z - array of integer depth values
* red, green, blue, alpha - pixel colors
* Output: red, green, blue, alpha - fogged pixel colors
*
- * Use lookup table & interpolation?
+ * Use lookup table & interpolation?
*/
void
_mesa_win_fog_coords_from_z( const GLcontext *ctx,
- GLuint n,
- const GLdepth z[],
+ GLuint n,
+ const GLdepth z[],
GLfixed fogcoord[] )
{
const GLboolean ortho = (ctx->ProjectionMatrix.m[15] != 0.0F);
@@ -274,4 +274,3 @@ _mesa_depth_fog_ci_pixels( const GLcontext *ctx,
_mesa_win_fog_coords_from_z( ctx, n, z, fog );
_mesa_fog_ci_pixels( ctx, n, fog, index );
}
-
diff --git a/src/mesa/swrast/s_fog.h b/src/mesa/swrast/s_fog.h
index 864ad7af968..9c487e13d11 100644
--- a/src/mesa/swrast/s_fog.h
+++ b/src/mesa/swrast/s_fog.h
@@ -1,10 +1,10 @@
-/* $Id: s_fog.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_fog.h,v 1.3 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c
index 9e856d41534..48d04115cc2 100644
--- a/src/mesa/swrast/s_lines.c
+++ b/src/mesa/swrast/s_lines.c
@@ -1,21 +1,21 @@
-/* $Id: s_lines.c,v 1.13 2001/03/08 17:33:33 brianp Exp $ */
+/* $Id: s_lines.c,v 1.14 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -933,7 +933,7 @@ static void flat_multitextured_line( GLcontext *ctx,
}
-void _swrast_add_spec_terms_line( GLcontext *ctx,
+void _swrast_add_spec_terms_line( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1 )
{
diff --git a/src/mesa/swrast/s_lines.h b/src/mesa/swrast/s_lines.h
index 110f536c488..99a60d9b063 100644
--- a/src/mesa/swrast/s_lines.h
+++ b/src/mesa/swrast/s_lines.h
@@ -1,10 +1,10 @@
-/* $Id: s_lines.h,v 1.4 2001/02/16 18:14:41 keithw Exp $ */
+/* $Id: s_lines.h,v 1.5 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -33,8 +33,8 @@
void
_swrast_choose_line( GLcontext *ctx );
-void
-_swrast_add_spec_terms_line( GLcontext *ctx,
+void
+_swrast_add_spec_terms_line( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1 );
diff --git a/src/mesa/swrast/s_linetemp.h b/src/mesa/swrast/s_linetemp.h
index dd7d33f8cde..5792b46a4a9 100644
--- a/src/mesa/swrast/s_linetemp.h
+++ b/src/mesa/swrast/s_linetemp.h
@@ -1,21 +1,21 @@
-/* $Id: s_linetemp.h,v 1.6 2001/03/08 17:33:33 brianp Exp $ */
+/* $Id: s_linetemp.h,v 1.7 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -58,7 +58,7 @@
*
* To enable line stippling define STIPPLE = 1
* To enable wide lines define WIDE = 1
- *
+ *
* To actually "plot" each pixel either the PLOT macro or
* (XMAJOR_PLOT and YMAJOR_PLOT macros) must be defined...
* PLOT(X,Y) - code to plot a pixel. Example:
@@ -96,7 +96,7 @@
#endif
#ifdef INTERP_FOG
GLfixed fog0 = FloatToFixed(vert0->fog);
- GLfixed dfog = FloatToFixed(vert1->fog) - fog0;
+ GLfixed dfog = FloatToFixed(vert1->fog) - fog0;
#endif
#ifdef INTERP_RGB
GLfixed r0 = IntToFixed(vert0->color[0]);
diff --git a/src/mesa/swrast/s_logic.c b/src/mesa/swrast/s_logic.c
index c16a4b63a9f..399a8e8a762 100644
--- a/src/mesa/swrast/s_logic.c
+++ b/src/mesa/swrast/s_logic.c
@@ -1,21 +1,21 @@
-/* $Id: s_logic.c,v 1.4 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_logic.c,v 1.5 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
diff --git a/src/mesa/swrast/s_logic.h b/src/mesa/swrast/s_logic.h
index b6a339a0adb..76cd7f8fa9f 100644
--- a/src/mesa/swrast/s_logic.h
+++ b/src/mesa/swrast/s_logic.h
@@ -1,10 +1,10 @@
-/* $Id: s_logic.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_logic.h,v 1.3 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_masking.c b/src/mesa/swrast/s_masking.c
index a2d763067d6..7cacd1de389 100644
--- a/src/mesa/swrast/s_masking.c
+++ b/src/mesa/swrast/s_masking.c
@@ -1,21 +1,21 @@
-/* $Id: s_masking.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_masking.c,v 1.4 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -178,4 +178,3 @@ _mesa_mask_index_pixels( GLcontext *ctx,
index[i] = (index[i] & msrc) | (fbindexes[i] & mdest);
}
}
-
diff --git a/src/mesa/swrast/s_masking.h b/src/mesa/swrast/s_masking.h
index dcd35c27e59..4f324aa60a4 100644
--- a/src/mesa/swrast/s_masking.h
+++ b/src/mesa/swrast/s_masking.h
@@ -1,10 +1,10 @@
-/* $Id: s_masking.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_masking.h,v 1.3 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -73,4 +73,3 @@ _mesa_mask_index_pixels( GLcontext *ctx,
#endif
-
diff --git a/src/mesa/swrast/s_pixeltex.c b/src/mesa/swrast/s_pixeltex.c
index a9cf425ffbd..6f83779e2a8 100644
--- a/src/mesa/swrast/s_pixeltex.c
+++ b/src/mesa/swrast/s_pixeltex.c
@@ -1,21 +1,21 @@
-/* $Id: s_pixeltex.c,v 1.2 2000/11/05 18:24:40 keithw Exp $ */
+/* $Id: s_pixeltex.c,v 1.3 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
diff --git a/src/mesa/swrast/s_pixeltex.h b/src/mesa/swrast/s_pixeltex.h
index a677c173012..6a53f5b6b41 100644
--- a/src/mesa/swrast/s_pixeltex.h
+++ b/src/mesa/swrast/s_pixeltex.h
@@ -1,10 +1,10 @@
-/* $Id: s_pixeltex.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_pixeltex.h,v 1.3 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -13,7 +13,7 @@
* 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 noti_mesa_PixelTexGenParameterfvce and this permission notice shall be included
+ * 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
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 70ff376df88..0c3b4d0f084 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -1,21 +1,21 @@
-/* $Id: s_points.c,v 1.14 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_points.c,v 1.15 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -159,7 +159,7 @@
-void _swrast_add_spec_terms_point( GLcontext *ctx,
+void _swrast_add_spec_terms_point( GLcontext *ctx,
const SWvertex *v0 )
{
SWvertex *ncv0 = (SWvertex *)v0;
@@ -195,7 +195,7 @@ do { \
* Examine the current context to determine which point drawing function
* should be used.
*/
-void
+void
_swrast_choose_point( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -276,4 +276,3 @@ _swrast_choose_point( GLcontext *ctx )
USE(_mesa_select_point);
}
}
-
diff --git a/src/mesa/swrast/s_points.h b/src/mesa/swrast/s_points.h
index 1dd78cb8645..f52b32b76e5 100644
--- a/src/mesa/swrast/s_points.h
+++ b/src/mesa/swrast/s_points.h
@@ -1,10 +1,10 @@
-/* $Id: s_points.h,v 1.4 2001/02/16 18:14:41 keithw Exp $ */
+/* $Id: s_points.h,v 1.5 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -33,8 +33,8 @@
void
_swrast_choose_point( GLcontext *ctx );
-void
-_swrast_add_spec_terms_point( GLcontext *ctx,
+void
+_swrast_add_spec_terms_point( GLcontext *ctx,
const SWvertex *v0 );
#endif
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index 60d7f45f140..f33be6d6655 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -1,21 +1,21 @@
-/* $Id: s_pointtemp.h,v 1.4 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_pointtemp.h,v 1.5 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -96,7 +96,7 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
texcoord[u][0] = vert->texcoord[u][0] / vert->texcoord[u][3];
texcoord[u][1] = vert->texcoord[u][1] / vert->texcoord[u][3];
texcoord[u][2] = vert->texcoord[u][2] / vert->texcoord[u][3];
- }
+ }
else {
texcoord[u][0] = vert->texcoord[u][0];
texcoord[u][1] = vert->texcoord[u][1];
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 9ed58f4a63f..a24c44bebed 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -1,21 +1,21 @@
-/* $Id: s_readpix.c,v 1.9 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_readpix.c,v 1.10 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -473,7 +473,7 @@ read_rgba_pixels( GLcontext *ctx,
void
_swrast_ReadPixels( GLcontext *ctx,
GLint x, GLint y, GLsizei width, GLsizei height,
- GLenum format, GLenum type,
+ GLenum format, GLenum type,
const struct gl_pixelstore_attrib *pack,
GLvoid *pixels )
{
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 4197167e2d0..e7659d51a7f 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1,21 +1,21 @@
-/* $Id: s_span.c,v 1.10 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_span.c,v 1.11 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -99,7 +99,7 @@ static GLuint clip_span( GLcontext *ctx,
}
else {
/* partially off left side */
- BZERO(mask, -x * sizeof(GLubyte));
+ BZERO(mask, -x * sizeof(GLubyte));
}
}
@@ -269,7 +269,7 @@ void _mesa_write_index_span( GLcontext *ctx,
void _mesa_write_monoindex_span( GLcontext *ctx,
- GLuint n, GLint x, GLint y,
+ GLuint n, GLint x, GLint y,
const GLdepth z[],
const GLfixed fog[],
GLuint index, GLenum primitive )
@@ -426,10 +426,10 @@ static void multi_write_rgba_span( GLcontext *ctx, GLuint n,
_mesa_mask_rgba_span( ctx, n, x, y, rgbaTmp );
}
- (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y,
+ (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y,
(const GLchan (*)[4]) rgbaTmp, mask );
if (swrast->_RasterMask & ALPHABUF_BIT) {
- _mesa_write_alpha_span( ctx, n, x, y,
+ _mesa_write_alpha_span( ctx, n, x, y,
(const GLchan (*)[4])rgbaTmp, mask );
}
}
@@ -523,7 +523,7 @@ void _mesa_write_rgba_span( GLcontext *ctx,
/* Per-pixel fog */
if (ctx->Fog.Enabled) {
- if (fog && !swrast->_PreferPixelFog)
+ if (fog && !swrast->_PreferPixelFog)
_mesa_fog_rgba_pixels( ctx, n, fog, rgba );
else
_mesa_depth_fog_rgba_pixels( ctx, n, z, rgba );
@@ -553,13 +553,13 @@ void _mesa_write_rgba_span( GLcontext *ctx,
}
/* write pixels */
- (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y,
- (const GLchan (*)[4]) rgba,
+ (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y,
+ (const GLchan (*)[4]) rgba,
write_all ? Null : mask );
if (swrast->_RasterMask & ALPHABUF_BIT) {
- _mesa_write_alpha_span( ctx, n, x, y,
- (const GLchan (*)[4]) rgba,
+ _mesa_write_alpha_span( ctx, n, x, y,
+ (const GLchan (*)[4]) rgba,
write_all ? Null : mask );
}
}
@@ -693,12 +693,12 @@ void _mesa_write_monocolor_span( GLcontext *ctx,
}
/* write pixels */
- (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y,
- (const GLchan (*)[4]) rgba,
+ (*ctx->Driver.WriteRGBASpan)( ctx, n, x, y,
+ (const GLchan (*)[4]) rgba,
write_all ? Null : mask );
if (swrast->_RasterMask & ALPHABUF_BIT) {
- _mesa_write_alpha_span( ctx, n, x, y,
- (const GLchan (*)[4]) rgba,
+ _mesa_write_alpha_span( ctx, n, x, y,
+ (const GLchan (*)[4]) rgba,
write_all ? Null : mask );
}
}
@@ -714,7 +714,7 @@ void _mesa_write_monocolor_span( GLcontext *ctx,
COPY_CHAN4(rgba[i], color);
}
}
- multi_write_rgba_span( ctx, n, x, y,
+ multi_write_rgba_span( ctx, n, x, y,
(const GLchan (*)[4]) rgba, mask );
}
else {
@@ -811,7 +811,7 @@ void _mesa_write_texture_span( GLcontext *ctx,
stipple_polygon_span( ctx, n, x, y, mask );
write_all = GL_FALSE;
}
-
+
/* Texture with alpha test*/
if (ctx->Color.AlphaEnabled) {
/* Texturing without alpha is done after depth-testing which
@@ -819,7 +819,7 @@ void _mesa_write_texture_span( GLcontext *ctx,
ASSERT(ctx->Texture._ReallyEnabled);
_swrast_texture_fragments( ctx, 0, n, s, t, u, lambda,
(CONST GLchan (*)[4]) rgba, rgba );
-
+
/* Do the alpha test */
if (_mesa_alpha_test( ctx, n, (const GLchan (*)[4]) rgba, mask ) == 0) {
return;
@@ -856,7 +856,7 @@ void _mesa_write_texture_span( GLcontext *ctx,
}
/* Add base and specular colors */
- if (spec &&
+ if (spec &&
(ctx->Fog.ColorSumEnabled ||
(ctx->Light.Enabled && ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)))
add_colors( n, rgba, spec ); /* rgba = rgba + spec */
@@ -890,7 +890,7 @@ void _mesa_write_texture_span( GLcontext *ctx,
(*ctx->Driver.WriteRGBASpan)( ctx, n, x, y, (const GLchan (*)[4])rgba,
write_all ? Null : mask );
if (swrast->_RasterMask & ALPHABUF_BIT) {
- _mesa_write_alpha_span( ctx, n, x, y, (const GLchan (*)[4]) rgba,
+ _mesa_write_alpha_span( ctx, n, x, y, (const GLchan (*)[4]) rgba,
write_all ? Null : mask );
}
}
@@ -969,7 +969,7 @@ _mesa_write_multitexture_span( GLcontext *ctx,
for (i = 0; i < texUnits; i++)
_swrast_texture_fragments( ctx, i, n, s[i], t[i], u[i], lambda[i],
(CONST GLchan (*)[4]) rgbaIn, rgba );
-
+
/* Do the alpha test */
if (_mesa_alpha_test( ctx, n, (const GLchan (*)[4])rgba, mask ) == 0) {
return;
@@ -1007,9 +1007,9 @@ _mesa_write_multitexture_span( GLcontext *ctx,
}
/* Add base and specular colors */
- if (spec &&
+ if (spec &&
(ctx->Fog.ColorSumEnabled ||
- (ctx->Light.Enabled &&
+ (ctx->Light.Enabled &&
ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)))
add_colors( n, rgba, spec ); /* rgba = rgba + spec */
diff --git a/src/mesa/swrast/s_span.h b/src/mesa/swrast/s_span.h
index d4c77715c34..aa7e3b3664b 100644
--- a/src/mesa/swrast/s_span.h
+++ b/src/mesa/swrast/s_span.h
@@ -1,10 +1,10 @@
-/* $Id: s_span.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_span.h,v 1.4 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index ac6f0dda4bc..af782aa7856 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -1,21 +1,21 @@
-/* $Id: s_stencil.c,v 1.9 2001/03/07 05:06:12 brianp Exp $ */
+/* $Id: s_stencil.c,v 1.10 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -42,11 +42,11 @@
/* Stencil Logic:
IF stencil test fails THEN
- Apply fail-op to stencil value
+ Apply fail-op to stencil value
Don't write the pixel (RGBA,Z)
ELSE
IF doing depth test && depth test fails THEN
- Apply zfail-op to stencil value
+ Apply zfail-op to stencil value
Write RGBA and Z to appropriate buffers
ELSE
Apply zpass-op to stencil value
@@ -416,7 +416,7 @@ do_stencil_test( GLcontext *ctx, GLuint n, GLstencil stencil[],
* mask - array [n] of flags (1=stencil and depth test passed)
* Return: GL_TRUE - all fragments failed the testing
* GL_FALSE - one or more fragments passed the testing
- *
+ *
*/
static GLboolean
stencil_and_ztest_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
@@ -499,7 +499,7 @@ stencil_and_ztest_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
* Output: mask - array [n] of flags (1=stencil and depth test passed)
* Return: GL_TRUE - all fragments failed the testing
* GL_FALSE - one or more fragments passed the testing
- *
+ *
*/
GLboolean
_mesa_stencil_and_ztest_span( GLcontext *ctx, GLuint n, GLint x, GLint y,
@@ -896,7 +896,7 @@ stencil_test_pixels( GLcontext *ctx, GLuint n,
* The comments in this function are a bit sparse but the code is
* almost identical to stencil_and_ztest_span(), which is well
* commented.
- *
+ *
* Input: n - number of pixels in the array
* x, y - array of [n] pixel positions
* z - array [n] of z values
@@ -1301,4 +1301,3 @@ _mesa_clear_stencil_buffer( GLcontext *ctx )
clear_software_stencil_buffer(ctx);
}
}
-
diff --git a/src/mesa/swrast/s_stencil.h b/src/mesa/swrast/s_stencil.h
index a1ef81b61a1..30394a90594 100644
--- a/src/mesa/swrast/s_stencil.h
+++ b/src/mesa/swrast/s_stencil.h
@@ -1,10 +1,10 @@
-/* $Id: s_stencil.h,v 1.2 2000/11/22 07:32:18 joukj Exp $ */
+/* $Id: s_stencil.h,v 1.3 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/s_texture.h b/src/mesa/swrast/s_texture.h
index 821e8199d5b..ac15c106029 100644
--- a/src/mesa/swrast/s_texture.h
+++ b/src/mesa/swrast/s_texture.h
@@ -1,4 +1,4 @@
-/* $Id: s_texture.h,v 1.5 2001/02/20 16:42:26 brianp Exp $ */
+/* $Id: s_texture.h,v 1.6 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -47,4 +47,3 @@ _swrast_texture_fragments( GLcontext *ctx, GLuint texSet, GLuint n,
#endif
-
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index fbacc7ddd4a..a581acfcfb9 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -1,21 +1,21 @@
-/* $Id: s_triangle.c,v 1.17 2001/03/08 17:33:33 brianp Exp $ */
+/* $Id: s_triangle.c,v 1.18 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -47,10 +47,10 @@
#include "s_feedback.h"
#include "s_span.h"
#include "s_triangle.h"
-
+
GLboolean _mesa_cull_triangle( GLcontext *ctx,
- const SWvertex *v0,
- const SWvertex *v1,
+ const SWvertex *v0,
+ const SWvertex *v1,
const SWvertex *v2 )
{
GLfloat ex = v1->win[0] - v0->win[0];
@@ -61,7 +61,7 @@ GLboolean _mesa_cull_triangle( GLcontext *ctx,
if (c * SWRAST_CONTEXT(ctx)->_backface_sign > 0)
return 0;
-
+
return 1;
}
@@ -71,8 +71,8 @@ GLboolean _mesa_cull_triangle( GLcontext *ctx,
* Render a flat-shaded color index triangle.
*/
static void flat_ci_triangle( GLcontext *ctx,
- const SWvertex *v0,
- const SWvertex *v1,
+ const SWvertex *v0,
+ const SWvertex *v1,
const SWvertex *v2 )
{
#define INTERP_Z 1
@@ -96,7 +96,7 @@ static void flat_ci_triangle( GLcontext *ctx,
} \
}
-#include "s_tritemp.h"
+#include "s_tritemp.h"
}
@@ -105,8 +105,8 @@ static void flat_ci_triangle( GLcontext *ctx,
* Render a smooth-shaded color index triangle.
*/
static void smooth_ci_triangle( GLcontext *ctx,
- const SWvertex *v0,
- const SWvertex *v1,
+ const SWvertex *v0,
+ const SWvertex *v1,
const SWvertex *v2 )
{
#define INTERP_Z 1
@@ -289,7 +289,7 @@ static void simple_textured_triangle( GLcontext *ctx,
* Render an RGB, GL_DECAL, textured triangle.
* Interpolate S,T, GL_LESS depth test, w/out mipmapping or
* perspective correction.
- *
+ *
* No fog.
*/
static void simple_z_textured_triangle( GLcontext *ctx,
@@ -423,11 +423,11 @@ static void affine_textured_triangle( GLcontext *ctx,
tsize = obj->Image[b]->Height * tbytesline;
- /* Instead of defining a function for each mode, a test is done
+ /* Instead of defining a function for each mode, a test is done
* between the outer and inner loops. This is to reduce code size
- * and complexity. Observe that an optimizing compiler kills
+ * and complexity. Observe that an optimizing compiler kills
* unused variables (for instance tf,sf,ti,si in case of GL_NEAREST).
- */
+ */
#define NEAREST_RGB \
tr = tex00[RCOMP]; \
@@ -690,7 +690,7 @@ static void near_persp_textured_triangle(GLcontext *ctx,
/* The BIAS value is used to shift negative values into positive values.
* Without this, negative texture values don't GL_REPEAT correctly at just
* below zero, because (int)-0.5 = 0 = (int)0.5. We're not going to worry
- * about texture coords less than -BIAS. This could be fixed by using
+ * about texture coords less than -BIAS. This could be fixed by using
* FLOORF etc. instead, but this is slower...
*/
#define BIAS 4096.0F
@@ -825,7 +825,7 @@ static void near_persp_textured_triangle(GLcontext *ctx,
DRAW_LINE (DO_TEX); \
x_m ++; \
} \
-}
+}
#define SPAN3(DO_TEX, COMP, TEX_COORD) { \
GLfloat x_min = FLOORF (x_tex); \
@@ -862,7 +862,7 @@ static void near_persp_textured_triangle(GLcontext *ctx,
DRAW_LINE (DO_TEX); \
} \
}
-
+
#define SPAN4(DO_TEX, COMP, TEX_COORD) \
{ \
GLfloat x_min = FLOORF(x_tex); \
@@ -1798,7 +1798,7 @@ static void general_textured_spec_triangle1( GLcontext *ctx,
static void lambda_textured_triangle1( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
- const SWvertex *v2,
+ const SWvertex *v2,
GLfloat s[MAX_WIDTH],
GLfloat t[MAX_WIDTH],
GLfloat u[MAX_WIDTH] )
@@ -2015,7 +2015,7 @@ static void lambda_textured_spec_triangle1( GLcontext *ctx,
* Interpolate Z, RGB, Alpha, and two sets of texture coordinates.
* Yup, it's slow.
*/
-static void
+static void
lambda_multitextured_triangle1( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
@@ -2144,7 +2144,7 @@ static void general_textured_spec_triangle(GLcontext *ctx,
const SWvertex *v2 )
{
GLdepth zspan[MAX_WIDTH];
- GLfixed fogspan[MAX_WIDTH];
+ GLfixed fogspan[MAX_WIDTH];
GLchan rgba[MAX_WIDTH][4], spec[MAX_WIDTH][4];
general_textured_spec_triangle1(ctx,v0,v1,v2,zspan,fogspan,rgba,spec);
}
@@ -2180,9 +2180,9 @@ static void lambda_multitextured_triangle( GLcontext *ctx,
GLfloat t[MAX_TEXTURE_UNITS][MAX_WIDTH];
DEFMARRAY(GLfloat,u,MAX_TEXTURE_UNITS,MAX_WIDTH);
CHECKARRAY(u,return);
-
+
lambda_multitextured_triangle1(ctx,v0,v1,v2,s,t,u);
-
+
UNDEFARRAY(u);
}
@@ -2238,7 +2238,7 @@ void _swrast_add_spec_terms_triangle( GLcontext *ctx,
SWRAST_CONTEXT(ctx)->SpecTriangle( ctx, ncv0, ncv1, ncv2 );
COPY_CHAN4( ncv0->color, c[0] );
COPY_CHAN4( ncv1->color, c[1] );
- COPY_CHAN4( ncv2->color, c[2] );
+ COPY_CHAN4( ncv2->color, c[2] );
}
@@ -2258,7 +2258,7 @@ void _swrast_add_spec_terms_triangle( GLcontext *ctx,
* Please update the summary flag _SWRAST_NEW_TRIANGLE if you add or
* remove tests to this code.
*/
-void
+void
_swrast_choose_triangle( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
@@ -2278,8 +2278,8 @@ _swrast_choose_triangle( GLcontext *ctx )
ctx->Depth.Func == GL_LESS &&
!ctx->Stencil.Enabled) {
if ((rgbmode &&
- ctx->Color.ColorMask[0] == 0 &&
- ctx->Color.ColorMask[1] == 0 &&
+ ctx->Color.ColorMask[0] == 0 &&
+ ctx->Color.ColorMask[1] == 0 &&
ctx->Color.ColorMask[2] == 0 &&
ctx->Color.ColorMask[3] == 0)
||
@@ -2309,7 +2309,7 @@ _swrast_choose_triangle( GLcontext *ctx )
&& ctx->Texture.Unit[0].EnvMode!=GL_COMBINE_EXT) {
if (ctx->Hint.PerspectiveCorrection==GL_FASTEST) {
-
+
if (filter==GL_NEAREST
&& format==GL_RGB
&& (ctx->Texture.Unit[0].EnvMode==GL_REPLACE
diff --git a/src/mesa/swrast/s_triangle.h b/src/mesa/swrast/s_triangle.h
index 8689441bea6..576038db720 100644
--- a/src/mesa/swrast/s_triangle.h
+++ b/src/mesa/swrast/s_triangle.h
@@ -1,10 +1,10 @@
-/* $Id: s_triangle.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_triangle.h,v 1.7 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.1
+ * Version: 3.5
*
- * 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"),
@@ -45,12 +45,11 @@ GLboolean _mesa_cull_triangle( GLcontext *ctx,
void
_swrast_choose_triangle( GLcontext *ctx );
-void
-_swrast_add_spec_terms_triangle( GLcontext *ctx,
+void
+_swrast_add_spec_terms_triangle( GLcontext *ctx,
const SWvertex *v0,
const SWvertex *v1,
const SWvertex *v2 );
#endif
-
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index a854b995b89..062795debb2 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -1,21 +1,21 @@
-/* $Id: s_tritemp.h,v 1.13 2001/03/08 17:33:33 brianp Exp $ */
+/* $Id: s_tritemp.h,v 1.14 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -62,7 +62,7 @@
*
* Optionally, one may provide one-time setup code per triangle:
* SETUP_CODE - code which is to be executed once per triangle
- *
+ *
* The following macro MUST be defined:
* INNER_LOOP(LEFT,RIGHT,Y) - code to write a span of pixels.
* Something like:
@@ -231,7 +231,7 @@
* By stepping rasterization parameters along the major edge,
* we can avoid recomputing them at the discontinuity where
* the top and bottom edges meet. However, this forces us to
- * be able to scan both left-to-right and right-to-left.
+ * be able to scan both left-to-right and right-to-left.
* Also, we must determine whether the major edge is at the
* left or right side of the triangle. We do this by
* computing the magnitude of the cross-product of the major
@@ -461,7 +461,7 @@
eBot_dt = vMid->texcoord[0][1] * wMid - vMin->texcoord[0][1] * wMin;
dtdx = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt);
dtdy = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx);
-
+
eMaj_du = vMax->texcoord[0][2] * wMax - vMin->texcoord[0][2] * wMin;
eBot_du = vMid->texcoord[0][2] * wMid - vMin->texcoord[0][2] * wMin;
dudx = oneOverArea * (eMaj_du * eBot.dy - eMaj.dy * eBot_du);
@@ -498,14 +498,14 @@
- vMin->texcoord[u][1] * wMin;
dtdx[u] = oneOverArea * (eMaj_dt * eBot.dy - eMaj.dy * eBot_dt);
dtdy[u] = oneOverArea * (eMaj.dx * eBot_dt - eMaj_dt * eBot.dx);
-
+
eMaj_du = vMax->texcoord[u][2] * wMax
- vMin->texcoord[u][2] * wMin;
eBot_du = vMid->texcoord[u][2] * wMid
- vMin->texcoord[u][2] * wMin;
dudx[u] = oneOverArea * (eMaj_du * eBot.dy - eMaj.dy * eBot_du);
dudy[u] = oneOverArea * (eMaj.dx * eBot_du - eMaj_du * eBot.dx);
-
+
eMaj_dv = vMax->texcoord[u][3] * wMax
- vMin->texcoord[u][3] * wMin;
eBot_dv = vMid->texcoord[u][3] * wMid
@@ -540,7 +540,7 @@
* inside the triangle.
*
* Next we creep down the major edge until we reach that y,
- * and compute the corresponding x coordinate on the edge.
+ * and compute the corresponding x coordinate on the edge.
* Then we find the half-integral x that lies on or just
* inside the edge. This is the first pixel that might lie in
* the interior of the triangle. (We won't know for sure
@@ -1004,8 +1004,8 @@
GLfloat rho2 = r1 + r2; /* was: rho2 = MAX2(r1,r2); */
lambda_nominator = rho2;
}
-
- /* set DEST to log_(base 2) of sqrt(rho) */
+
+ /* set DEST to log_(base 2) of sqrt(rho) */
/* 1.442695 = 1/log(2) */
#define COMPUTE_LAMBDA(DEST, X) \
DEST = log( lambda_nominator * (X)*(X) ) * 1.442695F * 0.5F
@@ -1013,7 +1013,7 @@
#ifdef INTERP_MULTILAMBDA
/*
- * Read the comment for INTERP_LAMBDA, but apply to each texture unit
+ * Read the comment for INTERP_LAMBDA, but apply to each texture unit
*/
{
GLuint unit;
@@ -1030,7 +1030,7 @@
}
}
}
- /* set DEST to log_(base 2) of sqrt(rho) */
+ /* set DEST to log_(base 2) of sqrt(rho) */
#define COMPUTE_MULTILAMBDA(DEST, X, unit) \
DEST = log( lambda_nominator[unit] * (X)*(X) ) * 1.442695F * 0.5F
#endif
@@ -1064,7 +1064,7 @@
fz += fdzOuter;
#endif
#ifdef INTERP_FOG
- ffog += fdfogOuter;
+ ffog += fdfogOuter;
#endif
#ifdef INTERP_RGB
fr += fdrOuter; fg += fdgOuter; fb += fdbOuter;
diff --git a/src/mesa/swrast/s_zoom.c b/src/mesa/swrast/s_zoom.c
index b2ecbf2d902..daace6920fd 100644
--- a/src/mesa/swrast/s_zoom.c
+++ b/src/mesa/swrast/s_zoom.c
@@ -1,21 +1,21 @@
-/* $Id: s_zoom.c,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_zoom.c,v 1.4 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -142,7 +142,7 @@ _mesa_write_zoomed_rgba_span( GLcontext *ctx,
/* write the span */
for (r=r0; r<r1; r++) {
- _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
+ _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
(fog ? zfog : 0),
zrgba, GL_BITMAP );
}
@@ -253,7 +253,7 @@ _mesa_write_zoomed_rgb_span( GLcontext *ctx,
/* write the span */
for (r=r0; r<r1; r++) {
- _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
+ _mesa_write_rgba_span( ctx, m, x+skipcol, r, zdepth,
(fog ? zfog : 0), zrgba, GL_BITMAP );
}
}
@@ -360,7 +360,7 @@ _mesa_write_zoomed_index_span( GLcontext *ctx,
/* write the span */
for (r=r0; r<r1; r++) {
- _mesa_write_index_span( ctx, m, x+skipcol, r, zdepth,
+ _mesa_write_index_span( ctx, m, x+skipcol, r, zdepth,
(fog ? zfog : 0), zindexes, GL_BITMAP );
}
}
diff --git a/src/mesa/swrast/s_zoom.h b/src/mesa/swrast/s_zoom.h
index 4724edeb0ce..170133c3dff 100644
--- a/src/mesa/swrast/s_zoom.h
+++ b/src/mesa/swrast/s_zoom.h
@@ -1,10 +1,10 @@
-/* $Id: s_zoom.h,v 1.3 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_zoom.h,v 1.4 2001/03/12 00:48:42 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast/swrast.h b/src/mesa/swrast/swrast.h
index 94b564d78e8..eaea8cd7e81 100644
--- a/src/mesa/swrast/swrast.h
+++ b/src/mesa/swrast/swrast.h
@@ -1,8 +1,10 @@
+/* $Id: swrast.h,v 1.11 2001/03/12 00:48:42 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 6eaeb9c5273..def9e4f43c8 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -1,21 +1,21 @@
-/* $Id: ss_context.c,v 1.12 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: ss_context.c,v 1.13 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -36,7 +36,7 @@
#include "swrast_setup.h"
#include "tnl/t_context.h"
-
+
#define _SWSETUP_NEW_VERTS (_NEW_RENDERMODE| \
_NEW_LIGHT| \
_NEW_TEXTURE| \
@@ -48,40 +48,40 @@
/* Dispatch from these fixed entrypoints to the state-dependent
- * functions.
+ * functions.
*
* The design of swsetup suggests that we could really program
* ctx->Driver.TriangleFunc directly from _swsetup_RenderStart, and
* avoid this second level of indirection. However, this is more
- * convient for fallback cases in hardware rasterization drivers.
+ * convient for fallback cases in hardware rasterization drivers.
*/
-void
-_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1,
+void
+_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1,
GLuint v2, GLuint v3 )
{
SWSETUP_CONTEXT(ctx)->Quad( ctx, v0, v1, v2, v3 );
}
-void
-_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1,
+void
+_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1,
GLuint v2 )
{
SWSETUP_CONTEXT(ctx)->Triangle( ctx, v0, v1, v2 );
}
-void
+void
_swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1 )
{
SWSETUP_CONTEXT(ctx)->Line( ctx, v0, v1 );
}
-void
+void
_swsetup_Points( GLcontext *ctx, GLuint first, GLuint last )
{
SWSETUP_CONTEXT(ctx)->Points( ctx, first, last );
}
-void
+void
_swsetup_BuildProjectedVertices( GLcontext *ctx, GLuint start, GLuint end,
GLuint new_inputs )
{
@@ -94,8 +94,8 @@ _swsetup_CreateContext( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
SScontext *swsetup = (SScontext *)CALLOC(sizeof(SScontext));
-
- if (!swsetup)
+
+ if (!swsetup)
return GL_FALSE;
swsetup->verts = (SWvertex *) ALIGN_MALLOC( sizeof(SWvertex) * tnl->vb.Size, 32);
@@ -118,7 +118,7 @@ void
_swsetup_DestroyContext( GLcontext *ctx )
{
if (SWSETUP_CONTEXT(ctx)) {
- if (SWSETUP_CONTEXT(ctx)->verts)
+ if (SWSETUP_CONTEXT(ctx)->verts)
ALIGN_FREE(SWSETUP_CONTEXT(ctx)->verts);
FREE(SWSETUP_CONTEXT(ctx));
@@ -134,8 +134,8 @@ _swsetup_RenderPrimitive( GLcontext *ctx, GLenum mode )
void
_swsetup_RenderStart( GLcontext *ctx )
-{
- SScontext *swsetup = SWSETUP_CONTEXT(ctx);
+{
+ SScontext *swsetup = SWSETUP_CONTEXT(ctx);
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLuint new_state = swsetup->NewState;
@@ -149,10 +149,10 @@ _swsetup_RenderStart( GLcontext *ctx )
swsetup->NewState = 0;
- if (VB->ClipMask && VB->importable_data)
+ if (VB->ClipMask && VB->importable_data)
VB->import_data( ctx,
VB->importable_data,
- VEC_NOT_WRITEABLE|VEC_BAD_STRIDE);
+ VEC_NOT_WRITEABLE|VEC_BAD_STRIDE);
}
void
@@ -164,7 +164,7 @@ _swsetup_RenderFinish( GLcontext *ctx )
void
_swsetup_InvalidateState( GLcontext *ctx, GLuint new_state )
{
- SScontext *swsetup = SWSETUP_CONTEXT(ctx);
+ SScontext *swsetup = SWSETUP_CONTEXT(ctx);
swsetup->NewState |= new_state;
if (new_state & _SWSETUP_NEW_INTERP) {
@@ -173,17 +173,16 @@ _swsetup_InvalidateState( GLcontext *ctx, GLuint new_state )
}
}
-void
-_swsetup_RenderInterp( GLcontext *ctx, GLfloat t,
+void
+_swsetup_RenderInterp( GLcontext *ctx, GLfloat t,
GLuint dst, GLuint out, GLuint in,
- GLboolean force_boundary )
+ GLboolean force_boundary )
{
SWSETUP_CONTEXT(ctx)->RenderInterp( ctx, t, dst, out, in, force_boundary );
}
-void
-_swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src )
+void
+_swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src )
{
SWSETUP_CONTEXT(ctx)->RenderCopyPV( ctx, dst, src );
}
-
diff --git a/src/mesa/swrast_setup/ss_context.h b/src/mesa/swrast_setup/ss_context.h
index d19b1c62e01..895fb1b03ed 100644
--- a/src/mesa/swrast_setup/ss_context.h
+++ b/src/mesa/swrast_setup/ss_context.h
@@ -1,8 +1,10 @@
+/* $Id: ss_context.h,v 1.7 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -40,7 +42,7 @@ typedef struct {
*/
void (*InvalidateState)( GLcontext *ctx, GLuint new_state );
- void (*BuildProjVerts)( GLcontext *ctx,
+ void (*BuildProjVerts)( GLcontext *ctx,
GLuint start, GLuint end, GLuint new_inputs );
void (*Quad)( GLcontext *ctx, GLuint v0, GLuint v1,
@@ -55,7 +57,7 @@ typedef struct {
void (*RenderCopyPV)( GLcontext *ctx, GLuint dst, GLuint src );
- void (*RenderInterp)( GLcontext *ctx, GLfloat t,
+ void (*RenderInterp)( GLcontext *ctx, GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary );
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index ad44b1453fd..958eae3a29a 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -1,8 +1,10 @@
+/* $Id: ss_triangle.c,v 1.12 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -35,20 +37,20 @@
#include "ss_triangle.h"
#include "ss_context.h"
-#define SS_RGBA_BIT 0x1
-#define SS_OFFSET_BIT 0x2
-#define SS_TWOSIDE_BIT 0x4
-#define SS_UNFILLED_BIT 0x8
+#define SS_RGBA_BIT 0x1
+#define SS_OFFSET_BIT 0x2
+#define SS_TWOSIDE_BIT 0x4
+#define SS_UNFILLED_BIT 0x8
#define SS_MAX_TRIFUNC 0x10
static triangle_func tri_tab[SS_MAX_TRIFUNC];
static quad_func quad_tab[SS_MAX_TRIFUNC];
-static void _swsetup_render_line_tri( GLcontext *ctx,
+static void _swsetup_render_line_tri( GLcontext *ctx,
GLuint e0, GLuint e1, GLuint e2 )
{
- SScontext *swsetup = SWSETUP_CONTEXT(ctx);
+ SScontext *swsetup = SWSETUP_CONTEXT(ctx);
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLubyte *ef = VB->EdgeFlag;
SWvertex *verts = swsetup->verts;
@@ -76,13 +78,13 @@ static void _swsetup_render_line_tri( GLcontext *ctx,
}
if (swsetup->render_prim == GL_POLYGON) {
- if (ef[e2]) _swrast_Line( ctx, v2, v0 );
- if (ef[e0]) _swrast_Line( ctx, v0, v1 );
- if (ef[e1]) _swrast_Line( ctx, v1, v2 );
+ if (ef[e2]) _swrast_Line( ctx, v2, v0 );
+ if (ef[e0]) _swrast_Line( ctx, v0, v1 );
+ if (ef[e1]) _swrast_Line( ctx, v1, v2 );
} else {
- if (ef[e0]) _swrast_Line( ctx, v0, v1 );
- if (ef[e1]) _swrast_Line( ctx, v1, v2 );
- if (ef[e2]) _swrast_Line( ctx, v2, v0 );
+ if (ef[e0]) _swrast_Line( ctx, v0, v1 );
+ if (ef[e1]) _swrast_Line( ctx, v1, v2 );
+ if (ef[e2]) _swrast_Line( ctx, v2, v0 );
}
if (ctx->_TriangleCaps & DD_FLATSHADE) {
@@ -95,10 +97,10 @@ static void _swsetup_render_line_tri( GLcontext *ctx,
}
}
-static void _swsetup_render_point_tri( GLcontext *ctx,
+static void _swsetup_render_point_tri( GLcontext *ctx,
GLuint e0, GLuint e1, GLuint e2 )
{
- SScontext *swsetup = SWSETUP_CONTEXT(ctx);
+ SScontext *swsetup = SWSETUP_CONTEXT(ctx);
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLubyte *ef = VB->EdgeFlag;
SWvertex *verts = swsetup->verts;
@@ -125,9 +127,9 @@ static void _swsetup_render_point_tri( GLcontext *ctx,
v1->index = v2->index;
}
- if (ef[e0]) _swrast_Point( ctx, v0 );
- if (ef[e1]) _swrast_Point( ctx, v1 );
- if (ef[e2]) _swrast_Point( ctx, v2 );
+ if (ef[e0]) _swrast_Point( ctx, v0 );
+ if (ef[e1]) _swrast_Point( ctx, v1 );
+ if (ef[e2]) _swrast_Point( ctx, v2 );
if (ctx->_TriangleCaps & DD_FLATSHADE) {
COPY_CHAN4(v0->color, c[0]);
@@ -237,14 +239,14 @@ static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last )
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
GLuint i;
-
+
if (VB->Elts) {
- for (i = first; i < last; i++)
+ for (i = first; i < last; i++)
if (VB->ClipMask[VB->Elts[i]] == 0)
_swrast_Point( ctx, &verts[VB->Elts[i]] );
}
else {
- for (i = first; i < last; i++)
+ for (i = first; i < last; i++)
if (VB->ClipMask[i] == 0)
_swrast_Point( ctx, &verts[i] );
}
@@ -280,4 +282,3 @@ void _swsetup_choose_trifuncs( GLcontext *ctx )
swsetup->Line = swsetup_line;
swsetup->Points = swsetup_points;
}
-
diff --git a/src/mesa/swrast_setup/ss_triangle.h b/src/mesa/swrast_setup/ss_triangle.h
index 5b21a65ed08..a486826d4ed 100644
--- a/src/mesa/swrast_setup/ss_triangle.h
+++ b/src/mesa/swrast_setup/ss_triangle.h
@@ -1,8 +1,10 @@
+/* $Id: ss_triangle.h,v 1.3 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index 92f85dab915..31ad68d1bf3 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -1,19 +1,21 @@
+/* $Id: ss_tritmp.h,v 1.9 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -52,10 +54,10 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
if (IND & (SS_TWOSIDE_BIT | SS_UNFILLED_BIT))
{
facing = (cc < 0.0) ^ ctx->Polygon._FrontBit;
-
+
if (IND & SS_UNFILLED_BIT)
mode = facing ? ctx->Polygon.BackMode : ctx->Polygon.FrontMode;
-
+
if (facing == 1) {
if (IND & SS_TWOSIDE_BIT) {
if (IND & SS_RGBA_BIT) {
@@ -74,7 +76,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
SS_IND(v[2]->index, vbindex[e2]);
}
}
- }
+ }
}
if (IND & SS_OFFSET_BIT)
@@ -120,7 +122,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
v[1]->win[2] += offset;
v[2]->win[2] += offset;
}
- _swrast_Triangle( ctx, v[0], v[1], v[2] );
+ _swrast_Triangle( ctx, v[0], v[1], v[2] );
}
if (IND & SS_OFFSET_BIT) {
@@ -129,7 +131,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
v[2]->win[2] = z[2];
}
- if (IND & SS_TWOSIDE_BIT) {
+ if (IND & SS_TWOSIDE_BIT) {
if (facing == 1) {
if (IND & SS_RGBA_BIT) {
GLchan (*vbcolor)[4] = VB->ColorPtr[0]->data;
@@ -147,7 +149,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 )
SS_IND(v[2]->index, vbindex[e2]);
}
}
- }
+ }
}
@@ -161,12 +163,12 @@ static void TAG(quad)( GLcontext *ctx, GLuint v0,
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLubyte ef1 = VB->EdgeFlag[v1];
GLubyte ef3 = VB->EdgeFlag[v3];
- VB->EdgeFlag[v1] = 0;
+ VB->EdgeFlag[v1] = 0;
TAG(triangle)( ctx, v0, v1, v3 );
VB->EdgeFlag[v1] = ef1;
- VB->EdgeFlag[v3] = 0;
- TAG(triangle)( ctx, v1, v2, v3 );
- VB->EdgeFlag[v3] = ef3;
+ VB->EdgeFlag[v3] = 0;
+ TAG(triangle)( ctx, v1, v2, v3 );
+ VB->EdgeFlag[v3] = ef3;
} else {
TAG(triangle)( ctx, v0, v1, v3 );
TAG(triangle)( ctx, v1, v2, v3 );
@@ -185,6 +187,3 @@ static void TAG(init)( void )
#undef IND
#undef TAG
-
-
-
diff --git a/src/mesa/swrast_setup/ss_vb.c b/src/mesa/swrast_setup/ss_vb.c
index d69f0ed8fcd..eb3e0ec3fc6 100644
--- a/src/mesa/swrast_setup/ss_vb.c
+++ b/src/mesa/swrast_setup/ss_vb.c
@@ -1,19 +1,21 @@
+/* $Id: ss_vb.c,v 1.11 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -199,7 +201,7 @@ rs_invalid( GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
(void) (ctx && start && end && newinputs);
}
-void
+void
_swsetup_vb_init( GLcontext *ctx )
{
GLuint i;
@@ -258,7 +260,7 @@ static void printSetupFlags(char *msg, GLuint flags )
}
-void
+void
_swsetup_choose_rastersetup_func(GLcontext *ctx)
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
@@ -268,9 +270,9 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx)
if (ctx->Visual.rgbMode) {
funcindex = COLOR;
- if (ctx->Texture._ReallyEnabled & ~0xf)
+ if (ctx->Texture._ReallyEnabled & ~0xf)
funcindex |= MULTITEX;
- else if (ctx->Texture._ReallyEnabled & 0xf)
+ else if (ctx->Texture._ReallyEnabled & 0xf)
funcindex |= TEX0;
if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR ||
@@ -288,11 +290,11 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx)
funcindex |= FOG;
}
else if (ctx->RenderMode == GL_FEEDBACK) {
- if (ctx->Visual.rgbMode)
+ if (ctx->Visual.rgbMode)
funcindex = (COLOR | TEX0); /* is feedback color subject to fogging? */
else
funcindex = (INDEX | TEX0);
- }
+ }
else
funcindex = 0;
@@ -300,4 +302,3 @@ _swsetup_choose_rastersetup_func(GLcontext *ctx)
swsetup->BuildProjVerts = setup_func[funcindex];
ASSERT(setup_func[funcindex] != rs_invalid);
}
-
diff --git a/src/mesa/swrast_setup/ss_vb.h b/src/mesa/swrast_setup/ss_vb.h
index 6e8685a0b22..a7d05bf71a2 100644
--- a/src/mesa/swrast_setup/ss_vb.h
+++ b/src/mesa/swrast_setup/ss_vb.h
@@ -1,8 +1,10 @@
+/* $Id: ss_vb.h,v 1.3 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/swrast_setup/ss_vbtmp.h b/src/mesa/swrast_setup/ss_vbtmp.h
index 8b6aaaecded..fcfc1c93d70 100644
--- a/src/mesa/swrast_setup/ss_vbtmp.h
+++ b/src/mesa/swrast_setup/ss_vbtmp.h
@@ -1,19 +1,21 @@
+/* $Id: ss_vbtmp.h,v 1.12 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -61,12 +63,12 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
(VB->ClipOrMask
? VEC_NOT_WRITEABLE|VEC_BAD_STRIDE
: VEC_BAD_STRIDE));
-
+
if (IND & TEX0) {
tc[0] = VB->TexCoordPtr[0]->data;
tsz[0] = VB->TexCoordPtr[0]->size;
}
-
+
if (IND & MULTITEX) {
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
if (VB->TexCoordPtr[i]) {
@@ -84,12 +86,12 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
VB->SecondaryColorPtr[0] = VB->ColorPtr[0];
VB->SecondaryColorPtr[1] = VB->ColorPtr[1];
}
-
+
proj = VB->ProjectedClipPtr->data;
if (IND & FOG)
- fog = VB->FogCoordPtr->data;
- if (IND & COLOR)
+ fog = VB->FogCoordPtr->data;
+ if (IND & COLOR)
color = VB->ColorPtr[0]->data;
if (IND & SPEC)
spec = VB->SecondaryColorPtr[0]->data;
@@ -106,28 +108,28 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
v->win[1] = sy * proj[i][1] + ty;
v->win[2] = sz * proj[i][2] + tz;
v->win[3] = proj[i][3];
-
- if (IND & TEX0)
+
+ if (IND & TEX0)
COPY_CLEAN_4V( v->texcoord[0], tsz[0], tc[0][i] );
if (IND & MULTITEX) {
GLuint u;
for (u = 0 ; u < maxtex ; u++)
- if (tc[u])
+ if (tc[u])
COPY_CLEAN_4V( v->texcoord[u], tsz[u], tc[u][i] );
}
if (IND & COLOR)
COPY_CHAN4(v->color, color[i]);
-
- if (IND & SPEC)
+
+ if (IND & SPEC)
COPY_CHAN4(v->specular, spec[i]);
if (IND & FOG)
- v->fog = fog[i];
+ v->fog = fog[i];
if (IND & INDEX)
- v->index = index[i];
+ v->index = index[i];
if (IND & POINT)
v->pointSize = pointSize[i];
diff --git a/src/mesa/swrast_setup/swrast_setup.h b/src/mesa/swrast_setup/swrast_setup.h
index f3f8941a40f..bec8d90c1f3 100644
--- a/src/mesa/swrast_setup/swrast_setup.h
+++ b/src/mesa/swrast_setup/swrast_setup.h
@@ -1,19 +1,21 @@
+/* $Id: swrast_setup.h,v 1.8 2001/03/12 00:48:43 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -33,31 +35,31 @@
#ifndef SWRAST_SETUP_H
#define SWRAST_SETUP_H
-extern GLboolean
+extern GLboolean
_swsetup_CreateContext( GLcontext *ctx );
-extern void
+extern void
_swsetup_DestroyContext( GLcontext *ctx );
-extern void
+extern void
_swsetup_InvalidateState( GLcontext *ctx, GLuint new_state );
-extern void
-_swsetup_BuildProjectedVertices( GLcontext *ctx,
- GLuint start,
+extern void
+_swsetup_BuildProjectedVertices( GLcontext *ctx,
+ GLuint start,
GLuint end,
GLuint new_inputs );
-extern void
+extern void
_swsetup_Quad( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2, GLuint v3 );
-extern void
+extern void
_swsetup_Triangle( GLcontext *ctx, GLuint v0, GLuint v1, GLuint v2 );
-extern void
+extern void
_swsetup_Line( GLcontext *ctx, GLuint v0, GLuint v1 );
-extern void
+extern void
_swsetup_Points( GLcontext *ctx, GLuint first, GLuint last );
extern void
@@ -69,20 +71,20 @@ _swsetup_RenderStart( GLcontext *ctx );
extern void
_swsetup_RenderFinish( GLcontext *ctx );
-extern void
+extern void
_swsetup_RenderProjectInterpVerts( GLcontext *ctx );
-extern void
-_swsetup_RenderInterp( GLcontext *ctx, GLfloat t,
+extern void
+_swsetup_RenderInterp( GLcontext *ctx, GLfloat t,
GLuint dst, GLuint out, GLuint in,
GLboolean force_boundary );
-extern void
+extern void
_swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src );
-extern void
+extern void
_swsetup_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n );
-extern void
+extern void
_swsetup_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj );
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c
index cfc5e5debe9..f77fac1b2f6 100644
--- a/src/mesa/tnl/t_array_api.c
+++ b/src/mesa/tnl/t_array_api.c
@@ -1,4 +1,4 @@
-/* $Id: t_array_api.c,v 1.9 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_array_api.c,v 1.10 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -78,7 +78,7 @@ static void fallback_drawarrays( GLcontext *ctx, GLenum mode, GLint start,
#else
/* Simple alternative to above code.
*/
- if (_tnl_hard_begin( ctx, mode ))
+ if (_tnl_hard_begin( ctx, mode ))
{
GLuint i;
for (i=start;i<count;i++) {
@@ -90,7 +90,7 @@ static void fallback_drawarrays( GLcontext *ctx, GLenum mode, GLint start,
}
-static void _tnl_draw_elements( GLcontext *ctx, GLenum mode, GLsizei count,
+static void _tnl_draw_elements( GLcontext *ctx, GLenum mode, GLsizei count,
const GLuint *indices)
{
#if 1
@@ -135,10 +135,10 @@ static void _tnl_draw_elements( GLcontext *ctx, GLenum mode, GLsizei count,
}
-static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode,
- GLuint start, GLuint end,
+static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode,
+ GLuint start, GLuint end,
GLsizei count, const GLuint *indices )
-
+
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
FLUSH_CURRENT( ctx, 0 );
@@ -150,7 +150,7 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode,
tnl->vb.PrimitiveLength[0] = count;
tnl->vb.Elts = (GLuint *)indices;
- if (ctx->Array.LockCount)
+ if (ctx->Array.LockCount)
_tnl_run_pipeline( ctx );
else {
/* Note that arrays may have changed before/after execution.
@@ -202,18 +202,18 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
/* The arrays are small enough to fit in a single VB; just bind
* them and go. Any untransformed data will be copied on
* clipping.
- *
+ *
* Invalidate any locked data dependent on these arrays.
*/
_tnl_vb_bind_arrays( ctx, start, count );
VB->FirstPrimitive = 0;
VB->Primitive[0] = mode | PRIM_BEGIN | PRIM_END | PRIM_LAST;
- VB->PrimitiveLength[0] = count - start;
+ VB->PrimitiveLength[0] = count - start;
tnl->pipeline.run_input_changes |= ctx->Array._Enabled;
_tnl_run_pipeline( ctx );
tnl->pipeline.run_input_changes |= ctx->Array._Enabled;
}
- }
+ }
else if (!ctx->CompileFlag && mode == GL_TRIANGLE_STRIP) {
int bufsz = (ctx->Const.MaxArrayLockSize - 2) & ~1;
int j, nr;
@@ -226,8 +226,8 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
nr = MIN2( bufsz, count - j );
_tnl_vb_bind_arrays( ctx, j, j + nr );
VB->FirstPrimitive = 0;
- VB->Primitive[0] = mode | PRIM_BEGIN | PRIM_END | PRIM_LAST;
- VB->PrimitiveLength[0] = nr;
+ VB->Primitive[0] = mode | PRIM_BEGIN | PRIM_END | PRIM_LAST;
+ VB->PrimitiveLength[0] = nr;
tnl->pipeline.run_input_changes |= ctx->Array._Enabled;
_tnl_run_pipeline( ctx );
tnl->pipeline.run_input_changes |= ctx->Array._Enabled;
@@ -249,30 +249,30 @@ _tnl_DrawRangeElements(GLenum mode,
/* Check arguments, etc.
*/
- if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
+ if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
type, indices ))
return;
if (tnl->pipeline.build_state_changes)
_tnl_validate_pipeline( ctx );
- ui_indices = (GLuint *)_ac_import_elements( ctx, GL_UNSIGNED_INT,
+ ui_indices = (GLuint *)_ac_import_elements( ctx, GL_UNSIGNED_INT,
count, type, indices );
-
+
if (ctx->Array.LockCount) {
/* Are the arrays already locked? If so we currently have to look
* at the whole locked range.
*/
if (start >= ctx->Array.LockFirst && end <= ctx->Array.LockCount)
- _tnl_draw_range_elements( ctx, mode,
- ctx->Array.LockFirst,
+ _tnl_draw_range_elements( ctx, mode,
+ ctx->Array.LockFirst,
ctx->Array.LockCount,
count, ui_indices );
else {
/* The spec says referencing elements outside the locked
* range is undefined. I'm going to make it a noop this time
- * round, maybe come up with something beter before 3.6.
+ * round, maybe come up with something beter before 3.6.
*
* May be able to get away with just setting LockCount==0,
* though this raises the problems of dependent state. May
@@ -280,7 +280,7 @@ _tnl_DrawRangeElements(GLenum mode,
*
* Or scan the list and replace bad indices?
*/
- _mesa_problem( ctx,
+ _mesa_problem( ctx,
"DrawRangeElements references "
"elements outside locked range.");
}
@@ -300,7 +300,7 @@ _tnl_DrawRangeElements(GLenum mode,
void
-_tnl_DrawElements(GLenum mode, GLsizei count, GLenum type,
+_tnl_DrawElements(GLenum mode, GLsizei count, GLenum type,
const GLvoid *indices)
{
GET_CURRENT_CONTEXT(ctx);
@@ -315,22 +315,22 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type,
if (tnl->pipeline.build_state_changes)
_tnl_validate_pipeline( ctx );
- ui_indices = (GLuint *)_ac_import_elements( ctx, GL_UNSIGNED_INT,
+ ui_indices = (GLuint *)_ac_import_elements( ctx, GL_UNSIGNED_INT,
count, type, indices );
if (ctx->Array.LockCount) {
- _tnl_draw_range_elements( ctx, mode,
+ _tnl_draw_range_elements( ctx, mode,
ctx->Array.LockFirst,
ctx->Array.LockCount,
count, ui_indices );
- }
+ }
else {
/* Scan the index list and see if we can use the locked path anyway.
*/
GLuint max_elt = 0;
GLint i;
- for (i = 0 ; i < count ; i++)
+ for (i = 0 ; i < count ; i++)
if (ui_indices[i] > max_elt)
max_elt = ui_indices[i];
@@ -364,7 +364,7 @@ void _tnl_array_init( GLcontext *ctx )
_mesa_vector1ui_init( &tmp->Index, 0, 0 );
_mesa_vector1ub_init( &tmp->EdgeFlag, 0, 0 );
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
_mesa_vector4f_init( &tmp->TexCoord[i], 0, 0);
tnl->tmp_primitive = (GLuint *)MALLOC(sizeof(GLuint)*tnl->vb.Size);
diff --git a/src/mesa/tnl/t_array_api.h b/src/mesa/tnl/t_array_api.h
index ebb99e78d6b..32a70443f56 100644
--- a/src/mesa/tnl/t_array_api.h
+++ b/src/mesa/tnl/t_array_api.h
@@ -1,10 +1,10 @@
-/* $Id: t_array_api.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_array_api.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c
index 90cc0e53840..ecde7b29439 100644
--- a/src/mesa/tnl/t_array_import.c
+++ b/src/mesa/tnl/t_array_import.c
@@ -1,10 +1,10 @@
-/* $Id: t_array_import.c,v 1.10 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_array_import.c,v 1.11 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -50,13 +50,13 @@ static void _tnl_import_vertex( GLcontext *ctx,
GLboolean is_writeable = 0;
struct vertex_arrays *inputs = &TNL_CONTEXT(ctx)->array_inputs;
- tmp = _ac_import_vertex(ctx,
+ tmp = _ac_import_vertex(ctx,
GL_FLOAT,
stride ? 4*sizeof(GLfloat) : 0,
0,
- writeable,
+ writeable,
&is_writeable);
-
+
inputs->Obj.data = (GLfloat (*)[4]) tmp->Ptr;
inputs->Obj.start = (GLfloat *) tmp->Ptr;
inputs->Obj.stride = tmp->StrideB;
@@ -76,10 +76,10 @@ static void _tnl_import_normal( GLcontext *ctx,
GLboolean is_writeable = 0;
struct vertex_arrays *inputs = &TNL_CONTEXT(ctx)->array_inputs;
- tmp = _ac_import_normal(ctx, GL_FLOAT,
- stride ? 3*sizeof(GLfloat) : 0, writeable,
+ tmp = _ac_import_normal(ctx, GL_FLOAT,
+ stride ? 3*sizeof(GLfloat) : 0, writeable,
&is_writeable);
-
+
inputs->Normal.data = (GLfloat (*)[3]) tmp->Ptr;
inputs->Normal.start = (GLfloat *) tmp->Ptr;
inputs->Normal.stride = tmp->StrideB;
@@ -99,13 +99,13 @@ static void _tnl_import_color( GLcontext *ctx,
GLboolean is_writeable = 0;
struct vertex_arrays *inputs = &TNL_CONTEXT(ctx)->array_inputs;
- tmp = _ac_import_color(ctx,
- GL_UNSIGNED_BYTE,
- stride ? 4*sizeof(GLubyte) : 0,
+ tmp = _ac_import_color(ctx,
+ GL_UNSIGNED_BYTE,
+ stride ? 4*sizeof(GLubyte) : 0,
4,
- writeable,
+ writeable,
&is_writeable);
-
+
inputs->Color.data = (GLchan (*)[4]) tmp->Ptr;
inputs->Color.start = (GLchan *) tmp->Ptr;
inputs->Color.stride = tmp->StrideB;
@@ -125,12 +125,12 @@ static void _tnl_import_secondarycolor( GLcontext *ctx,
GLboolean is_writeable = 0;
struct vertex_arrays *inputs = &TNL_CONTEXT(ctx)->array_inputs;
- tmp = _ac_import_secondarycolor(ctx, GL_UNSIGNED_BYTE,
- stride ? 4*sizeof(GLubyte) : 0,
+ tmp = _ac_import_secondarycolor(ctx, GL_UNSIGNED_BYTE,
+ stride ? 4*sizeof(GLubyte) : 0,
4,
- writeable,
+ writeable,
&is_writeable);
-
+
inputs->SecondaryColor.data = (GLchan (*)[4]) tmp->Ptr;
inputs->SecondaryColor.start = (GLchan *) tmp->Ptr;
inputs->SecondaryColor.stride = tmp->StrideB;
@@ -149,10 +149,10 @@ static void _tnl_import_fogcoord( GLcontext *ctx,
struct gl_client_array *tmp;
GLboolean is_writeable = 0;
- tmp = _ac_import_fogcoord(ctx, GL_FLOAT,
- stride ? sizeof(GLfloat) : 0, writeable,
+ tmp = _ac_import_fogcoord(ctx, GL_FLOAT,
+ stride ? sizeof(GLfloat) : 0, writeable,
&is_writeable);
-
+
inputs->FogCoord.data = (GLfloat *) tmp->Ptr;
inputs->FogCoord.start = (GLfloat *) tmp->Ptr;
inputs->FogCoord.stride = tmp->StrideB;
@@ -171,10 +171,10 @@ static void _tnl_import_index( GLcontext *ctx,
struct gl_client_array *tmp;
GLboolean is_writeable = 0;
- tmp = _ac_import_index(ctx, GL_UNSIGNED_INT,
- stride ? sizeof(GLuint) : 0, writeable,
+ tmp = _ac_import_index(ctx, GL_UNSIGNED_INT,
+ stride ? sizeof(GLuint) : 0, writeable,
&is_writeable);
-
+
inputs->Index.data = (GLuint *) tmp->Ptr;
inputs->Index.start = (GLuint *) tmp->Ptr;
inputs->Index.stride = tmp->StrideB;
@@ -185,7 +185,7 @@ static void _tnl_import_index( GLcontext *ctx,
inputs->Index.flags |= VEC_NOT_WRITEABLE;
}
-
+
static void _tnl_import_texcoord( GLcontext *ctx,
GLuint i,
GLboolean writeable,
@@ -195,12 +195,12 @@ static void _tnl_import_texcoord( GLcontext *ctx,
struct gl_client_array *tmp;
GLboolean is_writeable = 0;
- tmp = _ac_import_texcoord(ctx, i, GL_FLOAT,
- stride ? 4*sizeof(GLfloat) : 0,
+ tmp = _ac_import_texcoord(ctx, i, GL_FLOAT,
+ stride ? 4*sizeof(GLfloat) : 0,
0,
- writeable,
+ writeable,
&is_writeable);
-
+
inputs->TexCoord[i].data = (GLfloat (*)[4]) tmp->Ptr;
inputs->TexCoord[i].start = (GLfloat *) tmp->Ptr;
inputs->TexCoord[i].stride = tmp->StrideB;
@@ -211,8 +211,8 @@ static void _tnl_import_texcoord( GLcontext *ctx,
if (!is_writeable)
inputs->TexCoord[i].flags |= VEC_NOT_WRITEABLE;
}
-
-
+
+
static void _tnl_import_edgeflag( GLcontext *ctx,
GLboolean writeable,
GLboolean stride )
@@ -221,11 +221,11 @@ static void _tnl_import_edgeflag( GLcontext *ctx,
struct gl_client_array *tmp;
GLboolean is_writeable = 0;
- tmp = _ac_import_edgeflag(ctx, GL_UNSIGNED_BYTE,
- stride ? sizeof(GLubyte) : 0,
- 0,
+ tmp = _ac_import_edgeflag(ctx, GL_UNSIGNED_BYTE,
+ stride ? sizeof(GLubyte) : 0,
+ 0,
&is_writeable);
-
+
inputs->EdgeFlag.data = (GLubyte *) tmp->Ptr;
inputs->EdgeFlag.start = (GLubyte *) tmp->Ptr;
inputs->EdgeFlag.stride = tmp->StrideB;
@@ -253,7 +253,7 @@ static void _tnl_upgrade_client_data( GLcontext *ctx,
struct vertex_arrays *inputs = &TNL_CONTEXT(ctx)->array_inputs;
(void) inputs;
- if ((required & VERT_CLIP) && VB->ClipPtr == VB->ObjPtr)
+ if ((required & VERT_CLIP) && VB->ClipPtr == VB->ObjPtr)
required |= VERT_OBJ;
/* _tnl_print_vert_flags("_tnl_upgrade_client_data", required); */
@@ -295,13 +295,13 @@ static void _tnl_upgrade_client_data( GLcontext *ctx,
}
if (required & VERT_TEX_ANY)
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
if ((required & VERT_TEX(i)) && (VB->TexCoordPtr[i]->flags & flags)) {
ASSERT(VB->TexCoordPtr[i] == &inputs->TexCoord[i]);
_tnl_import_texcoord( ctx, i, writeable, stride );
VB->importable_data &= ~VERT_TEX(i);
}
-
+
}
@@ -323,11 +323,11 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
ASSERT(start == (GLint) ctx->Array.LockFirst);
ASSERT(count == (GLint) ctx->Array.LockCount);
}
-
+
imports = tnl->pipeline.inputs;
_ac_import_range( ctx, start, count );
-
+
VB->Count = count - start;
VB->FirstClipped = VB->Count;
@@ -335,14 +335,14 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
VB->MaterialMask = 0;
VB->Material = 0;
VB->Flag = 0;
-
+
/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: inputs", inputs); */
/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: imports", imports); */
/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: _Enabled", ctx->Array._Enabled); */
if (inputs & VERT_OBJ) {
if (imports & VERT_OBJ) {
- _tnl_import_vertex( ctx, 0, 0 );
+ _tnl_import_vertex( ctx, 0, 0 );
tmp->Obj.count = VB->Count;
}
VB->ObjPtr = &tmp->Obj;
@@ -350,7 +350,7 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
if (inputs & VERT_NORM) {
if (imports & VERT_NORM) {
- _tnl_import_normal( ctx, 0, 0 );
+ _tnl_import_normal( ctx, 0, 0 );
tmp->Normal.count = VB->Count;
}
VB->NormalPtr = &tmp->Normal;
@@ -358,7 +358,7 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
if (inputs & VERT_RGBA) {
if (imports & VERT_RGBA) {
- _tnl_import_color( ctx, 0, 0 );
+ _tnl_import_color( ctx, 0, 0 );
tmp->Color.count = VB->Count;
}
VB->ColorPtr[0] = &tmp->Color;
@@ -367,42 +367,42 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
if (inputs & VERT_INDEX) {
if (imports & VERT_INDEX) {
- _tnl_import_index( ctx, 0, 0 );
+ _tnl_import_index( ctx, 0, 0 );
tmp->Index.count = VB->Count;
}
VB->IndexPtr[0] = &tmp->Index;
VB->IndexPtr[1] = 0;
- }
+ }
if (inputs & VERT_FOG_COORD) {
if (imports & VERT_FOG_COORD) {
- _tnl_import_fogcoord( ctx, 0, 0 );
+ _tnl_import_fogcoord( ctx, 0, 0 );
tmp->FogCoord.count = VB->Count;
}
VB->FogCoordPtr = &tmp->FogCoord;
}
-
+
if (inputs & VERT_EDGE) {
- _tnl_import_edgeflag( ctx, GL_TRUE, sizeof(GLboolean) );
+ _tnl_import_edgeflag( ctx, GL_TRUE, sizeof(GLboolean) );
VB->EdgeFlag = (GLboolean *) tmp->EdgeFlag.data;
}
-
+
if (inputs & VERT_SPEC_RGB) {
if (imports & VERT_SPEC_RGB) {
- _tnl_import_secondarycolor( ctx, 0, 0 );
+ _tnl_import_secondarycolor( ctx, 0, 0 );
tmp->SecondaryColor.count = VB->Count;
}
VB->SecondaryColorPtr[0] = &tmp->SecondaryColor;
VB->SecondaryColorPtr[1] = 0;
}
-
+
if (inputs & VERT_TEX_ANY) {
GLuint i;
for (i = 0; i < ctx->Const.MaxTextureUnits ; i++)
if (inputs & VERT_TEX(i)) {
if (imports & VERT_TEX(i)) {
- _tnl_import_texcoord( ctx, i, 0, 0 );
+ _tnl_import_texcoord( ctx, i, 0, 0 );
tmp->TexCoord[i].count = VB->Count;
}
VB->TexCoordPtr[i] = &tmp->TexCoord[i];
@@ -414,7 +414,7 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
VB->import_data = _tnl_upgrade_client_data;
VB->importable_data = imports & VERT_FIXUP;
/* _tnl_print_vert_flags("_tnl_vb_bind_arrays: importable", VB->importable_data); */
-
+
}
@@ -424,7 +424,7 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count )
* consecutive calls to ArrayElement with consecutive indices.
*/
void _tnl_fill_immediate_drawarrays( GLcontext *ctx, struct immediate *IM,
- GLuint start, GLuint count )
+ GLuint start, GLuint count )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint required = ctx->Array._Enabled;
@@ -449,7 +449,7 @@ void _tnl_fill_immediate_drawarrays( GLcontext *ctx, struct immediate *IM,
else if (ctx->Array.Vertex.Size == 3)
required |= VERT_OBJ_23;
-
+
if (required & VERT_NORM) {
_math_trans_3f( IM->Normal + IM->Start,
ctx->Array.Normal.Ptr,
@@ -457,7 +457,7 @@ void _tnl_fill_immediate_drawarrays( GLcontext *ctx, struct immediate *IM,
ctx->Array.Normal.Type,
start, n );
}
-
+
if (required & VERT_EDGE) {
_math_trans_1ub( IM->EdgeFlag + IM->Start,
ctx->Array.EdgeFlag.Ptr,
@@ -465,10 +465,10 @@ void _tnl_fill_immediate_drawarrays( GLcontext *ctx, struct immediate *IM,
ctx->Array.EdgeFlag.Type,
start, n );
}
-
+
if (required & VERT_RGBA) {
_math_trans_4chan( IM->Color + IM->Start,
- ctx->Array.Color.Ptr,
+ ctx->Array.Color.Ptr,
ctx->Array.Color.StrideB,
ctx->Array.Color.Type,
ctx->Array.Color.Size,
@@ -478,28 +478,28 @@ void _tnl_fill_immediate_drawarrays( GLcontext *ctx, struct immediate *IM,
if (required & VERT_SPEC_RGB) {
_math_trans_4chan( IM->SecondaryColor + IM->Start,
ctx->Array.SecondaryColor.Ptr,
- ctx->Array.SecondaryColor.StrideB,
- ctx->Array.SecondaryColor.Type,
- ctx->Array.SecondaryColor.Size,
+ ctx->Array.SecondaryColor.StrideB,
+ ctx->Array.SecondaryColor.Type,
+ ctx->Array.SecondaryColor.Size,
start, n );
}
if (required & VERT_FOG_COORD) {
_math_trans_1f( IM->FogCoord + IM->Start,
- ctx->Array.FogCoord.Ptr,
+ ctx->Array.FogCoord.Ptr,
ctx->Array.FogCoord.StrideB,
ctx->Array.FogCoord.Type,
start, n );
}
-
+
if (required & VERT_INDEX) {
_math_trans_1ui( IM->Index + IM->Start,
- ctx->Array.Index.Ptr,
- ctx->Array.Index.StrideB,
- ctx->Array.Index.Type,
+ ctx->Array.Index.Ptr,
+ ctx->Array.Index.StrideB,
+ ctx->Array.Index.Type,
start, n );
}
-
+
if (required & VERT_TEX_ANY) {
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
if (required & VERT_TEX(i)) {
@@ -513,15 +513,13 @@ void _tnl_fill_immediate_drawarrays( GLcontext *ctx, struct immediate *IM,
if (ctx->Array.TexCoord[i].Size == 4)
IM->TexSize |= TEX_SIZE_4(i);
else if (ctx->Array.TexCoord[i].Size == 3)
- IM->TexSize |= TEX_SIZE_3(i);
+ IM->TexSize |= TEX_SIZE_3(i);
}
}
}
-
+
IM->Count = IM->Start + n;
IM->Flag[IM->Start] |= required;
- for (i = IM->Start+1 ; i < IM->Count ; i++)
+ for (i = IM->Start+1 ; i < IM->Count ; i++)
IM->Flag[i] = required;
}
-
-
diff --git a/src/mesa/tnl/t_array_import.h b/src/mesa/tnl/t_array_import.h
index c1b903e24a5..1236850b91d 100644
--- a/src/mesa/tnl/t_array_import.h
+++ b/src/mesa/tnl/t_array_import.h
@@ -1,10 +1,10 @@
-/* $Id: t_array_import.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_array_import.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index c533e8a7f46..916f14bc57b 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -1,10 +1,10 @@
-/* $Id: t_context.c,v 1.14 2001/03/11 23:49:20 gareth Exp $ */
+/* $Id: t_context.c,v 1.15 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -24,7 +24,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <[email protected]>
+ * Keith Whitwell <[email protected]>
*/
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index de6e052c0e6..22d0423d162 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -1,10 +1,10 @@
-/* $Id: t_context.h,v 1.16 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_context.h,v 1.17 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -48,7 +48,7 @@
#define IMM_SIZE (IMM_MAXDATA + MAX_CLIPPED_VERTICES)
-/* Values for IM->BeginState
+/* Values for IM->BeginState
*/
#define VERT_BEGIN_0 0x1 /* glBegin (if initially inside beg/end) */
#define VERT_BEGIN_1 0x2 /* glBegin (if initially outside beg/end) */
@@ -66,16 +66,16 @@
/* Flags that describe the inputs and outputs of pipeline stages, and
- * the contents of a vertex-cassette.
+ * the contents of a vertex-cassette.
*
* 5 spare flags, rearrangement of eval flags can secure at least 3
- * more.
+ * more.
*/
-#define VERT_OBJ _NEW_ARRAY_VERTEX
-#define VERT_RGBA _NEW_ARRAY_COLOR
-#define VERT_NORM _NEW_ARRAY_NORMAL
-#define VERT_INDEX _NEW_ARRAY_INDEX
-#define VERT_EDGE _NEW_ARRAY_EDGEFLAG
+#define VERT_OBJ _NEW_ARRAY_VERTEX
+#define VERT_RGBA _NEW_ARRAY_COLOR
+#define VERT_NORM _NEW_ARRAY_NORMAL
+#define VERT_INDEX _NEW_ARRAY_INDEX
+#define VERT_EDGE _NEW_ARRAY_EDGEFLAG
#define VERT_SPEC_RGB _NEW_ARRAY_SECONDARYCOLOR
#define VERT_FOG_COORD _NEW_ARRAY_FOGCOORD
#define VERT_TEX0 _NEW_ARRAY_TEXCOORD_0
@@ -161,7 +161,7 @@
*/
struct immediate
{
- struct __GLcontextRec *backref;
+ struct __GLcontextRec *backref;
GLuint id, ref_count;
/* This must be saved when immediates are shared in display lists.
@@ -171,7 +171,7 @@ struct immediate
GLuint AndFlag, OrFlag;
GLuint TexSize; /* keep track of texcoord sizes */
GLuint BeginState, SavedBeginState;
- GLuint LastPrimitive;
+ GLuint LastPrimitive;
GLuint ArrayEltFlags; /* precalc'ed for glArrayElt */
GLuint ArrayEltIncr;
@@ -180,7 +180,7 @@ struct immediate
GLuint MaxTextureUnits; /* precalc'ed for glMultiTexCoordARB */
- /* Temporary values created when vertices are copied into the
+ /* Temporary values created when vertices are copied into the
* first 3 slots of the struct:
*/
GLuint CopyOrFlag;
@@ -200,8 +200,8 @@ struct immediate
GLuint Primitive[IMM_SIZE]; /* BEGIN/END */
GLuint PrimitiveLength[IMM_SIZE]; /* BEGIN/END */
GLuint Flag[IMM_SIZE]; /* VERT_* flags */
- GLchan Color[IMM_SIZE][4];
- GLfloat Obj[IMM_SIZE][4];
+ GLchan Color[IMM_SIZE][4];
+ GLfloat Obj[IMM_SIZE][4];
GLfloat Normal[IMM_SIZE][3];
GLfloat TexCoord0[IMM_SIZE][4]; /* just VERT_TEX0 */
GLuint Elt[IMM_SIZE];
@@ -265,27 +265,27 @@ typedef struct vertex_buffer
GLuint *Primitive; /* GL_(mode)|PRIM_* flags */
GLuint *PrimitiveLength; /* integers */
-
+
GLuint importable_data;
void (*import_data)( GLcontext *ctx, GLuint flags, GLuint vecflags );
/* Callback to the provider of the untransformed input for the
* render stage (or other stages) to call if they need to write into
* write-protected arrays, or fixup the stride on input arrays.
- *
+ *
* This is currently only necessary for client arrays that make it
* as far down the pipeline as the render stage.
*/
GLuint LastClipped;
/* Private data from _tnl_render_stage that has no business being
- * in this struct.
+ * in this struct.
*/
} TNLvertexbuffer;
-/* Describes an individual operation on the pipeline.
+/* Describes an individual operation on the pipeline.
*/
struct gl_pipeline_stage {
const char *name;
@@ -299,9 +299,9 @@ struct gl_pipeline_stage {
*/
GLuint run_state; /* All state referenced in run() --
* When is the cached output of the
- * stage invalidated?
+ * stage invalidated?
*/
-
+
GLboolean active; /* True if runnable in current state */
GLuint inputs; /* VERT_* inputs to the stage */
GLuint outputs; /* VERT_* outputs of the stage */
@@ -310,7 +310,7 @@ struct gl_pipeline_stage {
*/
GLuint changed_inputs; /* Generated value -- inputs to the
* stage that have changed since last
- * call to 'run'.
+ * call to 'run'.
*/
/* Private data for the pipeline stage:
@@ -322,14 +322,14 @@ struct gl_pipeline_stage {
void (*destroy)( struct gl_pipeline_stage * );
/* Called from _tnl_validate_pipeline(). Must update all fields in
- * the pipeline_stage struct for the current state.
+ * the pipeline_stage struct for the current state.
*/
void (*check)( GLcontext *ctx, struct gl_pipeline_stage * );
/* Called from _tnl_run_pipeline(). The stage.changed_inputs value
* encodes all inputs to thee struct which have changed. If
* non-zero, recompute all affected outputs of the stage, otherwise
- * execute any 'sideeffects' of the stage.
+ * execute any 'sideeffects' of the stage.
*
* Return value: GL_TRUE - keep going
* GL_FALSE - finished pipeline
@@ -354,17 +354,17 @@ struct tnl_eval_store {
GLuint EvalMap2Flags;
GLuint EvalNewState;
- GLfloat Coord[IMM_SIZE][4];
- GLfloat Obj[IMM_SIZE][4];
- GLfloat TexCoord[IMM_SIZE][4];
+ GLfloat Coord[IMM_SIZE][4];
+ GLfloat Obj[IMM_SIZE][4];
+ GLfloat TexCoord[IMM_SIZE][4];
GLfloat Normal[IMM_SIZE][3];
- GLchan Color[IMM_SIZE][4];
+ GLchan Color[IMM_SIZE][4];
GLuint Index[IMM_SIZE];
GLuint Flag[IMM_SIZE];
GLuint Elts[IMM_SIZE];
};
-typedef struct {
+typedef struct {
/* Track whether the module is active.
*/
@@ -388,14 +388,14 @@ typedef struct {
/* Set when executing an internally generated immediate.
*/
- GLboolean ReplayHardBeginEnd;
+ GLboolean ReplayHardBeginEnd;
GLenum CurrentPrimitive;
/* Note which vertices need copying over succesive immediates.
* Will add save versions to precompute vertex copying where
* possible.
*/
- struct immediate *ExecCopySource;
+ struct immediate *ExecCopySource;
GLuint ExecCopyCount;
GLuint ExecCopyElts[IMM_MAX_COPIED_VERTS];
GLuint ExecCopyTexSize;
diff --git a/src/mesa/tnl/t_eval_api.c b/src/mesa/tnl/t_eval_api.c
index 81a65451fe0..10700e83299 100644
--- a/src/mesa/tnl/t_eval_api.c
+++ b/src/mesa/tnl/t_eval_api.c
@@ -1,10 +1,10 @@
-/* $Id: t_eval_api.c,v 1.3 2001/03/03 20:33:31 brianp Exp $ */
+/* $Id: t_eval_api.c,v 1.4 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -50,7 +50,7 @@
* Thus we need to have a check in the display list code or
* elsewhere for eval(1,2) vertices in the case where
* map(1,2)_vertex is disabled, and to purge those vertices from
- * the vb.
+ * the vb.
*/
void
_tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
@@ -83,8 +83,8 @@ _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
/* Need to turn off compilation -- this is already saved, and the
* coordinates generated and the test above depend on state that
- * may change before the list is executed.
- *
+ * may change before the list is executed.
+ *
* TODO: Anaylse display lists to determine if this state is
* constant.
*/
@@ -137,7 +137,7 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
/* Need to turn off compilation -- this is already saved, and the
* coordinates generated and the test above depend on state that
- * may change before the list is executed.
+ * may change before the list is executed.
*/
{
GLboolean compiling = ctx->CompileFlag;
diff --git a/src/mesa/tnl/t_eval_api.h b/src/mesa/tnl/t_eval_api.h
index fab6108c8da..49a463b8f71 100644
--- a/src/mesa/tnl/t_eval_api.h
+++ b/src/mesa/tnl/t_eval_api.h
@@ -1,10 +1,10 @@
-/* $Id: t_eval_api.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_eval_api.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -36,7 +36,7 @@
*/
extern void _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 );
-extern void _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2,
+extern void _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2,
GLint j1, GLint j2 );
void _tnl_eval_init( GLcontext *ctx );
diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c
index 3aa0df72e3c..b624026767c 100644
--- a/src/mesa/tnl/t_imm_alloc.c
+++ b/src/mesa/tnl/t_imm_alloc.c
@@ -1,10 +1,10 @@
-/* $Id: t_imm_alloc.c,v 1.4 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_imm_alloc.c,v 1.5 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -50,7 +50,7 @@ struct immediate *_tnl_alloc_immediate( GLcontext *ctx )
IM->FlushElt = 0;
IM->LastPrimitive = IMM_MAX_COPIED_VERTS;
IM->Count = IMM_MAX_COPIED_VERTS;
- IM->Start = IMM_MAX_COPIED_VERTS;
+ IM->Start = IMM_MAX_COPIED_VERTS;
IM->Material = 0;
IM->MaterialMask = 0;
IM->MaxTextureUnits = ctx->Const.MaxTextureUnits;
@@ -91,7 +91,7 @@ void _tnl_free_immediate( struct immediate *IM )
IM->MaterialMask = 0;
}
- for (j = 1; j < IM->MaxTextureUnits; j++)
+ for (j = 1; j < IM->MaxTextureUnits; j++)
ALIGN_FREE( IM->TexCoord[j] );
@@ -99,6 +99,3 @@ void _tnl_free_immediate( struct immediate *IM )
freed++;
/* printf("outstanding %d\n", id - freed); */
}
-
-
-
diff --git a/src/mesa/tnl/t_imm_alloc.h b/src/mesa/tnl/t_imm_alloc.h
index 5640f80ceaa..37512cc2191 100644
--- a/src/mesa/tnl/t_imm_alloc.h
+++ b/src/mesa/tnl/t_imm_alloc.h
@@ -1,10 +1,10 @@
-/* $Id: t_imm_alloc.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_alloc.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/tnl/t_imm_api.c b/src/mesa/tnl/t_imm_api.c
index 64cf7b82f66..d6cc0ecb09c 100644
--- a/src/mesa/tnl/t_imm_api.c
+++ b/src/mesa/tnl/t_imm_api.c
@@ -1,9 +1,10 @@
+/* $Id: t_imm_api.c,v 1.8 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.3
+ * Version: 3.5
*
- * 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"),
@@ -22,8 +23,8 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
@@ -45,15 +46,15 @@
#include "t_imm_dlist.h"
-/* A cassette is full or flushed on a statechange.
+/* A cassette is full or flushed on a statechange.
*/
void _tnl_flush_immediate( struct immediate *IM )
{
GLcontext *ctx = IM->backref;
- if (ctx->CompileFlag)
+ if (ctx->CompileFlag)
_tnl_compile_cassette( ctx, IM );
- else
+ else
_tnl_execute_cassette( ctx, IM );
}
@@ -76,13 +77,13 @@ _tnl_begin( GLcontext *ctx, GLenum p )
if (MESA_VERBOSE&VERBOSE_API)
fprintf(stderr, "glBegin(IM %d) %s\n", IM->id, _mesa_lookup_enum_by_nr(p));
-
+
if (ctx->NewState)
_mesa_update_state(ctx);
-
+
/* if only a very few slots left, might as well flush now
*/
- if (IM->Count > IMM_MAXDATA-8) {
+ if (IM->Count > IMM_MAXDATA-8) {
_tnl_flush_immediate( IM );
IM = TNL_CURRENT_IM(ctx);
}
@@ -108,7 +109,7 @@ _tnl_begin( GLcontext *ctx, GLenum p )
ASSERT(IM->Primitive[IM->LastPrimitive] & PRIM_LAST);
state |= (VERT_BEGIN_0|VERT_BEGIN_1);
- IM->Flag[count] |= VERT_BEGIN;
+ IM->Flag[count] |= VERT_BEGIN;
IM->Primitive[IM->LastPrimitive] &= ~PRIM_LAST;
IM->Primitive[count] = p | PRIM_BEGIN | PRIM_LAST;
IM->PrimitiveLength[IM->LastPrimitive] = count - IM->LastPrimitive;
@@ -136,12 +137,12 @@ _tnl_Begin( GLenum mode )
if (mode > GL_POLYGON) {
_mesa_compile_error( ctx, GL_INVALID_ENUM, "glBegin" );
- return;
+ return;
}
_tnl_begin(ctx, mode);
- /* If compiling update SavePrimitive now.
+ /* If compiling update SavePrimitive now.
*
* In compile_and_exec mode, exec_primitive will be updated when
* the cassette is finished.
@@ -149,10 +150,10 @@ _tnl_Begin( GLenum mode )
* If not compiling, update exec_primitive now.
*/
if (ctx->CompileFlag) {
- if (ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN)
+ if (ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN)
ctx->Driver.CurrentSavePrimitive = PRIM_INSIDE_UNKNOWN_PRIM;
else if (ctx->Driver.CurrentSavePrimitive == PRIM_OUTSIDE_BEGIN_END)
- ctx->Driver.CurrentSavePrimitive = mode;
+ ctx->Driver.CurrentSavePrimitive = mode;
}
else if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END)
ctx->Driver.CurrentExecPrimitive = mode;
@@ -164,10 +165,10 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
{
struct immediate *IM = TNL_CURRENT_IM(ctx);
GLuint count, last;
-
+
if (ctx->NewState)
_mesa_update_state(ctx);
-
+
/* If not compiling, treat as a normal begin().
*/
if (!ctx->CompileFlag) {
@@ -178,53 +179,53 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
ctx->Driver.CurrentExecPrimitive = p;
return GL_TRUE;
}
-
- if (IM->Count > IMM_MAXDATA-8) {
+
+ if (IM->Count > IMM_MAXDATA-8) {
_tnl_flush_immediate( IM );
IM = TNL_CURRENT_IM(ctx);
}
-
+
switch (IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1)) {
case VERT_BEGIN_0|VERT_BEGIN_1:
/* This is an immediate known to be inside a begin/end object.
*/
IM->BeginState |= (VERT_ERROR_1|VERT_ERROR_0);
return GL_FALSE;
-
+
case VERT_BEGIN_0:
case VERT_BEGIN_1:
/* This is a display-list immediate in an unknown begin/end
- * state. Assert it is empty and conviert it to a 'hard' one.
+ * state. Assert it is empty and conviert it to a 'hard' one.
*/
ASSERT (IM->SavedBeginState == 0);
-
+
/* ASSERT (ctx->Driver.CurrentSavePrimitive >= GL_POLYGON+1); */
/* Push current beginstate, to be restored later. Don't worry
* about raising errors.
*/
IM->SavedBeginState = IM->BeginState;
-
+
/* FALLTHROUGH */
- case 0:
- /* Unless we have fallen through, this is an immediate known to
+ case 0:
+ /* Unless we have fallen through, this is an immediate known to
* be outside begin/end objects.
*/
-
+
IM->BeginState |= VERT_BEGIN_0|VERT_BEGIN_1;
-
+
count = IM->Count;
last = IM->LastPrimitive;
ASSERT(IM->Primitive[IM->LastPrimitive] & PRIM_LAST);
- IM->Flag[count] |= VERT_BEGIN;
+ IM->Flag[count] |= VERT_BEGIN;
IM->Primitive[last] &= ~PRIM_LAST;
IM->Primitive[count] = p | PRIM_BEGIN | PRIM_LAST;
IM->PrimitiveLength[last] = count - last;
IM->LastPrimitive = count;
-
+
ASSERT (!IM->FlushElt);
/* This is necessary as this immediate will not be flushed in
@@ -234,10 +235,10 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
return GL_TRUE;
-
+
default:
ASSERT (0);
- return GL_TRUE;
+ return GL_TRUE;
}
}
@@ -245,16 +246,16 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
/* Need to do this to get the correct begin/end error behaviour from
* functions like ColorPointerEXT which are still active in
- * SAVE_AND_EXEC modes.
+ * SAVE_AND_EXEC modes.
*/
void
_tnl_save_Begin( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
-
+
if (mode > GL_POLYGON) {
_mesa_compile_error( ctx, GL_INVALID_ENUM, "glBegin" );
- return;
+ return;
}
if (ctx->ExecuteFlag) {
@@ -329,11 +330,11 @@ _tnl_end( GLcontext *ctx )
_tnl_translate_array_elts( ctx, IM, last, count );
IM->FlushElt = 0;
}
-
+
/* ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES; */
}
- IM->BeginState = state;
+ IM->BeginState = state;
if (!ctx->CompileFlag)
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
@@ -356,7 +357,7 @@ _tnl_End(void)
* COMPILE_AND_EXEC modes, need to keep exec primitive uptodate
* otherwise.
*/
- if (ctx->CompileFlag)
+ if (ctx->CompileFlag)
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
}
@@ -741,7 +742,7 @@ _tnl_TexCoord1f( GLfloat s )
static void
_tnl_TexCoord2f( GLfloat s, GLfloat t )
{
- TEXCOORD2F(s,t);
+ TEXCOORD2F(s,t);
}
@@ -884,7 +885,7 @@ static void
_tnl_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
{
GET_IMMEDIATE;
- VERTEX3F( IM, x, y, z );
+ VERTEX3F( IM, x, y, z );
}
static void
_tnl_Vertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
@@ -1048,9 +1049,9 @@ _tnl_MultiTexCoord4fvARB(GLenum target, const GLfloat *v)
/* KW: Because the eval values don't become 'current', fixup will flow
* through these vertices, and then evaluation will write on top
- * of the fixup results.
+ * of the fixup results.
*
- * Note: using Obj to hold eval coord data.
+ * Note: using Obj to hold eval coord data.
*/
#define EVALCOORD1(IM, x) \
{ \
@@ -1078,7 +1079,7 @@ _tnl_MultiTexCoord4fvARB(GLenum target, const GLfloat *v)
if (count == IMM_MAXDATA-1) \
_tnl_flush_immediate( IM ); \
}
-
+
#define EVALPOINT2(IM, x, y) \
{ \
GLuint count = IM->Count++; \
@@ -1157,11 +1158,11 @@ _tnl_ArrayElement( GLint i )
}
-/* Internal functions. These are safe to use providing either:
- *
+/* Internal functions. These are safe to use providing either:
+ *
* - It is determined that a display list is not being compiled, or
* if so that these commands won't be compiled into the list (see
- * t_eval.c for an example).
+ * t_eval.c for an example).
*
* - _tnl_hard_begin() is used instead of _tnl_[bB]egin, and tested
* for a GL_TRUE return value. See _tnl_Rectf, below.
@@ -1233,10 +1234,10 @@ _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params )
if (!IM->Material) {
IM->Material = (GLmaterial (*)[2]) MALLOC( sizeof(GLmaterial) *
IMM_SIZE * 2 );
- IM->MaterialMask = (GLuint *) MALLOC( sizeof(GLuint) * IMM_SIZE );
+ IM->MaterialMask = (GLuint *) MALLOC( sizeof(GLuint) * IMM_SIZE );
}
else if (IM->MaterialOrMask & ~bitmask) {
- _mesa_copy_material_pairs( IM->Material[count],
+ _mesa_copy_material_pairs( IM->Material[count],
IM->Material[IM->LastMaterial],
IM->MaterialOrMask & ~bitmask );
}
@@ -1245,7 +1246,7 @@ _tnl_Materialfv( GLenum face, GLenum pname, const GLfloat *params )
IM->LastMaterial = count;
IM->MaterialMask[count] = 0;
}
-
+
IM->MaterialOrMask |= bitmask;
IM->MaterialMask[count] |= bitmask;
mat = IM->Material[count];
@@ -1353,13 +1354,13 @@ void _tnl_imm_vtxfmt_init( GLcontext *ctx )
vfmt->Vertex4f = _tnl_Vertex4f;
vfmt->Vertex4fv = _tnl_Vertex4fv;
- /* Outside begin/end functions (from t_varray.c, t_eval.c, ...):
+ /* Outside begin/end functions (from t_varray.c, t_eval.c, ...):
*/
vfmt->Rectf = _tnl_Rectf;
/* Just use the core function:
*/
- vfmt->CallList = _mesa_CallList;
+ vfmt->CallList = _mesa_CallList;
vfmt->prefer_float_colors = GL_FALSE;
}
diff --git a/src/mesa/tnl/t_imm_api.h b/src/mesa/tnl/t_imm_api.h
index 3c0686403d4..ad1827f1f8a 100644
--- a/src/mesa/tnl/t_imm_api.h
+++ b/src/mesa/tnl/t_imm_api.h
@@ -1,21 +1,21 @@
-/* $Id: t_imm_api.h,v 1.2 2001/01/08 21:56:00 keithw Exp $ */
+/* $Id: t_imm_api.h,v 1.3 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
diff --git a/src/mesa/tnl/t_imm_debug.c b/src/mesa/tnl/t_imm_debug.c
index 192259afcda..ded4ee4d0c1 100644
--- a/src/mesa/tnl/t_imm_debug.c
+++ b/src/mesa/tnl/t_imm_debug.c
@@ -1,21 +1,21 @@
-/* $Id: t_imm_debug.c,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_debug.c,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -28,7 +28,7 @@
#include "t_context.h"
#include "t_imm_debug.h"
-void _tnl_print_vert_flags( const char *name, GLuint flags )
+void _tnl_print_vert_flags( const char *name, GLuint flags )
{
fprintf(stderr,
"%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
@@ -61,7 +61,7 @@ void _tnl_print_vert_flags( const char *name, GLuint flags )
);
}
-void _tnl_print_cassette( struct immediate *IM )
+void _tnl_print_cassette( struct immediate *IM )
{
GLuint i;
GLuint *flags = IM->Flag;
@@ -70,7 +70,7 @@ void _tnl_print_cassette( struct immediate *IM )
GLuint state = IM->BeginState;
GLuint req = ~0;
- fprintf(stderr, "Cassette id %d, %u rows.\n", IM->id,
+ fprintf(stderr, "Cassette id %d, %u rows.\n", IM->id,
IM->Count - IM->CopyStart);
_tnl_print_vert_flags("Contains at least one", orflag);
@@ -78,7 +78,7 @@ void _tnl_print_cassette( struct immediate *IM )
if (IM->Count != IM->CopyStart)
{
_tnl_print_vert_flags("Contains a full complement of", andflag);
-
+
fprintf(stderr, "Final begin/end state %s/%s, errors %s/%s\n",
(state & VERT_BEGIN_0) ? "in" : "out",
(state & VERT_BEGIN_1) ? "in" : "out",
@@ -115,7 +115,7 @@ void _tnl_print_cassette( struct immediate *IM )
GLuint j;
for (j = 0 ; j < MAX_TEXTURE_UNITS ; j++) {
if (req & flags[i] & VERT_TEX(j)) {
- fprintf(stderr,
+ fprintf(stderr,
"TC%d %f %f %f %f",
j,
IM->TexCoord[j][i][0], IM->TexCoord[j][i][1],
@@ -145,7 +145,7 @@ void _tnl_print_cassette( struct immediate *IM )
if (req & flags[i] & VERT_MATERIAL)
fprintf(stderr, " Material ");
-
+
/* The order of these two is not easily knowable, but this is
* the usually correct way to look at them.
@@ -154,7 +154,7 @@ void _tnl_print_cassette( struct immediate *IM )
fprintf(stderr, " END ");
if (req & flags[i] & VERT_BEGIN)
- fprintf(stderr, " BEGIN(%s) (%s%s%s%s)",
+ fprintf(stderr, " BEGIN(%s) (%s%s%s%s)",
_mesa_prim_name[IM->Primitive[i] & PRIM_MODE_MASK],
(IM->Primitive[i] & PRIM_LAST) ? "LAST," : "",
(IM->Primitive[i] & PRIM_BEGIN) ? "BEGIN," : "",
@@ -164,6 +164,3 @@ void _tnl_print_cassette( struct immediate *IM )
fprintf(stderr, "\n");
}
}
-
-
-
diff --git a/src/mesa/tnl/t_imm_debug.h b/src/mesa/tnl/t_imm_debug.h
index aaae5c11da3..f735a9ca9f9 100644
--- a/src/mesa/tnl/t_imm_debug.h
+++ b/src/mesa/tnl/t_imm_debug.h
@@ -1,3 +1,31 @@
+/* $Id: t_imm_debug.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.5
+ *
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Keith Whitwell <[email protected]>
+ */
#ifndef _T_DEBUG_H
#define _T_DEBUG_H
diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c
index 33d3149ed0a..0ce1909c9f0 100644
--- a/src/mesa/tnl/t_imm_dlist.c
+++ b/src/mesa/tnl/t_imm_dlist.c
@@ -1,21 +1,21 @@
-/* $Id: t_imm_dlist.c,v 1.10 2001/03/03 20:33:31 brianp Exp $ */
+/* $Id: t_imm_dlist.c,v 1.11 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -23,8 +23,8 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
@@ -67,7 +67,7 @@ static void execute_compiled_cassette( GLcontext *ctx, void *data );
/* Insert the active immediate struct onto the display list currently
* being built.
*/
-void
+void
_tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
{
struct immediate *im = TNL_CURRENT_IM(ctx);
@@ -84,7 +84,7 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
GLuint andflag = ~0;
GLuint i;
GLuint start = IM->FlushElt ? IM->LastPrimitive : IM->CopyStart;
- _tnl_translate_array_elts( ctx, IM, start, IM->Count );
+ _tnl_translate_array_elts( ctx, IM, start, IM->Count );
/* Need to recompute andflag.
*/
@@ -104,14 +104,14 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
IM->PrimitiveLength[IM->LastPrimitive] = IM->Count - IM->LastPrimitive;
ASSERT(IM->Primitive[IM->LastPrimitive] & PRIM_LAST);
-
- node = (TNLvertexcassette *)
- _mesa_alloc_instruction(ctx,
+
+ node = (TNLvertexcassette *)
+ _mesa_alloc_instruction(ctx,
tnl->opcode_vertex_cassette,
sizeof(TNLvertexcassette));
- if (!node)
+ if (!node)
return;
-
+
node->IM = im; im->ref_count++;
node->Start = im->Start;
node->Count = im->Count;
@@ -128,8 +128,8 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
if (ctx->ExecuteFlag) {
execute_compiled_cassette( ctx, (void *)node );
}
-
-
+
+
/* Discard any errors raised in the last cassette.
*/
new_beginstate = node->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1);
@@ -140,7 +140,7 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
if (im->Count > IMM_MAXDATA - 16) {
/* Call it full...
*/
- struct immediate *new_im = _tnl_alloc_immediate(ctx);
+ struct immediate *new_im = _tnl_alloc_immediate(ctx);
if (!new_im) return;
new_im->ref_count++;
im->ref_count--; /* remove CURRENT_IM reference */
@@ -153,11 +153,11 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
*/
_tnl_reset_input( ctx, im->Count+1+IMM_MAX_COPIED_VERTS,
new_beginstate, node->SavedBeginState);
- }
+ }
}
-static void
+static void
execute_compiled_cassette( GLcontext *ctx, void *data )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -169,14 +169,14 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
if (tnl->pipeline.build_state_changes)
_tnl_validate_pipeline( ctx );
-
+
IM->Start = node->Start;
IM->CopyStart = node->Start;
IM->Count = node->Count;
IM->BeginState = node->BeginState;
- IM->SavedBeginState = node->SavedBeginState;
+ IM->SavedBeginState = node->SavedBeginState;
IM->OrFlag = node->OrFlag;
- IM->TexSize = node->TexSize;
+ IM->TexSize = node->TexSize;
IM->AndFlag = node->AndFlag;
IM->LastData = node->LastData;
IM->LastPrimitive = node->LastPrimitive;
@@ -215,7 +215,7 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
_tnl_fixup_compiled_cassette( ctx, IM );
_tnl_get_exec_copy_verts( ctx, IM );
- _tnl_run_cassette( ctx, IM );
+ _tnl_run_cassette( ctx, IM );
_tnl_restore_compiled_cassette( ctx, IM );
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1)
@@ -232,13 +232,13 @@ destroy_compiled_cassette( GLcontext *ctx, void *data )
}
-static void
+static void
print_compiled_cassette( GLcontext *ctx, void *data )
{
TNLvertexcassette *node = (TNLvertexcassette *)data;
struct immediate *IM = node->IM;
- fprintf(stderr, "TNL-VERTEX-CASSETTE, id %u, rows %u..%u\n",
+ fprintf(stderr, "TNL-VERTEX-CASSETTE, id %u, rows %u..%u\n",
node->IM->id, node->Start, node->Count);
IM->Start = node->Start;
@@ -271,19 +271,19 @@ void
_tnl_EndCallList( GLcontext *ctx )
{
/* May have to copy vertices from a dangling begin/end inside the
- * list to the current immediate.
+ * list to the current immediate.
*/
if (ctx->CallDepth == 0) {
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct immediate *IM = TNL_CURRENT_IM(ctx);
- if (tnl->ExecCopySource != IM)
+ if (tnl->ExecCopySource != IM)
_tnl_copy_immediate_vertices( ctx, IM );
}
}
-void
+void
_tnl_EndList( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -312,16 +312,16 @@ _tnl_EndList( GLcontext *ctx )
SET_IMMEDIATE( ctx, IM );
IM->ref_count++;
- _tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS, 0, 0 );
+ _tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS, 0, 0 );
- /* outside begin/end, even in COMPILE_AND_EXEC,
- * so no vertices to copy, right?
+ /* outside begin/end, even in COMPILE_AND_EXEC,
+ * so no vertices to copy, right?
*/
ASSERT(TNL_CONTEXT(ctx)->ExecCopyCount == 0);
}
-void
+void
_tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode )
{
struct immediate *IM = TNL_CURRENT_IM(ctx);
@@ -341,16 +341,15 @@ _tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode )
}
-void
+void
_tnl_dlist_init( GLcontext *ctx )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- tnl->opcode_vertex_cassette =
+ tnl->opcode_vertex_cassette =
_mesa_alloc_opcode( ctx,
sizeof(TNLvertexcassette),
execute_compiled_cassette,
destroy_compiled_cassette,
print_compiled_cassette );
}
-
diff --git a/src/mesa/tnl/t_imm_dlist.h b/src/mesa/tnl/t_imm_dlist.h
index 69c7bdfdbc2..e4080832ed4 100644
--- a/src/mesa/tnl/t_imm_dlist.h
+++ b/src/mesa/tnl/t_imm_dlist.h
@@ -1,10 +1,10 @@
-/* $Id: t_imm_dlist.h,v 1.2 2001/01/08 21:56:00 keithw Exp $ */
+/* $Id: t_imm_dlist.h,v 1.3 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,8 +23,8 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
#ifndef _T_DLIST_H
diff --git a/src/mesa/tnl/t_imm_elt.c b/src/mesa/tnl/t_imm_elt.c
index 6fe8f9aa141..1ef6a8c2f20 100644
--- a/src/mesa/tnl/t_imm_elt.c
+++ b/src/mesa/tnl/t_imm_elt.c
@@ -1,10 +1,10 @@
-/* $Id: t_imm_elt.c,v 1.5 2001/03/08 15:23:47 brianp Exp $ */
+/* $Id: t_imm_elt.c,v 1.6 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -597,7 +597,7 @@ static void _tnl_trans_elt_1f(GLfloat *to,
GLuint start,
GLuint n )
{
- _tnl_trans_elt_1f_tab[TYPE_IDX(from->Type)]( to,
+ _tnl_trans_elt_1f_tab[TYPE_IDX(from->Type)]( to,
from->Ptr,
from->StrideB,
flags,
@@ -605,7 +605,7 @@ static void _tnl_trans_elt_1f(GLfloat *to,
match,
start,
n );
-
+
}
static void _tnl_trans_elt_1ui(GLuint *to,
@@ -616,7 +616,7 @@ static void _tnl_trans_elt_1ui(GLuint *to,
GLuint start,
GLuint n )
{
- _tnl_trans_elt_1ui_tab[TYPE_IDX(from->Type)]( to,
+ _tnl_trans_elt_1ui_tab[TYPE_IDX(from->Type)]( to,
from->Ptr,
from->StrideB,
flags,
@@ -624,7 +624,7 @@ static void _tnl_trans_elt_1ui(GLuint *to,
match,
start,
n );
-
+
}
@@ -636,7 +636,7 @@ static void _tnl_trans_elt_1ub(GLubyte *to,
GLuint start,
GLuint n )
{
- _tnl_trans_elt_1ub_tab[TYPE_IDX(from->Type)]( to,
+ _tnl_trans_elt_1ub_tab[TYPE_IDX(from->Type)]( to,
from->Ptr,
from->StrideB,
flags,
@@ -644,7 +644,7 @@ static void _tnl_trans_elt_1ub(GLubyte *to,
match,
start,
n );
-
+
}
@@ -656,7 +656,7 @@ static void _tnl_trans_elt_4ub(GLubyte (*to)[4],
GLuint start,
GLuint n )
{
- _tnl_trans_elt_4ub_tab[from->Size][TYPE_IDX(from->Type)]( to,
+ _tnl_trans_elt_4ub_tab[from->Size][TYPE_IDX(from->Type)]( to,
from->Ptr,
from->StrideB,
flags,
@@ -664,7 +664,7 @@ static void _tnl_trans_elt_4ub(GLubyte (*to)[4],
match,
start,
n );
-
+
}
static void _tnl_trans_elt_4us(GLushort (*to)[4],
@@ -675,7 +675,7 @@ static void _tnl_trans_elt_4us(GLushort (*to)[4],
GLuint start,
GLuint n )
{
- _tnl_trans_elt_4us_tab[from->Size][TYPE_IDX(from->Type)]( to,
+ _tnl_trans_elt_4us_tab[from->Size][TYPE_IDX(from->Type)]( to,
from->Ptr,
from->StrideB,
flags,
@@ -683,7 +683,7 @@ static void _tnl_trans_elt_4us(GLushort (*to)[4],
match,
start,
n );
-
+
}
static void _tnl_trans_elt_4f(GLfloat (*to)[4],
@@ -694,7 +694,7 @@ static void _tnl_trans_elt_4f(GLfloat (*to)[4],
GLuint start,
GLuint n )
{
- _tnl_trans_elt_4f_tab[from->Size][TYPE_IDX(from->Type)]( to,
+ _tnl_trans_elt_4f_tab[from->Size][TYPE_IDX(from->Type)]( to,
from->Ptr,
from->StrideB,
flags,
@@ -702,7 +702,7 @@ static void _tnl_trans_elt_4f(GLfloat (*to)[4],
match,
start,
n );
-
+
}
static void _tnl_trans_elt_4chan(GLchan (*to)[4],
@@ -734,7 +734,7 @@ static void _tnl_trans_elt_3f(GLfloat (*to)[3],
GLuint start,
GLuint n )
{
- _tnl_trans_elt_3f_tab[TYPE_IDX(from->Type)]( to,
+ _tnl_trans_elt_3f_tab[TYPE_IDX(from->Type)]( to,
from->Ptr,
from->StrideB,
flags,
@@ -749,12 +749,12 @@ static void _tnl_trans_elt_3f(GLfloat (*to)[3],
/* Batch function to translate away all the array elements in the
* input buffer prior to transform. Done only the first time a vertex
- * buffer is executed or compiled.
+ * buffer is executed or compiled.
*
- * KW: Have to do this after each glEnd if arrays aren't locked.
+ * KW: Have to do this after each glEnd if arrays aren't locked.
*/
void _tnl_translate_array_elts( GLcontext *ctx, struct immediate *IM,
- GLuint start, GLuint count )
+ GLuint start, GLuint count )
{
GLuint *flags = IM->Flag;
GLuint *elts = IM->Elt;
@@ -826,14 +826,12 @@ void _tnl_translate_array_elts( GLcontext *ctx, struct immediate *IM,
if (ctx->Array.TexCoord[i].Size == 4)
IM->TexSize |= TEX_SIZE_4(i);
else if (ctx->Array.TexCoord[i].Size == 3)
- IM->TexSize |= TEX_SIZE_3(i);
+ IM->TexSize |= TEX_SIZE_3(i);
}
}
- for (i = start ; i < count ; i++)
+ for (i = start ; i < count ; i++)
if (flags[i] & VERT_ELT) flags[i] |= translate;
IM->CopyOrFlag |= translate;
}
-
-
diff --git a/src/mesa/tnl/t_imm_elt.h b/src/mesa/tnl/t_imm_elt.h
index 180b75fbee8..d2d709d9c0f 100644
--- a/src/mesa/tnl/t_imm_elt.h
+++ b/src/mesa/tnl/t_imm_elt.h
@@ -1,10 +1,10 @@
-/* $Id: t_imm_elt.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_elt.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -37,7 +37,7 @@
extern void _tnl_imm_elt_init( void );
-extern void _tnl_translate_array_elts( GLcontext *ctx,
+extern void _tnl_translate_array_elts( GLcontext *ctx,
struct immediate *IM,
GLuint start,
GLuint end );
diff --git a/src/mesa/tnl/t_imm_eval.c b/src/mesa/tnl/t_imm_eval.c
index 1207a9ab158..aa1d2f4810c 100644
--- a/src/mesa/tnl/t_imm_eval.c
+++ b/src/mesa/tnl/t_imm_eval.c
@@ -1,10 +1,10 @@
-/* $Id: t_imm_eval.c,v 1.5 2001/02/20 18:28:52 keithw Exp $ */
+/* $Id: t_imm_eval.c,v 1.6 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -98,7 +98,7 @@ static void eval1_4f( GLvector4f *dest,
if (flags[i] & (VERT_EVAL_C1|VERT_EVAL_P1)) {
GLfloat u = (coord[i][0] - u1) * du;
ASSIGN_4V(to[i], 0,0,0,1);
- _math_horner_bezier_curve(map->Points, to[i], u,
+ _math_horner_bezier_curve(map->Points, to[i], u,
dimension, map->Order);
}
@@ -129,7 +129,7 @@ static void eval1_1ui( GLvector1ui *dest,
static void eval1_norm( GLvector3f *dest,
GLfloat coord[][4],
- const GLuint *flags,
+ const GLuint *flags,
struct gl_1d_map *map )
{
const GLfloat u1 = map->u1;
@@ -304,22 +304,22 @@ static void eval2_color( GLvector4chan *dest,
static void copy_4f( GLfloat to[][4], GLfloat from[][4], GLuint count )
{
- MEMCPY( to, from, count * sizeof(to[0]));
+ MEMCPY( to, from, count * sizeof(to[0]));
}
static void copy_3f( GLfloat to[][3], GLfloat from[][3], GLuint count )
{
- MEMCPY( to, from, (count) * sizeof(to[0]));
+ MEMCPY( to, from, (count) * sizeof(to[0]));
}
static void copy_4chan( GLchan to[][4], GLchan from[][4], GLuint count )
{
- MEMCPY( to, from, (count) * sizeof(to[0]));
+ MEMCPY( to, from, (count) * sizeof(to[0]));
}
static void copy_1ui( GLuint to[], GLuint from[], GLuint count )
{
- MEMCPY( to, from, (count) * sizeof(to[0]));
+ MEMCPY( to, from, (count) * sizeof(to[0]));
}
@@ -368,13 +368,13 @@ static void update_eval( GLcontext *ctx )
eval1 |= VERT_OBJ_23;
if (ctx->Eval.Map2Vertex4) {
- if (ctx->Eval.AutoNormal)
+ if (ctx->Eval.AutoNormal)
eval2 |= VERT_OBJ_234 | VERT_NORM;
else
eval2 |= VERT_OBJ_234;
}
else if (ctx->Eval.Map2Vertex3) {
- if (ctx->Eval.AutoNormal)
+ if (ctx->Eval.AutoNormal)
eval2 |= VERT_OBJ_23 | VERT_NORM;
else
eval2 |= VERT_OBJ_23;
@@ -388,14 +388,14 @@ static void update_eval( GLcontext *ctx )
/* This looks a lot like a pipeline stage, but for various reasons is
* better handled outside the pipeline, and considered the final stage
- * of fixing up an immediate struct for execution.
+ * of fixing up an immediate struct for execution.
*
* Really want to cache the results of this function in display lists,
- * at least for EvalMesh commands.
+ * at least for EvalMesh commands.
*/
-void _tnl_eval_vb( GLcontext *ctx,
+void _tnl_eval_vb( GLcontext *ctx,
GLfloat (*coord)[4],
- GLuint orflag,
+ GLuint orflag,
GLuint andflag )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -417,18 +417,18 @@ void _tnl_eval_vb( GLcontext *ctx,
if (any_eval1 && !ctx->Eval.Map1Vertex4 && !ctx->Eval.Map1Vertex3)
purge_flags = (VERT_EVAL_P1|VERT_EVAL_C1);
- if (any_eval2 && !ctx->Eval.Map2Vertex4 && !ctx->Eval.Map2Vertex3)
+ if (any_eval2 && !ctx->Eval.Map2Vertex4 && !ctx->Eval.Map2Vertex3)
purge_flags |= (VERT_EVAL_P1|VERT_EVAL_C1);
- if (any_eval1)
+ if (any_eval1)
req |= tnl->pipeline.inputs & tnl->eval.EvalMap1Flags;
- if (any_eval2)
+ if (any_eval2)
req |= tnl->pipeline.inputs & tnl->eval.EvalMap2Flags;
-
+
/* Translate points into coords. Use store->Coord to hold the
- * new data.
+ * new data.
*/
if (any_eval1 && (orflag & VERT_EVAL_P1))
{
@@ -455,13 +455,13 @@ void _tnl_eval_vb( GLcontext *ctx,
*/
if (req & VERT_INDEX)
{
- if (!all_eval)
+ if (!all_eval)
copy_1ui( store->Index, tmp->Index.data, count );
tmp->Index.data = store->Index;
tmp->Index.start = store->Index;
- if (ctx->Eval.Map1Index && any_eval1)
+ if (ctx->Eval.Map1Index && any_eval1)
eval1_1ui( &tmp->Index, coord, flags, &ctx->EvalMap.Map1Index );
if (ctx->Eval.Map2Index && any_eval2)
@@ -487,11 +487,11 @@ void _tnl_eval_vb( GLcontext *ctx,
if (req & VERT_TEX(0))
{
- if (!all_eval)
+ if (!all_eval)
copy_4f( store->TexCoord, tmp->TexCoord[0].data, count );
- else
+ else
tmp->TexCoord[0].size = 0;
-
+
tmp->TexCoord[0].data = store->TexCoord;
tmp->TexCoord[0].start = (GLfloat *)store->TexCoord;
@@ -507,7 +507,7 @@ void _tnl_eval_vb( GLcontext *ctx,
else if (ctx->Eval.Map1TextureCoord2) {
eval1_4f( &tmp->TexCoord[0], coord, flags, 2,
&ctx->EvalMap.Map1Texture2 );
- }
+ }
else if (ctx->Eval.Map1TextureCoord1) {
eval1_4f( &tmp->TexCoord[0], coord, flags, 1,
&ctx->EvalMap.Map1Texture1 );
@@ -520,7 +520,7 @@ void _tnl_eval_vb( GLcontext *ctx,
&ctx->EvalMap.Map2Texture4 );
}
else if (ctx->Eval.Map2TextureCoord3) {
- eval2_4f( &tmp->TexCoord[0], coord, flags, 3,
+ eval2_4f( &tmp->TexCoord[0], coord, flags, 3,
&ctx->EvalMap.Map2Texture3 );
}
else if (ctx->Eval.Map2TextureCoord2) {
@@ -569,7 +569,7 @@ void _tnl_eval_vb( GLcontext *ctx,
if (any_eval1) {
if (ctx->Eval.Map1Vertex4) {
- eval1_4f( &tmp->Obj, coord, flags, 4,
+ eval1_4f( &tmp->Obj, coord, flags, 4,
&ctx->EvalMap.Map1Vertex4 );
}
else if (ctx->Eval.Map1Vertex3) {
@@ -581,16 +581,16 @@ void _tnl_eval_vb( GLcontext *ctx,
if (any_eval2) {
if (ctx->Eval.Map2Vertex4)
{
- if (ctx->Eval.AutoNormal && (req & VERT_NORM))
- eval2_obj_norm( &tmp->Obj, &tmp->Normal, coord, flags, 4,
+ if (ctx->Eval.AutoNormal && (req & VERT_NORM))
+ eval2_obj_norm( &tmp->Obj, &tmp->Normal, coord, flags, 4,
&ctx->EvalMap.Map2Vertex4 );
else
- eval2_4f( &tmp->Obj, coord, flags, 4,
+ eval2_4f( &tmp->Obj, coord, flags, 4,
&ctx->EvalMap.Map2Vertex4 );
}
else if (ctx->Eval.Map2Vertex3)
{
- if (ctx->Eval.AutoNormal && (req & VERT_NORM))
+ if (ctx->Eval.AutoNormal && (req & VERT_NORM))
eval2_obj_norm( &tmp->Obj, &tmp->Normal, coord, flags, 3,
&ctx->EvalMap.Map2Vertex3 );
else
@@ -605,7 +605,7 @@ void _tnl_eval_vb( GLcontext *ctx,
GLuint i;
copy_1ui( store->Flag, flags, count );
tnl->vb.Flag = store->Flag;
-
+
/* This is overkill, but correct as fixup will have copied the
* values to all vertices in the VB - we may be falsely stating
* that some repeated values are new, but doing so is fairly
@@ -615,10 +615,3 @@ void _tnl_eval_vb( GLcontext *ctx,
store->Flag[i] |= req;
}
}
-
-
-
-
-
-
-
diff --git a/src/mesa/tnl/t_imm_eval.h b/src/mesa/tnl/t_imm_eval.h
index 06a91e0cd5b..951a93d896d 100644
--- a/src/mesa/tnl/t_imm_eval.h
+++ b/src/mesa/tnl/t_imm_eval.h
@@ -1,10 +1,10 @@
-/* $Id: t_imm_eval.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
+/* $Id: t_imm_eval.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index ff8cc00989d..888d8c34c33 100644
--- a/src/mesa/tnl/t_imm_exec.c
+++ b/src/mesa/tnl/t_imm_exec.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.c,v 1.15 2001/03/08 15:23:47 brianp Exp $ */
+/* $Id: t_imm_exec.c,v 1.16 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -24,7 +24,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <[email protected]>
+ * Keith Whitwell <[email protected]>
*/
@@ -59,9 +59,9 @@
/* Called to initialize new buffers, and to recycle old ones.
*/
-void _tnl_reset_input( GLcontext *ctx,
+void _tnl_reset_input( GLcontext *ctx,
GLuint start,
- GLuint beginstate,
+ GLuint beginstate,
GLuint savedbeginstate )
{
struct immediate *IM = TNL_CURRENT_IM(ctx);
@@ -74,7 +74,7 @@ void _tnl_reset_input( GLcontext *ctx,
IM->CopyStart = IM->Start = IM->Count = start;
IM->Primitive[IM->Start] = (ctx->Driver.CurrentExecPrimitive | PRIM_LAST);
IM->LastPrimitive = IM->Start;
- IM->BeginState = beginstate;
+ IM->BeginState = beginstate;
IM->SavedBeginState = savedbeginstate;
IM->TexSize = 0;
IM->LastMaterial = 0;
@@ -95,9 +95,9 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM,
if (MESA_VERBOSE&VERBOSE_IMMEDIATE)
_tnl_print_vert_flags("copy to current", flag);
- if (flag & VERT_NORM)
- COPY_3FV( ctx->Current.Normal, IM->Normal[count]);
-
+ if (flag & VERT_NORM)
+ COPY_3FV( ctx->Current.Normal, IM->Normal[count]);
+
if (flag & VERT_INDEX)
ctx->Current.Index = IM->Index[count];
@@ -128,10 +128,10 @@ void _tnl_copy_to_current( GLcontext *ctx, struct immediate *IM,
}
if (flag & VERT_MATERIAL) {
- _mesa_update_material( ctx,
- IM->Material[IM->LastMaterial],
+ _mesa_update_material( ctx,
+ IM->Material[IM->LastMaterial],
IM->MaterialOrMask );
-
+
_mesa_validate_all_lighting_tables( ctx );
}
}
@@ -159,7 +159,7 @@ void _tnl_compute_orflag( struct immediate *IM )
* calls like 'glNormal', 'glMaterial' that occur after the final
* glVertex, glEval, etc. Additionally, a buffer can consist of
* eg. a single glMaterial call, in which case IM->Start ==
- * IM->Count, but the buffer is definitely not empty.
+ * IM->Count, but the buffer is definitely not empty.
*/
if (IM->Flag[i] & VERT_DATA) {
IM->LastData++;
@@ -178,7 +178,7 @@ void _tnl_compute_orflag( struct immediate *IM )
/* Note: The 'start' member of the GLvector structs is now redundant
* because we always re-transform copied vertices, and the vectors
* below are set up so that the first copied vertex (if any) appears
- * at position zero.
+ * at position zero.
*/
static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
{
@@ -188,7 +188,7 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
GLuint inputs = tnl->pipeline.inputs; /* for copy-to-current */
GLuint start = IM->CopyStart;
GLuint count = IM->Count - start;
-
+
/* TODO: optimize the case where nothing has changed. (Just bind
* tmp to vb).
*/
@@ -233,10 +233,10 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
tmp->Obj.data = IM->Obj + start;
tmp->Obj.start = (GLfloat *)(IM->Obj + start);
tmp->Obj.count = count;
- VB->ObjPtr = &tmp->Obj;
- if ((IM->CopyOrFlag & VERT_OBJ_234) == VERT_OBJ_234)
+ VB->ObjPtr = &tmp->Obj;
+ if ((IM->CopyOrFlag & VERT_OBJ_234) == VERT_OBJ_234)
tmp->Obj.size = 4;
- else if ((IM->CopyOrFlag & VERT_OBJ_234) == VERT_OBJ_23)
+ else if ((IM->CopyOrFlag & VERT_OBJ_234) == VERT_OBJ_23)
tmp->Obj.size = 3;
else
tmp->Obj.size = 2;
@@ -292,7 +292,7 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
tmp->TexCoord[i].size = 2;
if (IM->TexSize & TEX_SIZE_3(i)) {
tmp->TexCoord[i].size = 3;
- if (IM->TexSize & TEX_SIZE_4(i))
+ if (IM->TexSize & TEX_SIZE_4(i))
tmp->TexCoord[i].size = 4;
}
VB->TexCoordPtr[i] = &tmp->TexCoord[i];
@@ -303,7 +303,7 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM )
if ((inputs & VERT_MATERIAL) && IM->Material) {
VB->MaterialMask = IM->MaterialMask + start;
VB->Material = IM->Material + start;
- }
+ }
}
@@ -317,27 +317,27 @@ void _tnl_run_cassette( GLcontext *ctx, struct immediate *IM )
_tnl_vb_bind_immediate( ctx, IM );
- if (IM->CopyOrFlag & VERT_EVAL_ANY)
- _tnl_eval_vb( ctx,
- IM->Obj + IM->CopyStart,
- IM->CopyOrFlag,
+ if (IM->CopyOrFlag & VERT_EVAL_ANY)
+ _tnl_eval_vb( ctx,
+ IM->Obj + IM->CopyStart,
+ IM->CopyOrFlag,
IM->CopyAndFlag );
-
+
/* Invalidate all stored data before and after run:
*/
tnl->pipeline.run_input_changes |= tnl->pipeline.inputs;
- _tnl_run_pipeline( ctx );
+ _tnl_run_pipeline( ctx );
tnl->pipeline.run_input_changes |= tnl->pipeline.inputs;
- _tnl_copy_to_current( ctx, IM, IM->OrFlag );
+ _tnl_copy_to_current( ctx, IM, IM->OrFlag );
}
/* Called for pure, locked VERT_ELT cassettes instead of
- * _tnl_run_cassette.
+ * _tnl_run_cassette.
*/
static void exec_elt_cassette( GLcontext *ctx, struct immediate *IM )
{
@@ -359,14 +359,14 @@ static void exec_elt_cassette( GLcontext *ctx, struct immediate *IM )
* TODO: delay this until FlushVertices
*/
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1) {
- _tnl_translate_array_elts( ctx, IM, IM->LastData, IM->LastData );
+ _tnl_translate_array_elts( ctx, IM, IM->LastData, IM->LastData );
_tnl_copy_to_current( ctx, IM, ctx->Array._Enabled );
}
}
-/* Called for regular vertex cassettes.
+/* Called for regular vertex cassettes.
*/
static void exec_vert_cassette( GLcontext *ctx, struct immediate *IM )
{
@@ -374,7 +374,7 @@ static void exec_vert_cassette( GLcontext *ctx, struct immediate *IM )
GLuint andflag = ~0;
GLuint i;
GLuint start = IM->FlushElt ? IM->LastPrimitive : IM->CopyStart;
- _tnl_translate_array_elts( ctx, IM, start, IM->Count );
+ _tnl_translate_array_elts( ctx, IM, start, IM->Count );
/* Need to recompute andflag.
*/
@@ -389,7 +389,7 @@ static void exec_vert_cassette( GLcontext *ctx, struct immediate *IM )
_tnl_fixup_input( ctx, IM );
/* _tnl_print_cassette( IM ); */
- _tnl_run_cassette( ctx, IM );
+ _tnl_run_cassette( ctx, IM );
}
@@ -414,14 +414,14 @@ void _tnl_execute_cassette( GLcontext *ctx, struct immediate *IM )
_tnl_validate_pipeline( ctx );
_tnl_get_exec_copy_verts( ctx, IM );
-
+
if (IM->CopyStart == IM->Count) {
- if (IM->OrFlag & VERT_ELT)
- _tnl_translate_array_elts( ctx, IM, IM->CopyStart, IM->CopyStart );
+ if (IM->OrFlag & VERT_ELT)
+ _tnl_translate_array_elts( ctx, IM, IM->CopyStart, IM->CopyStart );
_tnl_copy_to_current( ctx, IM, IM->OrFlag );
}
- else if ((IM->OrFlag & VERT_DATA) == VERT_ELT &&
+ else if ((IM->OrFlag & VERT_DATA) == VERT_ELT &&
ctx->Array.LockCount &&
ctx->Array.Vertex.Enabled) {
exec_elt_cassette( ctx, IM );
@@ -430,13 +430,13 @@ void _tnl_execute_cassette( GLcontext *ctx, struct immediate *IM )
exec_vert_cassette( ctx, IM );
}
- _tnl_reset_input( ctx,
+ _tnl_reset_input( ctx,
IMM_MAX_COPIED_VERTS,
- IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1),
- IM->SavedBeginState );
+ IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1),
+ IM->SavedBeginState );
/* Copy vertices and primitive information to immediate before it
- * can be overwritten.
+ * can be overwritten.
*/
_tnl_copy_immediate_vertices( ctx, IM );
@@ -479,7 +479,7 @@ void _tnl_imm_init( GLcontext *ctx )
_mesa_vector1ui_init( &tmp->Index, 0, 0 );
_mesa_vector1ub_init( &tmp->EdgeFlag, 0, 0 );
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
_mesa_vector4f_init( &tmp->TexCoord[i], 0, 0);
/* Install the first immediate. Intially outside begin/end.
@@ -493,7 +493,7 @@ void _tnl_imm_init( GLcontext *ctx )
void _tnl_imm_destroy( GLcontext *ctx )
{
- if (TNL_CURRENT_IM(ctx))
+ if (TNL_CURRENT_IM(ctx))
_tnl_free_immediate( TNL_CURRENT_IM(ctx) );
}
diff --git a/src/mesa/tnl/t_imm_exec.h b/src/mesa/tnl/t_imm_exec.h
index ab5fa292d71..8cdede46f01 100644
--- a/src/mesa/tnl/t_imm_exec.h
+++ b/src/mesa/tnl/t_imm_exec.h
@@ -1,10 +1,10 @@
-/* $Id: t_imm_exec.h,v 1.3 2001/02/15 01:33:52 keithw Exp $ */
+/* $Id: t_imm_exec.h,v 1.4 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -52,9 +52,9 @@ extern void _tnl_imm_init( GLcontext *ctx );
extern void _tnl_imm_destroy( GLcontext *ctx );
-extern void _tnl_reset_input( GLcontext *ctx,
+extern void _tnl_reset_input( GLcontext *ctx,
GLuint start,
- GLuint beginstate,
+ GLuint beginstate,
GLuint savedbeginstate );
extern void _tnl_compute_orflag( struct immediate *IM );
diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c
index 7827941d23d..fd7f4b1231d 100644
--- a/src/mesa/tnl/t_imm_fixup.c
+++ b/src/mesa/tnl/t_imm_fixup.c
@@ -1,10 +1,10 @@
-/* $Id: t_imm_fixup.c,v 1.8 2001/03/03 20:33:31 brianp Exp $ */
+/* $Id: t_imm_fixup.c,v 1.9 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -26,7 +26,7 @@
/*
* Authors:
- * Keith Whitwell <[email protected]>
+ * Keith Whitwell <[email protected]>
*/
@@ -226,7 +226,7 @@ void _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
fixup = ~andflag & VERT_FIXUP;
- if (!ctx->CompileFlag)
+ if (!ctx->CompileFlag)
fixup &= tnl->pipeline.inputs;
if (!ctx->ExecuteFlag)
@@ -238,7 +238,7 @@ void _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
if (fixup) {
GLuint copy = fixup & ~IM->Flag[start];
-
+
/* Equivalent to a lazy copy-from-current when setting up the
* immediate.
*/
@@ -261,7 +261,7 @@ void _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
if (copy & VERT_INDEX)
IM->Index[start] = ctx->Current.Index;
-
+
if (copy & VERT_EDGE)
IM->EdgeFlag[start] = ctx->Current.EdgeFlag;
@@ -281,7 +281,7 @@ void _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
GLuint i;
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
if (fixup & VERT_TEX(i)) {
- if (orflag & VERT_TEX(i))
+ if (orflag & VERT_TEX(i))
fixup_4f( IM->TexCoord[i], IM->Flag, start, VERT_TEX(i) );
else
fixup_first_4f( IM->TexCoord[i], IM->Flag, VERT_END_VB, start,
@@ -356,7 +356,7 @@ static void copy_material( struct immediate *next,
IMM_SIZE * 2 );
next->MaterialMask = (GLuint *) MALLOC( sizeof(GLuint) * IMM_SIZE );
}
-
+
next->MaterialMask[dst] = prev->MaterialMask[src];
MEMCPY(next->Material[dst], prev->Material[src], 2*sizeof(GLmaterial));
}
@@ -370,7 +370,7 @@ static void copy_material( struct immediate *next,
* primitives.
*
* Have to be careful with the transitions between display list
- * replay, compile and normal execute modes.
+ * replay, compile and normal execute modes.
*/
static void copy_vertices( GLcontext *ctx,
struct immediate *next,
@@ -382,7 +382,7 @@ static void copy_vertices( GLcontext *ctx,
GLuint offset = IMM_MAX_COPIED_VERTS - count;
GLuint i;
- next->CopyStart = next->Start - count;
+ next->CopyStart = next->Start - count;
/* Copy the vertices
*/
@@ -392,7 +392,7 @@ static void copy_vertices( GLcontext *ctx,
GLuint dst = next->CopyStart+i;
COPY_4FV( next->Obj[dst], prev->Obj[src] );
- COPY_3FV( next->Normal[dst], prev->Normal[src] );
+ COPY_3FV( next->Normal[dst], prev->Normal[src] );
COPY_CHAN4( next->Color[dst], prev->Color[src] );
if (prev->OrFlag & VERT_TEX_ANY) {
@@ -415,13 +415,13 @@ static void copy_vertices( GLcontext *ctx,
next->CopyOrFlag |= prev->Flag[src]; /* redundant for current_im */
next->CopyAndFlag &= prev->Flag[src]; /* redundant for current_im */
}
-
+
ASSERT(prev == tnl->ExecCopySource);
if (--tnl->ExecCopySource->ref_count == 0)
_tnl_free_immediate( tnl->ExecCopySource );
-
+
next->ref_count++;
tnl->ExecCopySource = next;
@@ -442,16 +442,16 @@ void _tnl_copy_immediate_vertices( GLcontext *ctx, struct immediate *IM )
/* Need to push this in now as it won't be computed anywhere else/
*/
IM->TexSize = tnl->ExecCopyTexSize;
-
+
/* A wrapped primitive. We may be copying into a revived
* display list immediate, or onto the front of a new execute-mode
* immediate.
*/
- copy_vertices( ctx, IM,
- tnl->ExecCopySource,
+ copy_vertices( ctx, IM,
+ tnl->ExecCopySource,
tnl->ExecCopyCount,
tnl->ExecCopyElts );
-
+
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1) {
/* Immediates are built by default to be correct in this state,
* and copying to the first slots of an immediate doesn't remove
@@ -462,14 +462,14 @@ void _tnl_copy_immediate_vertices( GLcontext *ctx, struct immediate *IM )
ASSERT(IM->CopyStart == IM->Start);
}
- /* Copy the primitive information:
+ /* Copy the primitive information:
*/
IM->Primitive[IM->CopyStart] = (ctx->Driver.CurrentExecPrimitive | PRIM_LAST);
IM->LastPrimitive = IM->CopyStart;
if (tnl->ExecParity)
IM->Primitive[IM->CopyStart] |= PRIM_PARITY;
}
-
+
/* Revive a compiled immediate struct - propogate new 'Current'
* values. Often this is redundant because the current values were
@@ -489,8 +489,8 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
IM->CopyAndFlag = IM->AndFlag; /* redundant for current_im */
IM->CopyTexSize = IM->TexSize | tnl->ExecCopyTexSize;
- copy_vertices( ctx, IM,
- tnl->ExecCopySource,
+ copy_vertices( ctx, IM,
+ tnl->ExecCopySource,
tnl->ExecCopyCount,
tnl->ExecCopyElts );
@@ -540,7 +540,7 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
/* Can potentially overwrite primitive details - need to save the
- * first slot:
+ * first slot:
*/
tnl->DlistPrimitive = IM->Primitive[IM->Start];
tnl->DlistPrimitiveLength = IM->PrimitiveLength[IM->Start];
@@ -554,15 +554,15 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1) {
GLuint i;
- if (IM->BeginState & VERT_ERROR_1)
+ if (IM->BeginState & VERT_ERROR_1)
_mesa_error( ctx, GL_INVALID_OPERATION, "glBegin/glEnd");
for (i = IM->Start ; i <= IM->Count ; i += IM->PrimitiveLength[i])
- if (IM->Flag[i] & (VERT_BEGIN|VERT_END_VB))
+ if (IM->Flag[i] & (VERT_BEGIN|VERT_END_VB))
break;
/* Would like to just ignore vertices upto this point. Can't
- * set copystart because it might skip materials?
+ * set copystart because it might skip materials?
*/
ASSERT(IM->Start == IM->CopyStart);
if (i > IM->CopyStart) {
@@ -578,25 +578,25 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
} else {
GLuint i;
- if (IM->BeginState & VERT_ERROR_0)
+ if (IM->BeginState & VERT_ERROR_0)
_mesa_error( ctx, GL_INVALID_OPERATION, "glBegin/glEnd");
-
+
if (IM->CopyStart == IM->Start &&
IM->Flag[IM->Start] & (VERT_END|VERT_END_VB))
{
}
- else
+ else
{
IM->Primitive[IM->CopyStart] = ctx->Driver.CurrentExecPrimitive;
- if (tnl->ExecParity)
- IM->Primitive[IM->CopyStart] |= PRIM_PARITY;
-
-
+ if (tnl->ExecParity)
+ IM->Primitive[IM->CopyStart] |= PRIM_PARITY;
+
+
for (i = IM->Start ; i <= IM->Count ; i += IM->PrimitiveLength[i])
if (IM->Flag[i] & (VERT_END|VERT_END_VB)) {
IM->PrimitiveLength[IM->CopyStart] = i - IM->CopyStart;
if (IM->Flag[i] & VERT_END_VB) {
- IM->Primitive[IM->CopyStart] |= PRIM_LAST;
+ IM->Primitive[IM->CopyStart] |= PRIM_LAST;
IM->LastPrimitive = IM->CopyStart;
}
if (IM->Flag[i] & VERT_END) {
@@ -610,7 +610,7 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
if (IM->Primitive[IM->LastPrimitive] & PRIM_END)
ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
else
- ctx->Driver.CurrentExecPrimitive =
+ ctx->Driver.CurrentExecPrimitive =
IM->Primitive[IM->LastPrimitive] & PRIM_MODE_MASK;
}
@@ -626,9 +626,9 @@ void _tnl_restore_compiled_cassette( GLcontext *ctx, struct immediate *IM )
}
-
-
+
+
static void copy_none( TNLcontext *tnl, GLuint start, GLuint count, GLuint ovf)
{
@@ -694,7 +694,7 @@ static copy_func copy_tab[GL_POLYGON+2] =
-/* Figure out what vertices need to be copied next time.
+/* Figure out what vertices need to be copied next time.
*/
void
_tnl_get_exec_copy_verts( GLcontext *ctx, struct immediate *IM )
@@ -708,7 +708,7 @@ _tnl_get_exec_copy_verts( GLcontext *ctx, struct immediate *IM )
GLuint pincr = increment[prim];
GLuint pintro = intro[prim];
GLuint ovf = 0;
-
+
if (tnl->ExecCopySource != IM) {
if (--tnl->ExecCopySource->ref_count == 0)
@@ -728,7 +728,7 @@ _tnl_get_exec_copy_verts( GLcontext *ctx, struct immediate *IM )
if (pincr != 1 && (IM->Count - last - pintro))
ovf = (IM->Count - last - pintro) % pincr;
-
+
if (last < IM->Count)
copy_tab[prim]( tnl, last, IM->Count, ovf );
}
@@ -743,7 +743,7 @@ _tnl_get_exec_copy_verts( GLcontext *ctx, struct immediate *IM )
* etc.
*
* Generate the index list that will be used to render this immediate
- * struct.
+ * struct.
*
* Finally, generate a new primitives list for rendering the indices.
*/
@@ -759,16 +759,16 @@ void _tnl_fixup_purged_eval( GLcontext *ctx,
GLuint good_index = (VERT_EVAL_ANY & ~purge)|VERT_OBJ;
GLuint prim_length = 0, lastprim = 0, nextprim = 0;
- if (fixup & VERT_TEX0)
+ if (fixup & VERT_TEX0)
fixup_4f( store->TexCoord, flags, 0, VERT_TEX0|fixup_fence );
- if (fixup & VERT_INDEX)
+ if (fixup & VERT_INDEX)
fixup_1ui( store->Index, flags, 0, VERT_INDEX|fixup_fence );
- if (fixup & VERT_RGBA)
+ if (fixup & VERT_RGBA)
fixup_4chan( store->Color, flags, 0, VERT_RGBA|fixup_fence );
- if (fixup & VERT_NORM)
+ if (fixup & VERT_NORM)
fixup_3f( store->Normal, flags, 0, VERT_NORM|fixup_fence );
for (i = 0, j = 0 ; i < tnl->vb.Count ; i++) {
@@ -784,7 +784,7 @@ void _tnl_fixup_purged_eval( GLcontext *ctx,
lastprimlen = VB->PrimitiveLength[i];
}
}
-
+
VB->Elts = store->Elts;
/* What about copying??? No immediate exists with the right
diff --git a/src/mesa/tnl/t_imm_fixup.h b/src/mesa/tnl/t_imm_fixup.h
index a6740a2a55b..6cf1e3bfd13 100644
--- a/src/mesa/tnl/t_imm_fixup.h
+++ b/src/mesa/tnl/t_imm_fixup.h
@@ -1,10 +1,10 @@
-/* $Id: t_imm_fixup.h,v 1.1 2000/12/26 05:09:33 keithw Exp $ */
+/* $Id: t_imm_fixup.h,v 1.2 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -35,10 +35,10 @@
extern void _tnl_fixup_input( GLcontext *ctx, struct immediate *IM );
-extern void _tnl_fixup_compiled_cassette( GLcontext *ctx,
+extern void _tnl_fixup_compiled_cassette( GLcontext *ctx,
struct immediate *IM );
-extern void _tnl_restore_compiled_cassette( GLcontext *ctx,
+extern void _tnl_restore_compiled_cassette( GLcontext *ctx,
struct immediate *IM );
diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c
index f1c5a255a5d..0d43a1fbcab 100644
--- a/src/mesa/tnl/t_pipeline.c
+++ b/src/mesa/tnl/t_pipeline.c
@@ -1,10 +1,10 @@
-/* $Id: t_pipeline.c,v 1.13 2001/02/16 00:35:35 keithw Exp $ */
+/* $Id: t_pipeline.c,v 1.14 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,8 +23,8 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
- * Keith Whitwell <[email protected]>
+ * Authors:
+ * Keith Whitwell <[email protected]>
*/
#include "glheader.h"
@@ -41,7 +41,7 @@
#include "t_pipeline.h"
-void _tnl_install_pipeline( GLcontext *ctx,
+void _tnl_install_pipeline( GLcontext *ctx,
const struct gl_pipeline_stage **stages )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -71,7 +71,7 @@ void _tnl_destroy_pipeline( GLcontext *ctx )
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint i;
- for (i = 0 ; i < tnl->pipeline.nr_stages ; i++)
+ for (i = 0 ; i < tnl->pipeline.nr_stages ; i++)
tnl->pipeline.stages[i].destroy( &tnl->pipeline.stages[i] );
tnl->pipeline.nr_stages = 0;
@@ -95,22 +95,22 @@ void _tnl_validate_pipeline( GLcontext *ctx )
for (i = pipe->nr_stages+1 ; --i ; s++) {
s->changed_inputs |= s->inputs & changed_inputs;
-
- if (s->check_state & newstate) {
+
+ if (s->check_state & newstate) {
if (s->active) {
GLuint old_outputs = s->outputs;
s->check(ctx, s);
if (!s->active)
changed_inputs |= old_outputs;
}
- else
+ else
s->check(ctx, s);
}
if (s->active) {
pipe->inputs |= s->inputs & ~generated;
generated |= s->outputs;
- }
+ }
}
}
@@ -136,10 +136,10 @@ void _tnl_run_pipeline( GLcontext *ctx )
ctx->Driver.PipelineStart( ctx );
/* If something changes in the pipeline, tag all subsequent stages
- * using this value for recalculation.
+ * using this value for recalculation.
*
* Even inactive stages have their state and inputs examined to try
- * to keep cached data alive over state-changes.
+ * to keep cached data alive over state-changes.
*/
for (i = pipe->nr_stages+1 ; --i ; s++) {
s->changed_inputs |= s->inputs & changed_inputs;
@@ -151,7 +151,7 @@ void _tnl_run_pipeline( GLcontext *ctx )
if (s->active) {
if (running) {
- if (s->changed_inputs)
+ if (s->changed_inputs)
changed_inputs |= s->outputs;
/* fprintf(stderr, "run %s\n", s->name); */
@@ -174,9 +174,9 @@ void _tnl_run_pipeline( GLcontext *ctx )
* simple hardware rasterizers. For customization, I don't recommend
* tampering with the internals of these stages in the way that
* drivers did in Mesa 3.4. These stages are basically black boxes,
- * and should be left intact.
+ * and should be left intact.
*
- * To customize the pipeline, consider:
+ * To customize the pipeline, consider:
*
* - removing redundant stages (making sure that the software rasterizer
* can cope with this on fallback paths). An example is fog
@@ -199,17 +199,16 @@ void _tnl_run_pipeline( GLcontext *ctx )
* pipeline by returning GL_FALSE from run(), or do nothing).
*
* Some work can be done to lift some of the restrictions in the final
- * case, if it becomes necessary to do so.
+ * case, if it becomes necessary to do so.
*/
const struct gl_pipeline_stage *_tnl_default_pipeline[] = {
- &_tnl_vertex_transform_stage,
- &_tnl_normal_transform_stage,
- &_tnl_lighting_stage,
- &_tnl_fog_coordinate_stage,
- &_tnl_texgen_stage,
- &_tnl_texture_transform_stage,
- &_tnl_point_attenuation_stage,
+ &_tnl_vertex_transform_stage,
+ &_tnl_normal_transform_stage,
+ &_tnl_lighting_stage,
+ &_tnl_fog_coordinate_stage,
+ &_tnl_texgen_stage,
+ &_tnl_texture_transform_stage,
+ &_tnl_point_attenuation_stage,
&_tnl_render_stage,
0
};
-
diff --git a/src/mesa/tnl/t_pipeline.h b/src/mesa/tnl/t_pipeline.h
index 8c996da89ef..60b349d0e01 100644
--- a/src/mesa/tnl/t_pipeline.h
+++ b/src/mesa/tnl/t_pipeline.h
@@ -1,10 +1,10 @@
-/* $Id: t_pipeline.h,v 1.6 2001/02/16 00:35:35 keithw Exp $ */
+/* $Id: t_pipeline.h,v 1.7 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,8 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- *
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -42,19 +41,19 @@ extern void _tnl_validate_pipeline( GLcontext *ctx );
extern void _tnl_destroy_pipeline( GLcontext *ctx );
-extern void _tnl_install_pipeline( GLcontext *ctx,
+extern void _tnl_install_pipeline( GLcontext *ctx,
const struct gl_pipeline_stage **stages );
/* These are implemented in the t_vb_*.c files:
*/
-extern const struct gl_pipeline_stage _tnl_vertex_transform_stage;
-extern const struct gl_pipeline_stage _tnl_normal_transform_stage;
-extern const struct gl_pipeline_stage _tnl_lighting_stage;
-extern const struct gl_pipeline_stage _tnl_fog_coordinate_stage;
-extern const struct gl_pipeline_stage _tnl_texgen_stage;
-extern const struct gl_pipeline_stage _tnl_texture_transform_stage;
-extern const struct gl_pipeline_stage _tnl_point_attenuation_stage;
+extern const struct gl_pipeline_stage _tnl_vertex_transform_stage;
+extern const struct gl_pipeline_stage _tnl_normal_transform_stage;
+extern const struct gl_pipeline_stage _tnl_lighting_stage;
+extern const struct gl_pipeline_stage _tnl_fog_coordinate_stage;
+extern const struct gl_pipeline_stage _tnl_texgen_stage;
+extern const struct gl_pipeline_stage _tnl_texture_transform_stage;
+extern const struct gl_pipeline_stage _tnl_point_attenuation_stage;
extern const struct gl_pipeline_stage _tnl_render_stage;
/* Shorthand to plug in the default pipeline:
diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h
index 59dc0b2fec1..371563a6b02 100644
--- a/src/mesa/tnl/t_vb_cliptmp.h
+++ b/src/mesa/tnl/t_vb_cliptmp.h
@@ -1,21 +1,21 @@
-/* $Id: t_vb_cliptmp.h,v 1.8 2001/01/29 20:47:39 keithw Exp $ */
+/* $Id: t_vb_cliptmp.h,v 1.9 2001/03/12 00:48:43 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -159,7 +159,7 @@ static __inline void TAG(clip_line)( GLcontext *ctx,
/* Clip a triangle against the viewport and user clip planes.
*/
-static __inline void TAG(clip_tri)( GLcontext *ctx,
+static __inline void TAG(clip_tri)( GLcontext *ctx,
GLuint v0, GLuint v1, GLuint v2,
GLubyte mask )
{
@@ -211,7 +211,7 @@ static __inline void TAG(clip_tri)( GLcontext *ctx,
/* Clip a quad against the viewport and user clip planes.
*/
-static __inline void TAG(clip_quad)( GLcontext *ctx,
+static __inline void TAG(clip_quad)( GLcontext *ctx,
GLuint v0, GLuint v1, GLuint v2, GLuint v3,
GLubyte mask )
{
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c
index c39806d6af0..0cffbbb0d15 100644
--- a/src/mesa/tnl/t_vb_fog.c
+++ b/src/mesa/tnl/t_vb_fog.c
@@ -1,10 +1,10 @@
-/* $Id: t_vb_fog.c,v 1.7 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_vb_fog.c,v 1.8 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -85,14 +85,14 @@ static void init_static_data( void )
}
-static void make_win_fog_coords( GLcontext *ctx, GLvector1f *out,
+static void make_win_fog_coords( GLcontext *ctx, GLvector1f *out,
const GLvector1f *in )
{
GLfloat end = ctx->Fog.End;
GLfloat *v = in->start;
GLuint stride = in->stride;
GLuint n = in->count;
- GLfloat *data = out->data;
+ GLfloat *data = out->data;
GLfloat d;
GLuint i;
@@ -111,7 +111,7 @@ static void make_win_fog_coords( GLcontext *ctx, GLvector1f *out,
break;
case GL_EXP:
d = ctx->Fog.Density;
- for ( i = 0 ; i < n ; i++, STRIDE_F(v,stride))
+ for ( i = 0 ; i < n ; i++, STRIDE_F(v,stride))
NEG_EXP( data[i], d*ABSF(*v) );
break;
case GL_EXP2:
@@ -128,7 +128,7 @@ static void make_win_fog_coords( GLcontext *ctx, GLvector1f *out,
}
-static GLboolean run_fog_stage( GLcontext *ctx,
+static GLboolean run_fog_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
@@ -144,7 +144,7 @@ static GLboolean run_fog_stage( GLcontext *ctx,
if (!ctx->_NeedEyeCoords) {
GLfloat *m = ctx->ModelView.m;
GLfloat plane[4];
-
+
/* Use this to store calculated eye z values:
*/
input = &store->fogcoord;
@@ -194,7 +194,7 @@ static void check_fog_stage( GLcontext *ctx, struct gl_pipeline_stage *stage )
/* Called the first time stage->run() is invoked.
*/
-static GLboolean alloc_fog_data( GLcontext *ctx,
+static GLboolean alloc_fog_data( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -228,11 +228,11 @@ static void free_fog_data( struct gl_pipeline_stage *stage )
}
-const struct gl_pipeline_stage _tnl_fog_coordinate_stage =
-{
+const struct gl_pipeline_stage _tnl_fog_coordinate_stage =
+{
"build fog coordinates",
_NEW_FOG,
- _NEW_FOG,
+ _NEW_FOG,
0, 0, VERT_FOG_COORD, /* active, inputs, outputs */
0, 0, /* changed_inputs, private_data */
free_fog_data, /* dtr */
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c
index d7d1d26ca44..4fbe52fe47e 100644
--- a/src/mesa/tnl/t_vb_light.c
+++ b/src/mesa/tnl/t_vb_light.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_light.c,v 1.11 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_vb_light.c,v 1.12 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -141,10 +141,10 @@ static GLboolean run_lighting( GLcontext *ctx, struct gl_pipeline_stage *stage )
_mesa_vector4f_clean_elem(input, VB->Count, 2);
}
}
-
+
if (VB->Flag)
ind = LIGHT_FLAGS;
- else
+ else
ind = 0;
/* The individual tabs know about replaying side-effects vs. full
@@ -158,19 +158,19 @@ static GLboolean run_lighting( GLcontext *ctx, struct gl_pipeline_stage *stage )
/* Called in place of do_lighting when the light table may have changed.
*/
-static GLboolean run_validate_lighting( GLcontext *ctx,
+static GLboolean run_validate_lighting( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
GLuint ind = 0;
- light_func *tab;
-
+ light_func *tab;
+
if (ctx->Visual.rgbMode) {
if (ctx->Light._NeedVertices) {
if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)
tab = _tnl_light_spec_tab;
else
- tab = _tnl_light_tab;
- }
+ tab = _tnl_light_tab;
+ }
else {
if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev)
tab = _tnl_light_fast_single_tab;
@@ -183,7 +183,7 @@ static GLboolean run_validate_lighting( GLcontext *ctx,
if (ctx->Light.ColorMaterialEnabled)
ind |= LIGHT_COLORMATERIAL;
-
+
if (ctx->Light.Model.TwoSide)
ind |= LIGHT_TWOSIDE;
@@ -202,7 +202,7 @@ static GLboolean run_validate_lighting( GLcontext *ctx,
/* Called the first time stage->run is called. In effect, don't
* allocate data until the first time the stage is run.
*/
-static GLboolean run_init_lighting( GLcontext *ctx,
+static GLboolean run_init_lighting( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -244,9 +244,9 @@ static void check_lighting( GLcontext *ctx, struct gl_pipeline_stage *stage )
if (stage->privatePtr)
stage->run = run_validate_lighting;
stage->inputs = VERT_NORM|VERT_MATERIAL;
- if (ctx->Light._NeedVertices)
+ if (ctx->Light._NeedVertices)
stage->inputs |= VERT_EYE; /* effectively, even when lighting in obj */
- if (ctx->Light.ColorMaterialEnabled)
+ if (ctx->Light.ColorMaterialEnabled)
stage->inputs |= VERT_RGBA;
stage->outputs = VERT_RGBA;
@@ -261,19 +261,19 @@ static void dtr( struct gl_pipeline_stage *stage )
struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
if (store) {
- _mesa_vector4chan_free( &store->LitColor[0] );
- _mesa_vector4chan_free( &store->LitColor[1] );
- _mesa_vector4chan_free( &store->LitSecondary[0] );
- _mesa_vector4chan_free( &store->LitSecondary[1] );
- _mesa_vector1ui_free( &store->LitIndex[0] );
- _mesa_vector1ui_free( &store->LitIndex[1] );
+ _mesa_vector4chan_free( &store->LitColor[0] );
+ _mesa_vector4chan_free( &store->LitColor[1] );
+ _mesa_vector4chan_free( &store->LitSecondary[0] );
+ _mesa_vector4chan_free( &store->LitSecondary[1] );
+ _mesa_vector1ui_free( &store->LitIndex[0] );
+ _mesa_vector1ui_free( &store->LitIndex[1] );
FREE( store );
stage->privatePtr = 0;
}
}
-const struct gl_pipeline_stage _tnl_lighting_stage =
-{
+const struct gl_pipeline_stage _tnl_lighting_stage =
+{
"lighting",
_NEW_LIGHT, /* recheck */
_NEW_LIGHT|_NEW_MODELVIEW, /* recalc -- modelview dependency
@@ -285,4 +285,3 @@ const struct gl_pipeline_stage _tnl_lighting_stage =
check_lighting, /* check */
run_init_lighting /* run -- initially set to ctr */
};
-
diff --git a/src/mesa/tnl/t_vb_lighttmp.h b/src/mesa/tnl/t_vb_lighttmp.h
index 370061512f1..7b9a1ba404f 100644
--- a/src/mesa/tnl/t_vb_lighttmp.h
+++ b/src/mesa/tnl/t_vb_lighttmp.h
@@ -1,21 +1,21 @@
-/* $Id: t_vb_lighttmp.h,v 1.9 2001/03/03 20:33:31 brianp Exp $ */
+/* $Id: t_vb_lighttmp.h,v 1.10 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* 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
@@ -56,7 +56,7 @@
# define VSTRIDE vstride
# define NSTRIDE nstride
# define CHECK_MATERIAL(x) 0 /* no materials on array paths */
-# define CHECK_END_VB(XX) (XX >= nr)
+# define CHECK_END_VB(XX) (XX >= nr)
# if (IDX & LIGHT_COLORMATERIAL)
# define CMSTRIDE STRIDE_4CHAN(CMcolor, CMstride)
# define CHECK_COLOR_MATERIAL(x) (x < nr) /* always have colormaterial */
@@ -81,7 +81,7 @@
-static void TAG(light_rgba_spec)( GLcontext *ctx,
+static void TAG(light_rgba_spec)( GLcontext *ctx,
struct vertex_buffer *VB,
struct gl_pipeline_stage *stage,
GLvector4f *input )
@@ -94,7 +94,7 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
GLuint vstride = input->stride;
const GLfloat *vertex = (GLfloat *)input->data;
- GLuint nstride = VB->NormalPtr->stride;
+ GLuint nstride = VB->NormalPtr->stride;
const GLfloat *normal = (GLfloat *)VB->NormalPtr->data;
GLchan (*CMcolor)[4];
@@ -111,7 +111,7 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
GLuint *new_material_mask = VB->MaterialMask;
(void) flags;
- (void) nstride;
+ (void) nstride;
(void) vstride;
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
@@ -134,14 +134,14 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
if (stage->changed_inputs == 0)
return;
- for ( j=0 ;
- j<nr ;
- j++,STRIDE_F(vertex,VSTRIDE),STRIDE_F(normal,NSTRIDE),CMSTRIDE)
+ for ( j=0 ;
+ j<nr ;
+ j++,STRIDE_F(vertex,VSTRIDE),STRIDE_F(normal,NSTRIDE),CMSTRIDE)
{
GLfloat sum[2][3], spec[2][3];
struct gl_light *light;
-
- if ( CHECK_COLOR_MATERIAL(j) )
+
+ if ( CHECK_COLOR_MATERIAL(j) )
_mesa_update_color_material( ctx, CMcolor[j] );
if ( CHECK_MATERIAL(j) )
@@ -157,12 +157,12 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
COPY_3V(sum[1], base[1]);
ZERO_3V(spec[1]);
}
-
+
/* Add contribution from each enabled light source */
foreach (light, &ctx->Light.EnabledList) {
GLfloat n_dot_h;
GLfloat correction;
- GLint side;
+ GLint side;
GLfloat contrib[3];
GLfloat attenuation;
GLfloat VP[3]; /* unit vector from vertex to light */
@@ -186,15 +186,15 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
GLfloat invd = 1.0F / d;
SELF_SCALE_SCALAR_3V(VP, invd);
}
-
- attenuation = 1.0F / (light->ConstantAttenuation + d *
- (light->LinearAttenuation + d *
+
+ attenuation = 1.0F / (light->ConstantAttenuation + d *
+ (light->LinearAttenuation + d *
light->QuadraticAttenuation));
/* spotlight attenuation */
if (light->_Flags & LIGHT_SPOT) {
GLfloat PV_dot_dir = - DOT3(VP, light->_NormDirection);
-
+
if (PV_dot_dir<light->_CosCutoff) {
continue; /* this light makes no contribution */
}
@@ -209,7 +209,7 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
}
- if (attenuation < 1e-3)
+ if (attenuation < 1e-3)
continue; /* this light makes no contribution */
/* Compute dot product or normal and vector from V to light pos */
@@ -228,10 +228,10 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
else {
if (IDX & LIGHT_TWOSIDE) {
ACC_SCALE_SCALAR_3V( sum[1], attenuation, light->_MatAmbient[1]);
- }
+ }
side = 0;
correction = 1;
- }
+ }
/* diffuse term */
COPY_3V(contrib, light->_MatAmbient[side]);
@@ -255,7 +255,7 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
else {
h = light->_h_inf_norm;
}
-
+
n_dot_h = correction * DOT3(normal, h);
if (n_dot_h > 0.0F) {
@@ -274,17 +274,17 @@ static void TAG(light_rgba_spec)( GLcontext *ctx,
UNCLAMPED_FLOAT_TO_RGB_CHAN( Fcolor[j], sum[0] );
UNCLAMPED_FLOAT_TO_RGB_CHAN( Fspec[j], spec[0] );
Fcolor[j][3] = sumA[0];
-
+
if (IDX & LIGHT_TWOSIDE) {
UNCLAMPED_FLOAT_TO_RGB_CHAN( Bcolor[j], sum[1] );
UNCLAMPED_FLOAT_TO_RGB_CHAN( Bspec[j], spec[1] );
Bcolor[j][3] = sumA[1];
}
- }
+ }
}
-static void TAG(light_rgba)( GLcontext *ctx,
+static void TAG(light_rgba)( GLcontext *ctx,
struct vertex_buffer *VB,
struct gl_pipeline_stage *stage,
GLvector4f *input )
@@ -297,7 +297,7 @@ static void TAG(light_rgba)( GLcontext *ctx,
GLuint vstride = input->stride;
const GLfloat *vertex = (GLfloat *) input->data;
- GLuint nstride = VB->NormalPtr->stride;
+ GLuint nstride = VB->NormalPtr->stride;
const GLfloat *normal = (GLfloat *)VB->NormalPtr->data;
GLchan (*CMcolor)[4];
@@ -313,7 +313,7 @@ static void TAG(light_rgba)( GLcontext *ctx,
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
(void) flags;
- (void) nstride;
+ (void) nstride;
(void) vstride;
if (IDX & LIGHT_COLORMATERIAL) {
@@ -328,16 +328,16 @@ static void TAG(light_rgba)( GLcontext *ctx,
if (stage->changed_inputs == 0)
return;
- for ( j=0 ;
- j<nr ;
- j++,STRIDE_F(vertex,VSTRIDE), STRIDE_F(normal,NSTRIDE),CMSTRIDE)
+ for ( j=0 ;
+ j<nr ;
+ j++,STRIDE_F(vertex,VSTRIDE), STRIDE_F(normal,NSTRIDE),CMSTRIDE)
{
GLfloat sum[2][3];
struct gl_light *light;
- if ( CHECK_COLOR_MATERIAL(j) )
+ if ( CHECK_COLOR_MATERIAL(j) )
_mesa_update_color_material( ctx, (GLchan *)CMcolor[j] );
-
+
if ( CHECK_MATERIAL(j) )
_mesa_update_material( ctx, new_material[j], new_material_mask[j] );
@@ -345,16 +345,16 @@ static void TAG(light_rgba)( GLcontext *ctx,
_mesa_validate_all_lighting_tables( ctx );
COPY_3V(sum[0], base[0]);
-
- if ( IDX & LIGHT_TWOSIDE )
+
+ if ( IDX & LIGHT_TWOSIDE )
COPY_3V(sum[1], base[1]);
-
+
/* Add contribution from each enabled light source */
foreach (light, &ctx->Light.EnabledList) {
GLfloat n_dot_h;
GLfloat correction;
- GLint side;
+ GLint side;
GLfloat contrib[3];
GLfloat attenuation = 1.0;
GLfloat VP[3]; /* unit vector from vertex to light */
@@ -380,8 +380,8 @@ static void TAG(light_rgba)( GLcontext *ctx,
SELF_SCALE_SCALAR_3V(VP, invd);
}
- attenuation = 1.0F / (light->ConstantAttenuation + d *
- (light->LinearAttenuation + d *
+ attenuation = 1.0F / (light->ConstantAttenuation + d *
+ (light->LinearAttenuation + d *
light->QuadraticAttenuation));
/* spotlight attenuation */
@@ -401,8 +401,8 @@ static void TAG(light_rgba)( GLcontext *ctx,
}
}
-
- if (attenuation < 1e-3)
+
+ if (attenuation < 1e-3)
continue; /* this light makes no contribution */
@@ -414,7 +414,7 @@ static void TAG(light_rgba)( GLcontext *ctx,
ACC_SCALE_SCALAR_3V(sum[0], attenuation, light->_MatAmbient[0]);
if (!(IDX & LIGHT_TWOSIDE))
- continue;
+ continue;
side = 1;
correction = -1;
@@ -423,11 +423,11 @@ static void TAG(light_rgba)( GLcontext *ctx,
else {
if (IDX & LIGHT_TWOSIDE) {
ACC_SCALE_SCALAR_3V( sum[1], attenuation, light->_MatAmbient[1]);
- }
+ }
side = 0;
correction = 1;
- }
-
+ }
+
COPY_3V(contrib, light->_MatAmbient[side]);
/* diffuse term */
@@ -451,14 +451,14 @@ static void TAG(light_rgba)( GLcontext *ctx,
else {
h = light->_h_inf_norm;
}
-
+
n_dot_h = correction * DOT3(normal, h);
- if (n_dot_h > 0.0F)
+ if (n_dot_h > 0.0F)
{
GLfloat spec_coef;
struct gl_shine_tab *tab = ctx->_ShineTable[side];
-
+
GET_SHINE_TAB_ENTRY( tab, n_dot_h, spec_coef );
ACC_SCALE_SCALAR_3V( contrib, spec_coef,
@@ -467,7 +467,7 @@ static void TAG(light_rgba)( GLcontext *ctx,
}
ACC_SCALE_SCALAR_3V( sum[side], attenuation, contrib );
- }
+ }
UNCLAMPED_FLOAT_TO_RGB_CHAN( Fcolor[j], sum[0] );
Fcolor[j][3] = sumA[0];
@@ -476,7 +476,7 @@ static void TAG(light_rgba)( GLcontext *ctx,
UNCLAMPED_FLOAT_TO_RGB_CHAN( Bcolor[j], sum[1] );
Bcolor[j][3] = sumA[1];
}
- }
+ }
}
@@ -484,14 +484,14 @@ static void TAG(light_rgba)( GLcontext *ctx,
/* As below, but with just a single light.
*/
-static void TAG(light_fast_rgba_single)( GLcontext *ctx,
+static void TAG(light_fast_rgba_single)( GLcontext *ctx,
struct vertex_buffer *VB,
struct gl_pipeline_stage *stage,
GLvector4f *input )
{
struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
- GLuint nstride = VB->NormalPtr->stride;
+ GLuint nstride = VB->NormalPtr->stride;
const GLfloat *normal = (GLfloat *)VB->NormalPtr->data;
GLchan (*CMcolor)[4];
GLuint CMstride;
@@ -510,7 +510,7 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
(void) input; /* doesn't refer to Eye or Obj */
(void) flags;
(void) nr;
- (void) nstride;
+ (void) nstride;
if (IDX & LIGHT_COLORMATERIAL) {
CMcolor = VB->ColorPtr[0]->data;
@@ -526,10 +526,10 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
do {
- if ( CHECK_COLOR_MATERIAL(j) )
+ if ( CHECK_COLOR_MATERIAL(j) )
_mesa_update_color_material( ctx, (GLchan *)CMcolor[j] );
-
- if ( CHECK_MATERIAL(j) )
+
+ if ( CHECK_MATERIAL(j) )
_mesa_update_material( ctx, new_material[j], new_material_mask[j] );
if ( CHECK_VALIDATE(j) )
@@ -544,7 +544,7 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
COPY_3V(base[0], light->_MatAmbient[0]);
ACC_3V(base[0], ctx->Light._BaseColor[0] );
UNCLAMPED_FLOAT_TO_RGB_CHAN( baseubyte[0], base[0] );
-
+
if (IDX & LIGHT_TWOSIDE) {
COPY_3V(base[1], light->_MatAmbient[1]);
ACC_3V(base[1], ctx->Light._BaseColor[1]);
@@ -552,9 +552,9 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
}
}
- do {
+ do {
GLfloat n_dot_VP = DOT3(normal, light->_VP_inf_norm);
-
+
COPY_CHAN4(Fcolor[j], baseubyte[0]);
if (IDX & LIGHT_TWOSIDE) COPY_CHAN4(Bcolor[j], baseubyte[1]);
@@ -568,7 +568,7 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
GLfloat spec;
GET_SHINE_TAB_ENTRY( ctx->_ShineTable[1], n_dot_h, spec );
ACC_SCALE_SCALAR_3V(sum, spec, light->_MatSpecular[1]);
- }
+ }
UNCLAMPED_FLOAT_TO_RGB_CHAN(Bcolor[j], sum );
}
} else {
@@ -577,7 +577,7 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
COPY_3V(sum, base[0]);
ACC_SCALE_SCALAR_3V(sum, n_dot_VP, light->_MatDiffuse[0]);
if (n_dot_h > 0.0F) {
- GLfloat spec;
+ GLfloat spec;
GET_SHINE_TAB_ENTRY( ctx->_ShineTable[0], n_dot_h, spec );
ACC_SCALE_SCALAR_3V(sum, spec, light->_MatSpecular[0]);
@@ -589,28 +589,28 @@ static void TAG(light_fast_rgba_single)( GLcontext *ctx,
STRIDE_F(normal, NSTRIDE);
} while (DO_ANOTHER_NORMAL(j));
-
+
for ( ; REUSE_LIGHT_RESULTS(j) ; j++ ) {
COPY_CHAN4(Fcolor[j], Fcolor[j-1]);
- if (IDX & LIGHT_TWOSIDE)
+ if (IDX & LIGHT_TWOSIDE)
COPY_CHAN4(Bcolor[j], Bcolor[j-1]);
STRIDE_F(normal, NSTRIDE);
}
} while (!CHECK_END_VB(j));
-}
+}
/* Light infinite lights
*/
-static void TAG(light_fast_rgba)( GLcontext *ctx,
+static void TAG(light_fast_rgba)( GLcontext *ctx,
struct vertex_buffer *VB,
struct gl_pipeline_stage *stage,
GLvector4f *input )
{
struct light_stage_data *store = LIGHT_STAGE_DATA(stage);
const GLchan *sumA = ctx->Light._BaseAlpha;
- GLuint nstride = VB->NormalPtr->stride;
+ GLuint nstride = VB->NormalPtr->stride;
const GLfloat *normal = (GLfloat *)VB->NormalPtr->data;
GLchan (*CMcolor)[4];
GLuint CMstride;
@@ -627,7 +627,7 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
(void) flags;
(void) input;
(void) nr;
- (void) nstride;
+ (void) nstride;
if (IDX & LIGHT_COLORMATERIAL) {
CMcolor = VB->ColorPtr[0]->data;
@@ -645,10 +645,10 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
do {
GLfloat sum[2][3];
- if ( CHECK_COLOR_MATERIAL(j) )
+ if ( CHECK_COLOR_MATERIAL(j) )
_mesa_update_color_material( ctx, CMcolor[j] );
- if ( CHECK_MATERIAL(j) )
+ if ( CHECK_MATERIAL(j) )
_mesa_update_material( ctx, new_material[j], new_material_mask[j] );
if ( CHECK_VALIDATE(j) )
@@ -656,14 +656,14 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
COPY_3V(sum[0], ctx->Light._BaseColor[0]);
- if (IDX & LIGHT_TWOSIDE)
+ if (IDX & LIGHT_TWOSIDE)
COPY_3V(sum[1], ctx->Light._BaseColor[1]);
foreach (light, &ctx->Light.EnabledList) {
GLfloat n_dot_h, n_dot_VP, spec;
ACC_3V(sum[0], light->_MatAmbient[0]);
- if (IDX & LIGHT_TWOSIDE)
+ if (IDX & LIGHT_TWOSIDE)
ACC_3V(sum[1], light->_MatAmbient[1]);
n_dot_VP = DOT3(normal, light->_VP_inf_norm);
@@ -674,9 +674,9 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
if (n_dot_h > 0.0F) {
struct gl_shine_tab *tab = ctx->_ShineTable[0];
GET_SHINE_TAB_ENTRY( tab, n_dot_h, spec );
- ACC_SCALE_SCALAR_3V( sum[0], spec,
+ ACC_SCALE_SCALAR_3V( sum[0], spec,
light->_MatSpecular[0]);
- }
+ }
}
else if (IDX & LIGHT_TWOSIDE) {
ACC_SCALE_SCALAR_3V(sum[1], -n_dot_VP, light->_MatDiffuse[1]);
@@ -684,15 +684,15 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
if (n_dot_h > 0.0F) {
struct gl_shine_tab *tab = ctx->_ShineTable[1];
GET_SHINE_TAB_ENTRY( tab, n_dot_h, spec );
- ACC_SCALE_SCALAR_3V( sum[1], spec,
+ ACC_SCALE_SCALAR_3V( sum[1], spec,
light->_MatSpecular[1]);
- }
+ }
}
}
UNCLAMPED_FLOAT_TO_RGB_CHAN( Fcolor[j], sum[0] );
Fcolor[j][3] = sumA[0];
-
+
if (IDX & LIGHT_TWOSIDE) {
UNCLAMPED_FLOAT_TO_RGB_CHAN( Bcolor[j], sum[1] );
Bcolor[j][3] = sumA[1];
@@ -713,7 +713,7 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
}
} while (!CHECK_END_VB(j));
-}
+}
@@ -728,7 +728,7 @@ static void TAG(light_fast_rgba)( GLcontext *ctx,
* normal - array of [n] surface normal vector
* Output: indexResult - resulting array of [n] color indexes
*/
-static void TAG(light_ci)( GLcontext *ctx,
+static void TAG(light_ci)( GLcontext *ctx,
struct vertex_buffer *VB,
struct gl_pipeline_stage *stage,
GLvector4f *input )
@@ -737,7 +737,7 @@ static void TAG(light_ci)( GLcontext *ctx,
GLuint j;
GLuint vstride = input->stride;
const GLfloat *vertex = (GLfloat *) input->data;
- GLuint nstride = VB->NormalPtr->stride;
+ GLuint nstride = VB->NormalPtr->stride;
const GLfloat *normal = (GLfloat *)VB->NormalPtr->data;
GLchan (*CMcolor)[4];
GLuint CMstride;
@@ -749,7 +749,7 @@ static void TAG(light_ci)( GLcontext *ctx,
/* fprintf(stderr, "%s\n", __FUNCTION__ ); */
(void) flags;
- (void) nstride;
+ (void) nstride;
(void) vstride;
VB->IndexPtr[0] = &store->LitIndex[0];
@@ -769,17 +769,17 @@ static void TAG(light_ci)( GLcontext *ctx,
}
/* loop over vertices */
- for ( j=0 ;
- j<nr ;
- j++,STRIDE_F(vertex,VSTRIDE),STRIDE_F(normal, NSTRIDE), CMSTRIDE)
+ for ( j=0 ;
+ j<nr ;
+ j++,STRIDE_F(vertex,VSTRIDE),STRIDE_F(normal, NSTRIDE), CMSTRIDE)
{
GLfloat diffuse[2], specular[2];
GLuint side = 0;
struct gl_light *light;
-
- if ( CHECK_COLOR_MATERIAL(j) )
+
+ if ( CHECK_COLOR_MATERIAL(j) )
_mesa_update_color_material( ctx, (GLchan *)CMcolor[j] );
-
+
if ( CHECK_MATERIAL(j) )
_mesa_update_material( ctx, new_material[j], new_material_mask[j] );
@@ -807,7 +807,7 @@ static void TAG(light_ci)( GLcontext *ctx,
}
else {
GLfloat d; /* distance from vertex to light */
-
+
SUB_3V(VP, light->_Position, vertex);
d = LEN_3FV( VP );
@@ -816,8 +816,8 @@ static void TAG(light_ci)( GLcontext *ctx,
SELF_SCALE_SCALAR_3V(VP, invd);
}
- attenuation = 1.0F / (light->ConstantAttenuation + d *
- (light->LinearAttenuation + d *
+ attenuation = 1.0F / (light->ConstantAttenuation + d *
+ (light->LinearAttenuation + d *
light->QuadraticAttenuation));
/* spotlight attenuation */
@@ -836,14 +836,14 @@ static void TAG(light_ci)( GLcontext *ctx,
}
}
- if (attenuation < 1e-3)
+ if (attenuation < 1e-3)
continue; /* this light makes no contribution */
n_dot_VP = DOT3( normal, VP );
/* which side are we lighting? */
if (n_dot_VP < 0.0F) {
- if (!(IDX & LIGHT_TWOSIDE))
+ if (!(IDX & LIGHT_TWOSIDE))
continue;
side = 1;
correction = -1;
@@ -894,7 +894,7 @@ static void TAG(light_ci)( GLcontext *ctx,
else {
GLfloat d_a = mat->DiffuseIndex - mat->AmbientIndex;
GLfloat s_a = mat->SpecularIndex - mat->AmbientIndex;
-
+
index = mat->AmbientIndex
+ diffuse[side] * (1.0F-specular[side]) * d_a
+ specular[side] * s_a;
@@ -921,7 +921,7 @@ static void TAG(init_light_tab)( void )
#undef TAG
-#undef IDX
+#undef IDX
#undef NR_SIDES
#undef NSTRIDE
#undef VSTRIDE
diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c
index 4f9503bed3d..93e3908c804 100644
--- a/src/mesa/tnl/t_vb_normals.c
+++ b/src/mesa/tnl/t_vb_normals.c
@@ -1,10 +1,10 @@
-/* $Id: t_vb_normals.c,v 1.6 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_vb_normals.c,v 1.7 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -44,7 +44,7 @@
struct normal_stage_data {
- normal_func *NormalTransform;
+ normal_func *NormalTransform;
GLvector3f normal;
};
@@ -53,7 +53,7 @@ struct normal_stage_data {
-static GLboolean run_normal_stage( GLcontext *ctx,
+static GLboolean run_normal_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
struct normal_stage_data *store = NORMAL_STAGE_DATA(stage);
@@ -65,7 +65,7 @@ static GLboolean run_normal_stage( GLcontext *ctx,
(store->NormalTransform[0])(&ctx->ModelView,
ctx->_ModelViewInvScale,
VB->NormalPtr,
- 0,
+ 0,
0,
&store->normal);
@@ -74,7 +74,7 @@ static GLboolean run_normal_stage( GLcontext *ctx,
}
-static GLboolean run_validate_normal_stage( GLcontext *ctx,
+static GLboolean run_validate_normal_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage)
{
struct normal_stage_data *store = NORMAL_STAGE_DATA(stage);
@@ -89,8 +89,8 @@ static GLboolean run_validate_normal_stage( GLcontext *ctx,
MAT_FLAG_GENERAL_3D |
MAT_FLAG_PERSPECTIVE))
transform = NORM_TRANSFORM;
-
-
+
+
if (ctx->Transform.Normalize) {
store->NormalTransform = _mesa_normal_tab[transform | NORM_NORMALIZE];
}
@@ -131,12 +131,12 @@ static void check_normal_transform( GLcontext *ctx,
stage->active = ctx->_NeedNormals;
/* Don't clobber the initialize function:
*/
- if (stage->privatePtr)
+ if (stage->privatePtr)
stage->run = run_validate_normal_stage;
}
-static GLboolean alloc_normal_data( GLcontext *ctx,
+static GLboolean alloc_normal_data( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -173,8 +173,8 @@ static void free_normal_data( struct gl_pipeline_stage *stage )
-const struct gl_pipeline_stage _tnl_normal_transform_stage =
-{
+const struct gl_pipeline_stage _tnl_normal_transform_stage =
+{
"normal transform",
_TNL_NEW_NORMAL_TRANSFORM, /* re-check */
_TNL_NEW_NORMAL_TRANSFORM, /* re-run */
@@ -184,4 +184,3 @@ const struct gl_pipeline_stage _tnl_normal_transform_stage =
check_normal_transform, /* check */
alloc_normal_data /* run -- initially set to alloc */
};
-
diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c
index a27e00257c1..2c35d436109 100644
--- a/src/mesa/tnl/t_vb_points.c
+++ b/src/mesa/tnl/t_vb_points.c
@@ -1,10 +1,10 @@
-/* $Id: t_vb_points.c,v 1.3 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_vb_points.c,v 1.4 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Brian Paul <[email protected]>
*/
@@ -34,7 +34,7 @@
struct point_stage_data {
- GLvector1f PointSize;
+ GLvector1f PointSize;
};
#define POINT_STAGE_DATA(stage) ((struct point_stage_data *)stage->privatePtr)
@@ -43,7 +43,7 @@ struct point_stage_data {
/*
* Compute attenuated point sizes
*/
-static GLboolean run_point_stage( GLcontext *ctx,
+static GLboolean run_point_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
struct point_stage_data *store = POINT_STAGE_DATA(stage);
@@ -66,7 +66,7 @@ static GLboolean run_point_stage( GLcontext *ctx,
}
VB->PointSizePtr = &store->PointSize;
-
+
return GL_TRUE;
}
@@ -108,8 +108,8 @@ static void free_point_data( struct gl_pipeline_stage *stage )
}
}
-const struct gl_pipeline_stage _tnl_point_attenuation_stage =
-{
+const struct gl_pipeline_stage _tnl_point_attenuation_stage =
+{
"point size attenuation", /* name */
_NEW_POINT, /* build_state_change */
_NEW_POINT, /* run_state_change */
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 25e03a8c4e8..03c8943de19 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_render.c,v 1.14 2001/02/16 18:14:42 keithw Exp $ */
+/* $Id: t_vb_render.c,v 1.15 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -40,9 +40,9 @@
* context->Driver.PointsFunc()
* context->Driver.LineFunc()
* context->Driver.TriangleFunc()
- * context->Driver.QuadFunc()
+ * context->Driver.QuadFunc()
*
- * context->Driver.RenderTabVerts[]
+ * context->Driver.RenderTabVerts[]
* context->Driver.RenderTabElts[]
*
* None of these may be null.
@@ -68,7 +68,7 @@
/**********************************************************************/
-#if defined(USE_IEEE)
+#if defined(USE_IEEE)
#define NEGATIVE(x) ((*(GLuint *)&x) & (1<<31))
#define DIFFERENT_SIGNS(x,y) (((*(GLuint *)&x)^(*(GLuint *)&y)) & (1<<31))
#else
@@ -200,7 +200,7 @@ static void clip_elt_triangles( GLcontext *ctx,
const GLuint * const elt = VB->Elts;
GLubyte *mask = VB->ClipMask;
(void) flags;
-
+
ctx->Driver.RenderPrimitive( ctx, GL_TRIANGLES );
for (j=start; j < last; j+=3 ) {
@@ -209,15 +209,15 @@ static void clip_elt_triangles( GLcontext *ctx,
GLubyte c3 = mask[elt[j+2]];
GLubyte ormask = c1|c2|c3;
if (ormask) {
- if (start < j)
+ if (start < j)
render_tris( ctx, start, j, 0 );
- if (!(c1&c2&c3&0x3f))
+ if (!(c1&c2&c3&0x3f))
clip_tri_4( ctx, elt[j], elt[j+1], elt[j+2], ormask );
start = j+3;
}
}
- if (start < j)
+ if (start < j)
render_tris( ctx, start, j, 0 );
}
@@ -258,7 +258,7 @@ static void clip_elt_triangles( GLcontext *ctx,
#define RESET_STIPPLE ctx->Driver.ResetLineStipple( ctx )
#define RESET_OCCLUSION ctx->OcclusionResult = GL_TRUE
#define INIT(x) ctx->Driver.RenderPrimitive( ctx, x )
-#define RENDER_TAB_QUALIFIER
+#define RENDER_TAB_QUALIFIER
#define PRESERVE_VB_DEFS
#include "t_vb_rendertmp.h"
@@ -282,7 +282,7 @@ static GLboolean run_render( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct vertex_buffer *VB = &tnl->vb;
+ struct vertex_buffer *VB = &tnl->vb;
GLuint new_inputs = stage->changed_inputs;
render_func *tab;
GLint pass = 0;
@@ -314,7 +314,7 @@ static GLboolean run_render( GLcontext *ctx,
}
else {
tab = VB->Elts ? ctx->Driver.RenderTabElts : ctx->Driver.RenderTabVerts;
- }
+ }
do
{
@@ -322,7 +322,7 @@ static GLboolean run_render( GLcontext *ctx,
for (i = 0 ; !(flags & PRIM_LAST) ; i += length)
{
flags = VB->Primitive[i];
- length= VB->PrimitiveLength[i];
+ length= VB->PrimitiveLength[i];
ASSERT(length || (flags & PRIM_LAST));
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
if (length)
@@ -344,7 +344,7 @@ static GLboolean run_render( GLcontext *ctx,
/* Quite a bit of work involved in finding out the inputs for the
- * render stage.
+ * render stage.
*/
static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
{
@@ -354,7 +354,7 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
if (ctx->Visual.rgbMode) {
inputs |= VERT_RGBA;
- if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR)
+ if (ctx->_TriangleCaps & DD_SEPERATE_SPECULAR)
inputs |= VERT_SPEC_RGB;
if (ctx->Texture._ReallyEnabled) {
@@ -368,18 +368,18 @@ static void check_render( GLcontext *ctx, struct gl_pipeline_stage *stage )
inputs |= VERT_INDEX;
}
- if (ctx->Point._Attenuated)
+ if (ctx->Point._Attenuated)
inputs |= VERT_POINT_SIZE;
/* How do drivers turn this off?
*/
- if (ctx->Fog.Enabled)
+ if (ctx->Fog.Enabled)
inputs |= VERT_FOG_COORD;
- if (ctx->_TriangleCaps & DD_TRI_UNFILLED)
+ if (ctx->_TriangleCaps & DD_TRI_UNFILLED)
inputs |= VERT_EDGE;
- if (ctx->RenderMode==GL_FEEDBACK)
+ if (ctx->RenderMode==GL_FEEDBACK)
inputs |= VERT_TEX_ANY;
stage->inputs = inputs;
@@ -393,8 +393,8 @@ static void dtr( struct gl_pipeline_stage *stage )
}
-const struct gl_pipeline_stage _tnl_render_stage =
-{
+const struct gl_pipeline_stage _tnl_render_stage =
+{
"render",
(_NEW_BUFFERS |
_DD_NEW_SEPERATE_SPECULAR |
diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h
index b6c2933ae85..7e9f6842c70 100644
--- a/src/mesa/tnl/t_vb_rendertmp.h
+++ b/src/mesa/tnl/t_vb_rendertmp.h
@@ -1,21 +1,21 @@
-/* $Id: t_vb_rendertmp.h,v 1.7 2001/01/16 05:29:43 keithw Exp $ */
+/* $Id: t_vb_rendertmp.h,v 1.8 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
- *
- * 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"),
* 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
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -33,13 +33,13 @@
#endif
#ifndef INIT
-#define INIT(x)
+#define INIT(x)
#endif
#ifndef NEED_EDGEFLAG_SETUP
#define NEED_EDGEFLAG_SETUP 0
#define EDGEFLAG_GET(a) 0
-#define EDGEFLAG_SET(a,b) (void)b
+#define EDGEFLAG_SET(a,b) (void)b
#endif
#ifndef RESET_STIPPLE
@@ -109,7 +109,7 @@ static void TAG(render_line_strip)( GLcontext *ctx,
RESET_OCCLUSION;
INIT(GL_LINE_STRIP);
- for (j=start+1; j<count; j++ )
+ for (j=start+1; j<count; j++ )
RENDER_LINE( ELT(j-1), ELT(j) );
if (TEST_PRIM_END(flags))
@@ -124,7 +124,7 @@ static void TAG(render_line_loop)( GLcontext *ctx,
GLuint count,
GLuint flags )
{
- GLuint i;
+ GLuint i;
LOCAL_VARS;
(void) flags;
@@ -186,10 +186,10 @@ static void TAG(render_tri_strip)( GLcontext *ctx,
GLuint j;
GLuint parity = 0;
LOCAL_VARS;
-
+
if (TEST_PRIM_PARITY(flags))
parity = 1;
-
+
INIT(GL_TRIANGLE_STRIP);
if (NEED_EDGEFLAG_SETUP) {
for (j=start+2;j<count;j++,parity^=1) {
@@ -273,13 +273,13 @@ static void TAG(render_poly)( GLcontext *ctx,
/* If the primitive does not begin here, the first edge
* is non-boundary.
*/
- if (!TEST_PRIM_BEGIN(flags))
+ if (!TEST_PRIM_BEGIN(flags))
EDGEFLAG_SET( ELT(start), GL_FALSE );
/* If the primitive does not end here, the final edge is
* non-boundary.
*/
- if (!TEST_PRIM_END(flags))
+ if (!TEST_PRIM_END(flags))
EDGEFLAG_SET( ELT(count-1), GL_FALSE );
/* Draw the first triangles (possibly zero)
@@ -290,7 +290,7 @@ static void TAG(render_poly)( GLcontext *ctx,
RENDER_TRI( ELT(j-1), ELT(j), ELT(start) );
EDGEFLAG_SET( ELT(j), ef );
j++;
-
+
/* Don't render the first edge again:
*/
EDGEFLAG_SET( ELT(start), GL_FALSE );
@@ -312,7 +312,7 @@ static void TAG(render_poly)( GLcontext *ctx,
*/
EDGEFLAG_SET( ELT(count-1), efcount );
EDGEFLAG_SET( ELT(start), efstart );
-
+
if (TEST_PRIM_END(flags)) {
RESET_STIPPLE;
}
@@ -348,7 +348,7 @@ static void TAG(render_quads)( GLcontext *ctx,
}
}
POSTFIX;
-}
+}
static void TAG(render_quad_strip)( GLcontext *ctx,
GLuint start,
@@ -399,7 +399,7 @@ static void TAG(render_noop)( GLcontext *ctx,
RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
GLuint,
GLuint,
- GLuint) =
+ GLuint) =
{
TAG(render_points),
TAG(render_lines),
@@ -436,4 +436,3 @@ RENDER_TAB_QUALIFIER void (*TAG(render_tab)[GL_POLYGON+2])(GLcontext *,
#undef PRESERVE_VB_DEFS
#undef PRESERVE_TAG
-
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index daded260d32..cbc7778ea9e 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -1,10 +1,10 @@
-/* $Id: t_vb_texgen.c,v 1.5 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_vb_texgen.c,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -89,10 +89,10 @@ static GLuint all_bits[5] = {
#define VEC_SIZE_FLAGS (VEC_SIZE_1|VEC_SIZE_2|VEC_SIZE_3|VEC_SIZE_4)
-/*
+/*
*/
static void build_m3(GLfloat f[][3], GLfloat m[],
- const GLvector3f *normal,
+ const GLvector3f *normal,
const GLvector4f *eye )
{
GLuint stride = eye->stride;
@@ -104,11 +104,11 @@ static void build_m3(GLfloat f[][3], GLfloat m[],
/* KW: Had to rearrange this loop to avoid a compiler bug with gcc
* 2.7.3.1 at -O3 optimization. Using -fno-strength-reduce
- * also fixed the bug - is this generally necessary?
+ * also fixed the bug - is this generally necessary?
*/
for (i=0;i<count;i++,STRIDE_F(coord,stride)) {
GLfloat u[3], two_nu, fx, fy, fz;
- COPY_3V( u, coord );
+ COPY_3V( u, coord );
NORMALIZE_3FV( u );
two_nu = 2.0F * DOT3(norm,u);
fx = f[i][0] = u[0] - norm[0] * two_nu;
@@ -126,7 +126,7 @@ static void build_m3(GLfloat f[][3], GLfloat m[],
static void build_m2(GLfloat f[][3], GLfloat m[],
- const GLvector3f *normal,
+ const GLvector3f *normal,
const GLvector4f *eye )
{
GLuint stride = eye->stride;
@@ -139,7 +139,7 @@ static void build_m2(GLfloat f[][3], GLfloat m[],
for (i=0;i<count;i++,STRIDE_F(coord,stride)) {
GLfloat u[3], two_nu, fx, fy, fz;
- COPY_2V( u, coord );
+ COPY_2V( u, coord );
u[2] = 0;
NORMALIZE_3FV( u );
two_nu = 2.0F * DOT3(norm,u);
@@ -175,9 +175,9 @@ static build_m_func build_m_tab[5] = {
/* This is unusual in that we respect the stride of the output vector
* (f). This allows us to pass in either a texcoord vector4f, or a
- * temporary vector3f.
+ * temporary vector3f.
*/
-static void build_f3( GLfloat *f,
+static void build_f3( GLfloat *f,
GLuint fstride,
const GLvector3f *normal,
const GLvector4f *eye )
@@ -191,20 +191,20 @@ static void build_f3( GLfloat *f,
for (i=0;i<count;i++) {
GLfloat u[3], two_nu;
- COPY_3V( u, coord );
+ COPY_3V( u, coord );
NORMALIZE_3FV( u );
two_nu = 2.0F * DOT3(norm,u);
f[0] = u[0] - norm[0] * two_nu;
f[1] = u[1] - norm[1] * two_nu;
f[2] = u[2] - norm[2] * two_nu;
STRIDE_F(coord,stride);
- STRIDE_F(f,fstride);
+ STRIDE_F(f,fstride);
STRIDE_F(norm, normal->stride);
}
}
-static void build_f2( GLfloat *f,
+static void build_f2( GLfloat *f,
GLuint fstride,
const GLvector3f *normal,
const GLvector4f *eye )
@@ -218,7 +218,7 @@ static void build_f2( GLfloat *f,
for (i=0;i<count;i++) {
GLfloat u[3], two_nu;
- COPY_2V( u, coord );
+ COPY_2V( u, coord );
u[2] = 0;
NORMALIZE_3FV( u );
two_nu = 2.0F * DOT3(norm,u);
@@ -239,14 +239,14 @@ typedef void (*build_f_func)( GLfloat *f,
-/* Just treat 4-vectors as 3-vectors.
+/* Just treat 4-vectors as 3-vectors.
*/
static build_f_func build_f_tab[5] = {
0,
0,
build_f2,
build_f3,
- build_f3
+ build_f3
};
@@ -262,22 +262,22 @@ static void texgen_reflection_map_nv( GLcontext *ctx,
build_f_tab[VB->EyePtr->size]( out->start,
out->stride,
- VB->NormalPtr,
- VB->EyePtr );
-
+ VB->NormalPtr,
+ VB->EyePtr );
+
if (in) {
out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_3;
out->count = in->count;
out->size = MAX2(in->size, 3);
- if (in->size == 4)
+ if (in->size == 4)
_mesa_copy_tab[0][0x8](out, in, 0);
- }
+ }
else {
out->flags |= VEC_SIZE_3;
out->size = 3;
out->count = in->count;
}
-
+
}
@@ -289,7 +289,7 @@ static void texgen_normal_map_nv( GLcontext *ctx,
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLvector4f *in = VB->TexCoordPtr[unit];
GLvector4f *out = &store->texcoord[unit];
- GLvector3f *normal = VB->NormalPtr;
+ GLvector3f *normal = VB->NormalPtr;
GLfloat (*texcoord)[4] = (GLfloat (*)[4])out->start;
GLuint count = VB->Count;
GLuint i;
@@ -306,9 +306,9 @@ static void texgen_normal_map_nv( GLcontext *ctx,
out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_3;
out->count = in->count;
out->size = MAX2(in->size, 3);
- if (in->size == 4)
+ if (in->size == 4)
_mesa_copy_tab[0][0x8](out, in, 0);
- }
+ }
else {
out->flags |= VEC_SIZE_3;
out->size = 3;
@@ -330,10 +330,10 @@ static void texgen_sphere_map( GLcontext *ctx,
GLfloat (*f)[3] = store->tmp_f;
GLfloat *m = store->tmp_m;
- (build_m_tab[VB->EyePtr->size])( store->tmp_f,
- store->tmp_m,
- VB->NormalPtr,
- VB->EyePtr );
+ (build_m_tab[VB->EyePtr->size])( store->tmp_f,
+ store->tmp_m,
+ VB->NormalPtr,
+ VB->EyePtr );
for (i=0;i<count;i++) {
texcoord[i][0] = f[i][0] * m[i] + 0.5F;
@@ -344,7 +344,7 @@ static void texgen_sphere_map( GLcontext *ctx,
out->size = MAX2(in->size,2);
out->count = in->count;
out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_2;
- if (in->size > 2)
+ if (in->size > 2)
_mesa_copy_tab[0][all_bits[in->size] & ~0x3](out, in, 0);
} else {
out->size = 2;
@@ -355,7 +355,7 @@ static void texgen_sphere_map( GLcontext *ctx,
-static void texgen( GLcontext *ctx,
+static void texgen( GLcontext *ctx,
struct texgen_stage_data *store,
GLuint unit )
{
@@ -376,9 +376,9 @@ static void texgen( GLcontext *ctx,
if (texUnit->_GenFlags & TEXGEN_NEED_M) {
- build_m_tab[in->size]( store->tmp_f, store->tmp_m, normal, eye );
+ build_m_tab[in->size]( store->tmp_f, store->tmp_m, normal, eye );
} else if (texUnit->_GenFlags & TEXGEN_NEED_F) {
- build_f_tab[in->size]( (GLfloat *)store->tmp_f, 3, normal, eye );
+ build_f_tab[in->size]( (GLfloat *)store->tmp_f, 3, normal, eye );
}
if (!in) {
@@ -399,7 +399,7 @@ static void texgen( GLcontext *ctx,
out->size = MAX2(in->size, store->TexgenSize[unit]);
out->flags |= (in->flags & VEC_SIZE_FLAGS) | texUnit->TexGenEnabled;
out->count = in->count;
-
+
holes = ~all_bits[in->size] & store->TexgenHoles[unit];
}
@@ -414,20 +414,20 @@ static void texgen( GLcontext *ctx,
switch (texUnit->GenModeS) {
case GL_OBJECT_LINEAR:
(_mesa_dotprod_tab[0][obj->size])((GLfloat *)out->data,
- sizeof(out->data[0]), obj,
+ sizeof(out->data[0]), obj,
texUnit->ObjectPlaneS, 0);
break;
case GL_EYE_LINEAR:
- (_mesa_dotprod_tab[0][eye->size])((GLfloat *)out->data,
+ (_mesa_dotprod_tab[0][eye->size])((GLfloat *)out->data,
sizeof(out->data[0]), eye,
texUnit->EyePlaneS, 0);
break;
- case GL_SPHERE_MAP:
+ case GL_SPHERE_MAP:
for (indata=in->start,i=0 ; i<count ;i++, STRIDE_F(indata,in->stride))
texcoord[i][0] = indata[0] * m[i] + 0.5F;
break;
- case GL_REFLECTION_MAP_NV:
- for (i=0;i<count;i++)
+ case GL_REFLECTION_MAP_NV:
+ for (i=0;i<count;i++)
texcoord[i][0] = f[i][0];
break;
case GL_NORMAL_MAP_NV: {
@@ -440,27 +440,27 @@ static void texgen( GLcontext *ctx,
default:
_mesa_problem(ctx, "Bad S texgen");
}
- }
+ }
if (texUnit->TexGenEnabled & T_BIT) {
GLuint i;
switch (texUnit->GenModeT) {
case GL_OBJECT_LINEAR:
- (_mesa_dotprod_tab[0][obj->size])(&(out->data[0][1]),
- sizeof(out->data[0]), obj,
+ (_mesa_dotprod_tab[0][obj->size])(&(out->data[0][1]),
+ sizeof(out->data[0]), obj,
texUnit->ObjectPlaneT, 0);
break;
case GL_EYE_LINEAR:
- (_mesa_dotprod_tab[0][eye->size])(&(out->data[0][1]),
- sizeof(out->data[0]), eye,
+ (_mesa_dotprod_tab[0][eye->size])(&(out->data[0][1]),
+ sizeof(out->data[0]), eye,
texUnit->EyePlaneT, 0);
- break;
- case GL_SPHERE_MAP:
- for (indata=in->start,i=0; i<count ;i++,STRIDE_F(indata,in->stride))
+ break;
+ case GL_SPHERE_MAP:
+ for (indata=in->start,i=0; i<count ;i++,STRIDE_F(indata,in->stride))
texcoord[i][1] = indata[1] * m[i] + 0.5F;
- break;
- case GL_REFLECTION_MAP_NV:
- for (i=0;i<count;i++)
+ break;
+ case GL_REFLECTION_MAP_NV:
+ for (i=0;i<count;i++)
texcoord[i][0] = f[i][0];
break;
case GL_NORMAL_MAP_NV: {
@@ -479,17 +479,17 @@ static void texgen( GLcontext *ctx,
GLuint i;
switch (texUnit->GenModeR) {
case GL_OBJECT_LINEAR:
- (_mesa_dotprod_tab[0][obj->size])(&(out->data[0][2]),
- sizeof(out->data[0]), obj,
+ (_mesa_dotprod_tab[0][obj->size])(&(out->data[0][2]),
+ sizeof(out->data[0]), obj,
texUnit->ObjectPlaneR, 0);
break;
case GL_EYE_LINEAR:
- (_mesa_dotprod_tab[0][eye->size])(&(out->data[0][2]),
+ (_mesa_dotprod_tab[0][eye->size])(&(out->data[0][2]),
sizeof(out->data[0]), eye,
texUnit->EyePlaneR, 0);
break;
- case GL_REFLECTION_MAP_NV:
- for (i=0;i<count;i++)
+ case GL_REFLECTION_MAP_NV:
+ for (i=0;i<count;i++)
texcoord[i][2] = f[i][2];
break;
case GL_NORMAL_MAP_NV: {
@@ -507,12 +507,12 @@ static void texgen( GLcontext *ctx,
if (texUnit->TexGenEnabled & Q_BIT) {
switch (texUnit->GenModeQ) {
case GL_OBJECT_LINEAR:
- (_mesa_dotprod_tab[0][obj->size])(&(out->data[0][3]),
- sizeof(out->data[0]), obj,
+ (_mesa_dotprod_tab[0][obj->size])(&(out->data[0][3]),
+ sizeof(out->data[0]), obj,
texUnit->ObjectPlaneQ, 0);
break;
case GL_EYE_LINEAR:
- (_mesa_dotprod_tab[0][eye->size])(&(out->data[0][3]),
+ (_mesa_dotprod_tab[0][eye->size])(&(out->data[0][3]),
sizeof(out->data[0]), eye,
texUnit->EyePlaneQ, 0);
break;
@@ -524,14 +524,14 @@ static void texgen( GLcontext *ctx,
-static GLboolean run_texgen_stage( GLcontext *ctx,
+static GLboolean run_texgen_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
- struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
+ struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct texgen_stage_data *store = TEXGEN_STAGE_DATA( stage );
GLuint i;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
if (ctx->_Enabled & ENABLE_TEXGEN(i)) {
if (stage->changed_inputs & (VERT_EYE | VERT_NORM | VERT_TEX(i)))
store->TexgenFunc[i]( ctx, store, i );
@@ -545,7 +545,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx,
-static GLboolean run_validate_texgen_stage( GLcontext *ctx,
+static GLboolean run_validate_texgen_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);
@@ -565,11 +565,11 @@ static GLboolean run_validate_texgen_stage( GLcontext *ctx,
sz = 2;
else
sz = 1;
-
+
store->TexgenSize[i] = sz;
store->TexgenHoles[i] = (all_bits[sz] & ~texUnit->TexGenEnabled);
store->TexgenFunc[i] = texgen;
-
+
if (texUnit->TexGenEnabled == (S_BIT|T_BIT|R_BIT)) {
if (texUnit->_GenFlags == TEXGEN_REFLECTION_MAP_NV) {
store->TexgenFunc[i] = texgen_reflection_map_nv;
@@ -605,8 +605,8 @@ static void check_texgen( GLcontext *ctx, struct gl_pipeline_stage *stage )
if (ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS)
inputs |= VERT_NORM;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
- if (ctx->_Enabled & ENABLE_TEXGEN(i))
+ for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ if (ctx->_Enabled & ENABLE_TEXGEN(i))
{
outputs |= VERT_TEX(i);
@@ -627,16 +627,16 @@ static void check_texgen( GLcontext *ctx, struct gl_pipeline_stage *stage )
stage->outputs = outputs;
}
}
-
+
/* Called the first time stage->run() is invoked.
*/
-static GLboolean alloc_texgen_data( GLcontext *ctx,
+static GLboolean alloc_texgen_data( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
- struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
+ struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct texgen_stage_data *store;
GLuint i;
@@ -666,10 +666,10 @@ static void free_texgen_data( struct gl_pipeline_stage *stage )
if (store) {
for (i = 0 ; i < MAX_TEXTURE_UNITS ; i++)
- if (store->texcoord[i].data)
+ if (store->texcoord[i].data)
_mesa_vector4f_free( &store->texcoord[i] );
-
+
if (store->tmp_f) FREE( store->tmp_f );
if (store->tmp_m) FREE( store->tmp_m );
FREE( store );
@@ -678,9 +678,9 @@ static void free_texgen_data( struct gl_pipeline_stage *stage )
}
-
-const struct gl_pipeline_stage _tnl_texgen_stage =
-{
+
+const struct gl_pipeline_stage _tnl_texgen_stage =
+{
"texgen",
_NEW_TEXTURE, /* when to call check() */
_NEW_TEXTURE, /* when to invalidate stored data */
@@ -690,5 +690,3 @@ const struct gl_pipeline_stage _tnl_texgen_stage =
check_texgen, /* check */
alloc_texgen_data /* run -- initially set to alloc data */
};
-
-
diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c
index 49fb2e1753e..6fd08d480bc 100644
--- a/src/mesa/tnl/t_vb_texmat.c
+++ b/src/mesa/tnl/t_vb_texmat.c
@@ -1,10 +1,10 @@
-/* $Id: t_vb_texmat.c,v 1.3 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_vb_texmat.c,v 1.4 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -44,7 +44,7 @@
/* Is there any real benefit seperating texmat from texgen? It means
* we need two lots of intermediate storage. Any changes to
* _NEW_TEXTURE will invalidate both sets -- it's only on changes to
- * *only* _NEW_TEXTURE_MATRIX that texgen survives but texmat doesn't.
+ * *only* _NEW_TEXTURE_MATRIX that texgen survives but texmat doesn't.
*
* However, the seperation of this code from the complex texgen stuff
* is very appealing.
@@ -63,27 +63,27 @@ static void check_texmat( GLcontext *ctx, struct gl_pipeline_stage *stage )
if (ctx->_Enabled & ENABLE_TEXMAT_ANY) {
GLuint flags = 0;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
- if (ctx->_Enabled & ENABLE_TEXMAT(i))
+ for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ if (ctx->_Enabled & ENABLE_TEXMAT(i))
flags |= VERT_TEX(i);
-
+
stage->active = 1;
stage->inputs = flags;
stage->outputs = flags;
}
}
-static GLboolean run_texmat_stage( GLcontext *ctx,
+static GLboolean run_texmat_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
struct texmat_stage_data *store = TEXMAT_STAGE_DATA(stage);
- struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
+ struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLuint i;
/* ENABLE_TEXMAT implies that the texture matrix is not the
* identity, so we don't have to check that here.
*/
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
if (ctx->_Enabled & ENABLE_TEXMAT(i)) {
if (stage->changed_inputs & VERT_TEX(i))
(void) TransformRaw( &store->texcoord[i], &ctx->TextureMatrix[i],
@@ -97,10 +97,10 @@ static GLboolean run_texmat_stage( GLcontext *ctx,
/* Called the first time stage->run() is invoked.
*/
-static GLboolean alloc_texmat_data( GLcontext *ctx,
+static GLboolean alloc_texmat_data( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
- struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
+ struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct texmat_stage_data *store;
GLuint i;
@@ -132,11 +132,11 @@ static void free_texmat_data( struct gl_pipeline_stage *stage )
stage->privatePtr = 0;
}
}
-
-const struct gl_pipeline_stage _tnl_texture_transform_stage =
-{
+
+const struct gl_pipeline_stage _tnl_texture_transform_stage =
+{
"texture transform",
_NEW_TEXTURE|_NEW_TEXTURE_MATRIX,
_NEW_TEXTURE|_NEW_TEXTURE_MATRIX,
diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c
index ad8a2a21d6e..ab08ac23c31 100644
--- a/src/mesa/tnl/t_vb_vertex.c
+++ b/src/mesa/tnl/t_vb_vertex.c
@@ -1,10 +1,10 @@
-/* $Id: t_vb_vertex.c,v 1.6 2001/03/07 05:06:13 brianp Exp $ */
+/* $Id: t_vb_vertex.c,v 1.7 2001/03/12 00:48:44 gareth Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),
@@ -23,7 +23,7 @@
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * Author:
+ * Authors:
* Keith Whitwell <[email protected]>
*/
@@ -46,7 +46,7 @@
struct vertex_stage_data {
GLvector4f eye;
GLvector4f clip;
- GLvector4f proj;
+ GLvector4f proj;
GLubyte *clipmask;
GLubyte ormask;
GLubyte andmask;
@@ -67,7 +67,7 @@ struct vertex_stage_data {
/* This function implements cliptesting for user-defined clip planes.
* The clipping of primitives to these planes is implemented in
- * t_render_clip.h.
+ * t_render_clip.h.
*/
#define USER_CLIPTEST(NAME, SZ) \
static void NAME( GLcontext *ctx, \
@@ -113,13 +113,13 @@ static void NAME( GLcontext *ctx, \
}
-USER_CLIPTEST(userclip2, 2)
-USER_CLIPTEST(userclip3, 3)
-USER_CLIPTEST(userclip4, 4)
+USER_CLIPTEST(userclip2, 2)
+USER_CLIPTEST(userclip3, 3)
+USER_CLIPTEST(userclip4, 4)
static void (*(usercliptab[5]))( GLcontext *,
GLvector4f *, GLubyte *,
- GLubyte *, GLubyte * ) =
+ GLubyte *, GLubyte * ) =
{
0,
0,
@@ -130,14 +130,14 @@ static void (*(usercliptab[5]))( GLcontext *,
-static GLboolean run_vertex_stage( GLcontext *ctx,
+static GLboolean run_vertex_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
struct vertex_stage_data *store = (struct vertex_stage_data *)stage->privatePtr;
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct vertex_buffer *VB = &tnl->vb;
-
- if (stage->changed_inputs)
+ TNLcontext *tnl = TNL_CONTEXT(ctx);
+ struct vertex_buffer *VB = &tnl->vb;
+
+ if (stage->changed_inputs)
{
/* VB->ObjPtr->size = 4; */
@@ -147,20 +147,20 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
if (ctx->ModelView.type == MATRIX_IDENTITY)
VB->EyePtr = VB->ObjPtr;
else
- VB->EyePtr = TransformRaw( &store->eye, &ctx->ModelView,
+ VB->EyePtr = TransformRaw( &store->eye, &ctx->ModelView,
VB->ObjPtr);
if (ctx->ProjectionMatrix.type == MATRIX_IDENTITY)
VB->ClipPtr = VB->EyePtr;
else
- VB->ClipPtr = TransformRaw( &store->clip, &ctx->ProjectionMatrix,
+ VB->ClipPtr = TransformRaw( &store->clip, &ctx->ProjectionMatrix,
VB->EyePtr );
- }
- else
+ }
+ else
{
/* Combined modelviewproject transform:
*/
- if (ctx->_ModelProjectMatrix.type == MATRIX_IDENTITY)
+ if (ctx->_ModelProjectMatrix.type == MATRIX_IDENTITY)
VB->ClipPtr = VB->ObjPtr;
else
VB->ClipPtr = TransformRaw( &store->clip, &ctx->_ModelProjectMatrix,
@@ -175,19 +175,19 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
VB->import_data( ctx, VERT_OBJ, VEC_NOT_WRITEABLE );
VB->ClipPtr = VB->ObjPtr;
}
- if (VB->ClipPtr->size == 2)
+ if (VB->ClipPtr->size == 2)
_mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 2 );
_mesa_vector4f_clean_elem( VB->ClipPtr, VB->Count, 3 );
}
/* Cliptest and perspective divide. Clip functions must clear
- * the clipmask.
+ * the clipmask.
*/
store->ormask = 0;
store->andmask = CLIP_ALL_BITS;
if (tnl->NeedProjCoords) {
- VB->ProjectedClipPtr =
+ VB->ProjectedClipPtr =
_mesa_clip_tab[VB->ClipPtr->size]( VB->ClipPtr,
&store->proj,
store->clipmask,
@@ -203,7 +203,7 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
&store->andmask );
}
- if (store->andmask)
+ if (store->andmask)
return GL_FALSE;
@@ -220,7 +220,7 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
if (store->andmask)
return GL_FALSE;
}
-
+
VB->ClipOrMask = store->ormask;
VB->ClipMask = store->clipmask;
@@ -230,9 +230,9 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
store->save_eyeptr = VB->EyePtr;
store->save_clipptr = VB->ClipPtr;
store->save_projptr = VB->ProjectedClipPtr;
- }
+ }
else {
- /* Replay the sideeffects.
+ /* Replay the sideeffects.
*/
VB->EyePtr = store->save_eyeptr;
VB->ClipPtr = store->save_clipptr;
@@ -251,14 +251,14 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
static void check_vertex( GLcontext *ctx, struct gl_pipeline_stage *stage )
{
- (void) ctx;
+ (void) ctx;
(void) stage;
}
-static GLboolean init_vertex_stage( GLcontext *ctx,
+static GLboolean init_vertex_stage( GLcontext *ctx,
struct gl_pipeline_stage *stage )
{
- struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
+ struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
struct vertex_stage_data *store;
GLuint size = VB->Size;
@@ -266,17 +266,17 @@ static GLboolean init_vertex_stage( GLcontext *ctx,
store = VERTEX_STAGE_DATA(stage);
if (!store)
return GL_FALSE;
-
+
_mesa_vector4f_alloc( &store->eye, 0, size, 32 );
_mesa_vector4f_alloc( &store->clip, 0, size, 32 );
- _mesa_vector4f_alloc( &store->proj, 0, size, 32 );
+ _mesa_vector4f_alloc( &store->proj, 0, size, 32 );
store->clipmask = (GLubyte *) ALIGN_MALLOC(sizeof(GLubyte)*size, 32 );
if (!store->clipmask ||
- !store->eye.data ||
- !store->clip.data ||
- !store->proj.data)
+ !store->eye.data ||
+ !store->clip.data ||
+ !store->proj.data)
return GL_FALSE;
/* Now run the stage.
@@ -301,8 +301,8 @@ static void dtr( struct gl_pipeline_stage *stage )
}
-const struct gl_pipeline_stage _tnl_vertex_transform_stage =
-{
+const struct gl_pipeline_stage _tnl_vertex_transform_stage =
+{
"modelview/project/cliptest/divide",
0, /* re-check -- always on */
_NEW_MODELVIEW|
@@ -316,5 +316,3 @@ const struct gl_pipeline_stage _tnl_vertex_transform_stage =
check_vertex, /* check */
init_vertex_stage /* run -- initially set to init */
};
-
-
diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h
index eb8e9054a9c..9ca530797e5 100644
--- a/src/mesa/tnl/tnl.h
+++ b/src/mesa/tnl/tnl.h
@@ -1,8 +1,10 @@
+/* $Id: tnl.h,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * 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"),