diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-08-01 14:30:57 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-08-01 14:30:57 +0300 |
commit | eb7fe7546c1410f3cd82298491edcae3a3e70c1d (patch) | |
tree | 5d955a15fea63e0cc7b2872866ada04b91d2a85e /source/blender/draw/engines/select | |
parent | 6786c336bd58370e5a37db352975000e60ae5ba5 (diff) |
Fix T68055: mesh selection issues, once blend is loaded second time in a Blender session
The depth attachment of the framebuffer was missing.
Diffstat (limited to 'source/blender/draw/engines/select')
-rw-r--r-- | source/blender/draw/engines/select/select_engine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c index b910f59c432..53a83e495ca 100644 --- a/source/blender/draw/engines/select/select_engine.c +++ b/source/blender/draw/engines/select/select_engine.c @@ -86,10 +86,12 @@ static void draw_select_framebuffer_select_id_setup(void) e_data.texture_u32 = NULL; } + /* Make sure the depth texture is attached. + * It may disappear when loading another Blender session. */ + GPU_framebuffer_texture_attach(e_data.framebuffer_select_id, dtxl->depth, 0, 0); + if (e_data.texture_u32 == NULL) { e_data.texture_u32 = GPU_texture_create_2d(size[0], size[1], GPU_R32UI, NULL, NULL); - - GPU_framebuffer_texture_attach(e_data.framebuffer_select_id, dtxl->depth, 0, 0); GPU_framebuffer_texture_attach(e_data.framebuffer_select_id, e_data.texture_u32, 0, 0); GPU_framebuffer_check_valid(e_data.framebuffer_select_id, NULL); } |