diff options
author | Brian Paul <[email protected]> | 2006-06-14 04:05:17 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-06-14 04:05:17 +0000 |
commit | 62e1fae858509615c6e54e0b9388cfa2691a5919 (patch) | |
tree | 35fb599ca4b17f1c909d916e2e91d2a1b6f587c5 /src/mesa/tnl/t_vb_fog.c | |
parent | 62dc134771858638ac38687c16bbb0578d20c419 (diff) |
A number of vertex buffer fields like NormalPtr, FogCoordPtr, etc are really
just aliases for members of the VB->AttribPtr[] array.
Begin replacing FogCoordPtr with VB->AttribPtr[_TNL_ATTRIB_FOG], and similarly
for NormalPtr, TexCoordPtr, PointSizePtr, etc.
Diffstat (limited to 'src/mesa/tnl/t_vb_fog.c')
-rw-r--r-- | src/mesa/tnl/t_vb_fog.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/tnl/t_vb_fog.c b/src/mesa/tnl/t_vb_fog.c index bbee44ebea0..51f28c4059f 100644 --- a/src/mesa/tnl/t_vb_fog.c +++ b/src/mesa/tnl/t_vb_fog.c @@ -158,8 +158,8 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT) { /* Fog is computed from vertex or fragment Z values */ /* source = VB->ObjPtr or VB->EyePtr coords */ - /* dest = VB->FogCoordPtr = fog stage private storage */ - VB->FogCoordPtr = &store->fogcoord; + /* dest = VB->AttribPtr[_TNL_ATTRIB_FOG] = fog stage private storage */ + VB->AttribPtr[_TNL_ATTRIB_FOG] = &store->fogcoord; if (!ctx->_NeedEyeCoords) { /* compute fog coords from object coords */ @@ -199,26 +199,26 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage) } else { /* use glFogCoord() coordinates */ - input = VB->FogCoordPtr; /* source data */ + input = VB->AttribPtr[_TNL_ATTRIB_FOG]; /* source data */ /* input->count may be one if glFogCoord was only called once * before glBegin. But we need to compute fog for all vertices. */ input->count = VB->ObjPtr->count; - VB->FogCoordPtr = &store->fogcoord; /* dest data */ + VB->AttribPtr[_TNL_ATTRIB_FOG] = &store->fogcoord; /* dest data */ } if (tnl->_DoVertexFog) { /* compute blend factors from fog coordinates */ - compute_fog_blend_factors( ctx, VB->FogCoordPtr, input ); + compute_fog_blend_factors( ctx, VB->AttribPtr[_TNL_ATTRIB_FOG], input ); } else { /* results = incoming fog coords (compute fog per-fragment later) */ - VB->FogCoordPtr = input; + VB->AttribPtr[_TNL_ATTRIB_FOG] = input; } - VB->AttribPtr[_TNL_ATTRIB_FOG] = VB->FogCoordPtr; + VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG]; return GL_TRUE; } |