From 846c11c8cfc2409fd8ed9b4d531124cf12c2ec28 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Aug 2017 19:50:27 +1000 Subject: Gawain: remove GWN_batch_discard_all Use ownership flags instead. --- source/blender/editors/uvedit/uvedit_smart_stitch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/uvedit') diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 55c439924cd..d75822cabe1 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1541,13 +1541,15 @@ static void stitch_calculate_edge_normal(BMEditMesh *em, UvEdge *edge, float *no normalize_v2(normal); } +/** + */ static void stitch_draw_vbo(Gwn_VertBuf *vbo, Gwn_PrimType prim_type, const float col[4]) { - Gwn_Batch *batch = GWN_batch_create(prim_type, vbo, NULL); + Gwn_Batch *batch = GWN_batch_create_ex(prim_type, vbo, NULL, GWN_BATCH_OWNS_VBO); Batch_set_builtin_program(batch, GPU_SHADER_2D_UNIFORM_COLOR); GWN_batch_uniform_4fv(batch, "color", col); GWN_batch_draw(batch); - GWN_batch_discard_all(batch); + GWN_batch_discard(batch); } /* TODO make things pretier : store batches inside StitchPreviewer instead of the bare verts pos */ -- cgit v1.2.3