-/* $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
- * 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
* copy of this software and associated documentation files (the "Software"),
if (ctx->Point.Size==1.0F && !ctx->Point.SmoothFlag && ctx->RasterMask==0
&& !ctx->Texture.Enabled) {
if (xmesa->xm_buffer->buffer==XIMAGE) {
- return NULL; /*draw_points_ximage;*/
+ return (points_func) NULL; /*draw_points_ximage;*/
}
else {
return draw_points_ANY_pixmap;
}
}
else {
- return NULL;
+ return (points_func) NULL;
}
}
(void) DitherValues; /* silence unused var warning */
(void) kernel1; /* silence unused var warning */
- if (ctx->Line.SmoothFlag) return NULL;
- if (ctx->Texture.Enabled) return NULL;
- if (ctx->Light.ShadeModel!=GL_FLAT) return NULL;
+ if (ctx->Line.SmoothFlag) return (line_func)NULL;
+ if (ctx->Texture.Enabled) return (line_func)NULL;
+ if (ctx->Light.ShadeModel!=GL_FLAT) return (line_func)NULL;
/* 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
&& ctx->RasterMask==DEPTH_BIT
case PF_DITHER_5R6G5B:
return flat_DITHER_5R6G5B_z_line;
case PF_DITHER:
- return (depth==8) ? flat_DITHER8_z_line : NULL;
+ return (depth==8) ? flat_DITHER8_z_line : (line_func)NULL;
case PF_LOOKUP:
- return (depth==8) ? flat_LOOKUP8_z_line : NULL;
+ return (depth==8) ? flat_LOOKUP8_z_line : (line_func)NULL;
case PF_HPCR:
return flat_HPCR_z_line;
default:
- return NULL;
+ return (line_func)NULL;
}
}
if (xmesa->xm_buffer->buffer==XIMAGE
case PF_DITHER_5R6G5B:
return flat_DITHER_5R6G5B_line;
case PF_DITHER:
- return (depth==8) ? flat_DITHER8_line : NULL;
+ return (depth==8) ? flat_DITHER8_line : (line_func)NULL;
case PF_LOOKUP:
- return (depth==8) ? flat_LOOKUP8_line : NULL;
+ return (depth==8) ? flat_LOOKUP8_line : (line_func)NULL;
case PF_HPCR:
return flat_HPCR_line;
default:
- return NULL;
+ return (line_func)NULL;
}
}
#if 0
return flat_pixmap_line;
}
#endif
- return NULL;
+ return (line_func)NULL;
}
-/* $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
- * 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
* copy of this software and associated documentation files (the "Software"),
(void) kernel1;
- if (ctx->Polygon.SmoothFlag) return NULL;
- if (ctx->Texture.Enabled) return NULL;
+ if (ctx->Polygon.SmoothFlag) return (triangle_func)NULL;
+ if (ctx->Texture.Enabled) return (triangle_func)NULL;
if (xmesa->xm_buffer->buffer==XIMAGE) {
if ( ctx->Light.ShadeModel==GL_SMOOTH
return (depth==8) ? smooth_DITHER8_z_triangle
: smooth_DITHER_z_triangle;
case PF_LOOKUP:
- return (depth==8) ? smooth_LOOKUP8_z_triangle : NULL;
+ return (depth==8) ? smooth_LOOKUP8_z_triangle : (triangle_func)NULL;
default:
- return NULL;
+ return (triangle_func)NULL;
}
}
if ( ctx->Light.ShadeModel==GL_FLAT
return (depth==8) ? flat_DITHER8_z_triangle
: flat_DITHER_z_triangle;
case PF_LOOKUP:
- return (depth==8) ? flat_LOOKUP8_z_triangle : NULL;
+ return (depth==8) ? flat_LOOKUP8_z_triangle : (triangle_func)NULL;
default:
- return NULL;
+ return (triangle_func)NULL;
}
}
if ( ctx->RasterMask==0 /* no depth test */
return (depth==8) ? smooth_DITHER8_triangle
: smooth_DITHER_triangle;
case PF_LOOKUP:
- return (depth==8) ? smooth_LOOKUP8_triangle : NULL;
+ return (depth==8) ? smooth_LOOKUP8_triangle : (triangle_func)NULL;
default:
- return NULL;
+ return (triangle_func)NULL;
}
}
return (depth==8) ? flat_DITHER8_triangle
: flat_DITHER_triangle;
case PF_LOOKUP:
- return (depth==8) ? flat_LOOKUP8_triangle : NULL;
+ return (depth==8) ? flat_LOOKUP8_triangle : (triangle_func)NULL;
default:
- return NULL;
+ return (triangle_func)NULL;
}
}
- return NULL;
+ return (triangle_func)NULL;
}
else {
/* draw to pixmap */
*/
if (ctx->Light.ShadeModel==GL_FLAT && ctx->RasterMask==0) {
if (ctx->Color.DitherFlag && depth < 24)
- return NULL;
+ return (triangle_func)NULL;
setup_x_polygon_options( ctx );
return flat_pixmap_triangle;
}
#endif
- return NULL;
+ return (triangle_func)NULL;
}
}