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:
authorPablo Dobarro <pablodp606@gmail.com>2019-10-09 20:03:57 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-10-09 22:23:11 +0300
commitd95bb087d0346164ab35df003ed8c4a27088e9eb (patch)
tree755e68c995f06fa7c95bfa3193bf80e56b14bde2 /source/blender/blenkernel/intern/pbvh.c
parente84685286274a48de4fbb3fa8e8836f921168319 (diff)
Sculpt: Fix wireframe drawing
With this commit sculpt mode draws the real mesh wireframe instead of the triangulated version by ignoring non real edges when building the PBVH GPU buffers Reviewed By: brecht Differential Revision: https://developer.blender.org/D6032
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh.c')
-rw-r--r--source/blender/blenkernel/intern/pbvh.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 8549ad1f7f0..4e193e35109 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -27,6 +27,7 @@
#include "BLI_ghash.h"
#include "BLI_task.h"
+#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "BKE_pbvh.h"
@@ -533,6 +534,7 @@ static void pbvh_build(PBVH *bvh, BB *cb, BBC *prim_bbc, int totprim)
* (which means it may rewrite it if needed, see #BKE_pbvh_vert_coords_apply().
*/
void BKE_pbvh_build_mesh(PBVH *bvh,
+ const Mesh *mesh,
const MPoly *mpoly,
const MLoop *mloop,
MVert *verts,
@@ -545,6 +547,7 @@ void BKE_pbvh_build_mesh(PBVH *bvh,
BBC *prim_bbc = NULL;
BB cb;
+ bvh->mesh = mesh;
bvh->type = PBVH_FACES;
bvh->mpoly = mpoly;
bvh->mloop = mloop;
@@ -1222,7 +1225,8 @@ static void pbvh_update_draw_buffer_cb(void *__restrict userdata,
bvh->looptri,
bvh->verts,
node->prim_indices,
- node->totprim);
+ node->totprim,
+ bvh->mesh);
break;
case PBVH_BMESH:
node->draw_buffers = GPU_pbvh_bmesh_buffers_build(bvh->flags &