-/* $Id: varray.c,v 1.16 1999/11/18 23:56:04 brianp Exp $ */
+/* $Id: varray.c,v 1.17 1999/11/19 00:03:27 keithw Exp $ */
/*
* Mesa 3-D graphics library
* rendering to keep it turned on.
*/
relock = ctx->CompileCVAFlag;
- ctx->CompileCVAFlag = 0;
- if (!elt->pipeline_valid || relock)
+ if (relock) {
+ ctx->CompileCVAFlag = 0;
+ elt->pipeline_valid = 0;
+ }
+
+ if (!elt->pipeline_valid)
gl_build_immediate_pipeline( ctx );
required = elt->inputs;
fallback = (elt->inputs & ~ctx->Array.Summary);
+ /* The translate function doesn't do anything about size. It
+ * just ensures that type and stride come out right.
+ */
+ IM->v.Obj.size = ctx->Array.Vertex.Size;
+
if (required & VERT_RGBA)
{
Color = &ctx->Array.Color;
VB->Material = IM->Material;
VB->BoundsPtr = 0;
- IM->v.Obj.size = ctx->Array.Vertex.Size; /* added by Andree Borrmann */
-
while (remaining > 0) {
GLint vbspace = VB_MAX - VB_START;
GLuint count, n;
/* Transform and render.
*/
gl_run_pipeline( VB );
- gl_flush_vb( ctx, "DrawArrays" ); /* added by Andree Borrmann */
gl_reset_vb( VB );
ctx->Array.Flag[count] = ctx->Array.Flags;
remaining -= n;
}
- ctx->CompileCVAFlag = relock;
+ gl_reset_input( ctx );
+
+ if (relock) {
+ ctx->CompileCVAFlag = relock;
+ elt->pipeline_valid = 0;
+ }
}
else if (ctx->Array.Vertex.Enabled)
{