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/blenkernel/intern/subdiv_converter.h | |
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/blenkernel/intern/subdiv_converter.h')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_converter.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_converter.h b/source/blender/blenkernel/intern/subdiv_converter.h index 17172bc29f7..fa5b15fa8d0 100644 --- a/source/blender/blenkernel/intern/subdiv_converter.h +++ b/source/blender/blenkernel/intern/subdiv_converter.h @@ -33,8 +33,7 @@ #include "BKE_subdiv.h" /* NOTE: Was initially used to get proper enumerator types, but this makes - * it tricky to compile without OpenSubdiv. - */ + * it tricky to compile without OpenSubdiv. */ /* #include "opensubdiv_converter_capi.h" */ struct Mesh; @@ -46,21 +45,18 @@ void BKE_subdiv_converter_init_for_mesh(struct OpenSubdiv_Converter *converter, const struct Mesh *mesh); /* NOTE: Frees converter data, but not converter itself. This means, that if - * converter was allocated on heap, it is up to the user to free that memory. - */ + * converter was allocated on heap, it is up to the user to free that memory. */ void BKE_subdiv_converter_free(struct OpenSubdiv_Converter *converter); /* ============================ INTERNAL HELPERS ============================ */ /* TODO(sergey): Find a way to make it OpenSubdiv_VtxBoundaryInterpolation, - * without breaking compilation without OpenSubdiv. - */ + * without breaking compilation without OpenSubdiv. */ int BKE_subdiv_converter_vtx_boundary_interpolation_from_settings( const SubdivSettings *settings); /* TODO(sergey): Find a way to make it OpenSubdiv_FVarLinearInterpolation, - * without breaking compilation without OpenSubdiv. - */ + * without breaking compilation without OpenSubdiv. */ int BKE_subdiv_converter_fvar_linear_from_settings( const SubdivSettings *settings); |