added missing \'s
[mesa.git] / src / mesa / swrast / s_context.h
index 86b71ecc4590e57020175fd519c30caed02a24cb..03f6961001a7ce1cab87d26ece76eb23a600e971 100644 (file)
@@ -1,8 +1,10 @@
+/* $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"),
@@ -63,10 +65,6 @@ typedef void (*swrast_line_func)( GLcontext *ctx,
 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 *);
-
 
 
 /*
@@ -102,6 +100,10 @@ typedef void (*swrast_quad_func)( GLcontext *ctx,
 
 typedef struct
 {
+   /* Driver interface:
+    */
+   struct swrast_device_driver Driver;
+
    /* Configuration mechanisms to make software rasterizer match
     * characteristics of the hardware rasterizer (if present):
     */
@@ -112,8 +114,7 @@ typedef struct
     * _swrast_validate_derived():
     */
    GLuint _RasterMask;
-   GLboolean _MultiTextureEnabled;
-   GLuint _MinMagThresh[MAX_TEXTURE_UNITS];
+   GLfloat _MinMagThresh[MAX_TEXTURE_UNITS];
    GLfloat _backface_sign;
    GLboolean _PreferPixelFog;
 
@@ -136,12 +137,10 @@ typedef struct
    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.
@@ -151,7 +150,14 @@ typedef struct
    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.
     */
@@ -167,6 +173,19 @@ _swrast_validate_derived( GLcontext *ctx );
 
 #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