summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vb_fog.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-03-19 02:25:35 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-03-19 02:25:35 +0000
commit709892459922a32096fe9dd8261d0d92337bb02f (patch)
tree87782215d4531207c97b236a5dfa0d15c45aef8a /src/mesa/tnl/t_vb_fog.c
parentd9bf6ccce9f5fea22d6a478c4afafea3c3c525c5 (diff)
Split driver struct into swrast/tnl/core components.
Diffstat (limited to 'src/mesa/tnl/t_vb_fog.c')
-rw-r--r--src/mesa/tnl/t_vb_fog.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c
index 0cffbbb0d1..79d72e4567 100644
--- a/src/mesa/tnl/t_vb_fog.c
+++ b/src/mesa/tnl/t_vb_fog.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_fog.c,v 1.8 2001/03/12 00:48:44 gareth Exp $ */
+/* $Id: t_vb_fog.c,v 1.9 2001/03/19 02:25:37 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -135,12 +135,15 @@ static GLboolean run_fog_stage( GLcontext *ctx,
struct fog_stage_data *store = FOG_STAGE_DATA(stage);
GLvector1f *input;
- VB->FogCoordPtr = &store->fogcoord;
-
if (stage->changed_inputs == 0)
return GL_TRUE;
if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT) {
+ /* fog computed from Z depth */
+ /* source = VB->ObjPtr or VB->EyePtr coords */
+ /* dest = VB->FogCoordPtr = fog stage private storage */
+ VB->FogCoordPtr = &store->fogcoord;
+
if (!ctx->_NeedEyeCoords) {
GLfloat *m = ctx->ModelView.m;
GLfloat plane[4];
@@ -174,8 +177,13 @@ static GLboolean run_fog_stage( GLcontext *ctx,
input->stride = VB->EyePtr->stride;
input->count = VB->EyePtr->count;
}
- } else
+ } else {
+ /* use glFogCoord() coordinates */
+ /* source = VB->FogCoordPtr */
input = VB->FogCoordPtr;
+ /* dest = fog stage private storage */
+ VB->FogCoordPtr = &store->fogcoord;
+ }
make_win_fog_coords( ctx, VB->FogCoordPtr, input );
return GL_TRUE;