diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2003-10-10 21:40:53 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2003-10-10 21:40:53 +0000 |
commit | 30cd200068d5f671b3167f4400c409578e24ecb6 (patch) | |
tree | 975b218a32ed654fc48c5b582bcdd83f1ca729fb | |
parent | e55c545d4ae20b3e30b73bc5a7c7582a9755b25e (diff) |
Fix a typo with evalcoord1f
-rw-r--r-- | src/mesa/tnl/t_vtx_api.c | 13 | ||||
-rw-r--r-- | src/mesa/tnl/t_vtx_eval.c | 6 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_vtx_api.c b/src/mesa/tnl/t_vtx_api.c index aaa17c2050..3f693553c6 100644 --- a/src/mesa/tnl/t_vtx_api.c +++ b/src/mesa/tnl/t_vtx_api.c @@ -859,6 +859,8 @@ static void _tnl_EvalCoord1f( GLfloat u ) GET_CURRENT_CONTEXT( ctx ); TNLcontext *tnl = TNL_CONTEXT(ctx); + _mesa_debug(0, "%s\n", __FUNCTION__); + /* TODO: use a CHOOSE() function for this: */ { GLint i; @@ -887,6 +889,8 @@ static void _tnl_EvalCoord2f( GLfloat u, GLfloat v ) GET_CURRENT_CONTEXT( ctx ); TNLcontext *tnl = TNL_CONTEXT(ctx); + _mesa_debug(0, "%s\n", __FUNCTION__); + /* TODO: use a CHOOSE() function for this: */ { GLint i; @@ -960,8 +964,15 @@ static void _tnl_Begin( GLenum mode ) if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1) { TNLcontext *tnl = TNL_CONTEXT(ctx); - int i = tnl->vtx.prim_count++; + int i; + + if (ctx->NewState) { + _mesa_update_state( ctx ); + ctx->Exec->Begin(mode); + return; + } + i = tnl->vtx.prim_count++; tnl->vtx.prim[i].mode = mode | PRIM_BEGIN; tnl->vtx.prim[i].start = tnl->vtx.initial_counter - tnl->vtx.counter; tnl->vtx.prim[i].count = 0; diff --git a/src/mesa/tnl/t_vtx_eval.c b/src/mesa/tnl/t_vtx_eval.c index a9ad6b20e2..68b8a40264 100644 --- a/src/mesa/tnl/t_vtx_eval.c +++ b/src/mesa/tnl/t_vtx_eval.c @@ -66,6 +66,8 @@ void _tnl_update_eval( GLcontext *ctx ) TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint attr; + _mesa_debug(0, "%s\n", __FUNCTION__); + /* Vertex program maps have priority over conventional attribs */ for (attr = 0; attr < VERT_ATTRIB_MAX; attr++) { @@ -161,10 +163,10 @@ void _tnl_do_EvalCoord1f(GLcontext* ctx, GLfloat u) ASSIGN_4V(vertex, 0, 0, 0, 1); _math_horner_bezier_curve(map->Points, vertex, uu, - tnl->vtx.eval.map1[attr].sz, + tnl->vtx.eval.map1[0].sz, map->Order); - if (tnl->vtx.attrsz[0] == 4) + if (tnl->vtx.eval.map1[0].sz == 4) glVertex4fv( vertex ); else glVertex3fv( vertex ); |