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/draw')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c6
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c9
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_render.c2
-rw-r--r--source/blender/draw/engines/workbench/workbench_studiolight.c2
-rw-r--r--source/blender/draw/intern/draw_cache.c10
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curve.c2
-rw-r--r--source/blender/draw/modes/object_mode.c6
7 files changed, 20 insertions, 17 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.
diff --git a/source/blender/draw/engines/workbench/workbench_studiolight.c b/source/blender/draw/engines/workbench/workbench_studiolight.c
index fed6ca680a7..ac27ff0b736 100644
--- a/source/blender/draw/engines/workbench/workbench_studiolight.c
+++ b/source/blender/draw/engines/workbench/workbench_studiolight.c
@@ -284,7 +284,7 @@ bool studiolight_camera_in_object_shadow(WORKBENCH_PrivateData *wpd,
}
/* Test projected near rectangle sides */
- float pts[4][2] = {
+ const float pts[4][2] = {
{oed->shadow_min[0], oed->shadow_min[1]},
{oed->shadow_min[0], oed->shadow_max[1]},
{oed->shadow_max[0], oed->shadow_min[1]},
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index 54c78fd583b..06ed661ad8e 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -592,7 +592,7 @@ GPUBatch *DRW_cache_circle_get(void)
GPUBatch *DRW_cache_square_get(void)
{
if (!SHC.drw_square) {
- float p[4][3] = {
+ const float p[4][3] = {
{1.0f, 0.0f, 1.0f}, {1.0f, 0.0f, -1.0f}, {-1.0f, 0.0f, -1.0f}, {-1.0f, 0.0f, 1.0f}};
/* Position Only 3D format */
@@ -1801,7 +1801,7 @@ GPUBatch *DRW_cache_light_spot_volume_get(void)
GPUBatch *DRW_cache_light_spot_square_get(void)
{
if (!SHC.drw_light_spot_square) {
- float p[5][3] = {
+ const float p[5][3] = {
{0.0f, 0.0f, 0.0f},
{1.0f, 1.0f, -1.0f},
{1.0f, -1.0f, -1.0f},
@@ -1840,7 +1840,7 @@ GPUBatch *DRW_cache_light_spot_square_get(void)
GPUBatch *DRW_cache_light_spot_square_volume_get(void)
{
if (!SHC.drw_light_spot_square_volume) {
- float p[5][3] = {
+ const float p[5][3] = {
{0.0f, 0.0f, 0.0f},
{1.0f, 1.0f, -1.0f},
{1.0f, -1.0f, -1.0f},
@@ -1952,7 +1952,7 @@ GPUBatch *DRW_cache_lightprobe_cube_get(void)
int v_idx = 0;
const float sin_pi_3 = 0.86602540378f;
const float cos_pi_3 = 0.5f;
- float v[7][3] = {
+ const float v[7][3] = {
{0.0f, 1.0f, 0.0f},
{sin_pi_3, cos_pi_3, 0.0f},
{sin_pi_3, -cos_pi_3, 0.0f},
@@ -2057,7 +2057,7 @@ GPUBatch *DRW_cache_lightprobe_planar_get(void)
if (!SHC.drw_lightprobe_planar) {
int v_idx = 0;
const float sin_pi_3 = 0.86602540378f;
- float v[4][3] = {
+ const float v[4][3] = {
{0.0f, 0.5f, 0.0f},
{sin_pi_3, 0.0f, 0.0f},
{0.0f, -0.5f, 0.0f},
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c
index c0cbe3266cb..ab800e42cc0 100644
--- a/source/blender/draw/intern/draw_cache_impl_curve.c
+++ b/source/blender/draw/intern/draw_cache_impl_curve.c
@@ -772,7 +772,7 @@ static void curve_create_edit_data_and_handles(CurveRenderData *rdata,
GPU_indexbuf_add_line_verts(elbp_lines, vbo_len_used + 1, vbo_len_used + 2);
}
if (vbo_data) {
- char vflag[3] = {
+ const char vflag[3] = {
beztriple_vflag_get(rdata, bezt->f1, bezt->h1, a, nu_id),
beztriple_vflag_get(rdata, bezt->f2, bezt->h1, a, nu_id),
beztriple_vflag_get(rdata, bezt->f3, bezt->h2, a, nu_id),
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 2b87e04b6b4..ba5ecb143ae 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2154,7 +2154,7 @@ static void camera_view3d_stereoscopy_display_extra(OBJECT_ShadingGroupList *sgl
static float one = 1.0f;
float plane_mat[4][4], scale_mat[4][4];
float scale_factor[3] = {1.0f, 1.0f, 1.0f};
- float color_plane[2][4] = {
+ const float color_plane[2][4] = {
{0.0f, 0.0f, 0.0f, v3d->stereo3d_convergence_alpha},
{0.0f, 0.0f, 0.0f, 1.0f},
};
@@ -2180,7 +2180,7 @@ static void camera_view3d_stereoscopy_display_extra(OBJECT_ShadingGroupList *sgl
/* Draw convergence volume. */
if (is_stereo3d_volume && !is_select) {
static float one = 1.0f;
- float color_volume[3][4] = {
+ const float color_volume[3][4] = {
{0.0f, 1.0f, 1.0f, v3d->stereo3d_volume_alpha},
{1.0f, 0.0f, 0.0f, v3d->stereo3d_volume_alpha},
{0.0f, 0.0f, 0.0f, 1.0f},
@@ -2306,7 +2306,7 @@ static void camera_view3d_reconstruction(OBJECT_ShadingGroupList *sgl,
DRW_shgroup_empty_ex(sgl, bundle_mat, &v3d->bundle_size, v3d->bundle_drawtype, color);
}
- float bundle_color_v4[4] = {
+ const float bundle_color_v4[4] = {
bundle_color[0],
bundle_color[1],
bundle_color[2],