-/* $Id: t_imm_alloc.c,v 1.11 2001/12/14 02:51:44 brianp Exp $ */
+/* $Id: t_imm_alloc.c,v 1.12 2001/12/15 00:49:00 brianp Exp $ */
/*
* Mesa 3-D graphics library
- * Version: 3.5
+ * Version: 4.0.1
*
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
#include "t_imm_alloc.h"
- static int id = 0;
+static int id = 0; /* give each struct immediate a unique ID number */
static struct immediate *real_alloc_immediate( GLcontext *ctx )
{
IM->CopyTexSize = 0;
IM->CopyStart = IM->Start;
+
/* TexCoord0 is special.
*/
IM->TexCoord[0] = IM->TexCoord0;
ASSERT(IM->ref_count == 0);
+ if (IM->NormalLengthPtr) {
+ ALIGN_FREE(IM->NormalLengthPtr);
+ IM->NormalLengthPtr = NULL;
+ }
+
if (!tnl) {
real_free_immediate( IM );
}