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-08-28 09:06:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-28 09:06:30 +0400
commitfa2ba5fbf5848e4d61b697c624af9b9e9456eb20 (patch)
tree8c7f0bcfc6af77f1bb491d4e4d230493f9d897c0 /source/blender/gpu/intern
parentc73d5b939dd9dcc68ed1d1316115c2c7cded9cab (diff)
- use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c6
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 910576fa34e..77498835d57 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -82,7 +82,7 @@ typedef enum GPUDataSource {
} GPUDataSource;
static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
- 0, 0, 0, 0, "mat3", 0, 0, 0, 0, 0, 0, "mat4"};
+ NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"};
struct GPUNode {
struct GPUNode *next, *prev;
@@ -451,7 +451,7 @@ static int codegen_input_has_texture(GPUInput *input)
else if(input->ima)
return 1;
else
- return input->tex != 0;
+ return input->tex != NULL;
}
const char *GPU_builtin_name(GPUBuiltin builtin)
@@ -880,7 +880,7 @@ void GPU_pass_unbind(GPUPass *pass)
GPU_texture_unbind(input->tex);
if (input->ima)
- input->tex = 0;
+ input->tex = NULL;
}
GPU_shader_unbind(shader);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 9878d83ff5a..7af5ef6ea14 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -308,7 +308,7 @@ void GPU_set_anisotropic(float value)
}
}
-float GPU_get_anisotropic()
+float GPU_get_anisotropic(void)
{
return GTS.anisotropic;
}
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index f6352a96878..c9f1b093b7a 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -484,7 +484,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
//if (fpixels)
// pixels = GPU_texture_convert_pixels(w*h*depth, fpixels);
- glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, 0);
+ glTexImage3D(tex->target, 0, internalformat, tex->w, tex->h, tex->depth, 0, format, type, NULL);
GPU_print_error("3D glTexImage3D");