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 /intern/gawain | |
parent | 18ce2bfac63046acb484857498caf0af7178c094 (diff) |
Gawain: remove GWN_batch_discard_all
Use ownership flags instead.
Diffstat (limited to 'intern/gawain')
-rw-r--r-- | intern/gawain/gawain/gwn_batch.h | 7 | ||||
-rw-r--r-- | intern/gawain/src/gwn_batch.c | 16 |
2 files changed, 0 insertions, 23 deletions
diff --git a/intern/gawain/gawain/gwn_batch.h b/intern/gawain/gawain/gwn_batch.h index 96d519450b5..1dd4621f1a3 100644 --- a/intern/gawain/gawain/gwn_batch.h +++ b/intern/gawain/gawain/gwn_batch.h @@ -58,7 +58,6 @@ void GWN_batch_init_ex(Gwn_Batch*, Gwn_PrimType, Gwn_VertBuf*, Gwn_IndexBuf*, un GWN_batch_init_ex(batch, prim, verts, elem, 0) void GWN_batch_discard(Gwn_Batch*); // verts & elem are not discarded -void GWN_batch_discard_all(Gwn_Batch*); // including verts & elem int GWN_batch_vertbuf_add_ex(Gwn_Batch*, Gwn_VertBuf*, bool own_vbo); @@ -136,9 +135,3 @@ Gwn_Batch* create_BatchInGeneral(Gwn_PrimType, VertexBufferStuff, ElementListStu batch = NULL; \ } \ } while (0) -#define BATCH_DISCARD_ALL_SAFE(batch) do { \ - if (batch != NULL) { \ - GWN_batch_discard_all(batch); \ - batch = NULL; \ - } \ -} while (0) diff --git a/intern/gawain/src/gwn_batch.c b/intern/gawain/src/gwn_batch.c index 23160668ca8..c95b67e39cf 100644 --- a/intern/gawain/src/gwn_batch.c +++ b/intern/gawain/src/gwn_batch.c @@ -69,22 +69,6 @@ void GWN_batch_discard(Gwn_Batch* batch) free(batch); } -/* TODO, remove */ -void GWN_batch_discard_all(Gwn_Batch* batch) - { - for (int v = 0; v < GWN_BATCH_VBO_MAX_LEN; ++v) - { - if (batch->verts[v] == NULL) - break; - GWN_vertbuf_discard(batch->verts[v]); - } - - if (batch->elem) - GWN_indexbuf_discard(batch->elem); - - GWN_batch_discard(batch); - } - int GWN_batch_vertbuf_add_ex( Gwn_Batch* batch, Gwn_VertBuf* verts, bool own_vbo) |