Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-01-25 11:16:29 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-01-25 12:01:48 +0300
commit99cfad6a015715a090fa2e1d808196dd1a02b390 (patch)
tree60fe28d57fe7881ac31f2028c666a4067d24f6f9 /source/blender/blenkernel/BKE_DerivedMesh.h
parent5be2a62ca3c93add06e606c05592f7f4a1530ddd (diff)
Convert MBC_ API to Mesh (instead of derived mesh) and move it to mesh_render
This includes a few fixes in the MBC_ api. The idea here is for this to be the only interface the render engines will deal with for the meshes. If we need to expose special options for sculpting engine we refactor this accordingly. But for now we are shaping this in a per-case base. Note: * We still need to hook up to the depsgraph to force clear/update of batch_cache when mesh changes (I'm waiting for Sergey Sharybin's depsgraph update for this though) * Also ideally we could/should use BMesh directly instead of DerivedMesh, but this will do for now. Note 2: In the end I renamed the `BKE_mesh_render` functions to `static mesh_render`. We can re-expose them as BKE_* later once we need it. Reviewers: merwin Subscribers: fclem Differential Revision: https://developer.blender.org/D2476
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 059f7309cf5..784c76bffd3 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -145,10 +145,6 @@ 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),
@@ -176,6 +172,8 @@ typedef enum DMDirtyFlag {
/* check this with modifier dependsOnNormals callback to see if normals need recalculation */
DM_DIRTY_NORMALS = 1 << 2,
+
+ DM_MESH_BATCH_CACHE = 1 << 3,
} DMDirtyFlag;
typedef struct DerivedMesh DerivedMesh;
@@ -187,7 +185,6 @@ 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;