diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-15 17:34:11 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-01-16 13:00:43 +0300 |
commit | b0c6c65e7b45bf66f2f9e0aa3718be7eb0f72f81 (patch) | |
tree | 74f3aeb53634bd80bdca4d5626ee9e8fe09b5caf /source/blender/makesdna | |
parent | e064777cac02a065e20a9453f6d2a03651250d56 (diff) |
Subdiv: Initial implementation of topology cache
This commit makes it so OpenSubdiv's topology refiner is kept
in memory and reused for until topology changes. There are the
following modifications which causes topology refiner to become
invalid:
- Change in a mesh topology (for example, vertices, edges, and
faces connectivity).
- Change in UV islands (adding new islands, merging them and
so on),
- Change in UV smoothing options.
- Change in creases.
- Change in Catmull-Clark / Simple subdivisions.
The following limitations are known:
- CPU evaluator is not yet cached.
- UV islands topology is not checked.
The UV limitation is currently a stopper for making this cache
enabled by default.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_modifier_types.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 6b71e6512a6..30c093ab3a8 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -34,6 +34,7 @@ struct Mesh; struct Scene; +struct Subdiv; typedef enum ModifierType { eModifierType_None = 0, @@ -167,7 +168,10 @@ typedef struct SubsurfModifierData { short quality; short pad[2]; + /* TODO(sergey): Get rid of those with the old CCG subdivision code. */ void *emCache, *mCache; + /* Cached subdivision surface descriptor, with topology and settings. */ + struct Subdiv *subdiv; } SubsurfModifierData; typedef struct LatticeModifierData { |