diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-22 20:52:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-22 20:52:06 +0400 |
commit | 1955407f7e85cc05601bc952f12de8464ee78ffa (patch) | |
tree | 86088aea5c02db3349af231b994c5fdc8513ee8a /source/blender/editors/space_view3d/drawvolume.c | |
parent | 34e2fb40c75f92532bdb4ceae955b38c998904ae (diff) |
code cleanyp - no functional changes.
Diffstat (limited to 'source/blender/editors/space_view3d/drawvolume.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawvolume.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index 2ab4491baa2..9618e5aeef0 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -218,7 +218,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 float size[3]; - if(!tex) { + if (!tex) { printf("Could not allocate 3D texture for 3D View smoke drawing.\n"); return; } @@ -331,7 +331,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 } } - if(i >= 8) { + if (i >= 8) { /* fallback, avoid using buffer over-run */ i= 0; } @@ -356,7 +356,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 printf("Your gfx card does not support 3D View smoke drawing.\n"); GPU_texture_bind(tex, 0); - if(tex_shadow) + if (tex_shadow) GPU_texture_bind(tex_shadow, 1); else printf("No volume shadow\n"); @@ -382,11 +382,11 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 points = MEM_callocN(sizeof(float)*12*3, "smoke_points_preview"); - while(1) { + while (1) { float p0[3]; float tmp_point[3], tmp_point2[3]; - if(dd*(float)n > ds) + if (dd*(float)n > ds) break; copy_v3_v3(tmp_point, viewnormal); @@ -406,11 +406,11 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 copy_v3_v3(p0, points); // sort points to get a convex polygon - for(i = 1; i < numpoints - 1; i++) + for (i = 1; i < numpoints - 1; i++) { - for(j = i + 1; j < numpoints; j++) + for (j = i + 1; j < numpoints; j++) { - if(!convex(p0, viewnormal, &points[j * 3], &points[i * 3])) + if (!convex(p0, viewnormal, &points[j * 3], &points[i * 3])) { float tmp2[3]; copy_v3_v3(tmp2, &points[j * 3]); @@ -437,11 +437,11 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 tend(); // printf ( "Draw Time: %f\n",( float ) tval() ); - if(tex_shadow) + if (tex_shadow) GPU_texture_unbind(tex_shadow); GPU_texture_unbind(tex); - if(GLEW_ARB_fragment_program) + if (GLEW_ARB_fragment_program) { glDisable(GL_FRAGMENT_PROGRAM_ARB); glDeleteProgramsARB(1, &prog); @@ -450,9 +450,9 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 MEM_freeN(points); - if(!gl_blend) + if (!gl_blend) glDisable(GL_BLEND); - if(gl_depth) + if (gl_depth) { glEnable(GL_DEPTH_TEST); glDepthMask(GL_TRUE); |