added some casts (Takaaki Nomura)
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
/* $Id: xm_line.c,v 1.1 2000/09/07 15:40:30 brianp Exp $ */
|
/* $Id: xm_line.c,v 1.2 2000/09/12 17:03:59 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 3.3
|
* Version: 3.5
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -100,14 +100,14 @@ points_func xmesa_get_points_func( GLcontext *ctx )
|
|||||||
if (ctx->Point.Size==1.0F && !ctx->Point.SmoothFlag && ctx->RasterMask==0
|
if (ctx->Point.Size==1.0F && !ctx->Point.SmoothFlag && ctx->RasterMask==0
|
||||||
&& !ctx->Texture.Enabled) {
|
&& !ctx->Texture.Enabled) {
|
||||||
if (xmesa->xm_buffer->buffer==XIMAGE) {
|
if (xmesa->xm_buffer->buffer==XIMAGE) {
|
||||||
return NULL; /*draw_points_ximage;*/
|
return (points_func) NULL; /*draw_points_ximage;*/
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return draw_points_ANY_pixmap;
|
return draw_points_ANY_pixmap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return NULL;
|
return (points_func) NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -673,11 +673,11 @@ line_func xmesa_get_line_func( GLcontext *ctx )
|
|||||||
(void) DitherValues; /* silence unused var warning */
|
(void) DitherValues; /* silence unused var warning */
|
||||||
(void) kernel1; /* silence unused var warning */
|
(void) kernel1; /* silence unused var warning */
|
||||||
|
|
||||||
if (ctx->Line.SmoothFlag) return NULL;
|
if (ctx->Line.SmoothFlag) return (line_func)NULL;
|
||||||
if (ctx->Texture.Enabled) return NULL;
|
if (ctx->Texture.Enabled) return (line_func)NULL;
|
||||||
if (ctx->Light.ShadeModel!=GL_FLAT) return NULL;
|
if (ctx->Light.ShadeModel!=GL_FLAT) return (line_func)NULL;
|
||||||
/* X line stippling doesn't match OpenGL stippling */
|
/* X line stippling doesn't match OpenGL stippling */
|
||||||
if (ctx->Line.StippleFlag==GL_TRUE) return NULL;
|
if (ctx->Line.StippleFlag==GL_TRUE) return (line_func)NULL;
|
||||||
|
|
||||||
if (xmesa->xm_buffer->buffer==XIMAGE
|
if (xmesa->xm_buffer->buffer==XIMAGE
|
||||||
&& ctx->RasterMask==DEPTH_BIT
|
&& ctx->RasterMask==DEPTH_BIT
|
||||||
@@ -699,13 +699,13 @@ line_func xmesa_get_line_func( GLcontext *ctx )
|
|||||||
case PF_DITHER_5R6G5B:
|
case PF_DITHER_5R6G5B:
|
||||||
return flat_DITHER_5R6G5B_z_line;
|
return flat_DITHER_5R6G5B_z_line;
|
||||||
case PF_DITHER:
|
case PF_DITHER:
|
||||||
return (depth==8) ? flat_DITHER8_z_line : NULL;
|
return (depth==8) ? flat_DITHER8_z_line : (line_func)NULL;
|
||||||
case PF_LOOKUP:
|
case PF_LOOKUP:
|
||||||
return (depth==8) ? flat_LOOKUP8_z_line : NULL;
|
return (depth==8) ? flat_LOOKUP8_z_line : (line_func)NULL;
|
||||||
case PF_HPCR:
|
case PF_HPCR:
|
||||||
return flat_HPCR_z_line;
|
return flat_HPCR_z_line;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return (line_func)NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (xmesa->xm_buffer->buffer==XIMAGE
|
if (xmesa->xm_buffer->buffer==XIMAGE
|
||||||
@@ -725,13 +725,13 @@ line_func xmesa_get_line_func( GLcontext *ctx )
|
|||||||
case PF_DITHER_5R6G5B:
|
case PF_DITHER_5R6G5B:
|
||||||
return flat_DITHER_5R6G5B_line;
|
return flat_DITHER_5R6G5B_line;
|
||||||
case PF_DITHER:
|
case PF_DITHER:
|
||||||
return (depth==8) ? flat_DITHER8_line : NULL;
|
return (depth==8) ? flat_DITHER8_line : (line_func)NULL;
|
||||||
case PF_LOOKUP:
|
case PF_LOOKUP:
|
||||||
return (depth==8) ? flat_LOOKUP8_line : NULL;
|
return (depth==8) ? flat_LOOKUP8_line : (line_func)NULL;
|
||||||
case PF_HPCR:
|
case PF_HPCR:
|
||||||
return flat_HPCR_line;
|
return flat_HPCR_line;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return (line_func)NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
@@ -744,5 +744,5 @@ line_func xmesa_get_line_func( GLcontext *ctx )
|
|||||||
return flat_pixmap_line;
|
return flat_pixmap_line;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return (line_func)NULL;
|
||||||
}
|
}
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
/* $Id: xm_tri.c,v 1.1 2000/09/07 15:40:30 brianp Exp $ */
|
/* $Id: xm_tri.c,v 1.2 2000/09/12 17:03:59 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
* Version: 3.3
|
* Version: 3.5
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999 Brian Paul All Rights Reserved.
|
* Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -1540,8 +1540,8 @@ triangle_func xmesa_get_triangle_func( GLcontext *ctx )
|
|||||||
|
|
||||||
(void) kernel1;
|
(void) kernel1;
|
||||||
|
|
||||||
if (ctx->Polygon.SmoothFlag) return NULL;
|
if (ctx->Polygon.SmoothFlag) return (triangle_func)NULL;
|
||||||
if (ctx->Texture.Enabled) return NULL;
|
if (ctx->Texture.Enabled) return (triangle_func)NULL;
|
||||||
|
|
||||||
if (xmesa->xm_buffer->buffer==XIMAGE) {
|
if (xmesa->xm_buffer->buffer==XIMAGE) {
|
||||||
if ( ctx->Light.ShadeModel==GL_SMOOTH
|
if ( ctx->Light.ShadeModel==GL_SMOOTH
|
||||||
@@ -1571,9 +1571,9 @@ triangle_func xmesa_get_triangle_func( GLcontext *ctx )
|
|||||||
return (depth==8) ? smooth_DITHER8_z_triangle
|
return (depth==8) ? smooth_DITHER8_z_triangle
|
||||||
: smooth_DITHER_z_triangle;
|
: smooth_DITHER_z_triangle;
|
||||||
case PF_LOOKUP:
|
case PF_LOOKUP:
|
||||||
return (depth==8) ? smooth_LOOKUP8_z_triangle : NULL;
|
return (depth==8) ? smooth_LOOKUP8_z_triangle : (triangle_func)NULL;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return (triangle_func)NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ctx->Light.ShadeModel==GL_FLAT
|
if ( ctx->Light.ShadeModel==GL_FLAT
|
||||||
@@ -1603,9 +1603,9 @@ triangle_func xmesa_get_triangle_func( GLcontext *ctx )
|
|||||||
return (depth==8) ? flat_DITHER8_z_triangle
|
return (depth==8) ? flat_DITHER8_z_triangle
|
||||||
: flat_DITHER_z_triangle;
|
: flat_DITHER_z_triangle;
|
||||||
case PF_LOOKUP:
|
case PF_LOOKUP:
|
||||||
return (depth==8) ? flat_LOOKUP8_z_triangle : NULL;
|
return (depth==8) ? flat_LOOKUP8_z_triangle : (triangle_func)NULL;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return (triangle_func)NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( ctx->RasterMask==0 /* no depth test */
|
if ( ctx->RasterMask==0 /* no depth test */
|
||||||
@@ -1632,9 +1632,9 @@ triangle_func xmesa_get_triangle_func( GLcontext *ctx )
|
|||||||
return (depth==8) ? smooth_DITHER8_triangle
|
return (depth==8) ? smooth_DITHER8_triangle
|
||||||
: smooth_DITHER_triangle;
|
: smooth_DITHER_triangle;
|
||||||
case PF_LOOKUP:
|
case PF_LOOKUP:
|
||||||
return (depth==8) ? smooth_LOOKUP8_triangle : NULL;
|
return (depth==8) ? smooth_LOOKUP8_triangle : (triangle_func)NULL;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return (triangle_func)NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1662,13 +1662,13 @@ triangle_func xmesa_get_triangle_func( GLcontext *ctx )
|
|||||||
return (depth==8) ? flat_DITHER8_triangle
|
return (depth==8) ? flat_DITHER8_triangle
|
||||||
: flat_DITHER_triangle;
|
: flat_DITHER_triangle;
|
||||||
case PF_LOOKUP:
|
case PF_LOOKUP:
|
||||||
return (depth==8) ? flat_LOOKUP8_triangle : NULL;
|
return (depth==8) ? flat_LOOKUP8_triangle : (triangle_func)NULL;
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return (triangle_func)NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return (triangle_func)NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* draw to pixmap */
|
/* draw to pixmap */
|
||||||
@@ -1680,11 +1680,11 @@ triangle_func xmesa_get_triangle_func( GLcontext *ctx )
|
|||||||
*/
|
*/
|
||||||
if (ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0) {
|
if (ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0) {
|
||||||
if (ctx->Color.DitherFlag && depth < 24)
|
if (ctx->Color.DitherFlag && depth < 24)
|
||||||
return NULL;
|
return (triangle_func)NULL;
|
||||||
setup_x_polygon_options( ctx );
|
setup_x_polygon_options( ctx );
|
||||||
return flat_pixmap_triangle;
|
return flat_pixmap_triangle;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return (triangle_func)NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user