minor clean-ups and warning fixes
This commit is contained in:
@@ -791,7 +791,7 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa)
|
|||||||
FX_grGlideGetState((GrState *) fxMesa->state);
|
FX_grGlideGetState((GrState *) fxMesa->state);
|
||||||
|
|
||||||
/* Run the config file */
|
/* Run the config file */
|
||||||
_mesa_context_initialize(fxMesa->glCtx);
|
_mesa_read_config_file(fxMesa->glCtx);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: xm_api.c,v 1.21 2001/04/27 21:18:25 brianp Exp $ */
|
/* $Id: xm_api.c,v 1.22 2001/05/03 14:11:18 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -1669,7 +1669,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
|
|||||||
|
|
||||||
/* Run the config file
|
/* Run the config file
|
||||||
*/
|
*/
|
||||||
_mesa_context_initialize( ctx );
|
_mesa_read_config_file( ctx );
|
||||||
|
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: attrib.c,v 1.49 2001/04/17 21:25:53 brianp Exp $ */
|
/* $Id: attrib.c,v 1.50 2001/05/03 14:11:18 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -672,7 +672,7 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
|
|||||||
bordColor[2] = CHAN_TO_FLOAT(obj->BorderColor[2]);
|
bordColor[2] = CHAN_TO_FLOAT(obj->BorderColor[2]);
|
||||||
bordColor[3] = CHAN_TO_FLOAT(obj->BorderColor[3]);
|
bordColor[3] = CHAN_TO_FLOAT(obj->BorderColor[3]);
|
||||||
|
|
||||||
_mesa_TexParameteri(target, GL_TEXTURE_PRIORITY, obj->Priority);
|
_mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority);
|
||||||
_mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, bordColor);
|
_mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, bordColor);
|
||||||
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS);
|
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS);
|
||||||
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT);
|
_mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT);
|
||||||
@@ -694,7 +694,7 @@ pop_texture_group(GLcontext *ctx, const struct gl_texture_attrib *texAttrib)
|
|||||||
obj->CompareOperator);
|
obj->CompareOperator);
|
||||||
}
|
}
|
||||||
if (ctx->Extensions.SGIX_shadow_ambient) {
|
if (ctx->Extensions.SGIX_shadow_ambient) {
|
||||||
_mesa_TexParameteri(target, GL_SHADOW_AMBIENT_SGIX,
|
_mesa_TexParameterf(target, GL_SHADOW_AMBIENT_SGIX,
|
||||||
CHAN_TO_FLOAT(obj->ShadowAmbient));
|
CHAN_TO_FLOAT(obj->ShadowAmbient));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: context.c,v 1.135 2001/04/28 08:39:17 keithw Exp $ */
|
/* $Id: context.c,v 1.136 2001/05/03 14:11:18 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -1498,7 +1498,7 @@ _mesa_initialize_context( GLcontext *ctx,
|
|||||||
|
|
||||||
|
|
||||||
#if defined(MESA_TRACE)
|
#if defined(MESA_TRACE)
|
||||||
ctx->TraceCtx = CALLOC( sizeof(trace_context_t) );
|
ctx->TraceCtx = (trace_context_t *) CALLOC( sizeof(trace_context_t) );
|
||||||
#if 0
|
#if 0
|
||||||
/* Brian: do you want to have CreateContext fail here,
|
/* Brian: do you want to have CreateContext fail here,
|
||||||
or should we just trap in NewTrace (currently done)? */
|
or should we just trap in NewTrace (currently done)? */
|
||||||
@@ -1674,18 +1674,6 @@ _mesa_destroy_context( GLcontext *ctx )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Called by the driver after both the context and driver are fully
|
|
||||||
* initialized. Currently just reads the config file.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
_mesa_context_initialize( GLcontext *ctx )
|
|
||||||
{
|
|
||||||
_mesa_read_config_file( ctx );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy attribute groups from one context to another.
|
* Copy attribute groups from one context to another.
|
||||||
* Input: src - source context
|
* Input: src - source context
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: context.h,v 1.26 2001/04/27 21:17:20 brianp Exp $ */
|
/* $Id: context.h,v 1.27 2001/05/03 14:11:18 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -149,10 +149,6 @@ extern void
|
|||||||
_mesa_destroy_context( GLcontext *ctx );
|
_mesa_destroy_context( GLcontext *ctx );
|
||||||
|
|
||||||
|
|
||||||
extern void
|
|
||||||
_mesa_context_initialize( GLcontext *ctx );
|
|
||||||
|
|
||||||
|
|
||||||
extern void
|
extern void
|
||||||
_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
|
_mesa_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: s_texture.c,v 1.27 2001/04/23 18:06:09 brianp Exp $ */
|
/* $Id: s_texture.c,v 1.28 2001/05/03 14:11:53 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -280,7 +280,7 @@ sample_1d_nearest(GLcontext *ctx,
|
|||||||
/* skip over the border, if any */
|
/* skip over the border, if any */
|
||||||
i += img->Border;
|
i += img->Border;
|
||||||
|
|
||||||
if (i < 0 || i >= img->Width) {
|
if (i < 0 || i >= (GLint) img->Width) {
|
||||||
/* Need this test for GL_CLAMP_TO_BORDER_ARB mode */
|
/* Need this test for GL_CLAMP_TO_BORDER_ARB mode */
|
||||||
COPY_CHAN4(rgba, tObj->BorderColor);
|
COPY_CHAN4(rgba, tObj->BorderColor);
|
||||||
}
|
}
|
||||||
@@ -570,7 +570,7 @@ sample_2d_nearest(GLcontext *ctx,
|
|||||||
i += img->Border;
|
i += img->Border;
|
||||||
j += img->Border;
|
j += img->Border;
|
||||||
|
|
||||||
if (i < 0 || i >= img->Width || j < 0 || j >= img->Height) {
|
if (i < 0 || i >= (GLint) img->Width || j < 0 || j >= (GLint) img->Height) {
|
||||||
/* Need this test for GL_CLAMP_TO_BORDER_ARB mode */
|
/* Need this test for GL_CLAMP_TO_BORDER_ARB mode */
|
||||||
COPY_CHAN4(rgba, tObj->BorderColor);
|
COPY_CHAN4(rgba, tObj->BorderColor);
|
||||||
}
|
}
|
||||||
@@ -990,9 +990,9 @@ sample_3d_nearest(GLcontext *ctx,
|
|||||||
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, t, height, j);
|
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapT, t, height, j);
|
||||||
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapR, r, depth, k);
|
COMPUTE_NEAREST_TEXEL_LOCATION(tObj->WrapR, r, depth, k);
|
||||||
|
|
||||||
if (i < 0 || i >= img->Width ||
|
if (i < 0 || i >= (GLint) img->Width ||
|
||||||
j < 0 || j >= img->Height ||
|
j < 0 || j >= (GLint) img->Height ||
|
||||||
k < 0 || k >= img->Depth) {
|
k < 0 || k >= (GLint) img->Depth) {
|
||||||
/* Need this test for GL_CLAMP_TO_BORDER_ARB mode */
|
/* Need this test for GL_CLAMP_TO_BORDER_ARB mode */
|
||||||
COPY_CHAN4(rgba, tObj->BorderColor);
|
COPY_CHAN4(rgba, tObj->BorderColor);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_eval.c,v 1.10 2001/05/01 13:18:03 keithw Exp $ */
|
/* $Id: t_imm_eval.c,v 1.11 2001/05/03 14:11:18 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -130,7 +130,7 @@ static void eval1_4f_ca( struct gl_client_array *dest,
|
|||||||
dimension, map->Order);
|
dimension, map->Order);
|
||||||
}
|
}
|
||||||
|
|
||||||
dest->Size = MAX2(dest->Size, dimension);
|
dest->Size = MAX2(dest->Size, (GLint) dimension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -262,7 +262,7 @@ static void eval2_4f_ca( struct gl_client_array *dest,
|
|||||||
map->Uorder, map->Vorder);
|
map->Uorder, map->Vorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
dest->Size = MAX2(dest->Size, dimension);
|
dest->Size = MAX2(dest->Size, (GLint) dimension);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ static void copy_4f_stride( GLfloat to[][4], GLfloat *from,
|
|||||||
if (stride == 4 * sizeof(GLfloat))
|
if (stride == 4 * sizeof(GLfloat))
|
||||||
MEMCPY( to, from, count * sizeof(to[0]));
|
MEMCPY( to, from, count * sizeof(to[0]));
|
||||||
else {
|
else {
|
||||||
int i;
|
GLuint i;
|
||||||
/* fprintf(stderr, "%s stride %d count %d\n", __FUNCTION__, */
|
/* fprintf(stderr, "%s stride %d count %d\n", __FUNCTION__, */
|
||||||
/* stride, count); */
|
/* stride, count); */
|
||||||
for (i = 0 ; i < count ; i++, STRIDE_F(from, stride))
|
for (i = 0 ; i < count ; i++, STRIDE_F(from, stride))
|
||||||
|
Reference in New Issue
Block a user