diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-31 05:01:27 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-31 05:06:56 +0300 |
commit | 9ccdad8a2173e14848fbfa5401210d8ffb074352 (patch) | |
tree | 6a5f8d56d35340d80ac7287ce2e89a46332f17b5 /source/blender/windowmanager/gizmo | |
parent | 57f6aa4d832cc24cc85ebc530dc6c8c51453120d (diff) |
Cleanup: use enum type for selection mode & internal algorithm enum
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r-- | source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c index e61de28d0a4..024aee84565 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c @@ -582,19 +582,19 @@ static int gizmo_find_intersected_3d_intern(wmGizmo **visible_gizmos, * - #GPU_SELECT_ALL: Use it to check if there is anything at the cursor location * (only ever runs once). * - #GPU_SELECT_PICK_NEAREST: Use if there are more than 1 item at the cursor location, - * select the best one. + * pick the nearest one. * - #GPU_SELECT_PICK_ALL: Use for the same purpose as #GPU_SELECT_PICK_NEAREST * when the selection depths need to re-ordered based on a bias. * */ - const int gpu_select_mode = (use_depth_test ? - (has_3d_select_bias ? - /* Using select bias means the depths need to be - * re-calculated based on the bias to pick the best. */ - GPU_SELECT_PICK_ALL : - /* No bias, just pick the closest. */ - GPU_SELECT_PICK_NEAREST) : - /* Fast-path (occlusion queries). */ - GPU_SELECT_ALL); + const eGPUSelectMode gpu_select_mode = + (use_depth_test ? (has_3d_select_bias ? + /* Using select bias means the depths need to be + * re-calculated based on the bias to pick the best. */ + GPU_SELECT_PICK_ALL : + /* No bias, just pick the closest. */ + GPU_SELECT_PICK_NEAREST) : + /* Fast-path (occlusion queries). */ + GPU_SELECT_ALL); if (GPU_select_is_cached()) { GPU_select_begin(buffer, ARRAY_SIZE(buffer), &rect, gpu_select_mode, 0); |