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:
authorGermano <germano.costa@ig.com.br>2017-12-17 03:22:21 +0300
committerGermano <germano.costa@ig.com.br>2017-12-17 03:22:21 +0300
commitc2ad5e805a4a26e6cc0f7959212f6d8b1285779d (patch)
tree0deeca5fa69fb393e147780fbb69fa234d485119 /source/blender/draw/intern/draw_cache_impl_curve.c
parent3713de163eb23dff3c43000c8d7ce0ef22046fa9 (diff)
Fix triangles indexbuf of Curve Displists was being discarded incorrectly
They were discarded when shaded surfaces were requested thus bringing glitches to the outline of the selected Displists Objects
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_curve.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_curve.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c
index 5a2ee2b0695..6d98195495f 100644
--- a/source/blender/draw/intern/draw_cache_impl_curve.c
+++ b/source/blender/draw/intern/draw_cache_impl_curve.c
@@ -810,8 +810,8 @@ static Gwn_Batch *curve_batch_cache_get_pos_and_normals(CurveRenderData *rdata,
if (cache->surface.triangles_in_order == NULL) {
cache->surface.triangles_in_order = DRW_displist_indexbuf_calc_triangles_in_order(lb);
}
- cache->surface.batch = GWN_batch_create_ex(
- GWN_PRIM_TRIS, cache->surface.verts, cache->surface.triangles_in_order, 0);
+ cache->surface.batch = GWN_batch_create(
+ GWN_PRIM_TRIS, cache->surface.verts, cache->surface.triangles_in_order);
}
return cache->surface.batch;
@@ -1021,7 +1021,6 @@ Gwn_Batch **DRW_curve_batch_cache_get_surface_shaded(
if (cache->surface.mat_len != gpumat_array_len) {
/* TODO: deduplicate code */
- GWN_INDEXBUF_DISCARD_SAFE(cache->surface.triangles_in_order);
if (cache->surface.shaded_triangles) {
for (int i = 0; i < cache->surface.mat_len; ++i) {
GWN_BATCH_DISCARD_SAFE(cache->surface.shaded_triangles[i]);