Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-03 20:58:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-03 20:58:06 +0300
commit709c727c510a85426b87a9a2fb7fb8517fef7de9 (patch)
treec4664d4773eb77cbf38ee264e9189a6557a310c4 /source/blender/gpu/intern
parent3326c0ca7523f5596a8ff96cb90a54b92e50ac5f (diff)
replace 0 with NULL when used as a pointer
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c16
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
2 files changed, 9 insertions, 9 deletions
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)