diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-21 14:14:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-21 15:06:06 +0300 |
commit | bfa888cef28955501195dfbee002bc793685e527 (patch) | |
tree | a7ed19cdc57089f3c728337761bd08a23764814d /source/blender/blenkernel/intern/lattice.c | |
parent | c7f00feabaa334cd839a9e7904ee0fc1b8d8d718 (diff) |
Cleanup: move draw-cache creation from BKE to DRW
Creating draw-cache should only ever be used by the draw-manager.
Diffstat (limited to 'source/blender/blenkernel/intern/lattice.c')
-rw-r--r-- | source/blender/blenkernel/intern/lattice.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index c567f9b0d6f..c03aa0cd155 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -57,7 +57,6 @@ #include "BKE_global.h" #include "BKE_key.h" #include "BKE_lattice.h" -#include "BKE_lattice_render.h" #include "BKE_library.h" #include "BKE_library_query.h" #include "BKE_library_remap.h" @@ -1234,3 +1233,19 @@ void BKE_lattice_eval_geometry(struct EvaluationContext *UNUSED(eval_ctx), { } +/* Draw Engine */ +void (*BKE_lattice_batch_cache_dirty_cb)(Lattice *lt, int mode) = NULL; +void (*BKE_lattice_batch_cache_free_cb)(Lattice *lt) = NULL; + +void BKE_lattice_batch_cache_dirty(Lattice *lt, int mode) +{ + if (lt->batch_cache) { + BKE_lattice_batch_cache_dirty_cb(lt, mode); + } +} +void BKE_lattice_batch_cache_free(Lattice *lt) +{ + if (lt->batch_cache) { + BKE_lattice_batch_cache_free_cb(lt); + } +}
\ No newline at end of file |