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.
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user