summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_texgen.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-05-01 22:44:02 +0000
committerBrian Paul <[email protected]>2003-05-01 22:44:02 +0000
commit92f9785c727ea10ff5f8dc9770f0e8f388fcea70 (patch)
tree10335899a8205128723f6b459d827e918bbc2d86 /src/mesa/tnl/t_vb_texgen.c
parent09b00c5ded8e6211c9c79be600bb8c8ecad0d8fc (diff)
Use ctx->Const.MaxTextureImageUnits and MaxTextureCoordUnits in more places.
Misc vertex array / vertex program changes.
Diffstat (limited to 'src/mesa/tnl/t_vb_texgen.c')
-rw-r--r--src/mesa/tnl/t_vb_texgen.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index 9a954bf4851..22cb07edf30 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -1,5 +1,3 @@
-/* $Id: t_vb_texgen.c,v 1.19 2003/03/31 16:48:35 brianp Exp $ */
-
/*
* Mesa 3-D graphics library
* Version: 5.1
@@ -527,7 +525,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx,
struct texgen_stage_data *store = TEXGEN_STAGE_DATA( stage );
GLuint i;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++)
if (ctx->Texture._TexGenEnabled & ENABLE_TEXGEN(i)) {
if (stage->changed_inputs & (VERT_BIT_EYE | VERT_BIT_NORMAL | VERT_BIT_TEX(i)))
store->TexgenFunc[i]( ctx, store, i );
@@ -547,7 +545,7 @@ static GLboolean run_validate_texgen_stage( GLcontext *ctx,
struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);
GLuint i;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++) {
+ for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) {
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
if (texUnit->TexGenEnabled) {
@@ -604,7 +602,7 @@ static void check_texgen( GLcontext *ctx, struct gl_pipeline_stage *stage )
if (ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS)
inputs |= VERT_BIT_NORMAL;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++)
if (ctx->Texture._TexGenEnabled & ENABLE_TEXGEN(i))
{
outputs |= VERT_BIT_TEX(i);
@@ -642,7 +640,7 @@ static GLboolean alloc_texgen_data( GLcontext *ctx,
if (!store)
return GL_FALSE;
- for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
+ for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++)
_mesa_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 );
store->tmp_f = (GLfloat (*)[3]) MALLOC(VB->Size * sizeof(GLfloat) * 3);