diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-16 12:50:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-16 12:51:46 +0300 |
commit | 846c11c8cfc2409fd8ed9b4d531124cf12c2ec28 (patch) | |
tree | 21b2cad109ec71771ad47cd60a3c90212b7c1800 /source/blender/gpu/intern/gpu_batch.c | |
parent | 18ce2bfac63046acb484857498caf0af7178c094 (diff) |
Gawain: remove GWN_batch_discard_all
Use ownership flags instead.
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index 92bab13dcb5..cb2b65d1a67 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -93,7 +93,7 @@ static Gwn_Batch *batch_sphere(int lat_res, int lon_res) } } - return GWN_batch_create(GWN_PRIM_TRIS, vbo, NULL); + return GWN_batch_create_ex(GWN_PRIM_TRIS, vbo, NULL, GWN_BATCH_OWNS_VBO); } static Gwn_Batch *batch_sphere_wire(int lat_res, int lon_res) @@ -125,7 +125,7 @@ static Gwn_Batch *batch_sphere_wire(int lat_res, int lon_res) } } - return GWN_batch_create(GWN_PRIM_LINES, vbo, NULL); + return GWN_batch_create_ex(GWN_PRIM_LINES, vbo, NULL, GWN_BATCH_OWNS_VBO); } Gwn_Batch *Batch_get_sphere(int lod) @@ -163,9 +163,9 @@ void gpu_batch_init(void) void gpu_batch_exit(void) { - GWN_batch_discard_all(sphere_low); - GWN_batch_discard_all(sphere_med); - GWN_batch_discard_all(sphere_high); - GWN_batch_discard_all(sphere_wire_low); - GWN_batch_discard_all(sphere_wire_med); + GWN_batch_discard(sphere_low); + GWN_batch_discard(sphere_med); + GWN_batch_discard(sphere_high); + GWN_batch_discard(sphere_wire_low); + GWN_batch_discard(sphere_wire_med); } |