-/* $Id: t_eval_api.c,v 1.10 2002/04/19 12:32:14 brianp Exp $ */
+/* $Id: t_eval_api.c,v 1.11 2002/06/23 02:36:27 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.1
*
- * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Keith Whitwell - original code
+ * Brian Paul - vertex program updates
*/
#include "t_imm_exec.h"
-
-
-
/* KW: If are compiling, we don't know whether eval will produce a
* vertex when it is run in the future. If this is pure immediate
* mode, eval is a noop if neither vertex map is enabled.
GLenum prim;
ASSERT_OUTSIDE_BEGIN_END(ctx);
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glEvalMesh1()");
switch (mode) {
case GL_POINT:
/* No effect if vertex maps disabled.
*/
- if (!ctx->Eval.Map1Vertex4 && !ctx->Eval.Map1Vertex3)
+ if (!ctx->Eval.Map1Vertex4 && !ctx->Eval.Map1Vertex3 &&
+ (!ctx->VertexProgram.Enabled || !ctx->Eval.Map1Attrib[VERT_ATTRIB_POS]))
return;
du = ctx->Eval.MapGrid1du;
GLfloat u, du, v, dv, v1, u1;
ASSERT_OUTSIDE_BEGIN_END(ctx);
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glEvalMesh2()");
/* No effect if vertex maps disabled.
*/
- if (!ctx->Eval.Map2Vertex4 && !ctx->Eval.Map2Vertex3)
+ if (!ctx->Eval.Map2Vertex4 && !ctx->Eval.Map2Vertex3 &&
+ (!ctx->VertexProgram.Enabled || !ctx->Eval.Map2Attrib[VERT_ATTRIB_POS]))
return;
-
du = ctx->Eval.MapGrid2du;
dv = ctx->Eval.MapGrid2dv;
v1 = ctx->Eval.MapGrid2v1 + j1 * dv;
}
-
void _tnl_eval_init( GLcontext *ctx )
{
GLvertexformat *vfmt = &(TNL_CONTEXT(ctx)->vtxfmt);