diff options
author | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-10 16:18:12 +0300 |
---|---|---|
committer | OmarSquircleArt <omar.squircleart@gmail.com> | 2019-08-10 16:18:12 +0300 |
commit | 67474a7e622957044bc708119a7cfa49a82790fd (patch) | |
tree | 1689263da79f08b1c3c9725ac56c3da8b5d91fbb /source/blender/editors/space_view3d/view3d_draw_legacy.c | |
parent | b091542fe91353c15dd7240ba7ce8ecf72d4011b (diff) | |
parent | 553b581f25c1782c4231816965cd3f6ce58a449a (diff) |
Merge master to soc-2019-cycles-procedural.soc-2019-cycles-procedural
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw_legacy.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw_legacy.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c index 39cbc67f996..040b257bb90 100644 --- a/source/blender/editors/space_view3d/view3d_draw_legacy.c +++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c @@ -102,6 +102,7 @@ #include "RE_engine.h" #include "DRW_engine.h" +#include "DRW_select_buffer.h" #include "view3d_intern.h" /* own include */ @@ -238,22 +239,6 @@ void ED_view3d_backbuf_depth_validate(ViewContext *vc) } } -uint *ED_view3d_select_id_read_rect(const rcti *clip, uint *r_buf_len) -{ - uint width = BLI_rcti_size_x(clip); - uint height = BLI_rcti_size_y(clip); - uint buf_len = width * height; - uint *buf = MEM_mallocN(buf_len * sizeof(*buf), __func__); - - DRW_framebuffer_select_id_read(clip, buf); - - if (r_buf_len) { - *r_buf_len = buf_len; - } - - return buf; -} - /** * allow for small values [0.5 - 2.5], * and large values, FLT_MAX by clamping by the area size @@ -263,30 +248,6 @@ int ED_view3d_backbuf_sample_size_clamp(ARegion *ar, const float dist) return (int)min_ff(ceilf(dist), (float)max_ii(ar->winx, ar->winx)); } -/* reads full rect, converts indices */ -uint *ED_view3d_select_id_read(int xmin, int ymin, int xmax, int ymax, uint *r_buf_len) -{ - if (UNLIKELY((xmin > xmax) || (ymin > ymax))) { - return NULL; - } - - const rcti rect = { - .xmin = xmin, - .xmax = xmax + 1, - .ymin = ymin, - .ymax = ymax + 1, - }; - - uint buf_len; - uint *buf = ED_view3d_select_id_read_rect(&rect, &buf_len); - - if (r_buf_len) { - *r_buf_len = buf_len; - } - - return buf; -} - /* *********************** */ void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect) |