mesa: move more swrast-related #defines out of core Mesa
[mesa.git] / src / mesa / swrast / s_fog.c
index 3fc843921339d76f7790d982566ede12b39ff9da..ea59de1602007515d1c46da98df88967e3308b6e 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "main/glheader.h"
 #include "main/colormac.h"
-#include "main/context.h"
 #include "main/macros.h"
 
 #include "s_context.h"
@@ -36,7 +35,7 @@
  * Used to convert current raster distance to a fog factor in [0,1].
  */
 GLfloat
-_swrast_z_to_fogfactor(GLcontext *ctx, GLfloat z)
+_swrast_z_to_fogfactor(struct gl_context *ctx, GLfloat z)
 {
    GLfloat d, f;
 
@@ -130,7 +129,7 @@ else {                                                                              \
  * _PreferPixelFog should be in sync with that state!
  */
 void
-_swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span )
+_swrast_fog_rgba_span( const struct gl_context *ctx, SWspan *span )
 {
    const SWcontext *swrast = CONST_SWRAST_CONTEXT(ctx);
    GLfloat rFog, gFog, bFog;
@@ -159,7 +158,7 @@ _swrast_fog_rgba_span( const GLcontext *ctx, SWspan *span )
       /* The span's fog values are fog coordinates, now compute blend factors
        * and blend the fragment colors with the fog color.
        */
-      switch (swrast->_FogMode) {
+      switch (ctx->Fog.Mode) {
       case GL_LINEAR:
          {
             const GLfloat fogEnd = ctx->Fog.End;