From 377915b08144e0945ed1984338def3dcad267a6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 9 Jan 2018 14:21:55 +0100 Subject: DRW: Make use of DRWInstanceData. This modify the selection code quite a bit but it's for the better. When using selection we use the same batching / instancing process but we draw each element at a time using a an offset to the first element we want to draw and by drawing only one element. This result much less memory allocation and better draw time. --- source/blender/draw/modes/object_mode.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'source/blender/draw/modes/object_mode.c') diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index af0af3dca43..4e19eff3cfb 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1500,9 +1500,6 @@ static void DRW_shgroup_lightprobe(OBJECT_StorageList *stl, OBJECT_PassList *psl sub_v3_v3(prb_data->increment_z, prb_data->corner); DRWShadingGroup *grp = DRW_shgroup_instance_create(e_data.lightprobe_grid_sh, psl->lightprobes, DRW_cache_sphere_get()); - /* Dummy call just to save select ID */ - DRW_shgroup_call_dynamic_add_empty(grp); - /* Then overide the instance count */ DRW_shgroup_set_instance_count(grp, prb->grid_resolution_x * prb->grid_resolution_y * prb->grid_resolution_z); DRW_shgroup_uniform_vec4(grp, "color", color, 1); DRW_shgroup_uniform_vec3(grp, "corner", prb_data->corner, 1); -- cgit v1.2.3