diff options
-rw-r--r-- | source/blender/blenlib/intern/pbvh.c | 7 | ||||
-rw-r--r-- | source/blender/gpu/GPU_buffers.h | 5 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 8 |
3 files changed, 8 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index b7175db4ca3..0e3cc51dea5 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -420,11 +420,10 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node) if(!G.background) { node->draw_buffers = - GPU_build_mesh_buffers(map, bvh->verts, bvh->faces, + GPU_build_mesh_buffers(map, bvh->faces, node->prim_indices, - node->totprim, node->vert_indices, - node->uniq_verts, - node->uniq_verts + node->face_verts); + node->totprim, + node->uniq_verts); } node->flag |= PBVH_UpdateDrawBuffers; diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index a72c79a1e62..945b9d819ef 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -159,10 +159,9 @@ int GPU_buffer_legacy( struct DerivedMesh *dm ); /* Buffers for non-DerivedMesh drawing */ typedef struct GPU_Buffers GPU_Buffers; -GPU_Buffers *GPU_build_mesh_buffers(struct GHash *map, struct MVert *mvert, +GPU_Buffers *GPU_build_mesh_buffers(struct GHash *map, struct MFace *mface, int *face_indices, - int totface, int *vert_indices, int uniq_verts, - int totvert); + int totface, int uniq_verts); void GPU_update_mesh_buffers(GPU_Buffers *buffers, struct MVert *mvert, int *vert_indices, int totvert); GPU_Buffers *GPU_build_grid_buffers(struct DMGridData **grids, diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 8318d906f72..006baac0df5 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1333,10 +1333,9 @@ void GPU_update_mesh_buffers(GPU_Buffers *buffers, MVert *mvert, buffers->mvert = mvert; } -GPU_Buffers *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface, - int *face_indices, int totface, - int *vert_indices, int tot_uniq_verts, - int totvert) +GPU_Buffers *GPU_build_mesh_buffers(GHash *map, MFace *mface, + int *face_indices, int totface, + int tot_uniq_verts) { GPU_Buffers *buffers; unsigned short *tri_data; @@ -1402,7 +1401,6 @@ GPU_Buffers *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface, if(buffers->index_buf) glGenBuffersARB(1, &buffers->vert_buf); - GPU_update_mesh_buffers(buffers, mvert, vert_indices, totvert); buffers->tot_tri = tottri; |