/* Setup vector pointers that will be used to bind arrays to VB's.
*/
- _mesa_vector4f_init( &tmp->Obj, 0, 0 );
- _mesa_vector4f_init( &tmp->Normal, 0, 0 );
- _mesa_vector4f_init( &tmp->FogCoord, 0, 0 );
- _mesa_vector4f_init( &tmp->Index, 0, 0 );
+ _mesa_vector4f_init( &tmp->Obj, 0, NULL);
+ _mesa_vector4f_init( &tmp->Normal, 0, NULL);
+ _mesa_vector4f_init( &tmp->FogCoord, 0, NULL);
+ _mesa_vector4f_init( &tmp->Index, 0, NULL);
for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
- _mesa_vector4f_init( &tmp->TexCoord[i], 0, 0);
+ _mesa_vector4f_init( &tmp->TexCoord[i], 0, NULL);
}
VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS];
VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL];
VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0];
- VB->ColorPtr[1] = 0;
+ VB->ColorPtr[1] = NULL;
VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_INDEX];
- VB->IndexPtr[1] = 0;
+ VB->IndexPtr[1] = NULL;
VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1];
- VB->SecondaryColorPtr[1] = 0;
+ VB->SecondaryColorPtr[1] = NULL;
VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG];
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
_ae_destroy_context( ctx );
FREE(tnl);
- ctx->swtnl_context = 0;
+ ctx->swtnl_context = NULL;
}
&_tnl_vertex_program_stage,
#endif
&_tnl_render_stage,
- 0
+ NULL
};
node->prim_count = tnl->save.prim_count;
node->vertex_store = tnl->save.vertex_store;
node->prim_store = tnl->save.prim_store;
- node->normal_lengths = 0;
+ node->normal_lengths = NULL;
node->vertex_store->refcount++;
node->prim_store->refcount++;
tmp += tnl->save.attrsz[i];
}
else
- tnl->save.attrptr[i] = 0; /* will not be dereferenced. */
+ tnl->save.attrptr[i] = NULL; /* will not be dereferenced. */
}
/* Copy from current to repopulate the vertex with correct values.
if (tnl->save.currentsz[attr][0] == 0) {
assert(oldsz == 0);
tnl->save.dangling_attr_ref = GL_TRUE;
- _mesa_debug(0, "_save_upgrade_vertex: dangling reference attr %d\n",
+ _mesa_debug(NULL, "_save_upgrade_vertex: dangling reference attr %d\n",
attr);
#if 0
GLuint i;
(void) ctx;
- _mesa_debug(0, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n",
+ _mesa_debug(NULL, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n",
node->count,
node->prim_count,
node->vertex_size);
for (i = 0 ; i < node->prim_count ; i++) {
struct tnl_prim *prim = &node->prim[i];
- _mesa_debug(0, " prim %d: %s %d..%d %s %s\n",
+ _mesa_debug(NULL, " prim %d: %s %d..%d %s %s\n",
i,
_mesa_lookup_enum_by_nr(prim->mode & PRIM_MODE_MASK),
prim->start,
for (i = 0; i < _TNL_ATTRIB_MAX; i++)
- _mesa_vector4f_init( &tmp->Attribs[i], 0, 0);
+ _mesa_vector4f_init( &tmp->Attribs[i], 0, NULL);
tnl->save.opcode_vertex_list =
_mesa_alloc_opcode( ctx,
static attr_func mat_attrfunc[4] = {
mat_attr1fv,
- 0,
+ NULL,
mat_attr3fv,
mat_attr4fv
};
VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS];
VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL];
VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0];
- VB->ColorPtr[1] = 0;
+ VB->ColorPtr[1] = NULL;
VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_INDEX];
- VB->IndexPtr[1] = 0;
+ VB->IndexPtr[1] = NULL;
VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1];
- VB->SecondaryColorPtr[1] = 0;
+ VB->SecondaryColorPtr[1] = NULL;
VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG];
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
return GL_FALSE;
_mesa_vector4f_alloc( &store->fogcoord, 0, tnl->vb.Size, 32 );
- _mesa_vector4f_init( &store->input, 0, 0 );
+ _mesa_vector4f_init( &store->input, 0, NULL );
if (!inited)
init_static_data();
_mesa_vector4f_free( &store->LitIndex[0] );
_mesa_vector4f_free( &store->LitIndex[1] );
FREE( store );
- stage->privatePtr = 0;
+ stage->privatePtr = NULL;
}
}
VB->NormalPtr = &store->normal;
VB->AttribPtr[_TNL_ATTRIB_NORMAL] = VB->NormalPtr;
- VB->NormalLengthPtr = 0; /* no longer valid */
+ VB->NormalLengthPtr = NULL; /* no longer valid */
return GL_TRUE;
}
store->NormalTransform = _mesa_normal_tab[NORM_RESCALE];
}
else {
- store->NormalTransform = 0;
+ store->NormalTransform = NULL;
}
}
if (store) {
_mesa_vector4f_free( &store->PointSize );
FREE( store );
- stage->privatePtr = 0;
+ stage->privatePtr = NULL;
}
}
&store->andmask );
}
else {
- VB->NdcPtr = 0;
+ VB->NdcPtr = NULL;
_mesa_clip_np_tab[VB->ClipPtr->size]( VB->ClipPtr,
- 0,
+ NULL,
store->clipmask,
&store->ormask,
&store->andmask );
ALIGN_FREE( store->clipmask );
FREE( store );
- stage->privatePtr = 0;
+ stage->privatePtr = NULL;
}
}
static build_m_func build_m_tab[5] = {
- 0,
- 0,
+ NULL,
+ NULL,
build_m2,
build_m3,
build_m3
/* Just treat 4-vectors as 3-vectors.
*/
static build_f_func build_f_tab[5] = {
- 0,
- 0,
+ NULL,
+ NULL,
build_f2,
build_f3,
build_f3
if (store->texcoord[i].data)
_mesa_vector4f_free( &store->texcoord[i] );
FREE( store );
- stage->privatePtr = 0;
+ stage->privatePtr = NULL;
}
}
GLvector4f *, GLubyte *,
GLubyte *, GLubyte * ) =
{
- 0,
- 0,
+ NULL,
+ NULL,
userclip2,
userclip3,
userclip4
&store->andmask );
}
else {
- VB->NdcPtr = 0;
+ VB->NdcPtr = NULL;
_mesa_clip_np_tab[VB->ClipPtr->size]( VB->ClipPtr,
- 0,
+ NULL,
store->clipmask,
&store->ormask,
&store->andmask );
4 * sizeof(GLchan) },
{ "pad",
- 0,
- { 0, 0, 0, 0 },
+ NULL,
+ { NULL, NULL, NULL, NULL },
0 }
};
struct tnl_clipspace_attr *a = vtx->attr;
const GLuint attr_count = vtx->attr_count;
- vtx->emit = 0;
+ vtx->emit = NULL;
if (0)
vtx->emit = _tnl_codegen_emit(ctx);
{
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
- _tnl_install_attrs( ctx, 0, 0, 0, 0 );
+ _tnl_install_attrs( ctx, NULL, 0, NULL, 0 );
vtx->need_extras = GL_TRUE;
if (max_vertex_size > vtx->max_vertex_size) {
struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx);
if (vtx->vertex_buf) {
ALIGN_FREE(vtx->vertex_buf);
- vtx->vertex_buf = 0;
+ vtx->vertex_buf = NULL;
}
_tnl_free_c_codegen( &vtx->codegen );
static tnl_emit_func print_store_func( struct tnl_clipspace_codegen *p )
{
fprintf(stderr, "print_store_func: emitted:\n%s\n", p->buf);
- return 0;
+ return NULL;
}
void _tnl_init_c_codegen( struct tnl_clipspace_codegen *p )
{
if (p->buf) {
FREE(p->buf);
- p->buf = 0;
+ p->buf = NULL;
}
}
emit_4chan_4f_rgba_4 } },
{ "pad", 0, 0,
- { 0, 0, 0, 0 } }
+ { NULL, NULL, NULL, NULL } }
};
if (!emit_info[a[j].format].emit[sz]( p )) {
fprintf(stderr, "codegen failed\n");
- return 0;
+ return NULL;
}
p->emit_attr_footer( p );
tmp += tnl->vtx.attrsz[i];
}
else
- tnl->vtx.attrptr[i] = 0; /* will not be dereferenced */
+ tnl->vtx.attrptr[i] = NULL; /* will not be dereferenced */
}
/* Copy from current to repopulate the vertex with correct values.
return f;
}
- return 0;
+ return NULL;
}
static tnl_attrfv_func do_codegen( GLcontext *ctx, GLuint attr, GLuint sz )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct _tnl_dynfn *dfn = 0;
+ struct _tnl_dynfn *dfn = NULL;
if (attr == 0) {
GLuint key = tnl->vtx.vertex_size;
if (dfn)
return *(tnl_attrfv_func *) &dfn->code;
else
- return 0;
+ return NULL;
}
#endif /* USE_X86_ASM */
tnl->vtx.tabfv[attr][sz-1] = do_codegen( ctx, attr, sz );
else
#endif
- tnl->vtx.tabfv[attr][sz-1] = 0;
+ tnl->vtx.tabfv[attr][sz-1] = NULL;
/* Else use generic version:
*/
static struct _tnl_dynfn *no_codegen( GLcontext *ctx, int key )
{
(void) ctx; (void) key;
- return 0;
+ return NULL;
}
void _tnl_vtx_init( GLcontext *ctx )
}
for (i = 0; i < _TNL_ATTRIB_INDEX; i++)
- _mesa_vector4f_init( &tmp->Attribs[i], 0, 0);
+ _mesa_vector4f_init( &tmp->Attribs[i], 0, NULL);
for (i = 0; i < 4; i++) {
make_empty_list( &tnl->vtx.cache.Vertex[i] );
static void clear_active_eval1( TNLcontext *tnl, GLuint attr )
{
- tnl->vtx.eval.map1[attr].map = 0;
+ tnl->vtx.eval.map1[attr].map = NULL;
}
static void clear_active_eval2( TNLcontext *tnl, GLuint attr )
{
- tnl->vtx.eval.map2[attr].map = 0;
+ tnl->vtx.eval.map2[attr].map = NULL;
}
static void set_active_eval1( TNLcontext *tnl, GLuint attr, GLuint dim,
for (i = 0 ; i < tnl->vtx.prim_count ; i++) {
struct tnl_prim *prim = &tnl->vtx.prim[i];
- _mesa_debug(0, " prim %d: %s %d..%d %s %s\n",
+ _mesa_debug(NULL, " prim %d: %s %d..%d %s %s\n",
i,
_mesa_lookup_enum_by_nr(prim->mode & PRIM_MODE_MASK),
prim->start,
VB->ObjPtr = VB->AttribPtr[_TNL_ATTRIB_POS];
VB->NormalPtr = VB->AttribPtr[_TNL_ATTRIB_NORMAL];
VB->ColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR0];
- VB->ColorPtr[1] = 0;
+ VB->ColorPtr[1] = NULL;
VB->IndexPtr[0] = VB->AttribPtr[_TNL_ATTRIB_INDEX];
- VB->IndexPtr[1] = 0;
+ VB->IndexPtr[1] = NULL;
VB->SecondaryColorPtr[0] = VB->AttribPtr[_TNL_ATTRIB_COLOR1];
- VB->SecondaryColorPtr[1] = 0;
+ VB->SecondaryColorPtr[1] = NULL;
VB->FogCoordPtr = VB->AttribPtr[_TNL_ATTRIB_FOG];
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {