[Bf-blender-cvs] [6f0c629a917] refactor-mesh-remove-pointers: Fix build error
Hans Goudey
noreply at git.blender.org
Mon Aug 8 22:35:06 CEST 2022
Commit: 6f0c629a9171ab4ffeab9c5e3077c45e802a73fc
Author: Hans Goudey
Date: Mon Aug 8 15:32:22 2022 -0500
Branches: refactor-mesh-remove-pointers
https://developer.blender.org/rB6f0c629a9171ab4ffeab9c5e3077c45e802a73fc
Fix build error
===================================================================
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 d4823abab22..0792a392cc2 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -467,8 +467,8 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const Mesh *mesh,
int i, tottri;
int tot_real_edges = 0;
- const MPoly *mpoly = mesh->mpoly;
- const MLoop *mloop = mesh->mloop;
+ const MPoly *polygons = BKE_mesh_polygons(mesh);
+ const MLoop *loops = BKE_mesh_loops(mesh);
buffers = MEM_callocN(sizeof(GPU_PBVH_Buffers), "GPU_Buffers");
@@ -476,14 +476,14 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const Mesh *mesh,
&mesh->vdata, CD_PROP_BOOL, ".hide_vert");
/* smooth or flat for all */
- buffers->smooth = mpoly[looptri[face_indices[0]].poly].flag & ME_SMOOTH;
+ buffers->smooth = polygons[looptri[face_indices[0]].poly].flag & ME_SMOOTH;
buffers->show_overlay = false;
/* Count the number of visible triangles */
for (i = 0, tottri = 0; i < face_indices_len; i++) {
const MLoopTri *lt = &looptri[face_indices[i]];
- if (gpu_pbvh_is_looptri_visible(lt, hide_vert, mloop, sculpt_face_sets)) {
+ if (gpu_pbvh_is_looptri_visible(lt, hide_vert, loops, sculpt_face_sets)) {
int r_edges[3];
BKE_mesh_looptri_get_real_edges(mesh, lt, r_edges);
for (int j = 0; j < 3; j++) {
@@ -498,8 +498,8 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const Mesh *mesh,
if (tottri == 0) {
buffers->tot_tri = 0;
- buffers->mpoly = mpoly;
- buffers->mloop = mloop;
+ buffers->mpoly = polygons;
+ buffers->mloop = loops;
buffers->looptri = looptri;
buffers->face_indices = face_indices;
buffers->face_indices_len = 0;
@@ -516,7 +516,7 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const Mesh *mesh,
const MLoopTri *lt = &looptri[face_indices[i]];
/* Skip hidden faces */
- if (!gpu_pbvh_is_looptri_visible(lt, hide_vert, mloop, sculpt_face_sets)) {
+ if (!gpu_pbvh_is_looptri_visible(lt, hide_vert, loops, sculpt_face_sets)) {
continue;
}
@@ -538,8 +538,8 @@ GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const Mesh *mesh,
buffers->tot_tri = tottri;
- buffers->mpoly = mpoly;
- buffers->mloop = mloop;
+ buffers->mpoly = polygons;
+ buffers->mloop = loops;
buffers->looptri = looptri;
buffers->face_indices = face_indices;
More information about the Bf-blender-cvs
mailing list