diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-11 11:36:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-11 13:55:22 +0300 |
commit | c37ca437209f00ffe1b56cef2a5e8bbf390e669a (patch) | |
tree | 75f09f48e0c07cc18d5f87573344fcc65c80b9a8 /source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c | |
parent | 3eab8156d369f40de9d8c23672b1de28491ea920 (diff) |
OpenSubdiv: Changes in C-API
- Made OpenSubdiv_GLMesh private
Previously, it was still accessible via C-API from C++ code.
- Don't implicitly refine evaluator when updating coarse positions,
now there is an explicit call to do this.
Allows to first apply all changes to the coarse mesh and then
refine once.
- Added coarse positions update from a continuous buffer with given
starts offset and stride.
Allows to update coarse positions directly from MVert array.
- Refiner is no longer freed when CPU evaluator is created.
Allows to re-use refiner for multiple purposes.
Diffstat (limited to 'source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c')
-rw-r--r-- | source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c index fc4220277eb..46204898709 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c +++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv.c @@ -198,7 +198,7 @@ void ccgSubSurf_checkTopologyChanged(CCGSubSurf *ss, DerivedMesh *dm) ss->osd_topology_refiner = NULL; } - /* Reste CPU side. */ + /* Reset CPU side. */ if (ss->osd_evaluator != NULL) { openSubdiv_deleteEvaluatorDescr(ss->osd_evaluator); ss->osd_evaluator = NULL; @@ -523,6 +523,7 @@ static void opensubdiv_updateEvaluatorCoarsePositions(CCGSubSurf *ss) (float *)positions, 0, num_basis_verts); + openSubdiv_refineEvaluator(ss->osd_evaluator); MEM_freeN(positions); } |