diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-09-14 01:10:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-09-14 01:12:53 +0300 |
commit | 0547a7753643f45861306542857d97215ecb2c4f (patch) | |
tree | 1faad834721f7f13d4a0756bd80607963386fccd /source/blender/draw/engines/gpencil | |
parent | d30ec73d763ed01795100ec5d3a0ef9dc8521f7b (diff) |
Cleanup: use const args, variables
Diffstat (limited to 'source/blender/draw/engines/gpencil')
3 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c index 541a9e31586..8006c784190 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c @@ -80,7 +80,7 @@ static void gpencil_set_buffer_stroke_point(GPUVertBuf *vbo, uint thickness_id, uint uvdata_id, uint prev_pos_id, - float ref_pt[3], + const float ref_pt[3], short thickness, const float ink[4]) { @@ -110,7 +110,7 @@ static void gpencil_set_fill_point(GPUVertBuf *vbo, int idx, bGPDspoint *pt, const float fcolor[4], - float uv[2], + const float uv[2], uint pos_id, uint color_id, uint text_id) @@ -886,7 +886,7 @@ void gpencil_get_edlin_geom(struct GpencilBatchCacheElem *be, static void set_grid_point(GPUVertBuf *vbo, int idx, - float col_grid[4], + const float col_grid[4], uint pos_id, uint color_id, float v1, diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 882f2285296..fbaf35890f1 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -276,8 +276,11 @@ static void gpencil_calc_2d_bounding_box(const float (*points2d)[2], } /* calc texture coordinates using flat projected points */ -static void gpencil_calc_stroke_fill_uv( - const float (*points2d)[2], int totpoints, float minv[2], float maxv[2], float (*r_uv)[2]) +static void gpencil_calc_stroke_fill_uv(const float (*points2d)[2], + int totpoints, + const float minv[2], + float maxv[2], + float (*r_uv)[2]) { float d[2]; d[0] = maxv[0] - minv[0]; @@ -419,7 +422,7 @@ static DRWShadingGroup *gpencil_shgroup_fill_create(GPENCIL_Data *vedata, bGPDlayer *gpl, MaterialGPencilStyle *gp_style, int id, - int shading_type[2]) + const int shading_type[2]) { GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl; const DRWContextState *draw_ctx = DRW_context_state_get(); diff --git a/source/blender/draw/engines/gpencil/gpencil_render.c b/source/blender/draw/engines/gpencil/gpencil_render.c index 7ee86bcc392..d0deb48c019 100644 --- a/source/blender/draw/engines/gpencil/gpencil_render.c +++ b/source/blender/draw/engines/gpencil/gpencil_render.c @@ -131,7 +131,7 @@ static void GPENCIL_render_cache(void *vedata, /* TODO: Reuse Eevee code in shared module instead to duplicate here */ static void GPENCIL_render_update_viewvecs(float invproj[4][4], - float winmat[4][4], + const float winmat[4][4], float (*r_viewvecs)[4]) { /* view vectors for the corners of the view frustum. |