summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_texgen.c20
-rw-r--r--src/mesa/tnl/t_vb_texmat.c8
2 files changed, 18 insertions, 10 deletions
diff --git a/src/mesa/tnl/t_vb_texgen.c b/src/mesa/tnl/t_vb_texgen.c
index cbc7778ea9..78ac09db25 100644
--- a/src/mesa/tnl/t_vb_texgen.c
+++ b/src/mesa/tnl/t_vb_texgen.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_texgen.c,v 1.6 2001/03/12 00:48:44 gareth Exp $ */
+/* $Id: t_vb_texgen.c,v 1.7 2001/03/29 21:16:26 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -78,7 +78,6 @@ struct texgen_stage_data {
-
static GLuint all_bits[5] = {
0,
VEC_SIZE_1,
@@ -89,6 +88,12 @@ static GLuint all_bits[5] = {
#define VEC_SIZE_FLAGS (VEC_SIZE_1|VEC_SIZE_2|VEC_SIZE_3|VEC_SIZE_4)
+#define TEXGEN_NEED_M (TEXGEN_SPHERE_MAP)
+#define TEXGEN_NEED_F (TEXGEN_SPHERE_MAP | \
+ TEXGEN_REFLECTION_MAP_NV)
+
+
+
/*
*/
static void build_m3(GLfloat f[][3], GLfloat m[],
@@ -532,7 +537,7 @@ static GLboolean run_texgen_stage( GLcontext *ctx,
GLuint i;
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
- if (ctx->_Enabled & ENABLE_TEXGEN(i)) {
+ if (ctx->Texture._TexGenEnabled & ENABLE_TEXGEN(i)) {
if (stage->changed_inputs & (VERT_EYE | VERT_NORM | VERT_TEX(i)))
store->TexgenFunc[i]( ctx, store, i );
@@ -595,18 +600,21 @@ static void check_texgen( GLcontext *ctx, struct gl_pipeline_stage *stage )
GLuint i;
stage->active = 0;
- if (ctx->_Enabled & ENABLE_TEXGEN_ANY) {
+ if (ctx->Texture._TexGenEnabled) {
GLuint inputs = 0;
GLuint outputs = 0;
- if (ctx->Texture._GenFlags & TEXGEN_NEED_VERTICES)
+ if (ctx->Texture._GenFlags & TEXGEN_OBJ_LINEAR)
+ inputs |= VERT_OBJ;
+
+ if (ctx->Texture._GenFlags & TEXGEN_NEED_EYE_COORD)
inputs |= VERT_EYE;
if (ctx->Texture._GenFlags & TEXGEN_NEED_NORMALS)
inputs |= VERT_NORM;
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
- if (ctx->_Enabled & ENABLE_TEXGEN(i))
+ if (ctx->Texture._TexGenEnabled & ENABLE_TEXGEN(i))
{
outputs |= VERT_TEX(i);
diff --git a/src/mesa/tnl/t_vb_texmat.c b/src/mesa/tnl/t_vb_texmat.c
index 6fd08d480b..2eb6c943d7 100644
--- a/src/mesa/tnl/t_vb_texmat.c
+++ b/src/mesa/tnl/t_vb_texmat.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_texmat.c,v 1.4 2001/03/12 00:48:44 gareth Exp $ */
+/* $Id: t_vb_texmat.c,v 1.5 2001/03/29 21:16:26 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -60,11 +60,11 @@ static void check_texmat( GLcontext *ctx, struct gl_pipeline_stage *stage )
GLuint i;
stage->active = 0;
- if (ctx->_Enabled & ENABLE_TEXMAT_ANY) {
+ if (ctx->Texture._TexMatEnabled) {
GLuint flags = 0;
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
- if (ctx->_Enabled & ENABLE_TEXMAT(i))
+ if (ctx->Texture._TexMatEnabled & ENABLE_TEXMAT(i))
flags |= VERT_TEX(i);
stage->active = 1;
@@ -84,7 +84,7 @@ static GLboolean run_texmat_stage( GLcontext *ctx,
* identity, so we don't have to check that here.
*/
for (i = 0 ; i < ctx->Const.MaxTextureUnits ; i++)
- if (ctx->_Enabled & ENABLE_TEXMAT(i)) {
+ if (ctx->Texture._TexMatEnabled & ENABLE_TEXMAT(i)) {
if (stage->changed_inputs & VERT_TEX(i))
(void) TransformRaw( &store->texcoord[i], &ctx->TextureMatrix[i],
VB->TexCoordPtr[i]);