summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-12-18 04:06:44 +0000
committerBrian Paul <[email protected]>2001-12-18 04:06:44 +0000
commit30f51ae067379c2b3573c06b707d25a9704df7be (patch)
tree401d75d291724d0d3a47be29d4d3512dcdb66a5a /src/mesa/main/texstate.c
parent645ced29552da1af5c759d0497d98c8f55b72935 (diff)
Replace old matrix stacks with new code based on struct matrix_stack.
Moved vertex program hash table into shared context state. Implemented reference counting for vertex programs. Replaced tnl "ProjectedClip" with "Ndc" (normalized device coordinates).
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index f711ab31ce6..827a6bd8943 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.61 2001/12/13 16:02:11 brianp Exp $ */
+/* $Id: texstate.c,v 1.62 2001/12/18 04:06:45 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1706,10 +1706,10 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
GLfloat tmp[4];
/* Transform plane equation by the inverse modelview matrix */
- if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) {
- _math_matrix_analyse( &ctx->ModelView );
+ if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) {
+ _math_matrix_analyse( ctx->ModelviewMatrixStack.Top );
}
- _mesa_transform_vector( tmp, params, ctx->ModelView.inv );
+ _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv );
if (TEST_EQ_4V(texUnit->EyePlaneS, tmp))
return;
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
@@ -1762,10 +1762,10 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
else if (pname==GL_EYE_PLANE) {
GLfloat tmp[4];
/* Transform plane equation by the inverse modelview matrix */
- if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) {
- _math_matrix_analyse( &ctx->ModelView );
+ if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) {
+ _math_matrix_analyse( ctx->ModelviewMatrixStack.Top );
}
- _mesa_transform_vector( tmp, params, ctx->ModelView.inv );
+ _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv );
if (TEST_EQ_4V(texUnit->EyePlaneT, tmp))
return;
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
@@ -1815,10 +1815,10 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
else if (pname==GL_EYE_PLANE) {
GLfloat tmp[4];
/* Transform plane equation by the inverse modelview matrix */
- if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) {
- _math_matrix_analyse( &ctx->ModelView );
+ if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) {
+ _math_matrix_analyse( ctx->ModelviewMatrixStack.Top );
}
- _mesa_transform_vector( tmp, params, ctx->ModelView.inv );
+ _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv );
if (TEST_EQ_4V(texUnit->EyePlaneR, tmp))
return;
FLUSH_VERTICES(ctx, _NEW_TEXTURE);
@@ -1862,10 +1862,10 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
else if (pname==GL_EYE_PLANE) {
GLfloat tmp[4];
/* Transform plane equation by the inverse modelview matrix */
- if (ctx->ModelView.flags & MAT_DIRTY_INVERSE) {
- _math_matrix_analyse( &ctx->ModelView );
+ if (ctx->ModelviewMatrixStack.Top->flags & MAT_DIRTY_INVERSE) {
+ _math_matrix_analyse( ctx->ModelviewMatrixStack.Top );
}
- _mesa_transform_vector( tmp, params, ctx->ModelView.inv );
+ _mesa_transform_vector( tmp, params, ctx->ModelviewMatrixStack.Top->inv );
if (TEST_EQ_4V(texUnit->EyePlaneQ, tmp))
return;
FLUSH_VERTICES(ctx, _NEW_TEXTURE);