diff options
author | Brian Paul <[email protected]> | 2001-03-07 05:06:11 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2001-03-07 05:06:11 +0000 |
commit | b51b0a847d7e7daaea69f77ab569086ef81c24a2 (patch) | |
tree | 165cf8b023e6c7b1f66dacc46a6c37110ef27ea7 /src/mesa/tnl | |
parent | 249aebdd357d20f6326137c967c6b3923bef6c05 (diff) |
fixed a bunch of g++ warnings/errors. Compiling with g++ can help find lots of potential problems
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_array_api.c | 28 | ||||
-rw-r--r-- | src/mesa/tnl/t_array_import.c | 38 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.c | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.h | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_imm_alloc.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_fog.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_light.c | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_normals.c | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_points.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texgen.c | 10 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_texmat.c | 8 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_vertex.c | 10 |
12 files changed, 76 insertions, 70 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index 32dfcb0b8a9..cfc5e5debe9 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.8 2001/03/03 20:33:31 brianp Exp $ */ +/* $Id: t_array_api.c,v 1.9 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -56,10 +56,10 @@ static void fallback_drawarrays( GLcontext *ctx, GLenum mode, GLint start, */ #if 1 if (_tnl_hard_begin( ctx, mode )) { - GLuint j; + GLint j; for (j = 0 ; j < count ; ) { struct immediate *IM = TNL_CURRENT_IM(ctx); - GLuint nr = MIN2( IMM_MAXDATA - IM->Start, count - j ); + GLuint nr = MIN2( IMM_MAXDATA - IM->Start, (GLuint) (count - j) ); GLuint sf = IM->Flag[IM->Start]; _tnl_fill_immediate_drawarrays( ctx, IM, j, j+nr ); @@ -98,11 +98,11 @@ static void _tnl_draw_elements( GLcontext *ctx, GLenum mode, GLsizei count, * _tnl_array_element for each index in the list. */ if (_tnl_hard_begin( ctx, mode )) { - GLuint i,j; + GLint i, j; for (j = 0 ; j < count ; ) { struct immediate *IM = TNL_CURRENT_IM(ctx); GLuint start = IM->Start; - GLuint nr = MIN2( IMM_MAXDATA - start, count - j ) + start; + GLint nr = MIN2( (GLint) (IMM_MAXDATA - start), count - j ) + start; GLuint sf = IM->Flag[start]; IM->FlushElt |= 1; @@ -179,14 +179,17 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count) if (tnl->pipeline.build_state_changes) _tnl_validate_pipeline( ctx ); - if (!ctx->CompileFlag && count - start < ctx->Const.MaxArrayLockSize) { + if (!ctx->CompileFlag && count - start < (GLint) ctx->Const.MaxArrayLockSize) { FLUSH_CURRENT( ctx, 0 ); if (ctx->Array.LockCount) { - if (start < ctx->Array.LockFirst) start = ctx->Array.LockFirst; - if (count > ctx->Array.LockCount) count = ctx->Array.LockCount; - if (start >= count) return; + if (start < (GLint) ctx->Array.LockFirst) + start = ctx->Array.LockFirst; + if (count > (GLint) ctx->Array.LockCount) + count = ctx->Array.LockCount; + if (start >= count) + return; /* Locked drawarrays. Reuse any previously transformed data. */ @@ -325,13 +328,14 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type, /* Scan the index list and see if we can use the locked path anyway. */ GLuint max_elt = 0; - GLuint i; + GLint i; for (i = 0 ; i < count ; i++) - if (ui_indices[i] > max_elt) max_elt = ui_indices[i]; + if (ui_indices[i] > max_elt) + max_elt = ui_indices[i]; if (max_elt < ctx->Const.MaxArrayLockSize && /* can we use it? */ - max_elt < count) /* do we want to use it? */ + max_elt < (GLuint) count) /* do we want to use it? */ _tnl_draw_range_elements( ctx, mode, 0, max_elt+1, count, ui_indices ); else _tnl_draw_elements( ctx, mode, count, ui_indices ); diff --git a/src/mesa/tnl/t_array_import.c b/src/mesa/tnl/t_array_import.c index e3d2b3c94ac..90cc0e53840 100644 --- a/src/mesa/tnl/t_array_import.c +++ b/src/mesa/tnl/t_array_import.c @@ -1,4 +1,4 @@ -/* $Id: t_array_import.c,v 1.9 2001/02/20 18:28:52 keithw Exp $ */ +/* $Id: t_array_import.c,v 1.10 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -57,8 +57,8 @@ static void _tnl_import_vertex( GLcontext *ctx, writeable, &is_writeable); - inputs->Obj.data = tmp->Ptr; - inputs->Obj.start = (GLfloat *)tmp->Ptr; + inputs->Obj.data = (GLfloat (*)[4]) tmp->Ptr; + inputs->Obj.start = (GLfloat *) tmp->Ptr; inputs->Obj.stride = tmp->StrideB; inputs->Obj.size = tmp->Size; inputs->Obj.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); @@ -80,8 +80,8 @@ static void _tnl_import_normal( GLcontext *ctx, stride ? 3*sizeof(GLfloat) : 0, writeable, &is_writeable); - inputs->Normal.data = tmp->Ptr; - inputs->Normal.start = (GLfloat *)tmp->Ptr; + inputs->Normal.data = (GLfloat (*)[3]) tmp->Ptr; + inputs->Normal.start = (GLfloat *) tmp->Ptr; inputs->Normal.stride = tmp->StrideB; inputs->Normal.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); if (inputs->Normal.stride != 3*sizeof(GLfloat)) @@ -106,8 +106,8 @@ static void _tnl_import_color( GLcontext *ctx, writeable, &is_writeable); - inputs->Color.data = tmp->Ptr; - inputs->Color.start = (GLchan *)tmp->Ptr; + inputs->Color.data = (GLchan (*)[4]) tmp->Ptr; + inputs->Color.start = (GLchan *) tmp->Ptr; inputs->Color.stride = tmp->StrideB; inputs->Color.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); if (inputs->Color.stride != 4*sizeof(GLchan)) @@ -131,8 +131,8 @@ static void _tnl_import_secondarycolor( GLcontext *ctx, writeable, &is_writeable); - inputs->SecondaryColor.data = tmp->Ptr; - inputs->SecondaryColor.start = (GLchan *)tmp->Ptr; + inputs->SecondaryColor.data = (GLchan (*)[4]) tmp->Ptr; + inputs->SecondaryColor.start = (GLchan *) tmp->Ptr; inputs->SecondaryColor.stride = tmp->StrideB; inputs->SecondaryColor.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); if (inputs->SecondaryColor.stride != 4*sizeof(GLubyte)) @@ -153,8 +153,8 @@ static void _tnl_import_fogcoord( GLcontext *ctx, stride ? sizeof(GLfloat) : 0, writeable, &is_writeable); - inputs->FogCoord.data = tmp->Ptr; - inputs->FogCoord.start = (GLfloat *)tmp->Ptr; + inputs->FogCoord.data = (GLfloat *) tmp->Ptr; + inputs->FogCoord.start = (GLfloat *) tmp->Ptr; inputs->FogCoord.stride = tmp->StrideB; inputs->FogCoord.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); if (inputs->FogCoord.stride != sizeof(GLfloat)) @@ -175,8 +175,8 @@ static void _tnl_import_index( GLcontext *ctx, stride ? sizeof(GLuint) : 0, writeable, &is_writeable); - inputs->Index.data = tmp->Ptr; - inputs->Index.start = (GLuint *)tmp->Ptr; + inputs->Index.data = (GLuint *) tmp->Ptr; + inputs->Index.start = (GLuint *) tmp->Ptr; inputs->Index.stride = tmp->StrideB; inputs->Index.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); if (inputs->Index.stride != sizeof(GLuint)) @@ -201,8 +201,8 @@ static void _tnl_import_texcoord( GLcontext *ctx, writeable, &is_writeable); - inputs->TexCoord[i].data = tmp->Ptr; - inputs->TexCoord[i].start = (GLfloat *)tmp->Ptr; + inputs->TexCoord[i].data = (GLfloat (*)[4]) tmp->Ptr; + inputs->TexCoord[i].start = (GLfloat *) tmp->Ptr; inputs->TexCoord[i].stride = tmp->StrideB; inputs->TexCoord[i].size = tmp->Size; inputs->TexCoord[i].flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); @@ -226,8 +226,8 @@ static void _tnl_import_edgeflag( GLcontext *ctx, 0, &is_writeable); - inputs->EdgeFlag.data = tmp->Ptr; - inputs->EdgeFlag.start = (GLubyte *)tmp->Ptr; + inputs->EdgeFlag.data = (GLubyte *) tmp->Ptr; + inputs->EdgeFlag.start = (GLubyte *) tmp->Ptr; inputs->EdgeFlag.stride = tmp->StrideB; inputs->EdgeFlag.flags &= ~(VEC_BAD_STRIDE|VEC_NOT_WRITEABLE); if (inputs->EdgeFlag.stride != sizeof(GLubyte)) @@ -320,8 +320,8 @@ void _tnl_vb_bind_arrays( GLcontext *ctx, GLint start, GLsizei count ) /* start, count, ctx->Array.LockFirst, ctx->Array.LockCount); */ if (ctx->Array.LockCount) { - ASSERT(start == ctx->Array.LockFirst); - ASSERT(count == ctx->Array.LockCount); + ASSERT(start == (GLint) ctx->Array.LockFirst); + ASSERT(count == (GLint) ctx->Array.LockCount); } imports = tnl->pipeline.inputs; diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 843db0ebd7b..71bbfd64f92 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -1,4 +1,4 @@ -/* $Id: t_context.c,v 1.11 2001/01/13 18:28:20 keithw Exp $ */ +/* $Id: t_context.c,v 1.12 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -84,7 +84,7 @@ _tnl_CreateContext( GLcontext *ctx ) /* Create the TNLcontext structure */ - ctx->swtnl_context = tnl = CALLOC( sizeof(TNLcontext) ); + ctx->swtnl_context = tnl = (TNLcontext *) CALLOC( sizeof(TNLcontext) ); if (!tnl) { return GL_FALSE; diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index e15cef3e28b..de6e052c0e6 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -1,4 +1,4 @@ -/* $Id: t_context.h,v 1.15 2001/02/20 18:28:52 keithw Exp $ */ +/* $Id: t_context.h,v 1.16 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -315,7 +315,7 @@ struct gl_pipeline_stage { /* Private data for the pipeline stage: */ - void *private; + void *privatePtr; /* Free private data. May not be null. */ diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c index b63d0096a3e..3aa0df72e3c 100644 --- a/src/mesa/tnl/t_imm_alloc.c +++ b/src/mesa/tnl/t_imm_alloc.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_alloc.c,v 1.3 2001/02/15 01:33:52 keithw Exp $ */ +/* $Id: t_imm_alloc.c,v 1.4 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -64,8 +64,10 @@ struct immediate *_tnl_alloc_immediate( GLcontext *ctx ) */ IM->TexCoord[0] = IM->TexCoord0; - for (j = 1; j < ctx->Const.MaxTextureUnits; j++) - IM->TexCoord[j] = ALIGN_MALLOC( IMM_SIZE * sizeof(GLfloat) * 4, 32 ); + for (j = 1; j < ctx->Const.MaxTextureUnits; j++) { + IM->TexCoord[j] = (GLfloat (*)[4]) + ALIGN_MALLOC( IMM_SIZE * sizeof(GLfloat) * 4, 32 ); + } /* KW: Removed initialization of normals as these are now treated * identically to all other data types. diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index e5302cbdeee..c39806d6af0 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_fog.c,v 1.6 2001/03/03 20:57:00 brianp Exp $ */ +/* $Id: t_vb_fog.c,v 1.7 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -47,7 +47,7 @@ struct fog_stage_data { GLvector1f input; /* points into VB->EyePtr Z values */ }; -#define FOG_STAGE_DATA(stage) ((struct fog_stage_data *)stage->private) +#define FOG_STAGE_DATA(stage) ((struct fog_stage_data *)stage->privatePtr) #define FOG_EXP_TABLE_SIZE 256 #define FOG_MAX (5.0) @@ -199,7 +199,7 @@ static GLboolean alloc_fog_data( GLcontext *ctx, { TNLcontext *tnl = TNL_CONTEXT(ctx); struct fog_stage_data *store; - stage->private = MALLOC(sizeof(*store)); + stage->privatePtr = MALLOC(sizeof(*store)); store = FOG_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -223,7 +223,7 @@ static void free_fog_data( struct gl_pipeline_stage *stage ) if (store) { _mesa_vector1f_free( &store->fogcoord ); FREE( store ); - stage->private = 0; + stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index 6ccb1b0dff6..d7d1d26ca44 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.10 2001/03/03 20:33:31 brianp Exp $ */ +/* $Id: t_vb_light.c,v 1.11 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -55,7 +55,7 @@ struct light_stage_data { light_func *light_func_tab; }; -#define LIGHT_STAGE_DATA(stage) ((struct light_stage_data *)(stage->private)) +#define LIGHT_STAGE_DATA(stage) ((struct light_stage_data *)(stage->privatePtr)) /* Tables for all the shading functions. */ @@ -209,7 +209,7 @@ static GLboolean run_init_lighting( GLcontext *ctx, struct light_stage_data *store; GLuint size = tnl->vb.Size; - stage->private = MALLOC(sizeof(*store)); + stage->privatePtr = MALLOC(sizeof(*store)); store = LIGHT_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -241,7 +241,7 @@ static void check_lighting( GLcontext *ctx, struct gl_pipeline_stage *stage ) { stage->active = ctx->Light.Enabled; if (stage->active) { - if (stage->private) + if (stage->privatePtr) stage->run = run_validate_lighting; stage->inputs = VERT_NORM|VERT_MATERIAL; if (ctx->Light._NeedVertices) @@ -268,7 +268,7 @@ static void dtr( struct gl_pipeline_stage *stage ) _mesa_vector1ui_free( &store->LitIndex[0] ); _mesa_vector1ui_free( &store->LitIndex[1] ); FREE( store ); - stage->private = 0; + stage->privatePtr = 0; } } diff --git a/src/mesa/tnl/t_vb_normals.c b/src/mesa/tnl/t_vb_normals.c index 3d02cae4a23..4f9503bed3d 100644 --- a/src/mesa/tnl/t_vb_normals.c +++ b/src/mesa/tnl/t_vb_normals.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_normals.c,v 1.5 2001/03/03 20:57:00 brianp Exp $ */ +/* $Id: t_vb_normals.c,v 1.6 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -48,7 +48,7 @@ struct normal_stage_data { GLvector3f normal; }; -#define NORMAL_STAGE_DATA(stage) ((struct normal_stage_data *)stage->private) +#define NORMAL_STAGE_DATA(stage) ((struct normal_stage_data *)stage->privatePtr) @@ -131,7 +131,7 @@ static void check_normal_transform( GLcontext *ctx, stage->active = ctx->_NeedNormals; /* Don't clobber the initialize function: */ - if (stage->private) + if (stage->privatePtr) stage->run = run_validate_normal_stage; } @@ -141,7 +141,7 @@ static GLboolean alloc_normal_data( GLcontext *ctx, { TNLcontext *tnl = TNL_CONTEXT(ctx); struct normal_stage_data *store; - stage->private = MALLOC(sizeof(*store)); + stage->privatePtr = MALLOC(sizeof(*store)); store = NORMAL_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -162,7 +162,7 @@ static void free_normal_data( struct gl_pipeline_stage *stage ) if (store) { _mesa_vector3f_free( &store->normal ); FREE( store ); - stage->private = 0; + stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c index 94a9dc27a31..a27e00257c1 100644 --- a/src/mesa/tnl/t_vb_points.c +++ b/src/mesa/tnl/t_vb_points.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_points.c,v 1.2 2001/03/03 20:33:31 brianp Exp $ */ +/* $Id: t_vb_points.c,v 1.3 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -37,7 +37,7 @@ struct point_stage_data { GLvector1f PointSize; }; -#define POINT_STAGE_DATA(stage) ((struct point_stage_data *)stage->private) +#define POINT_STAGE_DATA(stage) ((struct point_stage_data *)stage->privatePtr) /* @@ -84,7 +84,7 @@ static GLboolean alloc_point_data( GLcontext *ctx, { struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb; struct point_stage_data *store; - stage->private = MALLOC(sizeof(*store)); + stage->privatePtr = MALLOC(sizeof(*store)); store = POINT_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -104,7 +104,7 @@ static void free_point_data( struct gl_pipeline_stage *stage ) if (store) { _mesa_vector1f_free( &store->PointSize ); FREE( store ); - stage->private = 0; + stage->privatePtr = 0; } } diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c index 8394c504d70..daded260d32 100644 --- a/src/mesa/tnl/t_vb_texgen.c +++ b/src/mesa/tnl/t_vb_texgen.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_texgen.c,v 1.4 2001/03/03 20:57:00 brianp Exp $ */ +/* $Id: t_vb_texgen.c,v 1.5 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -74,7 +74,7 @@ struct texgen_stage_data { }; -#define TEXGEN_STAGE_DATA(stage) ((struct texgen_stage_data *)stage->private) +#define TEXGEN_STAGE_DATA(stage) ((struct texgen_stage_data *)stage->privatePtr) @@ -620,7 +620,7 @@ static void check_texgen( GLcontext *ctx, struct gl_pipeline_stage *stage ) /* Something for Feedback? */ } - if (stage->private) + if (stage->privatePtr) stage->run = run_validate_texgen_stage; stage->active = 1; stage->inputs = inputs; @@ -640,7 +640,7 @@ static GLboolean alloc_texgen_data( GLcontext *ctx, struct texgen_stage_data *store; GLuint i; - stage->private = CALLOC(sizeof(*store)); + stage->privatePtr = CALLOC(sizeof(*store)); store = TEXGEN_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -673,7 +673,7 @@ static void free_texgen_data( struct gl_pipeline_stage *stage ) if (store->tmp_f) FREE( store->tmp_f ); if (store->tmp_m) FREE( store->tmp_m ); FREE( store ); - stage->private = 0; + stage->privatePtr = NULL; } } diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c index ca5707f9fff..49fb2e1753e 100644 --- a/src/mesa/tnl/t_vb_texmat.c +++ b/src/mesa/tnl/t_vb_texmat.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_texmat.c,v 1.2 2001/03/03 20:33:31 brianp Exp $ */ +/* $Id: t_vb_texmat.c,v 1.3 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -53,7 +53,7 @@ struct texmat_stage_data { GLvector4f texcoord[MAX_TEXTURE_UNITS]; }; -#define TEXMAT_STAGE_DATA(stage) ((struct texmat_stage_data *)stage->private) +#define TEXMAT_STAGE_DATA(stage) ((struct texmat_stage_data *)stage->privatePtr) static void check_texmat( GLcontext *ctx, struct gl_pipeline_stage *stage ) { @@ -104,7 +104,7 @@ static GLboolean alloc_texmat_data( GLcontext *ctx, struct texmat_stage_data *store; GLuint i; - stage->private = CALLOC(sizeof(*store)); + stage->privatePtr = CALLOC(sizeof(*store)); store = TEXMAT_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -129,7 +129,7 @@ static void free_texmat_data( struct gl_pipeline_stage *stage ) if (store->texcoord[i].data) _mesa_vector4f_free( &store->texcoord[i] ); FREE( store ); - stage->private = 0; + stage->privatePtr = 0; } } diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 0279d13d378..ad8a2a21d6e 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -1,4 +1,4 @@ -/* $Id: t_vb_vertex.c,v 1.5 2001/03/03 20:57:00 brianp Exp $ */ +/* $Id: t_vb_vertex.c,v 1.6 2001/03/07 05:06:13 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -60,7 +60,7 @@ struct vertex_stage_data { GLvector4f *save_projptr; }; -#define VERTEX_STAGE_DATA(stage) ((struct vertex_stage_data *)stage->private) +#define VERTEX_STAGE_DATA(stage) ((struct vertex_stage_data *)stage->privatePtr) @@ -133,7 +133,7 @@ static void (*(usercliptab[5]))( GLcontext *, static GLboolean run_vertex_stage( GLcontext *ctx, struct gl_pipeline_stage *stage ) { - struct vertex_stage_data *store = (struct vertex_stage_data *)stage->private; + struct vertex_stage_data *store = (struct vertex_stage_data *)stage->privatePtr; TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *VB = &tnl->vb; @@ -262,7 +262,7 @@ static GLboolean init_vertex_stage( GLcontext *ctx, struct vertex_stage_data *store; GLuint size = VB->Size; - stage->private = CALLOC(sizeof(*store)); + stage->privatePtr = CALLOC(sizeof(*store)); store = VERTEX_STAGE_DATA(stage); if (!store) return GL_FALSE; @@ -295,7 +295,7 @@ static void dtr( struct gl_pipeline_stage *stage ) _mesa_vector4f_free( &store->proj ); ALIGN_FREE( store->clipmask ); FREE(store); - stage->private = 0; + stage->privatePtr = NULL; stage->run = init_vertex_stage; } } |