diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-20 23:49:27 +0400 |
commit | 2d2d36fe3b2f3e7eed7d05714abc80f1a5a82303 (patch) | |
tree | 7ad54825db128e59312fbf787555fd91edf09a07 /source/blender/gpu/intern | |
parent | 5d9256404159670bec6d65557697accb5b3111b8 (diff) |
code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 4 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 899f4afb903..6538da2eb61 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -449,8 +449,8 @@ int GPU_verify_image(Image *ima, ImageUser *iuser, int tftile, int compare, int /* if tiling mode or repeat changed, change texture matrix to fit */ if (GTS.tilemode!=GTS.curtilemode || GTS.curtileXRep!=GTS.tileXRep || - GTS.curtileYRep != GTS.tileYRep) { - + GTS.curtileYRep != GTS.tileYRep) + { glMatrixMode(GL_TEXTURE); glLoadIdentity(); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 5918cf99d12..4cb868a9fea 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -539,7 +539,8 @@ static void add_to_diffuse(GPUMaterial *mat, Material *ma, GPUShadeInput *shi, G GPUNodeLink *fac, *tmp, *addcol; if (!(mat->scene->gm.flag & GAME_GLSL_NO_RAMPS) && - ma->ramp_col && (ma->mode & MA_RAMP_COL)) { + ma->ramp_col && (ma->mode & MA_RAMP_COL)) + { /* MA_RAMP_IN_RESULT is exceptional */ if (ma->rampin_col==MA_RAMP_IN_RESULT) { addcol = shi->rgb; @@ -579,7 +580,8 @@ static void ramp_spec_result(GPUShadeInput *shi, GPUNodeLink **spec) GPUNodeLink *fac; if (!(mat->scene->gm.flag & GAME_GLSL_NO_RAMPS) && - ma->ramp_spec && ma->rampin_spec==MA_RAMP_IN_RESULT) { + ma->ramp_spec && ma->rampin_spec==MA_RAMP_IN_RESULT) + { GPU_link(mat, "ramp_rgbtobw", *spec, &fac); /* colorband + blend */ @@ -775,7 +777,8 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la if (mat->scene->gm.flag & GAME_GLSL_NO_SHADERS); else if (!(lamp->mode & LA_NO_SPEC) && !(lamp->mode & LA_ONLYSHADOW) && - (GPU_link_changed(shi->spec) || ma->spec != 0.0f)) { + (GPU_link_changed(shi->spec) || ma->spec != 0.0f)) + { if (lamp->type == LA_HEMI) { GPU_link(mat, "shade_hemi_spec", vn, lv, view, GPU_uniform(&ma->spec), shi->har, visifac, &t); GPU_link(mat, "shade_add_spec", t, lcol, shi->specrgb, &outcol); |