diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-24 06:22:16 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-24 06:22:16 +0300 |
commit | 2cb45c993886c16b5b8e0e3187e1db5b92032d4f (patch) | |
tree | 8ddd0a3977aff304354ae8583ab9f820420f710a /source/blender/blenkernel/BKE_DerivedMesh.h | |
parent | e53ab2b9eccdc9b427beef4c045f297bb463c64c (diff) |
a place to cache draw data in DerivedMesh
DerivedMesh owns this cache and cleans up as part of DM cleanup. DM has no idea what is stored in this cache. Loose coupling FTW
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 789bc8df7e5..059f7309cf5 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -145,6 +145,10 @@ typedef DMDrawOption (*DMSetDrawOptions)(void *userData, int index); typedef DMDrawOption (*DMSetDrawOptionsMappedTex)(void *userData, int origindex, int mat_nr); typedef DMDrawOption (*DMSetDrawOptionsTex)(struct MTexPoly *mtexpoly, const bool has_vcol, int matnr); +/* Cleanup callback type */ +typedef void (*DMCleanupBatchCache)(void *batchCache); +void DM_set_batch_cleanup_callback(DMCleanupBatchCache); + typedef enum DMDrawFlag { DM_DRAW_USE_COLORS = (1 << 0), DM_DRAW_ALWAYS_SMOOTH = (1 << 1), @@ -183,6 +187,7 @@ struct DerivedMesh { int deformedOnly; /* set by modifier stack if only deformed from original */ BVHCache *bvhCache; struct GPUDrawObject *drawObject; + void *batchCache; DerivedMeshType type; float auto_bump_scale; DMDirtyFlag dirty; |