diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-06-03 16:58:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-06-03 16:58:10 +0300 |
commit | d5f6e573ed43521e497c83eff02f828aea1a35c9 (patch) | |
tree | 48bbbdb3a857b0bad01b57a9122c0f02946e4a6f /source/blender/draw/modes | |
parent | 6dca5ff41f9baa6fb27b862e270f6e27d7f16541 (diff) |
Cleanup: use const arguments
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/paint_texture_mode.c | 4 | ||||
-rw-r--r-- | source/blender/draw/modes/paint_vertex_mode.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/modes/paint_texture_mode.c b/source/blender/draw/modes/paint_texture_mode.c index 90e4a2ead22..66e2cf7122d 100644 --- a/source/blender/draw/modes/paint_texture_mode.c +++ b/source/blender/draw/modes/paint_texture_mode.c @@ -244,7 +244,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata) /* Uniforms need a pointer to it's value so be sure it's accessible at * any given time (i.e. use static vars) */ - static float color[4] = {1.0f, 0.0f, 1.0f, 1.0}; + static const float color[4] = {1.0f, 0.0f, 1.0f, 1.0}; DRW_shgroup_uniform_vec4(shgrp, "color", color, 1); if (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) { @@ -319,7 +319,7 @@ static void PAINT_TEXTURE_cache_init(void *vedata) DRW_STATE_BLEND_ALPHA; DRWPass *pass = DRW_pass_create("Face Mask Pass", state); DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->face_select_overlay, pass); - static float col[4] = {1.0f, 1.0f, 1.0f, 0.2f}; + static const float col[4] = {1.0f, 1.0f, 1.0f, 0.2f}; DRW_shgroup_uniform_vec4(shgrp, "color", col, 1); if (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) { diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c index 374cb10031e..b4438b7e69e 100644 --- a/source/blender/draw/modes/paint_vertex_mode.c +++ b/source/blender/draw/modes/paint_vertex_mode.c @@ -256,7 +256,7 @@ static void PAINT_VERTEX_cache_init(void *vedata) } { - static float col[4] = {1.0f, 1.0f, 1.0f, 0.2f}; + static const float col[4] = {1.0f, 1.0f, 1.0f, 0.2f}; DRWPass *pass = DRW_pass_create("Face Mask Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_BLEND_ALPHA); |