[Bf-blender-cvs] [e61459d0f65] temp-pbvh-vbos: Merge branch 'master' into temp-pbvh-vbos
Joseph Eagar
noreply at git.blender.org
Sun Aug 21 00:44:44 CEST 2022
Commit: e61459d0f6574e17777d6f97f7e7fab377d0ee40
Author: Joseph Eagar
Date: Fri Aug 19 13:17:24 2022 -0700
Branches: temp-pbvh-vbos
https://developer.blender.org/rBe61459d0f6574e17777d6f97f7e7fab377d0ee40
Merge branch 'master' into temp-pbvh-vbos
===================================================================
===================================================================
diff --cc source/blender/blenkernel/BKE_pbvh.h
index 74b1643cfc3,8c9488b0b46..07f61d570b6
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@@ -355,19 -346,17 +355,22 @@@ void BKE_pbvh_draw_cb(PBVH *pbvh
bool update_only_visible,
PBVHFrustumPlanes *update_frustum,
PBVHFrustumPlanes *draw_frustum,
- void (*draw_fn)(void *user_data, struct GPU_PBVH_Buffers *buffers),
+ void (*draw_fn)(void *user_data,
+ struct GPU_PBVH_Buffers *buffers,
+ struct PBVHBatches *batches,
+ struct PBVH_GPU_Args *args),
void *user_data,
- bool full_render);
+ bool full_render,
+ PBVHAttrReq *attrs,
+ int attrs_num);
- void BKE_pbvh_draw_debug_cb(
- PBVH *pbvh,
- void (*draw_fn)(void *user_data, const float bmin[3], const float bmax[3], PBVHNodeFlags flag),
- void *user_data);
+ void BKE_pbvh_draw_debug_cb(PBVH *pbvh,
+ void (*draw_fn)(PBVHNode *node,
+ void *user_data,
+ const float bmin[3],
+ const float bmax[3],
+ PBVHNodeFlags flag),
+ void *user_data);
/* PBVH Access */
diff --cc source/blender/blenkernel/intern/pbvh.c
index c366c2f495a,9db6689167d..795e850cff3
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@@ -1397,15 -1330,9 +1397,17 @@@ static void pbvh_update_draw_buffer_cb(
}
if (node->flag & PBVH_UpdateDrawBuffers) {
+ node->debug_draw_gen++;
+
const int update_flags = pbvh_get_buffers_update_flags(pbvh);
+
+ if (node->draw_batches) {
+ PBVH_GPU_Args args;
+
+ pbvh_draw_args(pbvh, &args, node);
+ GPU_pbvh_node_update(node->draw_batches, &args);
+ }
+
switch (pbvh->header.type) {
case PBVH_GRIDS:
GPU_pbvh_grid_buffers_update(pbvh->vbo_id,
diff --cc source/blender/gpu/intern/gpu_buffers.cc
index 1f05f5c5d01,d64b8b4118a..b1cc231de6a
--- a/source/blender/gpu/intern/gpu_buffers.cc
+++ b/source/blender/gpu/intern/gpu_buffers.cc
@@@ -1025,8 -469,11 +1027,11 @@@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers
const MPoly *mpoly = mesh->mpoly;
const MLoop *mloop = mesh->mloop;
- buffers = MEM_callocN(sizeof(GPU_PBVH_Buffers), "GPU_Buffers");
+ buffers = (GPU_PBVH_Buffers *)MEM_callocN(sizeof(GPU_PBVH_Buffers), "GPU_Buffers");
+ const bool *hide_vert = (bool *)CustomData_get_layer_named(
+ &mesh->vdata, CD_PROP_BOOL, ".hide_vert");
+
/* smooth or flat for all */
buffers->smooth = mpoly[looptri[face_indices[0]].poly].flag & ME_SMOOTH;
More information about the Bf-blender-cvs
mailing list