Преглед изворни кода

changes to silence MSVC warnings

tags/mesa_3_1
Brian Paul пре 26 година
родитељ
комит
99f16d01dd
5 измењених фајлова са 39 додато и 42 уклоњено
  1. 3
    3
      src/mesa/main/attrib.c
  2. 29
    29
      src/mesa/main/blend.c
  3. 2
    2
      src/mesa/main/polygon.c
  4. 2
    2
      src/mesa/main/rastpos.c
  5. 3
    6
      src/mesa/main/stencil.c

+ 3
- 3
src/mesa/main/attrib.c Прегледај датотеку

@@ -1,4 +1,4 @@
/* $Id: attrib.c,v 1.9 1999/11/08 07:36:43 brianp Exp $ */
/* $Id: attrib.c,v 1.10 1999/11/08 15:28:08 brianp Exp $ */

/*
* Mesa 3-D graphics library
@@ -581,10 +581,10 @@ void gl_PopAttrib( GLcontext* ctx )
break;
case GL_FOG_BIT:
{
GLboolean anyChange = (memcmp( &ctx->Fog, attr->data, sizeof(struct gl_fog_attrib) ) != 0);
GLboolean anyChange = (GLboolean) (memcmp( &ctx->Fog, attr->data, sizeof(struct gl_fog_attrib) ) != 0);
MEMCPY( &ctx->Fog, attr->data, sizeof(struct gl_fog_attrib) );
if (anyChange && ctx->Driver.Fogfv) {
const GLfloat mode = ctx->Fog.Mode;
const GLfloat mode = (GLfloat) ctx->Fog.Mode;
const GLfloat density = ctx->Fog.Density;
const GLfloat start = ctx->Fog.Start;
const GLfloat end = ctx->Fog.End;

+ 29
- 29
src/mesa/main/blend.c Прегледај датотеку

@@ -1,4 +1,4 @@
/* $Id: blend.c,v 1.6 1999/11/08 07:36:43 brianp Exp $ */
/* $Id: blend.c,v 1.7 1999/11/08 15:28:08 brianp Exp $ */

/*
* Mesa 3-D graphics library
@@ -259,10 +259,10 @@ void gl_BlendEquation( GLcontext *ctx, GLenum mode )
void gl_BlendColor( GLcontext *ctx, GLclampf red, GLclampf green,
GLclampf blue, GLclampf alpha )
{
ctx->Color.BlendColor[0] = CLAMP( red, 0.0, 1.0 );
ctx->Color.BlendColor[1] = CLAMP( green, 0.0, 1.0 );
ctx->Color.BlendColor[2] = CLAMP( blue, 0.0, 1.0 );
ctx->Color.BlendColor[3] = CLAMP( alpha, 0.0, 1.0 );
ctx->Color.BlendColor[0] = CLAMP( red, 0.0F, 1.0F );
ctx->Color.BlendColor[1] = CLAMP( green, 0.0F, 1.0F );
ctx->Color.BlendColor[2] = CLAMP( blue, 0.0F, 1.0F );
ctx->Color.BlendColor[3] = CLAMP( alpha, 0.0F, 1.0F );
}


@@ -301,10 +301,10 @@ static void blend_transparency( GLcontext *ctx, GLuint n, const GLubyte mask[],
ASSERT(g <= 255);
ASSERT(b <= 255);
ASSERT(a <= 255);
rgba[i][RCOMP] = r;
rgba[i][GCOMP] = g;
rgba[i][BCOMP] = b;
rgba[i][ACOMP] = a;
rgba[i][RCOMP] = (GLubyte) r;
rgba[i][GCOMP] = (GLubyte) g;
rgba[i][BCOMP] = (GLubyte) b;
rgba[i][ACOMP] = (GLubyte) a;
}
}
}
@@ -330,10 +330,10 @@ static void blend_add( GLcontext *ctx, GLuint n, const GLubyte mask[],
GLint g = rgba[i][GCOMP] + dest[i][GCOMP];
GLint b = rgba[i][BCOMP] + dest[i][BCOMP];
GLint a = rgba[i][ACOMP] + dest[i][ACOMP];
rgba[i][RCOMP] = MIN2( r, 255 );
rgba[i][GCOMP] = MIN2( g, 255 );
rgba[i][BCOMP] = MIN2( b, 255 );
rgba[i][ACOMP] = MIN2( a, 255 );
rgba[i][RCOMP] = (GLubyte) MIN2( r, 255 );
rgba[i][GCOMP] = (GLubyte) MIN2( g, 255 );
rgba[i][BCOMP] = (GLubyte) MIN2( b, 255 );
rgba[i][ACOMP] = (GLubyte) MIN2( a, 255 );
}
}
}
@@ -352,10 +352,10 @@ static void blend_min( GLcontext *ctx, GLuint n, const GLubyte mask[],

for (i=0;i<n;i++) {
if (mask[i]) {
rgba[i][RCOMP] = MIN2( rgba[i][RCOMP], dest[i][RCOMP] );
rgba[i][GCOMP] = MIN2( rgba[i][GCOMP], dest[i][GCOMP] );
rgba[i][BCOMP] = MIN2( rgba[i][BCOMP], dest[i][BCOMP] );
rgba[i][ACOMP] = MIN2( rgba[i][ACOMP], dest[i][ACOMP] );
rgba[i][RCOMP] = (GLubyte) MIN2( rgba[i][RCOMP], dest[i][RCOMP] );
rgba[i][GCOMP] = (GLubyte) MIN2( rgba[i][GCOMP], dest[i][GCOMP] );
rgba[i][BCOMP] = (GLubyte) MIN2( rgba[i][BCOMP], dest[i][BCOMP] );
rgba[i][ACOMP] = (GLubyte) MIN2( rgba[i][ACOMP], dest[i][ACOMP] );
}
}
}
@@ -374,10 +374,10 @@ static void blend_max( GLcontext *ctx, GLuint n, const GLubyte mask[],

for (i=0;i<n;i++) {
if (mask[i]) {
rgba[i][RCOMP] = MAX2( rgba[i][RCOMP], dest[i][RCOMP] );
rgba[i][GCOMP] = MAX2( rgba[i][GCOMP], dest[i][GCOMP] );
rgba[i][BCOMP] = MAX2( rgba[i][BCOMP], dest[i][BCOMP] );
rgba[i][ACOMP] = MAX2( rgba[i][ACOMP], dest[i][ACOMP] );
rgba[i][RCOMP] = (GLubyte) MAX2( rgba[i][RCOMP], dest[i][RCOMP] );
rgba[i][GCOMP] = (GLubyte) MAX2( rgba[i][GCOMP], dest[i][GCOMP] );
rgba[i][BCOMP] = (GLubyte) MAX2( rgba[i][BCOMP], dest[i][BCOMP] );
rgba[i][ACOMP] = (GLubyte) MAX2( rgba[i][ACOMP], dest[i][ACOMP] );
}
}
}
@@ -399,10 +399,10 @@ static void blend_modulate( GLcontext *ctx, GLuint n, const GLubyte mask[],
GLint g = (rgba[i][GCOMP] * dest[i][GCOMP]) >> 8;
GLint b = (rgba[i][BCOMP] * dest[i][BCOMP]) >> 8;
GLint a = (rgba[i][ACOMP] * dest[i][ACOMP]) >> 8;
rgba[i][RCOMP] = r;
rgba[i][GCOMP] = g;
rgba[i][BCOMP] = b;
rgba[i][ACOMP] = a;
rgba[i][RCOMP] = (GLubyte) r;
rgba[i][GCOMP] = (GLubyte) g;
rgba[i][BCOMP] = (GLubyte) b;
rgba[i][ACOMP] = (GLubyte) a;
}
}
}
@@ -695,10 +695,10 @@ static void blend_general( GLcontext *ctx, GLuint n, const GLubyte mask[],
}

/* final clamping */
rgba[i][RCOMP] = (GLint) CLAMP( r, 0.0F, 255.0F );
rgba[i][GCOMP] = (GLint) CLAMP( g, 0.0F, 255.0F );
rgba[i][BCOMP] = (GLint) CLAMP( b, 0.0F, 255.0F );
rgba[i][ACOMP] = (GLint) CLAMP( a, 0.0F, 255.0F );
rgba[i][RCOMP] = (GLubyte) (GLint) CLAMP( r, 0.0F, 255.0F );
rgba[i][GCOMP] = (GLubyte) (GLint) CLAMP( g, 0.0F, 255.0F );
rgba[i][BCOMP] = (GLubyte) (GLint) CLAMP( b, 0.0F, 255.0F );
rgba[i][ACOMP] = (GLubyte) (GLint) CLAMP( a, 0.0F, 255.0F );
}
}
}

+ 2
- 2
src/mesa/main/polygon.c Прегледај датотеку

@@ -1,4 +1,4 @@
/* $Id: polygon.c,v 1.5 1999/11/08 07:36:44 brianp Exp $ */
/* $Id: polygon.c,v 1.6 1999/11/08 15:28:08 brianp Exp $ */

/*
* Mesa 3-D graphics library
@@ -82,7 +82,7 @@ void gl_FrontFace( GLcontext *ctx, GLenum mode )
}

ctx->Polygon.FrontFace = mode;
ctx->Polygon.FrontBit = (mode == GL_CW);
ctx->Polygon.FrontBit = (GLboolean) (mode == GL_CW);
ctx->NewState |= NEW_POLYGON;

if (ctx->Driver.FrontFace)

+ 2
- 2
src/mesa/main/rastpos.c Прегледај датотеку

@@ -1,4 +1,4 @@
/* $Id: rastpos.c,v 1.2 1999/10/08 09:27:11 keithw Exp $ */
/* $Id: rastpos.c,v 1.3 1999/11/08 15:28:08 brianp Exp $ */

/*
* Mesa 3-D graphics library
@@ -107,7 +107,7 @@ void gl_RasterPos4f( GLcontext *ctx,
}

/* compute raster distance */
ctx->Current.RasterDistance =
ctx->Current.RasterDistance = (GLfloat)
GL_SQRT( eye[0]*eye[0] + eye[1]*eye[1] + eye[2]*eye[2] );

/* apply projection matrix: clip = Proj * eye */

+ 3
- 6
src/mesa/main/stencil.c Прегледај датотеку

@@ -1,4 +1,4 @@
/* $Id: stencil.c,v 1.7 1999/11/05 06:43:10 brianp Exp $ */
/* $Id: stencil.c,v 1.8 1999/11/08 15:28:08 brianp Exp $ */

/*
* Mesa 3-D graphics library
@@ -42,9 +42,6 @@
#include "stencil.h"
#include "types.h"
#include "enable.h"
#ifdef XFree86Server
#include "GL/xf86glx.h"
#endif
#endif


@@ -340,7 +337,7 @@ static void apply_stencil_op_to_span( GLcontext *ctx,
for (i=0;i<n;i++) {
if (mask[i]) {
GLstencil s = stencil[i];
stencil[i] = ~s;
stencil[i] = (GLstencil) ~s;
}
}
}
@@ -500,7 +497,7 @@ GLint gl_stencil_span( GLcontext *ctx,
}
break;
case GL_NOTEQUAL:
r = ctx->Stencil.Ref & ctx->Stencil.ValueMask;
r = (GLstencil) (ctx->Stencil.Ref & ctx->Stencil.ValueMask);
for (i=0;i<n;i++) {
if (mask[i]) {
s = (GLstencil) (stencil[i] & ctx->Stencil.ValueMask);

Loading…
Откажи
Сачувај