diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-20 17:36:18 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-20 17:36:36 +0300 |
commit | c48d1d54f1f096baf7620a35d57636dfdbb71aae (patch) | |
tree | a93d4a0f21f5c7ed27f52bda7c6c3ca116a25030 /source/blender/draw/intern/draw_select_buffer.c | |
parent | 0827110a35c8f11f6a7e9bba313d5f0189bbae92 (diff) |
Select Engine: Move some private members out of select context
Diffstat (limited to 'source/blender/draw/intern/draw_select_buffer.c')
-rw-r--r-- | source/blender/draw/intern/draw_select_buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_select_buffer.c b/source/blender/draw/intern/draw_select_buffer.c index 974ea22ccea..6454fc71e56 100644 --- a/source/blender/draw/intern/draw_select_buffer.c +++ b/source/blender/draw/intern/draw_select_buffer.c @@ -75,14 +75,15 @@ uint *DRW_select_buffer_read(struct Depsgraph *depsgraph, DRW_draw_select_id(depsgraph, ar, v3d, rect); if (select_ctx->index_drawn_len > 1) { - BLI_assert(ar->winx == GPU_texture_width(select_ctx->texture_u32) && - ar->winy == GPU_texture_height(select_ctx->texture_u32)); + BLI_assert(ar->winx == GPU_texture_width(DRW_engine_select_texture_get()) && + ar->winy == GPU_texture_height(DRW_engine_select_texture_get())); /* Read the UI32 pixels. */ buf_len = BLI_rcti_size_x(rect) * BLI_rcti_size_y(rect); r_buf = MEM_mallocN(buf_len * sizeof(*r_buf), __func__); - GPU_framebuffer_bind(select_ctx->framebuffer_select_id); + GPUFrameBuffer *select_id_fb = DRW_engine_select_framebuffer_get(); + GPU_framebuffer_bind(select_id_fb); glReadBuffer(GL_COLOR_ATTACHMENT0); glReadPixels(rect_clamp.xmin, rect_clamp.ymin, |