diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-30 00:52:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-30 14:43:33 +0300 |
commit | 596492e639f07b6a0a3f705a0f944dc57f94b7e4 (patch) | |
tree | 55f3dfa9ee3ad03c90954bec26f7c85157dc2d1b /source/blender/draw/engines/basic | |
parent | 32a2bfddcb4b0dedbea987ae3e335dc6aecdaed8 (diff) |
DRW: Refactor to use object pointer for drawcall by default
This cleans up a bit of duplicated code and some confusion about
what was culled and what wasn't.
Now everything is culled based on the given object pointer.
If the object pointer is NULL there is no culling performed.
Diffstat (limited to 'source/blender/draw/engines/basic')
-rw-r--r-- | source/blender/draw/engines/basic/basic_engine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c index a274eda84fe..beff451256d 100644 --- a/source/blender/draw/engines/basic/basic_engine.c +++ b/source/blender/draw/engines/basic/basic_engine.c @@ -154,7 +154,7 @@ static void basic_cache_populate(void *vedata, Object *ob) if (is_flat_object_viewed_from_side) { /* Avoid losing flat objects when in ortho views (see T56549) */ struct GPUBatch *geom = DRW_cache_object_all_edges_get(ob); - DRW_shgroup_call_object(stl->g_data->depth_shgrp, geom, ob); + DRW_shgroup_call(stl->g_data->depth_shgrp, geom, ob); return; } } @@ -164,7 +164,7 @@ static void basic_cache_populate(void *vedata, Object *ob) const bool do_cull = (draw_ctx->v3d && (draw_ctx->v3d->shading.flag & V3D_SHADING_BACKFACE_CULLING)); /* Depth Prepass */ - DRW_shgroup_call_object( + DRW_shgroup_call( (do_cull) ? stl->g_data->depth_shgrp_cull : stl->g_data->depth_shgrp, geom, ob); } } |