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-19 04:17:55 +0300
committerGermano <germano.costa@ig.com.br>2017-12-19 04:17:55 +0300
commit24ca903f6d8f1e87c464b4a50c44c495cda11fec (patch)
tree0c7f409ce4f6c55d22c1ecdd48faf202d6b0be82 /source/blender/draw/intern/draw_cache_impl_metaball.c
parent57f2cc918bdc846a4f5a85b7cabe6952055a4870 (diff)
Draw Manager: draw_cache_imp_displist, always return IndexBuf even when there is no index
This prevents possible errors with materials and a crash with low resolution metaball. Also a small cleanup was done in the code.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_metaball.c')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_metaball.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_metaball.c b/source/blender/draw/intern/draw_cache_impl_metaball.c
index 9a9bbbd2c0c..f01e7b929f8 100644
--- a/source/blender/draw/intern/draw_cache_impl_metaball.c
+++ b/source/blender/draw/intern/draw_cache_impl_metaball.c
@@ -133,10 +133,9 @@ Gwn_Batch *DRW_metaball_batch_cache_get_triangles_with_normals(Object *ob)
if (cache->batch == NULL) {
ListBase *lb = &ob->curve_cache->disp;
- Gwn_VertBuf *verts = DRW_displist_vertbuf_calc_pos_with_normals(lb);
cache->batch = GWN_batch_create_ex(
GWN_PRIM_TRIS,
- verts,
+ DRW_displist_vertbuf_calc_pos_with_normals(lb),
DRW_displist_indexbuf_calc_triangles_in_order(lb),
GWN_BATCH_OWNS_VBO | GWN_BATCH_OWNS_INDEX);
}