diff options
author | Germano <germano.costa@ig.com.br> | 2017-12-19 04:17:55 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2017-12-19 04:17:55 +0300 |
commit | 24ca903f6d8f1e87c464b4a50c44c495cda11fec (patch) | |
tree | 0c7f409ce4f6c55d22c1ecdd48faf202d6b0be82 /source/blender/draw/intern/draw_cache_impl_curve.c | |
parent | 57f2cc918bdc846a4f5a85b7cabe6952055a4870 (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_curve.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_curve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_curve.c b/source/blender/draw/intern/draw_cache_impl_curve.c index 6d98195495f..ff8ffd76ac3 100644 --- a/source/blender/draw/intern/draw_cache_impl_curve.c +++ b/source/blender/draw/intern/draw_cache_impl_curve.c @@ -1043,7 +1043,7 @@ Gwn_Batch **DRW_curve_batch_cache_get_surface_shaded( for (int i = 0; i < gpumat_array_len; ++i) { cache->surface.shaded_triangles[i] = GWN_batch_create_ex( - GWN_PRIM_TRIS, cache->surface.verts, el[i], el[i] ? GWN_BATCH_OWNS_INDEX : 0); + GWN_PRIM_TRIS, cache->surface.verts, el[i], GWN_BATCH_OWNS_INDEX); /* TODO: Add vertbuff for UV */ } |