GPencil: Remove uneeded storage->unit_matrix

When passing NULL to DRW_shgroup_call(), ModelMatrix is assumed
to be unitmat.
This commit is contained in:
2019-05-29 17:44:16 +02:00
parent 092962cf72
commit 32a2bfddcb
3 changed files with 3 additions and 11 deletions

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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;