/* 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. * * Thus we need to have a check in the display list code or * elsewhere for eval(1,2) vertices in the case where * map(1,2)_vertex is disabled, and to purge those vertices from * the vb. */ void GLAPIENTRY _mesa_noop_EvalMesh1( GLenum mode, GLint i1, GLint i2 ) { GET_CURRENT_CONTEXT(ctx); GLint i; GLfloat u, du; GLenum prim; switch (mode) { case GL_POINT: prim = GL_POINTS; break; case GL_LINE: prim = GL_LINE_STRIP; break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" ); return; } /* No effect if vertex maps disabled. */ if (!ctx->Eval.Map1Vertex4 && !ctx->Eval.Map1Vertex3 && !(ctx->VertexProgram._Enabled && ctx->Eval.Map1Attrib[VERT_ATTRIB_POS])) return; du = ctx->Eval.MapGrid1du; u = ctx->Eval.MapGrid1u1 + i1 * du; CALL_Begin(GET_DISPATCH(), (prim)); for (i=i1;i<=i2;i++,u+=du) { CALL_EvalCoord1f(GET_DISPATCH(), (u)); } CALL_End(GET_DISPATCH(), ()); }
static void GLAPIENTRY _save_EvalCoord1f(GLfloat u) { GET_CURRENT_CONTEXT(ctx); dlist_fallback(ctx); CALL_EvalCoord1f(ctx->Save, (u)); }
static void GLAPIENTRY vbo_exec_EvalMesh1(GLenum mode, GLint i1, GLint i2) { GET_CURRENT_CONTEXT(ctx); GLint i; GLfloat u, du; GLenum prim; ASSERT_OUTSIDE_BEGIN_END(ctx); switch (mode) { case GL_POINT: prim = GL_POINTS; break; case GL_LINE: prim = GL_LINE_STRIP; break; default: _mesa_error( ctx, GL_INVALID_ENUM, "glEvalMesh1(mode)" ); return; } /* No effect if vertex maps disabled. */ if (!ctx->Eval.Map1Vertex4 && !ctx->Eval.Map1Vertex3) return; du = ctx->Eval.MapGrid1du; u = ctx->Eval.MapGrid1u1 + i1 * du; CALL_Begin(GET_DISPATCH(), (prim)); for (i=i1;i<=i2;i++,u+=du) { CALL_EvalCoord1f(GET_DISPATCH(), (u)); } CALL_End(GET_DISPATCH(), ()); }
static void GLAPIENTRY _save_EvalCoord1f( GLfloat u ) { GET_CURRENT_CONTEXT(ctx); DO_FALLBACK(ctx); CALL_EvalCoord1f(ctx->Save, (u)); }