diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-16 17:17:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-17 19:05:57 +0300 |
commit | 36cc42e79673bb15afeacdb674d925d8f8140046 (patch) | |
tree | 7f2f3ef63367982810742b816717f6f1f0a6214e /source/blender/draw/engines/basic/basic_engine.c | |
parent | bc74e48680134ff195d6e76ac58b3c19e31b2803 (diff) |
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.
Diffstat (limited to 'source/blender/draw/engines/basic/basic_engine.c')
-rw-r--r-- | source/blender/draw/engines/basic/basic_engine.c | 5 |
1 files changed, 1 insertions, 4 deletions
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 */ |