From 724abeb058ca9372c5a9b9e38ee43dde1accaa41 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 31 Oct 2000 18:09:44 +0000 Subject: Moved the software rasterizer to a new directory. --- src/mesa/main/fog.c | 160 +--------------------------------------------------- 1 file changed, 1 insertion(+), 159 deletions(-) (limited to 'src/mesa/main/fog.c') diff --git a/src/mesa/main/fog.c b/src/mesa/main/fog.c index 72c0ff48492..b7795759f55 100644 --- a/src/mesa/main/fog.c +++ b/src/mesa/main/fog.c @@ -1,4 +1,4 @@ -/* $Id: fog.c,v 1.26 2000/10/30 13:32:00 keithw Exp $ */ +/* $Id: fog.c,v 1.27 2000/10/31 18:09:44 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -148,10 +148,6 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params ) -void -_mesa_init_fog( void ) -{ -} static GLvector1f *get_fogcoord_ptr( GLcontext *ctx, GLvector1f *tmp ) { @@ -249,157 +245,3 @@ _mesa_make_win_fog_coords( struct vertex_buffer *VB ) make_win_fog_coords( VB, get_fogcoord_ptr( VB->ctx, &tmp ) ); } - - -/* - * Apply fog to an array of RGBA pixels. - * Input: n - number of pixels - * fog - array of interpolated screen-space fog coordinates in [0..1] - * red, green, blue, alpha - pixel colors - * Output: red, green, blue, alpha - fogged pixel colors - */ -void -_mesa_fog_rgba_pixels( const GLcontext *ctx, - GLuint n, - const GLfixed fog[], - GLchan rgba[][4] ) -{ - GLfixed rFog = ctx->Fog.Color[0] * CHAN_MAXF; - GLfixed gFog = ctx->Fog.Color[1] * CHAN_MAXF; - GLfixed bFog = ctx->Fog.Color[2] * CHAN_MAXF; - GLuint i; - - for (i=0;i> FIXED_SHIFT; - rgba[i][1] = (f*rgba[i][1] + g*gFog) >> FIXED_SHIFT; - rgba[i][2] = (f*rgba[i][2] + g*bFog) >> FIXED_SHIFT; - } -} - - - - -/* - * Apply fog to an array of color index pixels. - * Input: n - number of pixels - * z - array of integer depth values - * index - pixel color indexes - * Output: index - fogged pixel color indexes - */ -void -_mesa_fog_ci_pixels( const GLcontext *ctx, - GLuint n, const GLfixed fog[], GLuint index[] ) -{ - GLuint idx = ctx->Fog.Index; - GLuint i; - - for (i=0;iProjectionMatrix.m[10]; - GLfloat d = ctx->ProjectionMatrix.m[14]; - GLuint i; - - GLfloat tz = ctx->Viewport.WindowMap.m[MAT_TZ]; - GLfloat szInv = 1.0F / ctx->Viewport.WindowMap.m[MAT_SZ]; - - switch (ctx->Fog.Mode) { - case GL_LINEAR: - { - GLfloat fogEnd = ctx->Fog.End; - GLfloat fogScale = (GLfloat) FIXED_ONE / (ctx->Fog.End - - ctx->Fog.Start); - for (i=0;iFog.Density * eyez )); - } - break; - case GL_EXP2: - { - GLfloat negDensitySquared = -ctx->Fog.Density * ctx->Fog.Density; - for (i=0;i