From 36cc42e79673bb15afeacdb674d925d8f8140046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 16 Dec 2018 15:17:31 +0100 Subject: Mesh Batch Cache: Optimization & Refactor shaded surface support This now only upload data per loops to the GPU, making use of index buffer to draw polygon. This make use of the vertex cache, speed up renders and saves a lot of vram. Update performance is also slightly faster and can even be improved further by updating only uvs or vcol independently. This commits breaks texture paint batches. It will be added back in another commit. --- source/blender/draw/engines/basic/basic_engine.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/blender/draw/engines/basic') diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c index 8356838a885..9dc8c8f2f34 100644 --- a/source/blender/draw/engines/basic/basic_engine.c +++ b/source/blender/draw/engines/basic/basic_engine.c @@ -157,10 +157,7 @@ static void basic_cache_populate(void *vedata, Object *ob) } } - const bool is_active = (ob == draw_ctx->obact); - const bool use_hide = is_active && DRW_object_use_hide_faces(ob); - - struct GPUBatch *geom = DRW_cache_object_surface_get_ex(ob, use_hide); + struct GPUBatch *geom = DRW_cache_object_surface_get(ob); if (geom) { const bool do_cull = (draw_ctx->v3d && (draw_ctx->v3d->flag2 & V3D_BACKFACE_CULLING)); /* Depth Prepass */ -- cgit v1.2.3