diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-13 03:26:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-14 18:17:29 +0300 |
commit | 2afed99da3a8e76b8041e9f636fb198b332896cc (patch) | |
tree | 685db211975adce08a3b299e3eb9cbf7fb7a8d44 /source/blender/draw/intern/draw_cache_impl_metaball.c | |
parent | 77164e30c730be27910d92a666d4b6c2d2d30721 (diff) |
Curve Batch Cache: Rework Implementation to use new batch request
Shaded triangles are not yet implemented (request from gpumaterials).
This also changes the mechanism to draw curve normals to make it not
dependant on normal size display. This way different viewport can
reuse the same batch.
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_metaball.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_metaball.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_metaball.c b/source/blender/draw/intern/draw_cache_impl_metaball.c index 10f5db42bf1..304d93f465c 100644 --- a/source/blender/draw/intern/draw_cache_impl_metaball.c +++ b/source/blender/draw/intern/draw_cache_impl_metaball.c @@ -143,7 +143,7 @@ static GPUVertBuf *mball_batch_cache_get_pos_and_normals(Object *ob, MetaBallBat { if (cache->pos_nor_in_order == NULL) { ListBase *lb = &ob->runtime.curve_cache->disp; - cache->pos_nor_in_order = DRW_displist_vertbuf_calc_pos_with_normals(lb); + cache->pos_nor_in_order = DRW_displist_vertbuf_calc_pos_with_normals(lb, NULL); } return cache->pos_nor_in_order; } @@ -167,7 +167,7 @@ GPUBatch *DRW_metaball_batch_cache_get_triangles_with_normals(Object *ob) cache->batch = GPU_batch_create_ex( GPU_PRIM_TRIS, mball_batch_cache_get_pos_and_normals(ob, cache), - DRW_displist_indexbuf_calc_triangles_in_order(lb), + DRW_displist_indexbuf_calc_triangles_in_order(lb, NULL), GPU_BATCH_OWNS_INDEX); } @@ -204,7 +204,7 @@ GPUBatch *DRW_metaball_batch_cache_get_wireframes_face(Object *ob) if (cache->face_wire.batch == NULL) { ListBase *lb = &ob->runtime.curve_cache->disp; - cache->face_wire.batch = DRW_displist_create_edges_overlay_batch(lb); + cache->face_wire.batch = DRW_displist_create_edges_overlay_batch(lb, NULL); } return cache->face_wire.batch; |