[Bf-blender-cvs] [8a7c2c4192a] master: Fix T66351 Wireframe display in sculpt-mode broke when hiding parts

Clément Foucault noreply at git.blender.org
Mon Jul 8 18:18:59 CEST 2019


Commit: 8a7c2c4192aff7f34e50dac83bd793e0247fc604
Author: Clément Foucault
Date:   Mon Jul 8 11:56:57 2019 +0200
Branches: master
https://developer.blender.org/rB8a7c2c4192aff7f34e50dac83bd793e0247fc604

Fix T66351 Wireframe display in sculpt-mode broke when hiding parts

===================================================================

M	source/blender/gpu/intern/gpu_buffers.c

===================================================================

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);
   }



More information about the Bf-blender-cvs mailing list