summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vb_cull.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2005-04-22 12:51:19 +0000
committerKeith Whitwell <[email protected]>2005-04-22 12:51:19 +0000
commit6f973f33679e034b7cb63806f1ddfabdbdd70123 (patch)
tree31580bc32d1b87a3dddd8f7c8bc5f404b407c637 /src/mesa/tnl/t_vb_cull.c
parent6a13c7da4c79f7e811fbddc68f59441070ff0cc8 (diff)
Simplify the pipeline_stage structure
- remove input/output fields, input tracking removed. - remove state fields, the validate function now called on every statechange. - add an explicit 'create' function. Add in code to build vertex program to implement current t&l state. Still disabled, but turn on with a #define in t_vp_build.h.
Diffstat (limited to 'src/mesa/tnl/t_vb_cull.c')
-rw-r--r--src/mesa/tnl/t_vb_cull.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/mesa/tnl/t_vb_cull.c b/src/mesa/tnl/t_vb_cull.c
index 9527ead9430..3f12945707f 100644
--- a/src/mesa/tnl/t_vb_cull.c
+++ b/src/mesa/tnl/t_vb_cull.c
@@ -57,6 +57,10 @@ static GLboolean run_cull_stage( GLcontext *ctx,
GLuint count = VB->Count;
GLuint i;
+ if (ctx->VertexProgram._Enabled ||
+ !ctx->Transform.CullVertexFlag)
+ return GL_TRUE;
+
VB->ClipOrMask &= ~CLIP_CULL_BIT;
VB->ClipAndMask |= CLIP_CULL_BIT;
@@ -81,31 +85,13 @@ static GLboolean run_cull_stage( GLcontext *ctx,
}
-static void check_cull( GLcontext *ctx, struct tnl_pipeline_stage *stage )
-{
- stage->active = (!ctx->VertexProgram._Enabled &&
- ctx->Transform.CullVertexFlag);
-}
-
-
-static void dtr( struct tnl_pipeline_stage *stage )
-{
-}
-
const struct tnl_pipeline_stage _tnl_vertex_cull_stage =
{
"EXT_cull_vertex",
- _NEW_PROGRAM |
- _NEW_TRANSFORM,
- _NEW_TRANSFORM,
- GL_TRUE, /* active */
- _TNL_BIT_NORMAL |
- _TNL_BIT_POS, /* inputs */
- _TNL_BIT_POS, /* outputs */
- 0, /* changed_inputs */
NULL, /* private data */
- dtr, /* destructor */
- check_cull, /* check */
+ NULL, /* ctr */
+ NULL, /* destructor */
+ NULL,
run_cull_stage /* run -- initially set to init */
};