DRW: Select Engine: Set uniform only once per ShadowGroup
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user