Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-09-17 14:26:38 +0300
committermano-wii <germano.costa@ig.com.br>2019-09-17 14:26:57 +0300
commit8f662e84e0b49a581f9330bf1c560e62485b3f6a (patch)
treebfb48c00c71a6bb8b65e023192745928d4885e53 /source/blender/draw/engines/select
parent6ee2d10005a9e3f47ba6eed53d4e56b9e76f9842 (diff)
Fix T69716: Can't select geometry hidden by faces created by modifiers
This kind of reverts rBc060a835 that was committed without discussion.
Diffstat (limited to 'source/blender/draw/engines/select')
-rw-r--r--source/blender/draw/engines/select/select_draw_utils.c4
-rw-r--r--source/blender/draw/engines/select/select_engine.c4
-rw-r--r--source/blender/draw/engines/select/select_private.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/draw/engines/select/select_draw_utils.c b/source/blender/draw/engines/select/select_draw_utils.c
index 927956dad19..cac8b5cb304 100644
--- a/source/blender/draw/engines/select/select_draw_utils.c
+++ b/source/blender/draw/engines/select/select_draw_utils.c
@@ -129,7 +129,11 @@ static void draw_select_id_edit_mesh(SELECTID_StorageList *stl,
}
else {
if (ob->dt >= OB_SOLID) {
+#ifdef USE_CAGE_OCCLUSION
+ struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me);
+#else
struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(me);
+#endif
DRWShadingGroup *face_shgrp = stl->g_data->shgrp_face_unif;
DRW_shgroup_call_no_cull(face_shgrp, geom_faces, ob);
}
diff --git a/source/blender/draw/engines/select/select_engine.c b/source/blender/draw/engines/select/select_engine.c
index 5dc20a589f0..abfa57dd218 100644
--- a/source/blender/draw/engines/select/select_engine.c
+++ b/source/blender/draw/engines/select/select_engine.c
@@ -252,7 +252,11 @@ static void select_cache_populate(void *vedata, Object *ob)
DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_faces, ob->obmat);
}
else if (ob->dt >= OB_SOLID) {
+#ifdef USE_CAGE_OCCLUSION
+ struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_triangles_with_select_id(me);
+#else
struct GPUBatch *geom_faces = DRW_mesh_batch_cache_get_surface(me);
+#endif
DRW_shgroup_call_obmat(stl->g_data->shgrp_depth_only, geom_faces, ob->obmat);
}
diff --git a/source/blender/draw/engines/select/select_private.h b/source/blender/draw/engines/select/select_private.h
index 642cd6ffc56..1e99a49252e 100644
--- a/source/blender/draw/engines/select/select_private.h
+++ b/source/blender/draw/engines/select/select_private.h
@@ -23,6 +23,8 @@
#ifndef __SELECT_PRIVATE_H__
#define __SELECT_PRIVATE_H__
+#define USE_CAGE_OCCLUSION
+
#include "DRW_render.h"
/* GPUViewport.storage