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:
authorClément Foucault <foucault.clem@gmail.com>2019-05-29 18:44:16 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-30 14:42:21 +0300
commit32a2bfddcb4b0dedbea987ae3e335dc6aecdaed8 (patch)
tree9b61a760233bbd0cb8c14f2346c1fa887ae39813
parent092962cf72e77abb3693f9f337b341bfc066d711 (diff)
GPencil: Remove uneeded storage->unit_matrix
When passing NULL to DRW_shgroup_call(), ModelMatrix is assumed to be unitmat.
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c10
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.c3
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.h1
3 files changed, 3 insertions, 11 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 4718985d1c8..964b7974de3 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1549,9 +1549,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data,
}
/* buffer strokes, must show stroke always */
- DRW_shgroup_call(stl->g_data->shgrps_drawing_stroke,
- e_data->batch_buffer_stroke,
- stl->storage->unit_matrix);
+ DRW_shgroup_call(stl->g_data->shgrps_drawing_stroke, e_data->batch_buffer_stroke, NULL);
if ((gpd->runtime.sbuffer_size >= 3) &&
(gpd->runtime.sfill[3] > GPENCIL_ALPHA_OPACITY_THRESH) &&
@@ -1573,9 +1571,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data,
}
e_data->batch_buffer_fill = DRW_gpencil_get_buffer_fill_geom(gpd);
- DRW_shgroup_call(stl->g_data->shgrps_drawing_fill,
- e_data->batch_buffer_fill,
- stl->storage->unit_matrix);
+ DRW_shgroup_call(stl->g_data->shgrps_drawing_fill, e_data->batch_buffer_fill, NULL);
stl->storage->buffer_fill = true;
}
stl->storage->buffer_stroke = true;
@@ -1605,7 +1601,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data,
e_data->batch_buffer_ctrlpoint = DRW_gpencil_get_buffer_ctrlpoint_geom(gpd);
- DRW_shgroup_call(shgrp, e_data->batch_buffer_ctrlpoint, stl->storage->unit_matrix);
+ DRW_shgroup_call(shgrp, e_data->batch_buffer_ctrlpoint, NULL);
stl->storage->buffer_ctrlpoint = true;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index 6bcffe3fb9f..f597797ae38 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -244,9 +244,6 @@ void GPENCIL_engine_init(void *vedata)
/* init storage */
if (!stl->storage) {
stl->storage = MEM_callocN(sizeof(GPENCIL_Storage), "GPENCIL_Storage");
-
- /* unit matrix */
- unit_m4(stl->storage->unit_matrix);
stl->storage->shade_render[0] = OB_RENDER;
stl->storage->shade_render[1] = 0;
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 6b66f1374bb..aa26d787487 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -145,7 +145,6 @@ typedef struct GPENCIL_shgroup {
typedef struct GPENCIL_Storage {
int shgroup_id; /* total elements */
- float unit_matrix[4][4];
int stroke_style;
int color_type;
int mode;