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_curve_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_curve_mode.c')
-rw-r--r-- | source/blender/draw/modes/edit_curve_mode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c index 212768dcdc9..068af2e2012 100644 --- a/source/blender/draw/modes/edit_curve_mode.c +++ b/source/blender/draw/modes/edit_curve_mode.c @@ -269,30 +269,30 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob) } geom = DRW_cache_curve_edge_wire_get(ob); - DRW_shgroup_call(wire_shgrp, geom, ob->obmat); + DRW_shgroup_call(wire_shgrp, geom, ob); if ((cu->flag & CU_3D) && (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_CU_NORMALS) != 0) { geom = DRW_cache_curve_edge_normal_get(ob); - DRW_shgroup_call_instances(wire_normals_shgrp, geom, ob->obmat, 2); + DRW_shgroup_call_instances(wire_normals_shgrp, ob, geom, 2); } geom = DRW_cache_curve_edge_overlay_get(ob); if (geom) { - DRW_shgroup_call(stl->g_data->overlay_edge_shgrp, geom, ob->obmat); + DRW_shgroup_call(stl->g_data->overlay_edge_shgrp, geom, ob); } geom = DRW_cache_curve_vert_overlay_get(ob, stl->g_data->show_handles); - DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob->obmat); + DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob); } } if (ob->type == OB_SURF) { if (BKE_object_is_in_editmode(ob)) { struct GPUBatch *geom = DRW_cache_curve_edge_overlay_get(ob); - DRW_shgroup_call(stl->g_data->overlay_edge_shgrp, geom, ob->obmat); + DRW_shgroup_call(stl->g_data->overlay_edge_shgrp, geom, ob); geom = DRW_cache_curve_vert_overlay_get(ob, false); - DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob->obmat); + DRW_shgroup_call(stl->g_data->overlay_vert_shgrp, geom, ob); } } } |