diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-07-01 12:07:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-07-01 12:29:22 +0300 |
commit | 0a026033ae46c83a84fcca54112190e1aa80d51f (patch) | |
tree | 0a8b4e77b0247a6b480c3d9c82953dd25cf3b5bc /source/blender/bmesh/intern/bmesh_mesh.h | |
parent | 4b0aeaf327d383ec760171261a1087abbb714d04 (diff) |
BMesh: make toolflags optional
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h index b9cdc4ccf66..c071205e9f5 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.h +++ b/source/blender/bmesh/intern/bmesh_mesh.h @@ -32,7 +32,14 @@ struct MLoopNorSpaceArray; void BM_mesh_elem_toolflags_ensure(BMesh *bm); void BM_mesh_elem_toolflags_clear(BMesh *bm); -BMesh *BM_mesh_create(const struct BMAllocTemplate *allocsize); + +struct BMeshCreateParams { + unsigned int use_toolflags : 1; +}; + +BMesh *BM_mesh_create( + const struct BMAllocTemplate *allocsize, + const struct BMeshCreateParams *params); void BM_mesh_free(BMesh *bm); void BM_mesh_data_free(BMesh *bm); @@ -113,10 +120,4 @@ extern const BMAllocTemplate bm_mesh_chunksize_default; #define BMALLOC_TEMPLATE_FROM_DM(...) VA_NARGS_CALL_OVERLOAD(_VA_BMALLOC_TEMPLATE_FROM_DM_, __VA_ARGS__) - - -enum { - BM_MESH_CREATE_USE_TOOLFLAGS = (1 << 0) -}; - #endif /* __BMESH_MESH_H__ */ |