Blender Git Loki

Git Commits -> Revision 98fc7e5

Revision 98fc7e5 by Germano Cavalcante
August 16, 2019, 01:04 (GMT)
Edit Mesh Selection: Refactor: Redraw idmap buffer at runtime with only objects inside the rect

But in the future the selection code may also be used in object mode (eg for snapping).
So to avoid using too much VRAM resources, it is good to avoid drawing all objects in the viewport.

The solution was to create an array with only objects that are detected within the selection area.
If the selection operator is modal, objects already detected are not removed from the array until view3d is moved or orbited.
To detect the object, its BoundBox is tested.
Since the Select Engine does not have a dedicated depth texture, whenever a new object is "found" the depth of the objects in the array already drawn is redrawn.

Reviewers: campbellbarton, fclem

Reviewed By: fclem

Differential Revision: https://developer.blender.org/D5435

Commit Details:

Full Hash: 98fc7e533cf790f0fe595e36672465670193e456
Parent Commit: aa34408
Committed By: YimingWu
Lines Changed: +467, -238

12 Modified Paths:

/source/blender/draw/DRW_engine.h (+1, -3) (Diff)
/source/blender/draw/DRW_select_buffer.h (+61, -22) (Diff)
/source/blender/draw/engines/select/select_draw_utils.c (+36, -8) (Diff)
/source/blender/draw/engines/select/select_engine.c (+119, -26) (Diff)
/source/blender/draw/engines/select/select_private.h (+5, -1) (Diff)
/source/blender/draw/intern/draw_manager.c (+9, -21) (Diff)
/source/blender/draw/intern/draw_select_buffer.c (+138, -87) (Diff)
/source/blender/editors/mesh/editmesh_select.c (+8, -6) (Diff)
/source/blender/editors/mesh/meshtools.c (+6, -4) (Diff)
/source/blender/editors/sculpt_paint/paint_utils.c (+1, -1) (Diff)
/source/blender/editors/space_view3d/view3d_draw_legacy.c (+2, -1) (Diff)
/source/blender/editors/space_view3d/view3d_select.c (+81, -58) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021