summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vertex.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-05-19 19:01:47 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-05-19 19:01:47 +0000
commit9557401a98b9585289fe8f65be33b6c5fda79095 (patch)
tree1a6e3557b98204a9c351970d070e42b063b76209 /src/mesa/tnl/t_vertex.c
parent67cc1f6ba6645b7eb231591a6de574eade9511a0 (diff)
Re-initialize viewport shadows each time.
Diffstat (limited to 'src/mesa/tnl/t_vertex.c')
-rw-r--r--src/mesa/tnl/t_vertex.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c
index 7732425dd1..f4847f7578 100644
--- a/src/mesa/tnl/t_vertex.c
+++ b/src/mesa/tnl/t_vertex.c
@@ -288,14 +288,6 @@ GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map,
if (vp) {
vtx->need_viewport = GL_TRUE;
- vtx->vp_scale[0] = vp[MAT_SX];
- vtx->vp_scale[1] = vp[MAT_SY];
- vtx->vp_scale[2] = vp[MAT_SZ];
- vtx->vp_scale[3] = 1.0;
- vtx->vp_xlate[0] = vp[MAT_TX];
- vtx->vp_xlate[1] = vp[MAT_TY];
- vtx->vp_xlate[2] = vp[MAT_TZ];
- vtx->vp_xlate[3] = 0.0;
}
for (j = 0, i = 0; i < nr; i++) {
@@ -389,6 +381,17 @@ static void update_input_ptrs( GLcontext *ctx, GLuint start )
a[j].inputptr = ((GLubyte *)vptr->data) + start * vptr->stride;
}
+
+ if (a->vp) {
+ vtx->vp_scale[0] = a->vp[MAT_SX];
+ vtx->vp_scale[1] = a->vp[MAT_SY];
+ vtx->vp_scale[2] = a->vp[MAT_SZ];
+ vtx->vp_scale[3] = 1.0;
+ vtx->vp_xlate[0] = a->vp[MAT_TX];
+ vtx->vp_xlate[1] = a->vp[MAT_TY];
+ vtx->vp_xlate[2] = a->vp[MAT_TZ];
+ vtx->vp_xlate[3] = 0.0;
+ }
}