-/* $Id: t_vb_fog.c,v 1.15 2002/01/05 20:51:13 brianp Exp $ */
+/* $Id: t_vb_fog.c,v 1.19 2002/10/29 20:29:03 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 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"),
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Authors:
- * Keith Whitwell <keithw@valinux.com>
+ * Keith Whitwell <keith@tungstengraphics.com>
*/
#include "colormac.h"
#include "context.h"
#include "macros.h"
-#include "mem.h"
+#include "imports.h"
#include "mmath.h"
#include "mtypes.h"
/* fog computed from Z depth */
/* source = VB->ObjPtr or VB->EyePtr coords */
/* dest = VB->FogCoordPtr = fog stage private storage */
- VB->AttribPtr[VERT_ATTRIB_FOG] = &store->fogcoord;
+ VB->FogCoordPtr = &store->fogcoord;
if (!ctx->_NeedEyeCoords) {
const GLfloat *m = ctx->ModelviewMatrixStack.Top->m;
else {
/* use glFogCoord() coordinates */
/* source = VB->FogCoordPtr */
- input = VB->AttribPtr[VERT_ATTRIB_FOG];
+ input = VB->FogCoordPtr;
/* dest = fog stage private storage */
- VB->AttribPtr[VERT_ATTRIB_FOG] = &store->fogcoord;
+ VB->FogCoordPtr = &store->fogcoord;
}
- make_win_fog_coords( ctx, VB->AttribPtr[VERT_ATTRIB_FOG], input );
+ make_win_fog_coords( ctx, VB->FogCoordPtr, input );
return GL_TRUE;
}
stage->active = ctx->Fog.Enabled && !ctx->VertexProgram.Enabled;
if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT)
- stage->inputs = VERT_EYE;
+ stage->inputs = VERT_BIT_EYE;
else
- stage->inputs = VERT_FOG_BIT;
+ stage->inputs = VERT_BIT_FOG;
}
_NEW_FOG, /* run_state */
GL_FALSE, /* active? */
0, /* inputs */
- VERT_FOG_BIT, /* outputs */
+ VERT_BIT_FOG, /* outputs */
0, /* changed_inputs */
NULL, /* private_data */
free_fog_data, /* dtr */