summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_texgen.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-06-14 04:05:17 +0000
committerBrian Paul <[email protected]>2006-06-14 04:05:17 +0000
commit62e1fae858509615c6e54e0b9388cfa2691a5919 (patch)
tree35fb599ca4b17f1c909d916e2e91d2a1b6f587c5 /src/mesa/tnl/t_vb_texgen.c
parent62dc134771858638ac38687c16bbb0578d20c419 (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_texgen.c')
-rw-r--r--src/mesa/tnl/t_vb_texgen.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index bfb7a503691..5f7b2dccd8f 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -254,12 +254,12 @@ static void texgen_reflection_map_nv( GLcontext *ctx,
GLuint unit )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- GLvector4f *in = VB->TexCoordPtr[unit];
+ GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];
GLvector4f *out = &store->texcoord[unit];
build_f_tab[VB->EyePtr->size]( out->start,
out->stride,
- VB->NormalPtr,
+ VB->AttribPtr[_TNL_ATTRIB_NORMAL],
VB->EyePtr );
out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_3;
@@ -276,9 +276,9 @@ static void texgen_normal_map_nv( GLcontext *ctx,
GLuint unit )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- GLvector4f *in = VB->TexCoordPtr[unit];
+ GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];
GLvector4f *out = &store->texcoord[unit];
- GLvector4f *normal = VB->NormalPtr;
+ GLvector4f *normal = VB->AttribPtr[_TNL_ATTRIB_NORMAL];
GLfloat (*texcoord)[4] = (GLfloat (*)[4])out->start;
GLuint count = VB->Count;
GLuint i;
@@ -304,7 +304,7 @@ static void texgen_sphere_map( GLcontext *ctx,
GLuint unit )
{
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
- GLvector4f *in = VB->TexCoordPtr[unit];
+ GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];
GLvector4f *out = &store->texcoord[unit];
GLfloat (*texcoord)[4] = (GLfloat (*)[4]) out->start;
GLuint count = VB->Count;
@@ -314,7 +314,7 @@ static void texgen_sphere_map( GLcontext *ctx,
(build_m_tab[VB->EyePtr->size])( store->tmp_f,
store->tmp_m,
- VB->NormalPtr,
+ VB->AttribPtr[_TNL_ATTRIB_NORMAL],
VB->EyePtr );
out->size = MAX2(in->size,2);
@@ -338,12 +338,12 @@ static void texgen( GLcontext *ctx,
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
- GLvector4f *in = VB->TexCoordPtr[unit];
+ GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];
GLvector4f *out = &store->texcoord[unit];
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
const GLvector4f *obj = VB->ObjPtr;
const GLvector4f *eye = VB->EyePtr;
- const GLvector4f *normal = VB->NormalPtr;
+ const GLvector4f *normal = VB->AttribPtr[_TNL_ATTRIB_NORMAL];
const GLfloat *m = store->tmp_m;
const GLuint count = VB->Count;
GLfloat (*texcoord)[4] = (GLfloat (*)[4])out->data;
@@ -501,8 +501,8 @@ static GLboolean run_texgen_stage( GLcontext *ctx,
store->TexgenFunc[i]( ctx, store, i );
- VB->AttribPtr[VERT_ATTRIB_TEX0+i] =
- VB->TexCoordPtr[i] = &store->texcoord[i];
+ VB->TexCoordPtr[i] =
+ VB->AttribPtr[VERT_ATTRIB_TEX0 + i] = &store->texcoord[i];
}
}