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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate_util.c')
-rw-r--r--source/blender/gpu/intern/gpu_immediate_util.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate_util.c b/source/blender/gpu/intern/gpu_immediate_util.c
index e834d6afccb..b8cd9fe356d 100644
--- a/source/blender/gpu/intern/gpu_immediate_util.c
+++ b/source/blender/gpu/intern/gpu_immediate_util.c
@@ -460,10 +460,10 @@ void imm_draw_cylinder_fill_normal_3d(
float h1 = height * ((float)j / (float)stacks);
float h2 = height * ((float)(j + 1) / (float)stacks);
- float v1[3] = {r1 * cos2, r1 * sin2, h1};
- float v2[3] = {r2 * cos2, r2 * sin2, h2};
- float v3[3] = {r2 * cos1, r2 * sin1, h2};
- float v4[3] = {r1 * cos1, r1 * sin1, h1};
+ const float v1[3] = {r1 * cos2, r1 * sin2, h1};
+ const float v2[3] = {r2 * cos2, r2 * sin2, h2};
+ const float v3[3] = {r2 * cos1, r2 * sin1, h2};
+ const float v4[3] = {r1 * cos1, r1 * sin1, h1};
float n1[3], n2[3];
/* calc normals */
@@ -516,10 +516,10 @@ void imm_draw_cylinder_wire_3d(
float h1 = height * ((float)j / (float)stacks);
float h2 = height * ((float)(j + 1) / (float)stacks);
- float v1[3] = {r1 * cos2, r1 * sin2, h1};
- float v2[3] = {r2 * cos2, r2 * sin2, h2};
- float v3[3] = {r2 * cos1, r2 * sin1, h2};
- float v4[3] = {r1 * cos1, r1 * sin1, h1};
+ const float v1[3] = {r1 * cos2, r1 * sin2, h1};
+ const float v2[3] = {r2 * cos2, r2 * sin2, h2};
+ const float v3[3] = {r2 * cos1, r2 * sin1, h2};
+ const float v4[3] = {r1 * cos1, r1 * sin1, h1};
immVertex3fv(pos, v1);
immVertex3fv(pos, v2);
@@ -554,10 +554,10 @@ void imm_draw_cylinder_fill_3d(
float h1 = height * ((float)j / (float)stacks);
float h2 = height * ((float)(j + 1) / (float)stacks);
- float v1[3] = {r1 * cos2, r1 * sin2, h1};
- float v2[3] = {r2 * cos2, r2 * sin2, h2};
- float v3[3] = {r2 * cos1, r2 * sin1, h2};
- float v4[3] = {r1 * cos1, r1 * sin1, h1};
+ const float v1[3] = {r1 * cos2, r1 * sin2, h1};
+ const float v2[3] = {r2 * cos2, r2 * sin2, h2};
+ const float v3[3] = {r2 * cos1, r2 * sin1, h2};
+ const float v4[3] = {r1 * cos1, r1 * sin1, h1};
/* first tri */
immVertex3fv(pos, v1);