+/* $Id: s_context.h,v 1.10 2001/05/17 09:32:17 keithw Exp $ */
+
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 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"),
typedef void (*swrast_tri_func)( GLcontext *ctx, const SWvertex *,
const SWvertex *, const SWvertex *);
-typedef void (*swrast_quad_func)( GLcontext *ctx,
- const SWvertex *, const SWvertex *,
- const SWvertex *, const SWvertex *);
-
/*
typedef struct
{
+ /* Driver interface:
+ */
+ struct swrast_device_driver Driver;
+
/* Configuration mechanisms to make software rasterizer match
* characteristics of the hardware rasterizer (if present):
*/
* _swrast_validate_derived():
*/
GLuint _RasterMask;
- GLboolean _MultiTextureEnabled;
- GLuint _MinMagThresh[MAX_TEXTURE_UNITS];
+ GLfloat _MinMagThresh[MAX_TEXTURE_UNITS];
GLfloat _backface_sign;
GLboolean _PreferPixelFog;
void (*choose_point)( GLcontext * );
void (*choose_line)( GLcontext * );
void (*choose_triangle)( GLcontext * );
- void (*choose_quad)( GLcontext * );
GLuint invalidate_point;
GLuint invalidate_line;
GLuint invalidate_triangle;
- GLuint invalidate_quad;
/* Function pointers for dispatch behind public entrypoints.
swrast_point_func Point;
swrast_line_func Line;
swrast_tri_func Triangle;
- swrast_quad_func Quad;
+
+ /* Placeholders for when separate specular (or secondary color) is
+ * enabled but texturing is not.
+ */
+ swrast_point_func SpecPoint;
+ swrast_line_func SpecLine;
+ swrast_tri_func SpecTriangle;
+
/* Internal hooks, kept uptodate by the same mechanism as above.
*/
#define SWRAST_CONTEXT(ctx) ((SWcontext *)ctx->swrast_context)
+#define RENDER_START(SWctx, GLctx) \
+ do { \
+ if ((SWctx)->Driver.SpanRenderStart) { \
+ (*(SWctx)->Driver.SpanRenderStart)(GLctx); \
+ } \
+ } while (0)
+
+#define RENDER_FINISH(SWctx, GLctx) \
+ do { \
+ if ((SWctx)->Driver.SpanRenderFinish) { \
+ (*(SWctx)->Driver.SpanRenderFinish)(GLctx); \
+ } \
+ } while (0)
#endif