diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-30 00:52:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-30 14:43:33 +0300 |
commit | 596492e639f07b6a0a3f705a0f944dc57f94b7e4 (patch) | |
tree | 55f3dfa9ee3ad03c90954bec26f7c85157dc2d1b /source/blender/draw/modes/edit_mesh_mode.c | |
parent | 32a2bfddcb4b0dedbea987ae3e335dc6aecdaed8 (diff) |
DRW: Refactor to use object pointer for drawcall by default
This cleans up a bit of duplicated code and some confusion about
what was culled and what wasn't.
Now everything is culled based on the given object pointer.
If the object pointer is NULL there is no culling performed.
Diffstat (limited to 'source/blender/draw/modes/edit_mesh_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 7b8dc01dfbc..bb11ff384b5 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -663,17 +663,17 @@ static void edit_mesh_add_ob_to_pass(Scene *scene, geom_tris = DRW_mesh_batch_cache_get_edit_triangles(ob->data); geom_edges = DRW_mesh_batch_cache_get_edit_edges(ob->data); - DRW_shgroup_call(edge_shgrp, geom_edges, ob->obmat); - DRW_shgroup_call(face_shgrp, geom_tris, ob->obmat); + DRW_shgroup_call(edge_shgrp, geom_edges, ob); + DRW_shgroup_call(face_shgrp, geom_tris, ob); if ((tsettings->selectmode & SCE_SELECT_VERTEX) != 0) { geom_verts = DRW_mesh_batch_cache_get_edit_vertices(ob->data); - DRW_shgroup_call(vert_shgrp, geom_verts, ob->obmat); + DRW_shgroup_call(vert_shgrp, geom_verts, ob); } if (facedot_shgrp && (tsettings->selectmode & SCE_SELECT_FACE) != 0) { geom_fcenter = DRW_mesh_batch_cache_get_edit_facedots(ob->data); - DRW_shgroup_call(facedot_shgrp, geom_fcenter, ob->obmat); + DRW_shgroup_call(facedot_shgrp, geom_fcenter, ob); } } @@ -698,7 +698,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob) if (do_show_weight) { geom = DRW_cache_mesh_surface_weights_get(ob); - DRW_shgroup_call(g_data->fweights_shgrp, geom, ob->obmat); + DRW_shgroup_call(g_data->fweights_shgrp, geom, ob); } if (do_show_mesh_analysis && !XRAY_ACTIVE(v3d)) { @@ -709,7 +709,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob) if (is_original) { geom = DRW_cache_mesh_surface_mesh_analysis_get(ob); if (geom) { - DRW_shgroup_call(g_data->mesh_analysis_shgrp, geom, ob->obmat); + DRW_shgroup_call(g_data->mesh_analysis_shgrp, geom, ob); } } } @@ -719,20 +719,20 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob) DRW_shgroup_call(do_in_front ? g_data->depth_shgrp_hidden_wire_in_front : g_data->depth_shgrp_hidden_wire, geom, - ob->obmat); + ob); } if (vnormals_do) { geom = DRW_mesh_batch_cache_get_edit_vertices(ob->data); - DRW_shgroup_call(g_data->vnormals_shgrp, geom, ob->obmat); + DRW_shgroup_call(g_data->vnormals_shgrp, geom, ob); } if (lnormals_do) { geom = DRW_mesh_batch_cache_get_edit_lnors(ob->data); - DRW_shgroup_call(g_data->lnormals_shgrp, geom, ob->obmat); + DRW_shgroup_call(g_data->lnormals_shgrp, geom, ob); } if (fnormals_do) { geom = DRW_mesh_batch_cache_get_edit_facedots(ob->data); - DRW_shgroup_call(g_data->fnormals_shgrp, geom, ob->obmat); + DRW_shgroup_call(g_data->fnormals_shgrp, geom, ob); } if (g_data->do_zbufclip) { |