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:
authorClément Foucault <foucault.clem@gmail.com>2019-07-08 12:56:57 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-07-08 19:09:52 +0300
commit8a7c2c4192aff7f34e50dac83bd793e0247fc604 (patch)
tree3b0f568491bc86015a50a1a1de93249bb5ee5832 /source/blender/gpu/intern/gpu_buffers.c
parent9526e236fce6d4ee0230f48cb1f29452ce2574be (diff)
Fix T66351 Wireframe display in sculpt-mode broke when hiding parts
Diffstat (limited to 'source/blender/gpu/intern/gpu_buffers.c')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 241b3bd553f..59b0857c177 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -374,6 +374,7 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const int (*face_vert_indices)[3],
/* Fill the only the line buffer. */
GPUIndexBufBuilder elb_lines;
GPU_indexbuf_init(&elb_lines, GPU_PRIM_LINES, tottri * 3, INT_MAX);
+ int vert_idx = 0;
for (i = 0; i < face_indices_len; ++i) {
const MLoopTri *lt = &looptri[face_indices[i]];
@@ -384,9 +385,10 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const int (*face_vert_indices)[3],
}
/* TODO skip "non-real" edges. */
- GPU_indexbuf_add_line_verts(&elb_lines, i * 3 + 0, i * 3 + 1);
- GPU_indexbuf_add_line_verts(&elb_lines, i * 3 + 1, i * 3 + 2);
- GPU_indexbuf_add_line_verts(&elb_lines, i * 3 + 2, i * 3 + 0);
+ GPU_indexbuf_add_line_verts(&elb_lines, vert_idx * 3 + 0, vert_idx * 3 + 1);
+ GPU_indexbuf_add_line_verts(&elb_lines, vert_idx * 3 + 1, vert_idx * 3 + 2);
+ GPU_indexbuf_add_line_verts(&elb_lines, vert_idx * 3 + 2, vert_idx * 3 + 0);
+ vert_idx++;
}
buffers->index_lines_buf = GPU_indexbuf_build(&elb_lines);
}