From 709c727c510a85426b87a9a2fb7fb8517fef7de9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 3 Mar 2011 17:58:06 +0000 Subject: replace 0 with NULL when used as a pointer --- source/blender/gpu/intern/gpu_draw.c | 16 ++++++++-------- source/blender/gpu/intern/gpu_material.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'source/blender/gpu/intern') diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 649d260728e..510ae31db51 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -303,7 +303,7 @@ static void gpu_make_repbind(Image *ima) if(ima->repbind) { glDeleteTextures(ima->totbind, (GLuint *)ima->repbind); MEM_freeN(ima->repbind); - ima->repbind= 0; + ima->repbind= NULL; ima->tpageflag &= ~IMA_MIPMAP_COMPLETE; } @@ -315,12 +315,12 @@ static void gpu_make_repbind(Image *ima) static void gpu_clear_tpage(void) { - if(GTS.lasttface==0) + if(GTS.lasttface==NULL) return; - GTS.lasttface= 0; + GTS.lasttface= NULL; GTS.curtile= 0; - GTS.curima= 0; + GTS.curima= NULL; if(GTS.curtilemode!=0) { glMatrixMode(GL_TEXTURE); glLoadIdentity(); @@ -432,7 +432,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int if(compare && ima == GTS.curima && GTS.curtile == GTS.tile && GTS.tilemode == GTS.curtilemode && GTS.curtileXRep == GTS.tileXRep && GTS.curtileYRep == GTS.tileYRep) - return (ima!=0); + return (ima != NULL); /* if tiling mode or repeat changed, change texture matrix to fit */ if(GTS.tilemode!=GTS.curtilemode || GTS.curtileXRep!=GTS.tileXRep || @@ -469,7 +469,7 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int if(GTS.tilemode) { /* tiled mode */ - if(ima->repbind==0) gpu_make_repbind(ima); + if(ima->repbind==NULL) gpu_make_repbind(ima); if(GTS.tile>=ima->totbind) GTS.tile= 0; /* this happens when you change repeat buttons */ @@ -588,7 +588,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap) Image *ima; /* check if we need to clear the state */ - if(tface==0) { + if(tface==NULL) { gpu_clear_tpage(); return 0; } @@ -612,7 +612,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap) glDisable(GL_TEXTURE_2D); GTS.curtile= 0; - GTS.curima= 0; + GTS.curima= NULL; GTS.curtilemode= 0; GTS.curtileXRep = 0; GTS.curtileYRep = 0; diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 9166c697f8e..f644700fb81 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -923,7 +923,7 @@ static void do_material_tex(GPUShadeInput *shi) mtex= ma->mtex[tex_nr]; tex= mtex->tex; - if(tex==0) continue; + if(tex == NULL) continue; /* which coords */ if(mtex->texco==TEXCO_ORCO) -- cgit v1.2.3