diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-10-01 01:40:50 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-10-01 01:40:50 +0300 |
commit | 206dead86058d58f1e0f402efb2c37930aadc661 (patch) | |
tree | 30d07036a1a69eaef25a20845048d36df1c43a78 /source | |
parent | 81f15a51aa7891c16579d004eac446ec4e7866be (diff) |
Sculpt: Fix T101467: Improper vertex count in pbvh draw
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_pbvh.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_pbvh.cc b/source/blender/draw/intern/draw_pbvh.cc index e0231e36e8e..287270079e5 100644 --- a/source/blender/draw/intern/draw_pbvh.cc +++ b/source/blender/draw/intern/draw_pbvh.cc @@ -498,8 +498,6 @@ struct PBVHBatches { void fill_vbo_faces(PBVHVbo &vbo, PBVH_GPU_Args *args) { - int totvert = args->totprim * 3; - auto foreach_faces = [&](std::function<void(int buffer_i, int tri_i, int vertex_i, const MLoopTri *tri)> func) { int buffer_i = 0; @@ -521,6 +519,9 @@ struct PBVHBatches { } }; + int totvert = 0; + foreach_faces([&totvert](int, int, int, const MLoopTri *) { totvert++; }); + int existing_num = GPU_vertbuf_get_vertex_len(vbo.vert_buf); void *existing_data = GPU_vertbuf_get_data(vbo.vert_buf); |