Sculpt: Fix T101467: Improper vertex count in pbvh draw
This commit is contained in:
parent
81f15a51aa
commit
206dead860
Notes:
blender-bot
2023-02-14 08:29:54 +01:00
Referenced by issue #101537, Regression: Crash render Cycles & Volume + Sky Texture on world shader Referenced by issue #101467, Regression: Sculpt Mode: Hiding Face Sets will cause glitches
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue