summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_vertex.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/tnl/t_vb_vertex.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/tnl/t_vb_vertex.c')
-rw-r--r--src/mesa/tnl/t_vb_vertex.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c
index f54d73bd628..8ceb9dbdafd 100644
--- a/src/mesa/tnl/t_vb_vertex.c
+++ b/src/mesa/tnl/t_vb_vertex.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_vertex.c,v 1.10 2001/12/14 02:51:45 brianp Exp $ */
+/* $Id: t_vb_vertex.c,v 1.11 2001/12/18 04:06:46 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -57,7 +57,7 @@ struct vertex_stage_data {
*/
GLvector4f *save_eyeptr;
GLvector4f *save_clipptr;
- GLvector4f *save_projptr;
+ GLvector4f *save_ndcptr;
};
#define VERTEX_STAGE_DATA(stage) ((struct vertex_stage_data *)stage->privatePtr)
@@ -142,16 +142,18 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
if (ctx->_NeedEyeCoords) {
/* Separate modelview and project transformations:
*/
- if (ctx->ModelView.type == MATRIX_IDENTITY)
+ if (ctx->ModelviewMatrixStack.Top->type == MATRIX_IDENTITY)
VB->EyePtr = VB->ObjPtr;
else
- VB->EyePtr = TransformRaw( &store->eye, &ctx->ModelView,
+ VB->EyePtr = TransformRaw( &store->eye,
+ ctx->ModelviewMatrixStack.Top,
VB->ObjPtr);
- if (ctx->ProjectionMatrix.type == MATRIX_IDENTITY)
+ if (ctx->ProjectionMatrixStack.Top->type == MATRIX_IDENTITY)
VB->ClipPtr = VB->EyePtr;
else
- VB->ClipPtr = TransformRaw( &store->clip, &ctx->ProjectionMatrix,
+ VB->ClipPtr = TransformRaw( &store->clip,
+ ctx->ProjectionMatrixStack.Top,
VB->EyePtr );
}
else {
@@ -184,16 +186,17 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
store->ormask = 0;
store->andmask = CLIP_ALL_BITS;
- if (tnl->NeedProjCoords) {
- VB->ProjectedClipPtr =
+ if (tnl->NeedNdcCoords) {
+ VB->NdcPtr =
_mesa_clip_tab[VB->ClipPtr->size]( VB->ClipPtr,
&store->proj,
store->clipmask,
&store->ormask,
&store->andmask );
- } else {
- VB->ProjectedClipPtr = 0;
+ }
+ else {
+ VB->NdcPtr = 0;
_mesa_clip_np_tab[VB->ClipPtr->size]( VB->ClipPtr,
0,
store->clipmask,
@@ -227,14 +230,14 @@ static GLboolean run_vertex_stage( GLcontext *ctx,
store->save_eyeptr = VB->EyePtr;
store->save_clipptr = VB->ClipPtr;
- store->save_projptr = VB->ProjectedClipPtr;
+ store->save_ndcptr = VB->NdcPtr;
}
else {
/* Replay the sideeffects.
*/
VB->EyePtr = store->save_eyeptr;
VB->ClipPtr = store->save_clipptr;
- VB->ProjectedClipPtr = store->save_projptr;
+ VB->NdcPtr = store->save_ndcptr;
VB->ClipMask = store->clipmask;
VB->ClipOrMask = store->ormask;
if (VB->ClipPtr == VB->ObjPtr && (VB->importable_data & VERT_OBJ_BIT))