[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44293] trunk/blender/source/blender: Remove call to GPU_update_mesh_buffers from GPU_build_mesh_buffers.
Nicholas Bishop
nicholasbishop at gmail.com
Tue Feb 21 05:16:35 CET 2012
Revision: 44293
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44293
Author: nicholasbishop
Date: 2012-02-21 04:16:27 +0000 (Tue, 21 Feb 2012)
Log Message:
-----------
Remove call to GPU_update_mesh_buffers from GPU_build_mesh_buffers.
Building the mesh buffers already gets the PBVH_UpdateDrawBuffers flag
set, so this was double-updating the vertex buffer.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/pbvh.c
trunk/blender/source/blender/gpu/GPU_buffers.h
trunk/blender/source/blender/gpu/intern/gpu_buffers.c
Modified: trunk/blender/source/blender/blenlib/intern/pbvh.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/pbvh.c 2012-02-21 03:43:57 UTC (rev 44292)
+++ trunk/blender/source/blender/blenlib/intern/pbvh.c 2012-02-21 04:16:27 UTC (rev 44293)
@@ -420,11 +420,10 @@
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;
Modified: trunk/blender/source/blender/gpu/GPU_buffers.h
===================================================================
--- trunk/blender/source/blender/gpu/GPU_buffers.h 2012-02-21 03:43:57 UTC (rev 44292)
+++ trunk/blender/source/blender/gpu/GPU_buffers.h 2012-02-21 04:16:27 UTC (rev 44293)
@@ -159,10 +159,9 @@
/* 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,
Modified: trunk/blender/source/blender/gpu/intern/gpu_buffers.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_buffers.c 2012-02-21 03:43:57 UTC (rev 44292)
+++ trunk/blender/source/blender/gpu/intern/gpu_buffers.c 2012-02-21 04:16:27 UTC (rev 44293)
@@ -1333,10 +1333,9 @@
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 @@
if(buffers->index_buf)
glGenBuffersARB(1, &buffers->vert_buf);
- GPU_update_mesh_buffers(buffers, mvert, vert_indices, totvert);
buffers->tot_tri = tottri;
More information about the Bf-blender-cvs
mailing list