summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/accum.c4
-rw-r--r--src/mesa/main/attrib.c4
-rw-r--r--src/mesa/main/context.c7
-rw-r--r--src/mesa/main/context.h4
-rw-r--r--src/mesa/main/depth.c4
-rw-r--r--src/mesa/main/dlist.c4
-rw-r--r--src/mesa/main/image.c8
-rw-r--r--src/mesa/main/teximage.c15
8 files changed, 26 insertions, 24 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 9621da5b5d3..ee32c92206a 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -1,4 +1,4 @@
-/* $Id: accum.c,v 1.16 2000/02/02 21:53:11 brianp Exp $ */
+/* $Id: accum.c,v 1.17 2000/03/19 01:10:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -351,7 +351,7 @@ _mesa_Accum( GLenum op, GLfloat value )
static GLchan multTable[32768];
static GLfloat prevMult = 0.0;
GLuint j;
- const GLint max = 256 / mult;
+ const GLint max = (GLint) (256 / mult);
if (mult != prevMult) {
assert(max <= 32768);
for (j = 0; j < max; j++)
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 95d2bc4ebfc..617a274e03e 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1,4 +1,4 @@
-/* $Id: attrib.c,v 1.19 2000/03/10 22:12:22 brianp Exp $ */
+/* $Id: attrib.c,v 1.20 2000/03/19 01:10:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -699,7 +699,7 @@ _mesa_PopAttrib(void)
case GL_POLYGON_STIPPLE_BIT:
MEMCPY( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) );
if (ctx->Driver.PolygonStipple)
- ctx->Driver.PolygonStipple( ctx, attr->data );
+ ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data );
break;
case GL_SCISSOR_BIT:
MEMCPY( &ctx->Scissor, attr->data,
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index f770326c39f..748607b8f5e 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.47 2000/03/17 15:31:52 brianp Exp $ */
+/* $Id: context.c,v 1.48 2000/03/19 01:10:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -287,6 +287,7 @@ GLvisual *gl_create_visual( GLboolean rgbFlag,
* bad value now (a 1-bit depth buffer!?!).
*/
assert(depthBits == 0 || depthBits > 1);
+printf("depthbits %d\n", depthBits);
if (depthBits < 0 || depthBits > 32) {
return NULL;
@@ -1394,8 +1395,8 @@ GLboolean gl_initialize_context_data( GLcontext *ctx,
}
/* setup API dispatch tables */
- ctx->Exec = CALLOC(_glapi_get_dispatch_table_size() * sizeof(void *));
- ctx->Save = CALLOC(_glapi_get_dispatch_table_size() * sizeof(void *));
+ ctx->Exec = (struct _glapi_table *) CALLOC(_glapi_get_dispatch_table_size() * sizeof(void *));
+ ctx->Save = (struct _glapi_table *) CALLOC(_glapi_get_dispatch_table_size() * sizeof(void *));
if (!ctx->Exec || !ctx->Save) {
free_shared_state(ctx, ctx->Shared);
FREE(ctx->VB);
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index b5dfa4d9e18..b9cc69bc69d 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -1,4 +1,4 @@
-/* $Id: context.h,v 1.13 2000/02/02 19:16:46 brianp Exp $ */
+/* $Id: context.h,v 1.14 2000/03/19 01:10:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -142,7 +142,7 @@ do { \
extern struct immediate *_mesa_CurrentInput;
-#define GET_CURRENT_CONTEXT(C) GLcontext *C = _glapi_Context
+#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
#define GET_IMMEDIATE struct immediate *IM = _mesa_CurrentInput
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index 57937dd0930..2f9697616e0 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -1,4 +1,4 @@
-/* $Id: depth.c,v 1.14 2000/03/17 15:31:52 brianp Exp $ */
+/* $Id: depth.c,v 1.15 2000/03/19 01:10:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1570,7 +1570,7 @@ _mesa_clear_depth_buffer( GLcontext *ctx )
2 * ctx->DrawBuffer->Width * ctx->DrawBuffer->Height);
}
else {
- GLushort *d = ctx->DrawBuffer->DepthBuffer;
+ GLushort *d = (GLushort *) ctx->DrawBuffer->DepthBuffer;
GLint n = ctx->DrawBuffer->Width * ctx->DrawBuffer->Height;
while (n >= 16) {
d[0] = clearValue; d[1] = clearValue;
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 2a317c7ba78..995e413e9c5 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,4 +1,4 @@
-/* $Id: dlist.c,v 1.34 2000/03/03 17:47:39 brianp Exp $ */
+/* $Id: dlist.c,v 1.35 2000/03/19 01:10:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -3391,7 +3391,7 @@ static void execute_list( GLcontext *ctx, GLuint list )
struct gl_pixelstore_attrib save = ctx->Unpack;
ctx->Unpack = _mesa_native_packing;
(*ctx->Exec->Bitmap)( (GLsizei) n[1].i, (GLsizei) n[2].i,
- n[3].f, n[4].f, n[5].f, n[6].f, n[7].data );
+ n[3].f, n[4].f, n[5].f, n[6].f, (const GLubyte *) n[7].data );
ctx->Unpack = save; /* restore */
}
break;
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 6c7e66dd64b..b1f64fb3fdf 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,4 +1,4 @@
-/* $Id: image.c,v 1.19 2000/03/13 18:31:51 brianp Exp $ */
+/* $Id: image.c,v 1.20 2000/03/19 01:10:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -497,7 +497,7 @@ void
_mesa_unpack_polygon_stipple( const GLubyte *pattern, GLuint dest[32],
const struct gl_pixelstore_attrib *unpacking )
{
- GLubyte *ptrn = _mesa_unpack_bitmap( 32, 32, pattern, unpacking );
+ GLubyte *ptrn = (GLubyte *) _mesa_unpack_bitmap( 32, 32, pattern, unpacking );
if (ptrn) {
/* Convert pattern from GLubytes to GLuints and handle big/little
* endian differences
@@ -1518,12 +1518,12 @@ extract_uint_indexes(GLuint n, GLuint indexes[],
for (i = 0; i < n; i++) {
GLfloat value = s[i];
SWAP4BYTE(value);
- indexes[i] = value;
+ indexes[i] = (GLuint) value;
}
}
else {
for (i = 0; i < n; i++)
- indexes[i] = s[i];
+ indexes[i] = (GLuint) s[i];
}
}
break;
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 035e88db0b5..a38d0c5a6df 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,4 +1,4 @@
-/* $Id: teximage.c,v 1.18 2000/03/01 23:28:20 brianp Exp $ */
+/* $Id: teximage.c,v 1.19 2000/03/19 01:10:12 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -446,9 +446,9 @@ make_texture_image( GLcontext *ctx, GLint internalFormat,
/* This will cover the common GL_RGB, GL_RGBA, GL_ALPHA,
* GL_LUMINANCE_ALPHA, etc. texture formats.
*/
- const GLubyte *src = gl_pixel_addr_in_image(unpacking,
+ const GLubyte *src = (const GLubyte *) gl_pixel_addr_in_image(unpacking,
pixels, width, height, srcFormat, srcType, 0, 0, 0);
- const GLubyte *src1 = gl_pixel_addr_in_image(unpacking,
+ const GLubyte *src1 = (const GLubyte *) gl_pixel_addr_in_image(unpacking,
pixels, width, height, srcFormat, srcType, 0, 1, 0);
const GLint srcStride = src1 - src;
GLubyte *dst = texImage->Data;
@@ -468,9 +468,9 @@ make_texture_image( GLcontext *ctx, GLint internalFormat,
}
else if (srcFormat == GL_RGBA && internalFormat == GL_RGB) {
/* commonly used by Quake */
- const GLubyte *src = gl_pixel_addr_in_image(unpacking,
+ const GLubyte *src = (const GLubyte *) gl_pixel_addr_in_image(unpacking,
pixels, width, height, srcFormat, srcType, 0, 0, 0);
- const GLubyte *src1 = gl_pixel_addr_in_image(unpacking,
+ const GLubyte *src1 = (const GLubyte *) gl_pixel_addr_in_image(unpacking,
pixels, width, height, srcFormat, srcType, 0, 1, 0);
const GLint srcStride = src1 - src;
GLubyte *dst = texImage->Data;
@@ -1316,7 +1316,8 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
assert(dest);
if (texImage->Format == GL_RGBA) {
const GLubyte *src = texImage->Data + row * width * 4 * sizeof(GLubyte);
- gl_pack_rgba_span( ctx, width, (void *) src, format, type, dest,
+ gl_pack_rgba_span( ctx, width, (CONST GLubyte (*)[4]) src,
+ format, type, dest,
&ctx->Pack, GL_TRUE );
}
else {
@@ -1633,7 +1634,7 @@ read_color_image( GLcontext *ctx, GLint x, GLint y,
GLint stride, i;
GLubyte *image, *dst;
- image = MALLOC(width * height * 4 * sizeof(GLubyte));
+ image = (GLubyte *) MALLOC(width * height * 4 * sizeof(GLubyte));
if (!image)
return NULL;