/*
* Mesa 3-D graphics library
* Version: 3.5
- *
+ *
* Copyright (C) 1999 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"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
#ifndef S_CONTEXT_H
#define S_CONTEXT_H
-#include "types.h"
+#include "mtypes.h"
#include "swrast.h"
/*
GLchan src[][4], CONST GLchan dst[][4] );
#endif
-typedef void (*swrast_tri_func)( GLcontext *ctx,
- SWvertex *, SWvertex *, SWvertex *);
-typedef void (*swrast_line_func)( GLcontext *ctx, SWvertex *, SWvertex *);
-typedef void (*swrast_point_func)( GLcontext *ctx, SWvertex *);
+typedef void (*swrast_point_func)( GLcontext *ctx, const SWvertex *);
+
+typedef void (*swrast_line_func)( GLcontext *ctx,
+ const SWvertex *, const SWvertex *);
+
+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 *);
+
+
/*
* Bitmasks to indicate which rasterization options are enabled (RasterMask)
typedef struct
{
- GLuint NewState;
- GLuint StateChanges;
+ /* Configuration mechanisms to make software rasterizer match
+ * characteristics of the hardware rasterizer (if present):
+ */
+ GLboolean AllowVertexFog;
+ GLboolean AllowPixelFog;
+ /* Derived values, invalidated on statechanges, updated from
+ * _swrast_validate_derived():
+ */
GLuint _RasterMask;
+ GLboolean _MultiTextureEnabled;
GLuint _MinMagThresh[MAX_TEXTURE_UNITS];
+ GLfloat _backface_sign;
+ GLboolean _PreferPixelFog;
+
+ /* Accum buffer temporaries.
+ */
+ GLboolean _IntegerAccumMode; /* Storing unscaled integers? */
+ GLfloat _IntegerAccumScaler; /* Implicit scale factor */
+
+ /* Working values:
+ */
struct pixel_buffer* PB;
GLuint StippleCounter; /* Line stipple counter */
-
+ GLuint NewState;
+ GLuint StateChanges;
/* Mechanism to allow driver (like X11) to register further
* software rasterization routines.
/* Function pointers for dispatch behind public entrypoints.
*/
void (*InvalidateState)( GLcontext *ctx, GLuint new_state );
- void (*Point)( GLcontext *ctx, SWvertex *v );
- void (*Line)( GLcontext *ctx, SWvertex *v0, SWvertex *v1 );
- void (*Triangle)( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2 );
- void (*Quad)( GLcontext *ctx, SWvertex *v0, SWvertex *v1, SWvertex *v2,
- SWvertex *v3);
+
+ swrast_point_func Point;
+ swrast_line_func Line;
+ swrast_tri_func Triangle;
+ swrast_quad_func Quad;
/* Internal hooks, kept uptodate by the same mechanism as above.
*/