summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/array_cache/ac_import.c46
-rw-r--r--src/mesa/drivers/glide/fxdrv.h2
-rw-r--r--src/mesa/glapi/glapi.c8
-rw-r--r--src/mesa/glapi/glthread.c6
-rw-r--r--src/mesa/main/clip.c6
-rw-r--r--src/mesa/main/colortab.c25
-rw-r--r--src/mesa/main/convolve.c4
-rw-r--r--src/mesa/main/dlist.c17
-rw-r--r--src/mesa/main/enums.c4
-rw-r--r--src/mesa/main/image.c23
-rw-r--r--src/mesa/main/image.h4
-rw-r--r--src/mesa/main/imports.c6
-rw-r--r--src/mesa/main/light.c8
-rw-r--r--src/mesa/main/teximage.c89
-rw-r--r--src/mesa/main/texstate.c4
-rw-r--r--src/mesa/main/texstore.c14
-rw-r--r--src/mesa/main/texutil.c6
-rw-r--r--src/mesa/main/varray.c9
-rw-r--r--src/mesa/math/m_eval.c6
-rw-r--r--src/mesa/math/m_matrix.c12
-rw-r--r--src/mesa/swrast/s_aaline.c6
-rw-r--r--src/mesa/swrast/s_aalinetemp.h8
-rw-r--r--src/mesa/swrast/s_aatriangle.c4
-rw-r--r--src/mesa/swrast/s_aatritemp.h4
-rw-r--r--src/mesa/swrast/s_accum.c26
-rw-r--r--src/mesa/swrast/s_buffers.c4
-rw-r--r--src/mesa/swrast/s_copypix.c4
-rw-r--r--src/mesa/swrast/s_depth.c12
-rw-r--r--src/mesa/swrast/s_drawpix.c46
-rw-r--r--src/mesa/swrast/s_fog.c4
-rw-r--r--src/mesa/swrast/s_pointtemp.h14
-rw-r--r--src/mesa/swrast/s_readpix.c5
-rw-r--r--src/mesa/swrast/s_stencil.c4
-rw-r--r--src/mesa/swrast/s_tritemp.h4
-rw-r--r--src/mesa/swrast_setup/ss_context.c4
-rw-r--r--src/mesa/swrast_setup/ss_triangle.c13
-rw-r--r--src/mesa/tnl/t_array_api.c28
-rw-r--r--src/mesa/tnl/t_array_import.c38
-rw-r--r--src/mesa/tnl/t_context.c4
-rw-r--r--src/mesa/tnl/t_context.h4
-rw-r--r--src/mesa/tnl/t_imm_alloc.c8
-rw-r--r--src/mesa/tnl/t_vb_fog.c8
-rw-r--r--src/mesa/tnl/t_vb_light.c10
-rw-r--r--src/mesa/tnl/t_vb_normals.c10
-rw-r--r--src/mesa/tnl/t_vb_points.c8
-rw-r--r--src/mesa/tnl/t_vb_texgen.c10
-rw-r--r--src/mesa/tnl/t_vb_texmat.c8
-rw-r--r--src/mesa/tnl/t_vb_vertex.c10
48 files changed, 312 insertions, 295 deletions
diff --git a/src/mesa/array_cache/ac_import.c b/src/mesa/array_cache/ac_import.c
index 293f475b15a..863f304da39 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.7 2001/02/20 18:28:52 keithw Exp $ */
+/* $Id: ac_import.c,v 1.8 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -39,7 +39,7 @@
#define STRIDE_ARRAY( array, offset ) \
do { \
- char *tmp = (array).Ptr; \
+ char *tmp = (char *) (array).Ptr; \
tmp += (offset) * (array).StrideB; \
(array).Ptr = tmp; \
} while (0)
@@ -193,7 +193,7 @@ static void import_texcoord( GLcontext *ctx, GLuint unit,
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
ASSERT(ac->count - ac->start < ctx->Const.MaxArrayLockSize);
- _math_trans_4f( to->Ptr,
+ _math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -219,7 +219,7 @@ static void import_vertex( GLcontext *ctx,
ASSERT(type == GL_FLOAT);
ASSERT(stride == 4*sizeof(GLfloat) || stride == 0);
- _math_trans_4f( to->Ptr,
+ _math_trans_4f( (GLfloat (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -245,7 +245,7 @@ static void import_normal( GLcontext *ctx,
ASSERT(type == GL_FLOAT);
ASSERT(stride == 3*sizeof(GLfloat) || stride == 0);
- _math_trans_3f( to->Ptr,
+ _math_trans_3f( (GLfloat (*)[3]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -270,7 +270,7 @@ static void import_color( GLcontext *ctx,
ASSERT(type == CHAN_TYPE);
ASSERT(stride == 4 * sizeof(GLchan) || stride == 0);
- _math_trans_4chan( to->Ptr,
+ _math_trans_4chan( (GLchan (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -296,7 +296,7 @@ static void import_index( GLcontext *ctx,
ASSERT(type == GL_UNSIGNED_INT);
ASSERT(stride == sizeof(GLuint) || stride == 0);
- _math_trans_1ui( to->Ptr,
+ _math_trans_1ui( (GLuint *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -320,7 +320,7 @@ static void import_secondarycolor( GLcontext *ctx,
ASSERT(type == CHAN_TYPE);
ASSERT(stride == 4 * sizeof(GLchan) || stride == 0);
- _math_trans_4chan( to->Ptr,
+ _math_trans_4chan( (GLchan (*)[4]) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -345,7 +345,7 @@ static void import_fogcoord( GLcontext *ctx,
ASSERT(type == GL_FLOAT);
ASSERT(stride == sizeof(GLfloat) || stride == 0);
- _math_trans_1f( to->Ptr,
+ _math_trans_1f( (GLfloat *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -369,7 +369,7 @@ static void import_edgeflag( GLcontext *ctx,
ASSERT(type == GL_FLOAT);
ASSERT(stride == sizeof(GLfloat) || stride == 0);
- _math_trans_1f( to->Ptr,
+ _math_trans_1f( (GLfloat *) to->Ptr,
from->Ptr,
from->StrideB,
from->Type,
@@ -402,13 +402,13 @@ struct gl_client_array *_ac_import_texcoord( GLcontext *ctx,
/* Is the request impossible?
*/
- if (reqsize != 0 && ac->Raw.TexCoord[unit].Size > reqsize)
+ if (reqsize != 0 && ac->Raw.TexCoord[unit].Size > (GLint) reqsize)
return 0;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.TexCoord[unit].Type != type ||
- (reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != reqstride) ||
+ (reqstride != 0 && ac->Raw.TexCoord[unit].StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.TexCoord[unit])
@@ -438,13 +438,13 @@ struct gl_client_array *_ac_import_vertex( GLcontext *ctx,
/* Is the request impossible?
*/
- if (reqsize != 0 && ac->Raw.Vertex.Size > reqsize)
+ if (reqsize != 0 && ac->Raw.Vertex.Size > (GLint) reqsize)
return 0;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Vertex.Type != type ||
- (reqstride != 0 && ac->Raw.Vertex.StrideB != reqstride) ||
+ (reqstride != 0 && ac->Raw.Vertex.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Vertex)
@@ -474,7 +474,7 @@ struct gl_client_array *_ac_import_normal( GLcontext *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 != reqstride) ||
+ (reqstride != 0 && ac->Raw.Normal.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Normal)
@@ -504,14 +504,14 @@ struct gl_client_array *_ac_import_color( GLcontext *ctx,
/* Is the request impossible?
*/
- if (reqsize != 0 && ac->Raw.Color.Size > reqsize) {
+ if (reqsize != 0 && ac->Raw.Color.Size > (GLint) reqsize) {
return 0;
}
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Color.Type != type ||
- (reqstride != 0 && ac->Raw.Color.StrideB != reqstride) ||
+ (reqstride != 0 && ac->Raw.Color.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Color)
@@ -542,7 +542,7 @@ struct gl_client_array *_ac_import_index( GLcontext *ctx,
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.Index.Type != type ||
- (reqstride != 0 && ac->Raw.Index.StrideB != reqstride) ||
+ (reqstride != 0 && ac->Raw.Index.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.Index)
@@ -572,13 +572,13 @@ struct gl_client_array *_ac_import_secondarycolor( GLcontext *ctx,
/* Is the request impossible?
*/
- if (reqsize != 0 && ac->Raw.SecondaryColor.Size > reqsize)
+ if (reqsize != 0 && ac->Raw.SecondaryColor.Size > (GLint) reqsize)
return 0;
/* Do we need to pull in a copy of the client data:
*/
if (ac->Raw.SecondaryColor.Type != type ||
- (reqstride != 0 && ac->Raw.SecondaryColor.StrideB != reqstride) ||
+ (reqstride != 0 && ac->Raw.SecondaryColor.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.SecondaryColor)
@@ -608,7 +608,7 @@ struct gl_client_array *_ac_import_fogcoord( GLcontext *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 != reqstride) ||
+ (reqstride != 0 && ac->Raw.FogCoord.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.FogCoord)
@@ -641,7 +641,7 @@ struct gl_client_array *_ac_import_edgeflag( GLcontext *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 != reqstride) ||
+ (reqstride != 0 && ac->Raw.EdgeFlag.StrideB != (GLint) reqstride) ||
reqwriteable)
{
if (!ac->IsCached.EdgeFlag)
@@ -714,7 +714,7 @@ _ac_import_elements( GLcontext *ctx,
if (ac->Elts) FREE(ac->Elts);
while (ac->elt_size < count * sizeof(GLuint))
ac->elt_size *= 2;
- ac->Elts = MALLOC(ac->elt_size);
+ ac->Elts = (GLuint *) MALLOC(ac->elt_size);
}
switch (new_type) {
diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h
index 7a92f12a75c..1349d5079c9 100644
--- a/src/mesa/drivers/glide/fxdrv.h
+++ b/src/mesa/drivers/glide/fxdrv.h
@@ -229,7 +229,7 @@ tfxMipMapLevel;
*/
typedef struct tfxTexInfo_t
{
- struct tfxTexInfo *next;
+ struct tfxTexInfo_t *next;
struct gl_texture_object *tObj;
GLuint lastTimeUsed;
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 90ed9eacc20..82c48ea0658 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -1,4 +1,4 @@
-/* $Id: glapi.c,v 1.49 2001/01/23 23:35:47 brianp Exp $ */
+/* $Id: glapi.c,v 1.50 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1675,7 +1675,7 @@ _glapi_add_entrypoint(const char *funcName, GLuint offset)
{
GLint index = get_static_proc_offset(funcName);
if (index >= 0) {
- return (GLboolean) (index == offset); /* bad offset! */
+ return (GLboolean) ((GLuint) index == offset); /* bad offset! */
}
}
@@ -1783,7 +1783,7 @@ GLint
_glapi_get_proc_offset(const char *funcName)
{
/* search extension functions first */
- GLint i;
+ GLuint i;
for (i = 0; i < NumExtEntryPoints; i++) {
if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
return ExtEntryTable[i].Offset;
@@ -1803,7 +1803,7 @@ const GLvoid *
_glapi_get_proc_address(const char *funcName)
{
/* search extension functions first */
- GLint i;
+ GLuint i;
for (i = 0; i < NumExtEntryPoints; i++) {
if (strcmp(ExtEntryTable[i].Name, funcName) == 0) {
return ExtEntryTable[i].Address;
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index b9c8506516f..4599f39dcc9 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -1,4 +1,4 @@
-/* $Id: glthread.c,v 1.6 2000/02/11 21:38:33 brianp Exp $ */
+/* $Id: glthread.c,v 1.7 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -93,7 +93,7 @@ _glthread_InitTSD(_glthread_TSD *tsd)
void *
_glthread_GetTSD(_glthread_TSD *tsd)
{
- if (tsd->initMagic != INIT_MAGIC) {
+ if (tsd->initMagic != (int) INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
return pthread_getspecific(tsd->key);
@@ -103,7 +103,7 @@ _glthread_GetTSD(_glthread_TSD *tsd)
void
_glthread_SetTSD(_glthread_TSD *tsd, void *ptr)
{
- if (tsd->initMagic != INIT_MAGIC) {
+ if (tsd->initMagic != (int) INIT_MAGIC) {
_glthread_InitTSD(tsd);
}
if (pthread_setspecific(tsd->key, ptr) != 0) {
diff --git a/src/mesa/main/clip.c b/src/mesa/main/clip.c
index d2bbd8b9a02..14930e2be34 100644
--- a/src/mesa/main/clip.c
+++ b/src/mesa/main/clip.c
@@ -1,4 +1,4 @@
-/* $Id: clip.c,v 1.20 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: clip.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -59,7 +59,7 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *eq )
ASSERT_OUTSIDE_BEGIN_END(ctx);
p = (GLint) plane - (GLint) GL_CLIP_PLANE0;
- if (p < 0 || p >= ctx->Const.MaxClipPlanes) {
+ if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) {
_mesa_error( ctx, GL_INVALID_ENUM, "glClipPlane" );
return;
}
@@ -114,7 +114,7 @@ _mesa_GetClipPlane( GLenum plane, GLdouble *equation )
ASSERT_OUTSIDE_BEGIN_END(ctx);
p = (GLint) (plane - GL_CLIP_PLANE0);
- if (p < 0 || p >= ctx->Const.MaxClipPlanes) {
+ if (p < 0 || p >= (GLint) ctx->Const.MaxClipPlanes) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetClipPlane" );
return;
}
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index f9693c6ba78..c3ba3c50c9d 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -1,4 +1,4 @@
-/* $Id: colortab.c,v 1.35 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: colortab.c,v 1.36 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -314,7 +314,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
return;
}
- if (width > ctx->Const.MaxColorTableSize) {
+ if (width > (GLsizei) ctx->Const.MaxColorTableSize) {
if (proxy) {
table->Size = 0;
table->IntFormat = (GLenum) 0;
@@ -344,7 +344,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
if (floatTable) {
GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
GLfloat *tableF;
- GLuint i;
+ GLint i;
_mesa_unpack_float_color_span(ctx, width, table->Format,
tempTab, /* dest */
@@ -411,7 +411,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
return;
}
_mesa_unpack_chan_color_span(ctx, width, table->Format,
- table->Table, /* dest */
+ (GLchan *) table->Table, /* dest */
format, type, data,
&ctx->Unpack, 0);
} /* floatTable */
@@ -514,7 +514,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
comps = _mesa_components_in_format(table->Format);
assert(comps > 0); /* error should have been caught sooner */
- if (start + count > table->Size) {
+ if (start + count > (GLint) table->Size) {
_mesa_error(ctx, GL_INVALID_VALUE, "glColorSubTable(count)");
return;
}
@@ -532,7 +532,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
else {
GLfloat tempTab[MAX_COLOR_TABLE_SIZE * 4];
GLfloat *tableF;
- GLuint i;
+ GLint i;
ASSERT(table->FloatTable);
@@ -673,7 +673,6 @@ _mesa_GetColorTable( GLenum target, GLenum format,
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
struct gl_color_table *table = NULL;
GLchan rgba[MAX_COLOR_TABLE_SIZE][4];
- GLint i;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
if (ctx->NewState) {
@@ -713,6 +712,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_ALPHA:
if (table->FloatTable) {
const GLfloat *tableF = (const GLfloat *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = 0;
rgba[i][GCOMP] = 0;
@@ -722,6 +722,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
else {
const GLchan *tableUB = (const GLchan *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = 0;
rgba[i][GCOMP] = 0;
@@ -733,6 +734,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_LUMINANCE:
if (table->FloatTable) {
const GLfloat *tableF = (const GLfloat *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
rgba[i][GCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
@@ -742,6 +744,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
else {
const GLchan *tableUB = (const GLchan *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = tableUB[i];
rgba[i][GCOMP] = tableUB[i];
@@ -753,6 +756,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_LUMINANCE_ALPHA:
if (table->FloatTable) {
const GLfloat *tableF = (const GLfloat *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = (GLint) (tableF[i*2+0] * CHAN_MAXF);
rgba[i][GCOMP] = (GLint) (tableF[i*2+0] * CHAN_MAXF);
@@ -762,6 +766,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
else {
const GLchan *tableUB = (const GLchan *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = tableUB[i*2+0];
rgba[i][GCOMP] = tableUB[i*2+0];
@@ -773,6 +778,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_INTENSITY:
if (table->FloatTable) {
const GLfloat *tableF = (const GLfloat *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
rgba[i][GCOMP] = (GLint) (tableF[i] * CHAN_MAXF);
@@ -782,6 +788,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
else {
const GLchan *tableUB = (const GLchan *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = tableUB[i];
rgba[i][GCOMP] = tableUB[i];
@@ -793,6 +800,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_RGB:
if (table->FloatTable) {
const GLfloat *tableF = (const GLfloat *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = (GLint) (tableF[i*3+0] * CHAN_MAXF);
rgba[i][GCOMP] = (GLint) (tableF[i*3+1] * CHAN_MAXF);
@@ -802,6 +810,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
else {
const GLchan *tableUB = (const GLchan *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = tableUB[i*3+0];
rgba[i][GCOMP] = tableUB[i*3+1];
@@ -813,6 +822,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
case GL_RGBA:
if (table->FloatTable) {
const GLfloat *tableF = (const GLfloat *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = (GLint) (tableF[i*4+0] * CHAN_MAXF + 0.5F);
rgba[i][GCOMP] = (GLint) (tableF[i*4+1] * CHAN_MAXF + 0.5F);
@@ -822,6 +832,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
}
else {
const GLchan *tableUB = (const GLchan *) table->Table;
+ GLuint i;
for (i = 0; i < table->Size; i++) {
rgba[i][RCOMP] = tableUB[i*4+0];
rgba[i][GCOMP] = tableUB[i*4+1];
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index 0b1d4113c6f..dcc4d59f800 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -1,4 +1,4 @@
-/* $Id: convolve.c,v 1.20 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: convolve.c,v 1.21 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -564,7 +564,7 @@ void
_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
{
const struct gl_convolution_attrib *filter;
- GLint row;
+ GLuint row;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 988bcd13c32..4f93d0d7684 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,4 +1,4 @@
-/* $Id: dlist.c,v 1.65 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: dlist.c,v 1.66 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -329,8 +329,8 @@ void _mesa_destroy_list( GLcontext *ctx, GLuint list )
/* check for extension opcodes first */
- int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
- if (i >= 0 && i < ctx->listext.nr_opcodes) {
+ GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0;
+ if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
ctx->listext.opcode[i].destroy(ctx, &n[1]);
n += ctx->listext.opcode[i].size;
}
@@ -658,7 +658,7 @@ _mesa_alloc_instruction( GLcontext *ctx, int opcode, GLint sz )
#ifdef DEBUG
if (opcode < (int) OPCODE_DRV_0) {
- assert( (GLint) count == InstSize[opcode] );
+ assert( count == InstSize[opcode] );
}
#endif
@@ -3992,7 +3992,7 @@ execute_list( GLcontext *ctx, GLuint list )
OpCode opcode = n[0].opcode;
int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
- if (i >= 0 && i < ctx->listext.nr_opcodes) {
+ if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
ctx->listext.opcode[i].execute(ctx, &n[1]);
n += ctx->listext.opcode[i].size;
}
@@ -5917,12 +5917,13 @@ static void print_list( GLcontext *ctx, FILE *f, GLuint list )
done = n ? GL_FALSE : GL_TRUE;
while (!done) {
OpCode opcode = n[0].opcode;
- int i = (int)n[0].opcode - (int)OPCODE_DRV_0;
+ GLint i = (GLint) n[0].opcode - (GLint) OPCODE_DRV_0;
- if (i >= 0 && i < ctx->listext.nr_opcodes) {
+ if (i >= 0 && i < (GLint) ctx->listext.nr_opcodes) {
ctx->listext.opcode[i].print(ctx, &n[1]);
n += ctx->listext.opcode[i].size;
- } else {
+ }
+ else {
switch (opcode) {
case OPCODE_ACCUM:
fprintf(f,"accum %s %g\n", enum_string(n[1].e), n[2].f );
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index de18c7c0fe7..faaa92c6580 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -1,4 +1,4 @@
-/* $Id: enums.c,v 1.12 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: enums.c,v 1.13 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -862,7 +862,7 @@ static int compar_nr( const enum_elt **a, const enum_elt **b )
static void sort_enums( void )
{
- int i;
+ GLuint i;
index1 = (enum_elt **)MALLOC( Elements(all_enums) * sizeof(enum_elt *) );
sorted = 1;
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 89bfcc27596..8fcb5562af7 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.57 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: image.c,v 1.58 2001/03/07 05:06:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -620,9 +620,9 @@ _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
width_in_bytes = CEILING( width, 8 );
dst = buffer;
for (row = 0; row < height; row++) {
- GLubyte *src = _mesa_image_address( packing, pixels, width, height,
- GL_COLOR_INDEX, GL_BITMAP,
- 0, row, 0 );
+ const GLubyte *src = (const GLubyte *)
+ _mesa_image_address(packing, pixels, width, height,
+ GL_COLOR_INDEX, GL_BITMAP, 0, row, 0);
if (!src) {
FREE(buffer);
return NULL;
@@ -640,7 +640,7 @@ _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
if (packing->LsbFirst) {
GLubyte srcMask = 1 << (packing->SkipPixels & 0x7);
GLubyte dstMask = 128;
- GLubyte *s = src;
+ const GLubyte *s = src;
GLubyte *d = dst;
*d = 0;
for (i = 0; i < width; i++) {
@@ -667,7 +667,7 @@ _mesa_unpack_bitmap( GLint width, GLint height, const GLubyte *pixels,
else {
GLubyte srcMask = 128 >> (packing->SkipPixels & 0x7);
GLubyte dstMask = 128;
- GLubyte *s = src;
+ const GLubyte *s = src;
GLubyte *d = dst;
*d = 0;
for (i = 0; i < width; i++) {
@@ -715,9 +715,8 @@ _mesa_pack_bitmap( GLint width, GLint height, const GLubyte *source,
width_in_bytes = CEILING( width, 8 );
src = source;
for (row = 0; row < height; row++) {
- GLubyte *dst = _mesa_image_address( packing, dest, width, height,
- GL_COLOR_INDEX, GL_BITMAP,
- 0, row, 0 );
+ GLubyte *dst = (GLubyte *) _mesa_image_address( packing, dest,
+ width, height, GL_COLOR_INDEX, GL_BITMAP, 0, row, 0 );
if (!dst)
return;
@@ -1725,7 +1724,7 @@ _mesa_pack_rgba_span( GLcontext *ctx,
}
else if (transferOps == 0 && dstFormat == GL_RGB && dstType == CHAN_TYPE) {
/* common simple case */
- GLint i;
+ GLuint i;
GLchan *dest = (GLchan *) dstAddr;
for (i = 0; i < n; i++) {
dest[0] = srcRgba[i][RCOMP];
@@ -3591,7 +3590,7 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLfloat *dest,
* Pack an array of depth values. The values are floats in [0,1].
*/
void
-_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest,
+_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest,
GLenum dstType, const GLfloat *depthSpan,
const struct gl_pixelstore_attrib *dstPacking )
{
@@ -3738,7 +3737,7 @@ _mesa_unpack_image( GLsizei width, GLsizei height, GLsizei depth,
}
{
- GLubyte *destBuffer = MALLOC(bytesPerRow * height * depth);
+ GLubyte *destBuffer = (GLubyte *) MALLOC(bytesPerRow * height * depth);
GLubyte *dst;
GLint img, row;
if (!destBuffer)
diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h
index 7ad693e7e22..12376f1d2f0 100644
--- a/src/mesa/main/image.h
+++ b/src/mesa/main/image.h
@@ -1,4 +1,4 @@
-/* $Id: image.h,v 1.16 2001/02/17 18:41:01 brianp Exp $ */
+/* $Id: image.h,v 1.17 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -156,7 +156,7 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n, GLfloat *dest,
const struct gl_pixelstore_attrib *srcPacking );
extern void
-_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLdepth *dest,
+_mesa_pack_depth_span( const GLcontext *ctx, GLuint n, GLvoid *dest,
GLenum dstType, const GLfloat *depthSpan,
const struct gl_pixelstore_attrib *dstPacking );
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 6e0741ab91c..d611c6e8d74 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -1,4 +1,4 @@
-/* $Id: imports.c,v 1.6 2001/03/02 16:01:22 brianp Exp $ */
+/* $Id: imports.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -130,14 +130,14 @@ _mesa_fopen(__GLcontext *gc, const char *path, const char *mode)
static int
_mesa_fclose(__GLcontext *gc, void *stream)
{
- return fclose(stream);
+ return fclose((FILE *) stream);
}
static int
_mesa_fprintf(__GLcontext *gc, void *stream, const char *fmt, ...)
{
/* XXX fix this */
- return fprintf(stream, fmt);
+ return fprintf((FILE *) stream, fmt);
}
/* XXX this really is driver-specific and can't be here */
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index a7fce7e0f2c..1ce12e35ff7 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -1,4 +1,4 @@
-/* $Id: light.c,v 1.39 2001/03/03 20:33:27 brianp Exp $ */
+/* $Id: light.c,v 1.40 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -90,7 +90,7 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
GLint i = (GLint) (light - GL_LIGHT0);
struct gl_light *l = &ctx->Light.Light[i];
- if (i < 0 || i >= ctx->Const.MaxLights) {
+ if (i < 0 || i >= (GLint) ctx->Const.MaxLights) {
_mesa_error( ctx, GL_INVALID_ENUM, "glLight" );
return;
}
@@ -265,7 +265,7 @@ _mesa_GetLightfv( GLenum light, GLenum pname, GLfloat *params )
GLint l = (GLint) (light - GL_LIGHT0);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (l < 0 || l >= ctx->Const.MaxLights) {
+ if (l < 0 || l >= (GLint) ctx->Const.MaxLights) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetLightfv" );
return;
}
@@ -316,7 +316,7 @@ _mesa_GetLightiv( GLenum light, GLenum pname, GLint *params )
GLint l = (GLint) (light - GL_LIGHT0);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- if (l < 0 || l >= ctx->Const.MaxLights) {
+ if (l < 0 || l >= (GLint) ctx->Const.MaxLights) {
_mesa_error( ctx, GL_INVALID_ENUM, "glGetLightiv" );
return;
}
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 79a4353abaa..53fcffb5128 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.82 2001/03/05 22:18:23 brianp Exp $ */
+/* $Id: teximage.c,v 1.83 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -56,50 +56,49 @@
#ifdef DEBUG
static void PrintTexture(const struct gl_texture_image *img)
{
- int i, j, c;
- GLchan *data = img->Data;
-
- if (!data) {
- printf("No texture data\n");
- return;
- }
-
- switch (img->Format) {
- case GL_ALPHA:
- case GL_LUMINANCE:
- case GL_INTENSITY:
- case GL_COLOR_INDEX:
- c = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- c = 2;
- break;
- case GL_RGB:
- c = 3;
- break;
- case GL_RGBA:
- c = 4;
- break;
- default:
- _mesa_problem(NULL, "error in PrintTexture\n");
- return;
- }
-
-
- for (i = 0; i < img->Height; i++) {
- for (j = 0; j < img->Width; j++) {
- if (c==1)
- printf("%02x ", data[0]);
- else if (c==2)
- printf("%02x%02x ", data[0], data[1]);
- else if (c==3)
- printf("%02x%02x%02x ", data[0], data[1], data[2]);
- else if (c==4)
- printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
- data += c;
- }
- printf("\n");
- }
+ GLuint i, j, c;
+ const GLchan *data = (const GLchan *) img->Data;
+
+ if (!data) {
+ printf("No texture data\n");
+ return;
+ }
+
+ switch (img->Format) {
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_INTENSITY:
+ case GL_COLOR_INDEX:
+ c = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ c = 2;
+ break;
+ case GL_RGB:
+ c = 3;
+ break;
+ case GL_RGBA:
+ c = 4;
+ break;
+ default:
+ _mesa_problem(NULL, "error in PrintTexture\n");
+ return;
+ }
+
+ for (i = 0; i < img->Height; i++) {
+ for (j = 0; j < img->Width; j++) {
+ if (c==1)
+ printf("%02x ", data[0]);
+ else if (c==2)
+ printf("%02x%02x ", data[0], data[1]);
+ else if (c==3)
+ printf("%02x%02x%02x ", data[0], data[1], data[2]);
+ else if (c==4)
+ printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
+ data += c;
+ }
+ printf("\n");
+ }
}
#endif
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 91763dc6412..d21503ac03e 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.35 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: texstate.c,v 1.36 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1165,7 +1165,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
case GL_SHADOW_AMBIENT_SGIX:
if (ctx->Extensions.SGIX_shadow_ambient) {
/* XXX range? */
- *params = CHAN_TO_FLOAT(obj->ShadowAmbient);
+ *params = (GLint) CHAN_TO_FLOAT(obj->ShadowAmbient);
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(pname)");
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 37aadbcb6e3..4164e7a0dfb 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -1,4 +1,4 @@
-/* $Id: texstore.c,v 1.9 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: texstore.c,v 1.10 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -820,7 +820,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
return; /* out of memory */
/* unpack image, apply transfer ops and store in texImage->Data */
- _mesa_transfer_teximage(ctx, 1, texImage->Format, texImage->Data,
+ _mesa_transfer_teximage(ctx, 1, texImage->Format, (GLchan *) texImage->Data,
width, 1, 1, 0, 0, 0,
0, /* dstRowStride */
0, /* dstImageStride */
@@ -873,7 +873,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
return; /* out of memory */
/* unpack image, apply transfer ops and store in texImage->Data */
- _mesa_transfer_teximage(ctx, 2, texImage->Format, texImage->Data,
+ _mesa_transfer_teximage(ctx, 2, texImage->Format, (GLchan *) texImage->Data,
width, height, 1, 0, 0, 0,
texImage->Width * components * sizeof(GLchan),
0, /* dstImageStride */
@@ -921,7 +921,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
return; /* out of memory */
/* unpack image, apply transfer ops and store in texImage->Data */
- _mesa_transfer_teximage(ctx, 3, texImage->Format, texImage->Data,
+ _mesa_transfer_teximage(ctx, 3, texImage->Format, (GLchan *) texImage->Data,
width, height, depth, 0, 0, 0,
texImage->Width * components * sizeof(GLchan),
texImage->Width * texImage->Height * components
@@ -943,7 +943,7 @@ _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- _mesa_transfer_teximage(ctx, 1, texImage->Format, texImage->Data,
+ _mesa_transfer_teximage(ctx, 1, texImage->Format, (GLchan *) texImage->Data,
width, 1, 1, /* src size */
xoffset, 0, 0, /* dest offsets */
0, /* dstRowStride */
@@ -966,7 +966,7 @@ _mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level,
{
const GLint components = components_in_intformat(texImage->IntFormat);
const GLint compSize = _mesa_sizeof_type(texImage->Type);
- _mesa_transfer_teximage(ctx, 2, texImage->Format, texImage->Data,
+ _mesa_transfer_teximage(ctx, 2, texImage->Format, (GLchan *) texImage->Data,
width, height, 1, /* src size */
xoffset, yoffset, 0, /* dest offsets */
texImage->Width * components * compSize,
@@ -989,7 +989,7 @@ _mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level,
{
const GLint components = components_in_intformat(texImage->IntFormat);
const GLint compSize = _mesa_sizeof_type(texImage->Type);
- _mesa_transfer_teximage(ctx, 3, texImage->Format, texImage->Data,
+ _mesa_transfer_teximage(ctx, 3, texImage->Format, (GLchan *) texImage->Data,
width, height, depth, /* src size */
xoffset, yoffset, xoffset, /* dest offsets */
texImage->Width * components * compSize,
diff --git a/src/mesa/main/texutil.c b/src/mesa/main/texutil.c
index b0c67933631..08e991f4aa9 100644
--- a/src/mesa/main/texutil.c
+++ b/src/mesa/main/texutil.c
@@ -1,4 +1,4 @@
-/* $Id: texutil.c,v 1.12 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: texutil.c,v 1.13 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -135,10 +135,6 @@ _mesa_convert_teximage(MesaIntTexFormat dstFormat,
GLubyte *dst = (GLubyte *) dstImage;
GLint row;
for (row = 0; row < dstHeight; row++) {
- GLuint i;
- for (i = 0 ; i < dstWidth ; i++)
- fprintf(stderr, "%02x ", src[i]);
- fprintf(stderr, "\n");
MEMCPY(dst, src, dstWidth * sizeof(GLubyte));
dst += dstRowStride;
src += srcStride;
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index fdc2a908ec9..6d63bc11950 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1,4 +1,4 @@
-/* $Id: varray.c,v 1.37 2001/03/03 20:33:28 brianp Exp $ */
+/* $Id: varray.c,v 1.38 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -654,14 +654,14 @@ _mesa_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid *pointer)
_mesa_TexCoordPointer( tcomps, GL_FLOAT, stride,
(GLubyte *) pointer + i * coffset );
}
- for (i = factor; i < ctx->Const.MaxTextureUnits; i++) {
+ for (i = factor; i < (GLint) ctx->Const.MaxTextureUnits; i++) {
_mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) );
_mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY );
}
}
else {
GLint i;
- for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+ for (i = 0; i < (GLint) ctx->Const.MaxTextureUnits; i++) {
_mesa_ClientActiveTextureARB( (GLenum) (GL_TEXTURE0_ARB + i) );
_mesa_DisableClientState( GL_TEXTURE_COORD_ARRAY );
}
@@ -707,7 +707,8 @@ _mesa_LockArraysEXT(GLint first, GLsizei count)
if (MESA_VERBOSE & VERBOSE_API)
fprintf(stderr, "glLockArrays %d %d\n", first, count);
- if (first == 0 && count > 0 && count <= ctx->Const.MaxArrayLockSize) {
+ if (first == 0 && count > 0 &&
+ count <= (GLint) ctx->Const.MaxArrayLockSize) {
ctx->Array.LockFirst = first;
ctx->Array.LockCount = count;
}
diff --git a/src/mesa/math/m_eval.c b/src/mesa/math/m_eval.c
index a4ae0395cad..c182bbff01b 100644
--- a/src/mesa/math/m_eval.c
+++ b/src/mesa/math/m_eval.c
@@ -1,4 +1,4 @@
-/* $Id: m_eval.c,v 1.1 2000/12/26 05:09:31 keithw Exp $ */
+/* $Id: m_eval.c,v 1.2 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -89,7 +89,7 @@ _math_horner_bezier_curve(const GLfloat *cp, GLfloat *out, GLfloat t,
for(i=2, cp+=2*dim, powert=t*t; i<order; i++, powert*=t, cp +=dim)
{
bincoeff *= order-i;
- bincoeff *= inv_tab[i];
+ bincoeff *= (GLuint) inv_tab[i];
for(k=0; k<dim; k++)
out[k] = s*out[k] + bincoeff*powert*cp[k];
@@ -147,7 +147,7 @@ _math_horner_bezier_surf(GLfloat *cn, GLfloat *out, GLfloat u, GLfloat v,
i++, poweru*=u, ucp +=uinc)
{
bincoeff *= uorder-i;
- bincoeff *= inv_tab[i];
+ bincoeff *= (GLuint) inv_tab[i];
for(k=0; k<dim; k++)
cp[j*dim+k] = s*cp[j*dim+k] + bincoeff*poweru*ucp[k];
diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index 534040394ba..8f8320f2565 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -1,4 +1,4 @@
-/* $Id: m_matrix.c,v 1.6 2001/02/05 18:48:52 brianp Exp $ */
+/* $Id: m_matrix.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -766,16 +766,16 @@ static void analyse_from_scratch( GLmatrix *mat )
/* Do the real work
*/
- if (mask == MASK_IDENTITY) {
+ if (mask == (GLuint) MASK_IDENTITY) {
mat->type = MATRIX_IDENTITY;
}
- else if ((mask & MASK_2D_NO_ROT) == MASK_2D_NO_ROT) {
+ else if ((mask & MASK_2D_NO_ROT) == (GLuint) MASK_2D_NO_ROT) {
mat->type = MATRIX_2D_NO_ROT;
if ((mask & MASK_NO_2D_SCALE) != MASK_NO_2D_SCALE)
mat->flags = MAT_FLAG_GENERAL_SCALE;
}
- else if ((mask & MASK_2D) == MASK_2D) {
+ else if ((mask & MASK_2D) == (GLuint) MASK_2D) {
GLfloat mm = DOT2(m, m);
GLfloat m4m4 = DOT2(m+4,m+4);
GLfloat mm4 = DOT2(m,m+4);
@@ -794,7 +794,7 @@ static void analyse_from_scratch( GLmatrix *mat )
mat->flags |= MAT_FLAG_ROTATION;
}
- else if ((mask & MASK_3D_NO_ROT) == MASK_3D_NO_ROT) {
+ else if ((mask & MASK_3D_NO_ROT) == (GLuint) MASK_3D_NO_ROT) {
mat->type = MATRIX_3D_NO_ROT;
/* Check for scale */
@@ -808,7 +808,7 @@ static void analyse_from_scratch( GLmatrix *mat )
mat->flags |= MAT_FLAG_GENERAL_SCALE;
}
}
- else if ((mask & MASK_3D) == MASK_3D) {
+ else if ((mask & MASK_3D) == (GLuint) MASK_3D) {
GLfloat c1 = DOT3(m,m);
GLfloat c2 = DOT3(m+4,m+4);
GLfloat c3 = DOT3(m+8,m+8);
diff --git a/src/mesa/swrast/s_aaline.c b/src/mesa/swrast/s_aaline.c
index ac368aa85b8..cfaea45053b 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.4 2001/01/23 23:39:37 brianp Exp $ */
+/* $Id: s_aaline.c,v 1.5 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -31,7 +31,7 @@
#include "swrast/s_context.h"
#include "swrast/swrast.h"
#include "mtypes.h"
-
+#include "mmath.h"
#define SUB_PIXEL 4
@@ -170,7 +170,7 @@ solve_plane_chan(GLfloat x, GLfloat y, const GLfloat plane[4])
if (z < 0.0F)
return 0;
else if (z > CHAN_MAXF)
- return CHAN_MAXF;
+ return (GLchan) CHAN_MAXF;
return (GLchan) (GLint) z;
}
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h
index a98fbfd246c..91d588eee0a 100644
--- a/src/mesa/swrast/s_aalinetemp.h
+++ b/src/mesa/swrast/s_aalinetemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_aalinetemp.h,v 1.5 2001/01/29 23:38:41 brianp Exp $ */
+/* $Id: s_aalinetemp.h,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -41,7 +41,7 @@ NAME(plot)(GLcontext *ctx, const struct LineInfo *line,
const GLfloat fy = (GLfloat) iy;
const GLfloat coverage = compute_coveragef(line, ix, iy);
GLdepth z;
- GLfloat fog;
+ GLfixed fog;
GLchan red, green, blue, alpha;
GLint frac, indx, index;
GLchan specRed, specGreen, specBlue;
@@ -60,9 +60,9 @@ NAME(plot)(GLcontext *ctx, const struct LineInfo *line,
z = 0.0;
#endif
#ifdef DO_FOG
- fog = solve_plane(fx, fy, line->fPlane);
+ fog = FloatToFixed( solve_plane(fx, fy, line->fPlane) );
#else
- fog = 0.0;
+ fog = 0;
#endif
#ifdef DO_RGBA
red = solve_plane_chan(fx, fy, line->rPlane);
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index d9a11b0cf66..423318d0934 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -1,4 +1,4 @@
-/* $Id: s_aatriangle.c,v 1.7 2001/02/16 18:14:41 keithw Exp $ */
+/* $Id: s_aatriangle.c,v 1.8 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -123,7 +123,7 @@ solve_plane_chan(GLfloat x, GLfloat y, const GLfloat plane[4])
if (z < 0.0F)
return 0;
else if (z > CHAN_MAXF)
- return CHAN_MAXF;
+ return (GLchan) CHAN_MAXF;
return (GLchan) (GLint) z;
}
diff --git a/src/mesa/swrast/s_aatritemp.h b/src/mesa/swrast/s_aatritemp.h
index febc46f85d3..26e1352c99b 100644
--- a/src/mesa/swrast/s_aatritemp.h
+++ b/src/mesa/swrast/s_aatritemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_aatritemp.h,v 1.6 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_aatritemp.h,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -437,7 +437,7 @@
for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) {
if (ctx->Texture.Unit[unit]._ReallyEnabled) {
GLint j;
- for (j = 0; j < n; j++) {
+ for (j = 0; j < (GLint) n; j++) {
s[unit][j] = s[unit][j + left];
t[unit][j] = t[unit][j + left];
u[unit][j] = u[unit][j + left];
diff --git a/src/mesa/swrast/s_accum.c b/src/mesa/swrast/s_accum.c
index d7f7dd9e0da..0b8c611f6cb 100644
--- a/src/mesa/swrast/s_accum.c
+++ b/src/mesa/swrast/s_accum.c
@@ -1,4 +1,4 @@
-/* $Id: s_accum.c,v 1.5 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_accum.c,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -276,7 +276,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
case GL_ADD:
if (value != 0.0F) {
const GLaccum intVal = (GLaccum) (value * acc_scale);
- GLuint j;
+ GLint j;
/* Leave optimized accum buffer mode */
if (swrast->_IntegerAccumMode)
rescale_accum(ctx);
@@ -293,7 +293,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
case GL_MULT:
if (value != 1.0F) {
- GLuint j;
+ GLint j;
/* Leave optimized accum buffer mode */
if (swrast->_IntegerAccumMode)
rescale_accum(ctx);
@@ -325,13 +325,13 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
if (swrast->_IntegerAccumMode) {
/* simply add integer color values into accum buffer */
- GLuint j;
+ GLint j;
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
assert(swrast->_IntegerAccumScaler > 0.0);
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
- GLuint i, i4;
+ GLint i, i4;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i = i4 = 0; i < width; i++, i4+=4) {
acc[i4+0] += rgba[i][RCOMP];
@@ -349,10 +349,10 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
const GLfloat gscale = value * acc_scale / fChanMax;
const GLfloat bscale = value * acc_scale / fChanMax;
const GLfloat ascale = value * acc_scale / fChanMax;
- GLuint j;
+ GLint j;
for (j=0;j<height;j++) {
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
- GLuint i;
+ GLint i;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i=0;i<width;i++) {
*acc += (GLaccum) ( (GLfloat) rgba[i][RCOMP] * rscale ); acc++;
@@ -390,12 +390,12 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
RENDER_START(ctx);
if (swrast->_IntegerAccumMode) {
/* just copy values into accum buffer */
- GLuint j;
+ GLint j;
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
assert(swrast->_IntegerAccumScaler > 0.0);
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
- GLuint i, i4;
+ GLint i, i4;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
for (i = i4 = 0; i < width; i++, i4 += 4) {
acc[i4+0] = rgba[i][RCOMP];
@@ -414,7 +414,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
const GLfloat bscale = value * acc_scale / fChanMax;
const GLfloat ascale = value * acc_scale / fChanMax;
const GLfloat d = 3.0 / acc_scale;
- GLuint i, j;
+ GLint i, j;
for (j = 0; j < height; j++) {
GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos * 4;
_mesa_read_rgba_span(ctx, ctx->DrawBuffer, width, xpos, ypos, rgba);
@@ -446,7 +446,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
static GLfloat prevMult = 0.0;
const GLfloat mult = swrast->_IntegerAccumScaler;
const GLint max = MIN2((GLint) (256 / mult), 32767);
- GLuint j;
+ GLint j;
if (mult != prevMult) {
for (j = 0; j < max; j++)
multTable[j] = (GLint) ((GLfloat) j * mult + 0.5F);
@@ -457,7 +457,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
assert(swrast->_IntegerAccumScaler <= 1.0);
for (j = 0; j < height; j++) {
const GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos*4;
- GLuint i, i4;
+ GLint i, i4;
for (i = i4 = 0; i < width; i++, i4 += 4) {
ASSERT(acc[i4+0] < max);
ASSERT(acc[i4+1] < max);
@@ -486,7 +486,7 @@ _swrast_Accum( GLcontext *ctx, GLenum op, GLfloat value,
const GLfloat gscale = value / acc_scale * fChanMax;
const GLfloat bscale = value / acc_scale * fChanMax;
const GLfloat ascale = value / acc_scale * fChanMax;
- GLuint i, j;
+ GLint i, j;
for (j=0;j<height;j++) {
const GLaccum *acc = ctx->DrawBuffer->Accum + ypos * width4 + xpos*4;
for (i=0;i<width;i++) {
diff --git a/src/mesa/swrast/s_buffers.c b/src/mesa/swrast/s_buffers.c
index c64bdccb3e6..9dc01e89919 100644
--- a/src/mesa/swrast/s_buffers.c
+++ b/src/mesa/swrast/s_buffers.c
@@ -1,4 +1,4 @@
-/* $Id: s_buffers.c,v 1.5 2001/02/13 23:58:38 brianp Exp $ */
+/* $Id: s_buffers.c,v 1.6 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -124,7 +124,7 @@ clear_color_buffer(GLcontext *ctx)
else {
/* Color index mode */
ASSERT((ctx->Color.IndexMask & ((1 << ctx->Visual.indexBits) - 1))
- == ((1 << ctx->Visual.indexBits) - 1));
+ == (GLuint) ((1 << ctx->Visual.indexBits) - 1));
if (ctx->Visual.indexBits == 8) {
/* 8-bit clear */
GLubyte span[MAX_WIDTH];
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 22fcd3c2a83..7af64ff0453 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -1,4 +1,4 @@
-/* $Id: s_copypix.c,v 1.13 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_copypix.c,v 1.14 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -430,7 +430,7 @@ copy_rgba_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
if (transferOps) {
const GLfloat scale = (1.0F / CHAN_MAXF);
GLfloat rgbaFloat[MAX_WIDTH][4];
- GLuint k;
+ GLint k;
/* convert chan to float */
for (k = 0; k < width; k++) {
rgbaFloat[k][RCOMP] = (GLfloat) rgba[k][RCOMP] * scale;
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 1266d318487..b051cdc4891 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -1,4 +1,4 @@
-/* $Id: s_depth.c,v 1.6 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_depth.c,v 1.7 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1367,14 +1367,14 @@ _mesa_read_depth_span( GLcontext *ctx,
/* read from software depth buffer */
if (ctx->Visual.depthBits <= 16) {
const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = zptr[i];
}
}
else {
const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = zptr[i];
}
@@ -1439,14 +1439,14 @@ _mesa_read_depth_span_float( GLcontext *ctx,
/* read from software depth buffer */
if (ctx->Visual.depthBits <= 16) {
const GLushort *zptr = Z_ADDRESS16( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = (GLfloat) zptr[i] * scale;
}
}
else {
const GLuint *zptr = Z_ADDRESS32( ctx, x, y );
- GLuint i;
+ GLint i;
for (i = 0; i < n; i++) {
depth[i] = (GLfloat) zptr[i] * scale;
}
@@ -1455,7 +1455,7 @@ _mesa_read_depth_span_float( GLcontext *ctx,
else if (ctx->Driver.ReadDepthSpan) {
/* read from hardware depth buffer */
GLdepth d[MAX_WIDTH];
- GLuint i;
+ GLint i;
assert(n <= MAX_WIDTH);
(*ctx->Driver.ReadDepthSpan)( ctx, n, x, y, d );
for (i = 0; i < n; i++) {
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 68caa3a23ce..0943d310474 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: s_drawpix.c,v 1.11 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_drawpix.c,v 1.12 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -211,7 +211,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[4]) src, NULL);
src += rowLength * 4;
destY++;
}
@@ -222,7 +222,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
for (row=0; row<drawHeight; row++) {
destY--;
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[4]) src, NULL);
src += rowLength * 4;
}
}
@@ -231,7 +231,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
_mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) src, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[4]) src, zoomY0);
src += rowLength * 4;
destY++;
}
@@ -248,7 +248,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[3]) src, NULL);
src += rowLength * 3;
destY++;
}
@@ -259,7 +259,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
for (row=0; row<drawHeight; row++) {
destY--;
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) src, NULL);
+ (CONST GLchan (*)[3]) src, NULL);
src += rowLength * 3;
}
}
@@ -268,7 +268,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row=0; row<drawHeight; row++) {
_mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) src, zoomY0);
+ zSpan, 0, (GLchan (*)[3]) src, zoomY0);
src += rowLength * 3;
destY++;
}
@@ -293,7 +293,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgb[i][2] = src[i];
}
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) rgb, NULL);
+ (CONST GLchan (*)[3]) rgb, NULL);
src += rowLength;
destY++;
}
@@ -311,7 +311,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
}
destY--;
(*ctx->Driver.WriteRGBSpan)(ctx, drawWidth, destX, destY,
- (void *) rgb, NULL);
+ (CONST GLchan (*)[3]) rgb, NULL);
src += rowLength;
}
}
@@ -327,7 +327,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgb[i][2] = src[i];
}
_mesa_write_zoomed_rgb_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) rgb, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[3]) rgb, zoomY0);
src += rowLength;
destY++;
}
@@ -354,7 +354,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgba[i][3] = *ptr++;
}
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) rgba, NULL);
+ (CONST GLchan (*)[4]) rgba, NULL);
src += rowLength*2;
destY++;
}
@@ -374,7 +374,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
}
destY--;
(*ctx->Driver.WriteRGBASpan)(ctx, drawWidth, destX, destY,
- (void *) rgba, NULL);
+ (CONST GLchan (*)[4]) rgba, NULL);
src += rowLength*2;
}
}
@@ -392,7 +392,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
rgba[i][3] = *ptr++;
}
_mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) rgba, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[4]) rgba, zoomY0);
src += rowLength*2;
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;
}
@@ -439,7 +439,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
ASSERT(drawWidth < MAX_WIDTH);
_mesa_map_ci8_to_rgba(ctx, drawWidth, src, rgba);
_mesa_write_zoomed_rgba_span(ctx, drawWidth, destX, destY,
- zSpan, 0, (void *) rgba, zoomY0);
+ zSpan, 0, (CONST GLchan (*)[4]) rgba, zoomY0);
src += rowLength;
destY++;
}
@@ -631,8 +631,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
GLint row;
for (row = 0; row < height; row++, y++) {
GLdepth zspan[MAX_WIDTH];
- const GLushort *zptr = _mesa_image_address(&ctx->Unpack,
- pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
+ const GLushort *zptr = (const GLushort *)
+ _mesa_image_address(&ctx->Unpack, pixels, width, height,
+ GL_DEPTH_COMPONENT, type, 0, row, 0);
GLint i;
for (i = 0; i < width; i++)
zspan[i] = zptr[i];
@@ -644,8 +645,9 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
/* Special case: directly write 32-bit depth values */
GLint row;
for (row = 0; row < height; row++, y++) {
- const GLuint *zptr = _mesa_image_address(&ctx->Unpack,
- pixels, width, height, GL_DEPTH_COMPONENT, type, 0, row, 0);
+ const GLuint *zptr = (const GLuint *)
+ _mesa_image_address(&ctx->Unpack, pixels, width, height,
+ GL_DEPTH_COMPONENT, type, 0, row, 0);
_mesa_write_rgba_span( ctx, width, x, y, zptr, 0, rgba, GL_BITMAP );
}
}
@@ -662,7 +664,7 @@ draw_depth_pixels( GLcontext *ctx, GLint x, GLint y,
/* clamp depth values to [0,1] and convert from floats to integers */
{
const GLfloat zs = ctx->DepthMaxF;
- GLuint i;
+ GLint i;
for (i = 0; i < drawWidth; i++) {
zspan[i] = (GLdepth) (fspan[i] * zs);
}
@@ -765,7 +767,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
for (row = 0; row < height; row++) {
const GLvoid *source = _mesa_image_address(unpack,
pixels, width, height, format, type, 0, row, 0);
- _mesa_unpack_float_color_span(ctx, width, GL_RGBA, (void *) dest,
+ _mesa_unpack_float_color_span(ctx, width, GL_RGBA, (GLfloat *) dest,
format, type, source, unpack,
transferOps & IMAGE_PRE_CONVOLUTION_BITS,
GL_FALSE);
@@ -801,7 +803,7 @@ draw_rgba_pixels( GLcontext *ctx, GLint x, GLint y,
for (row = 0; row < height; row++, y++) {
const GLvoid *source = _mesa_image_address(unpack,
pixels, width, height, format, type, 0, row, 0);
- _mesa_unpack_chan_color_span(ctx, width, GL_RGBA, (void*) rgba,
+ _mesa_unpack_chan_color_span(ctx, width, GL_RGBA, (GLchan *) rgba,
format, type, source, unpack,
transferOps);
if ((ctx->Pixel.MinMaxEnabled && ctx->MinMax.Sink) ||
diff --git a/src/mesa/swrast/s_fog.c b/src/mesa/swrast/s_fog.c
index 7c2d519173b..debca659e43 100644
--- a/src/mesa/swrast/s_fog.c
+++ b/src/mesa/swrast/s_fog.c
@@ -1,4 +1,4 @@
-/* $Id: s_fog.c,v 1.9 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_fog.c,v 1.10 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -89,7 +89,7 @@ void
_mesa_fog_ci_pixels( const GLcontext *ctx,
GLuint n, const GLfixed fog[], GLuint index[] )
{
- GLuint idx = ctx->Fog.Index;
+ GLuint idx = (GLuint) ctx->Fog.Index;
GLuint i;
for (i=0;i<n;i++) {
diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h
index da7ad0352e6..60d7f45f140 100644
--- a/src/mesa/swrast/s_pointtemp.h
+++ b/src/mesa/swrast/s_pointtemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_pointtemp.h,v 1.3 2001/01/30 16:38:20 brianp Exp $ */
+/* $Id: s_pointtemp.h,v 1.4 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -200,10 +200,10 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
iRadius = iSize / 2;
if (iSize & 1) {
/* odd size */
- xmin = vert->win[0] - iRadius;
- xmax = vert->win[0] + iRadius;
- ymin = vert->win[1] - iRadius;
- ymax = vert->win[1] + iRadius;
+ xmin = (GLint) (vert->win[0] - iRadius);
+ xmax = (GLint) (vert->win[0] + iRadius);
+ ymin = (GLint) (vert->win[1] - iRadius);
+ ymax = (GLint) (vert->win[1] + iRadius);
}
else {
/* even size */
@@ -281,8 +281,8 @@ NAME ( GLcontext *ctx, const SWvertex *vert )
{
/* size == 1 */
- GLint x = vert->win[0];
- GLint y = vert->win[1];
+ GLint x = (GLint) vert->win[0];
+ GLint y = (GLint) vert->win[1];
#if ((FLAGS & (SPECULAR | TEXTURE)) == (SPECULAR | TEXTURE))
PB_WRITE_MULTITEX_SPEC_PIXEL(PB, x, y, z, fog,
red, green, blue, alpha,
diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c
index 4ca5af4c8f2..9ed58f4a63f 100644
--- a/src/mesa/swrast/s_readpix.c
+++ b/src/mesa/swrast/s_readpix.c
@@ -1,4 +1,4 @@
-/* $Id: s_readpix.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_readpix.c,v 1.9 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -155,7 +155,8 @@ read_depth_pixels( GLcontext *ctx,
dest = _mesa_image_address(packing, pixels, width, height,
GL_DEPTH_COMPONENT, type, 0, j, 0);
- _mesa_pack_depth_span(ctx, readWidth, dest, type, depth, &ctx->Pack);
+ _mesa_pack_depth_span(ctx, readWidth, (GLdepth *) dest, type,
+ depth, &ctx->Pack);
}
}
}
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c
index a69bd3c96c4..ac6f0dda4bc 100644
--- a/src/mesa/swrast/s_stencil.c
+++ b/src/mesa/swrast/s_stencil.c
@@ -1,4 +1,4 @@
-/* $Id: s_stencil.c,v 1.8 2001/03/03 20:33:30 brianp Exp $ */
+/* $Id: s_stencil.c,v 1.9 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1260,7 +1260,7 @@ clear_hardware_stencil_buffer( GLcontext *ctx )
GLint y;
for (y = 0; y < height; y++) {
GLstencil stencil[MAX_WIDTH];
- GLuint i;
+ GLint i;
(*ctx->Driver.ReadStencilSpan)(ctx, width, x, y, stencil);
for (i = 0; i < width; i++) {
stencil[i] = (stencil[i] & invMask) | clearVal;
diff --git a/src/mesa/swrast/s_tritemp.h b/src/mesa/swrast/s_tritemp.h
index 254907dea5b..254f0fd2d20 100644
--- a/src/mesa/swrast/s_tritemp.h
+++ b/src/mesa/swrast/s_tritemp.h
@@ -1,4 +1,4 @@
-/* $Id: s_tritemp.h,v 1.11 2001/03/03 00:37:27 brianp Exp $ */
+/* $Id: s_tritemp.h,v 1.12 2001/03/07 05:06:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -725,7 +725,7 @@
# endif
}
{
- ffog = FloatToFixed(vLower->fog) * 256 + dfogdx * adjx + dfogdy * adjy + FIXED_HALF;
+ ffog = FloatToFixed(vLower->fog * 256 + dfogdx * adjx + dfogdy * adjy) + FIXED_HALF;
fdfogOuter = SignedFloatToFixed(dfogdy + dxOuter * dfogdx);
}
#endif
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index b15d7d98036..6eaeb9c5273 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -1,4 +1,4 @@
-/* $Id: ss_context.c,v 1.11 2001/02/16 18:14:41 keithw Exp $ */
+/* $Id: ss_context.c,v 1.12 2001/03/07 05:06:13 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -98,7 +98,7 @@ _swsetup_CreateContext( GLcontext *ctx )
if (!swsetup)
return GL_FALSE;
- swsetup->verts = ALIGN_MALLOC( sizeof(SWvertex) * tnl->vb.Size, 32);
+ swsetup->verts = (SWvertex *) ALIGN_MALLOC( sizeof(SWvertex) * tnl->vb.Size, 32);
if (!swsetup->verts) {
FREE(swsetup);
return GL_FALSE;
diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c
index 3ed8c97fb6a..2ea04ce0aac 100644
--- a/src/mesa/swrast_setup/ss_triangle.c
+++ b/src/mesa/swrast_setup/ss_triangle.c
@@ -236,15 +236,16 @@ static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
SWvertex *verts = SWSETUP_CONTEXT(ctx)->verts;
- int i;
+ GLuint i;
if (VB->Elts) {
- for(i=first;i<last;i++)
- if(VB->ClipMask[VB->Elts[i]]==0)
+ 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++)
- if(VB->ClipMask[i]==0)
+ }
+ else {
+ for (i = first; i < last; i++)
+ if (VB->ClipMask[i] == 0)
_swrast_Point( ctx, &verts[i] );
}
}
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;
}
}