diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-02 16:44:22 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-02 16:48:16 +0300 |
commit | 8fbe18dc8dc3e066ef0fc58b0be4f71aa7b0cda0 (patch) | |
tree | 2b2c8631616d65d671977a7213635f21930c1efd | |
parent | ae7137cdf862f54c21a5e5194886fc0564aad1d1 (diff) |
DRW: Select Engine: Set uniform only once per ShadowGroup
-rw-r--r-- | source/blender/draw/engines/select/select_draw_utils.c | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/select/select_engine.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/select/select_draw_utils.c b/source/blender/draw/engines/select/select_draw_utils.c index 026fd52aa58..c3615cb5a81 100644 --- a/source/blender/draw/engines/select/select_draw_utils.c +++ b/source/blender/draw/engines/select/select_draw_utils.c @@ -106,7 +106,6 @@ static void draw_select_id_edit_mesh(SELECTID_StorageList *stl, else { geom_faces = DRW_mesh_batch_cache_get_surface(me); face_shgrp = stl->g_data->shgrp_face_unif; - DRW_shgroup_uniform_int_copy(face_shgrp, "id", 0); *r_face_offset = initial_offset; } DRW_shgroup_call(face_shgrp, geom_faces, ob); @@ -158,7 +157,6 @@ static void draw_select_id_mesh(SELECTID_StorageList *stl, else { /* Only draw faces to mask out verts, we don't want their selection ID's. */ face_shgrp = stl->g_data->shgrp_face_unif; - DRW_shgroup_uniform_int_copy(face_shgrp, "id", 0); *r_face_offset = initial_offset; } DRW_shgroup_call(face_shgrp, geom_faces, ob); diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c index 20b04d0a659..5d5319722cf 100644 --- a/source/blender/draw/engines/select/select_engine.c +++ b/source/blender/draw/engines/select/select_engine.c @@ -158,6 +158,8 @@ static void select_cache_init(void *vedata) stl->g_data->shgrp_face_unif = DRW_shgroup_create(sh_data->select_id_uniform, psl->select_id_face_pass); + DRW_shgroup_uniform_int_copy(stl->g_data->shgrp_face_unif, "id", 0); + stl->g_data->shgrp_face_flat = DRW_shgroup_create(sh_data->select_id_flat, psl->select_id_face_pass); |