-/* $Id: t_imm_exec.c,v 1.38 2002/04/09 16:56:52 keithw Exp $ */
+/* $Id: t_imm_exec.c,v 1.43 2002/10/24 23:57:25 brianp Exp $ */
/*
* Mesa 3-D graphics library
*/
/**
- * \file vpexec.c
+ * \file tnl/t_imm_exec.c
* \brief Setup to execute immediate-mode vertex data.
* \author Keith Whitwell
*/
#include "enums.h"
#include "dlist.h"
#include "macros.h"
-#include "mem.h"
+#include "imports.h"
#include "mmath.h"
#include "light.h"
#include "state.h"
MEMSET(IM->Flag + start, 0, sizeof(GLuint) * (IM->Count+2-start));
if (MESA_VERBOSE & VERBOSE_IMMEDIATE)
- fprintf(stderr, "reset_input: IM(%d) new %x\n",
- IM->id, beginstate);
+ _mesa_debug(ctx, "reset_input: IM(%d) new %x\n", IM->id, beginstate);
IM->Start = start;
IM->Count = start;
tmp->Normal.data = IM->Attrib[VERT_ATTRIB_NORMAL] + start;
tmp->Normal.start = (GLfloat *) (IM->Attrib[VERT_ATTRIB_NORMAL] + start);
tmp->Normal.count = count;
+ tmp->Normal.size = 3; /* just to be safe */
VB->NormalPtr = &tmp->Normal;
if (IM->NormalLengthPtr)
VB->NormalLengthPtr = IM->NormalLengthPtr + start;
*/
static void exec_vert_cassette( GLcontext *ctx, struct immediate *IM )
{
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
-
if (IM->FlushElt) {
/* Orflag is computed twice, but only reach this code if app is
* using a mixture of glArrayElement() and glVertex() while
TNLcontext *tnl = TNL_CONTEXT(ctx);
struct vertex_buffer *VB = &tnl->vb;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
-
_tnl_vb_bind_arrays( ctx, ctx->Array.LockFirst, ctx->Array.LockCount );
/* Take only elements and primitive information from the immediate:
if (ctx->Driver.CurrentExecPrimitive == GL_POLYGON+1)
ctx->Driver.NeedFlush &= ~FLUSH_STORED_VERTICES;
-
-/* fprintf(stderr, "%s: NeedFlush: %x\n", __FUNCTION__, */
-/* ctx->Driver.NeedFlush); */
}
if (TNL_CURRENT_IM(ctx)) {
TNL_CURRENT_IM(ctx)->ref_count--;
if (TNL_CURRENT_IM(ctx)->ref_count == 0)
- _tnl_free_immediate( TNL_CURRENT_IM(ctx) );
+ _tnl_free_immediate( ctx, TNL_CURRENT_IM(ctx) );
/*
* Don't use SET_IMMEDIATE here, or else we'll whack the
* _tnl_CurrentInput pointer - not good when another