Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-08-16 12:50:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-16 12:51:46 +0300
commit846c11c8cfc2409fd8ed9b4d531124cf12c2ec28 (patch)
tree21b2cad109ec71771ad47cd60a3c90212b7c1800 /source/blender/editors/uvedit
parent18ce2bfac63046acb484857498caf0af7178c094 (diff)
Gawain: remove GWN_batch_discard_all
Use ownership flags instead.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c6
1 files changed, 4 insertions, 2 deletions
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 */