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/curve.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/curve.c')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 10da97f5761..084af644588 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -52,7 +52,6 @@ #include "BKE_animsys.h" #include "BKE_curve.h" -#include "BKE_curve_render.h" #include "BKE_displist.h" #include "BKE_font.h" #include "BKE_global.h" @@ -4660,3 +4659,20 @@ void BKE_curve_eval_path(EvaluationContext *UNUSED(eval_ctx), printf("%s on %s\n", __func__, curve->id.name); } } + +/* Draw Engine */ +void (*BKE_curve_batch_cache_dirty_cb)(Curve *cu, int mode) = NULL; +void (*BKE_curve_batch_cache_free_cb)(Curve *cu) = NULL; + +void BKE_curve_batch_cache_dirty(Curve *cu, int mode) +{ + if (cu->batch_cache) { + BKE_curve_batch_cache_dirty_cb(cu, mode); + } +} +void BKE_curve_batch_cache_free(Curve *cu) +{ + if (cu->batch_cache) { + BKE_curve_batch_cache_free_cb(cu); + } +}
\ No newline at end of file |