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-29 04:46:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-29 04:46:56 +0400
commit5065d4c744085a32fe8511515909da0b4bf2fb3d (patch)
tree19da9a2ba799560ffe95c5e5a64269587d3a049d /source/blender/gpu
parentff7bde2a2f2e20600460e96dc9181330d08ed0ba (diff)
parentf71223400929b55720251eabd46732397f34a7b1 (diff)
svn merge -r39664:39762 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c8
-rw-r--r--source/blender/gpu/intern/gpu_draw.c2
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c2
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
4 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 470b99de00b..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;
@@ -291,7 +291,7 @@ static void gpu_parse_functions_string(GHash *hash, char *code)
}
}
- if(strlen(function->name) == 0 || function->totparam == 0) {
+ if(function->name[0] == '\0' || function->totparam == 0) {
fprintf(stderr, "GPU functions parse error.\n");
MEM_freeN(function);
break;
@@ -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");
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 28624e9350c..15b96b6d808 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -358,7 +358,7 @@ void GPU_material_enable_alpha(GPUMaterial *material)
material->alpha= 1;
}
-GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[3])
+GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[4])
{
if(material->alpha || (material->obcolalpha && obcol[3] < 1.0f))
return GPU_BLEND_ALPHA;